Commit Graph
333 Commits
Author SHA1 Message Date
Friedrich W. H. Kossebau f4d293645d Rename OpDeleteParagraphStyle to OpRemoveParagraphStyle 2013-08-08 16:26:03 +02:00
Friedrich W. H. Kossebau 4322b22858 Rename everything with "[Uu]ser|[Ppeople]" to "[Mm]ember"
consolidates the terms used a little
2013-08-07 18:03:19 +02:00
Friedrich W. H. Kossebau de12e14614 Remove unset var userid and legacy code for ensuring a memberid in Editor constructor 2013-08-07 15:38:57 +02:00
Aditya Bhatt 825a44affc * OpAddAnnotation that lets you create annotations. This only creates an
annotation-end node if the length of the selection > 0.
* Adds a button to the editor to add an annotation at the given cursor position
or selection
* A bad hack in AnnotationViewManager: The dc:creator of
a created annotation is initially empty because the operation has no
way to access the user model even if it knows the memberid. The
SessionView has a new rule for editinfo:memberid attributes that sets
the CSS content: attribute to the user name. AnnotationViewManager,
for now, will read this CSS property and set the text of dc:creator to
that; at least till we have a better way to access the usermodel in
the future
* Rerenders annotations when an annotation is added for tracking (like upon creation)
* SessionView gets a way to concretely specify the CSS pseudo-class for a rule (:before, :after, etc)
* enableAnnotations only allows handles annotations if the allow value
changes
* Add translation strings for annotate
2013-08-05 19:16:32 +02:00
Friedrich W. H. Kossebau cce094b2c1 turn OpCloneParagraphStyle into OpAddParagraphStyle
having all the data in the spec not only helps/enables OT, but also
makes it possible to create styles in documents without any prior existing
2013-08-01 20:00:44 +02:00
Aditya Bhatt d618dd44f0 Add another note to welcome.odt to demonstrate the angular connectors 2013-08-01 19:05:23 +02:00
Aditya Bhatt 374ffc2fbc * Allow annotations to be enabled/disabled via OdfCanvas
* Documentation++
* Enable annotations by default in editor and viewer.
* Detach range in highlighter after use

Also: Annotation handling is broken when annotations overlap. Add TODO for
that.
2013-08-01 16:17:08 +02:00
Aditya Bhatt 302cc7a283 *Add an annotationsPane and position annotations onto it by styling them
via CSS
*Refactoring: Move common functions from TextStyleApplicator to DomUtils
and OdfUtils.
*Allow application of 'gui' style (with an annotation: namespace) in
TextStyleApplicator and Formatting.
*More CSS for annotations.
*Make OdfCanvas handle annotations.

Add an annotation:connector element to the highlight span for a dotted
line
2013-08-01 16:14:58 +02:00
Friedrich W. H. Kossebau e1dcfbdec5 Revert "Do not set an undoManager if there is a server, no server yet integrated with local undo"
This reverts commit 7c381891ba.
2013-07-31 20:32:10 +02:00
Friedrich W. H. Kossebau 7c381891ba Do not set an undoManager if there is a server, no server yet integrated with local undo 2013-07-31 19:59:17 +02:00
Friedrich W. H. Kossebau 0ad093545b set cursor to "pointer" for the session items in the SessionListView 2013-07-31 19:29:23 +02:00
Friedrich W. H. Kossebau b10f41de7b Rename "OpApplyStyle" to "OpApplyDirectStyling" and its spec elemnt "info" to "setProperties" 2013-07-30 12:05:09 +02:00
Friedrich W. H. Kossebau ac2cb8c005 Change spec of ops.OpUpdateParagraphStyle to take real ODF properties as payload for "setProperties" 2013-07-29 16:10:52 +02:00
Philip Peitsch f25d936355 Removing a cursor will now cause the associated caret to be removed
Removing the local cursor (e.g., calling SessionController.endEditing)
previously left behind an orphaned caret that would continue to receive
focus/blur commands and attempt to remain visible. This would cause an
error to be thrown after most operations.

This change turns CaretFactory into a manager that is responsible for
proper disposal of carets unpon the corresponding cursor's removal from
the document.
2013-07-26 22:26:11 +10:00
Lu Li c75f303cfb handle shortcuts for applying bold, italic & underline 2013-07-24 09:58:17 +02:00
Philip Peitsch cf3445e493 Added configurable option to suppress the caret when a range is selected
Various editors have inconsistent behaviour on this front.
* LibreOffice (Mac) - always blinks even with range select
* Firefox, Chrome, Word (Mac) - hides the caret on range
2013-07-24 01:26:58 +02:00
Lu Li 0eff2c6a0a Refactor odf.Formatting class
* move getTextNode from OdfUtils to StyleHelper
* move some of the unit tests under FormattingTests to StyleHelperTests
2013-07-22 16:47:42 +02:00
Friedrich W. H. Kossebau 455839d83b Add german translations for new strings 2013-07-22 12:15:00 +02:00
Philip Peitsch 2fc0ab536c Editor style buttons shouldn't crash if selection has no applied styles 2013-07-15 09:40:50 +02:00
Jos van den Oever 1dd372b23c Fix invalid css. 2013-07-10 22:49:52 +02:00
Jos van den Oever edcabfa249 Move addition of undo manager to before the widgets are initialized.
This way, the ui actually detects that there is an undo manager.
2013-07-10 16:09:23 +02:00
Jos van den Oever 8e633684bc JSLint fixes. 2013-07-10 15:51:03 +02:00
Jos van den Oever aa8c2b8c19 Include FileSaver.js in the editor build. 2013-07-10 13:09:02 +02:00
Jos van den Oever 5ba3664284 Fix dojo paths in the editor to be relative. 2013-07-10 13:00:54 +02:00
Jos van den Oever 3d367b2aed Add load and save buttons to the editor.
Due to the use of FileReader and Blob this will not work in older browsers.
2013-07-10 11:02:57 +02:00
Jos van den Oever 087196110c Omit release zips from the default builds. 2013-07-09 10:53:01 +02:00
Philip Peitsch a3dd2374dd SessionController now better hides absence of an undo manager
Consumers of the SessionController would all need to check if and how
undo was supported. As a result, it makes more sense to simply expose
the necessary signals for UI purposes, and encapsulate how the signals
are bound inside SessionController
2013-07-09 02:18:34 +10:00
Philip Peitsch e2b477968f Implemented trivial singler-user only undo manager
This manager supplies really simple undo and redo behaviour. Undo is
achieved by resetting the document back to the initial state, and
replaying all operations on top of it.

This undo mechanism is not suitable for a networked operation sessions
as there is no attempt to communicate the resetting of the document
state.

Initial undo state for a document is set when startEditing is called on
a session. This state is effectively a clean document with the local
cursor added to it.

* Added undo/redo buttons to the editor
2013-07-09 01:48:24 +10:00
Friedrich W. H. Kossebau a9e386a7a0 Fixup API dox of EditorSession.updateParagraphStyle() 2013-07-05 12:44:02 +02:00
Friedrich W. H. Kossebau 78b24d2f4a remove broken disable/enableEditHighlighting
these days only results in AvatarStyleInfo missing after replay for those members
whose cursors are added during the replay and for which the userdata arrives
already before the replay is finished, so that setAvatarInfoStyle() is never
called for them (unless there is an update on the userdata, but that rarely
happens)
2013-07-04 23:04:15 +02:00
Friedrich W. H. Kossebau f558e33231 During initial ops replay there is no own cursor yet added, so either test for the cursor or do not do cursor-using things 2013-07-03 14:57:28 +02:00
Friedrich W. H. Kossebau f6c017a7f3 in ops.OpUpdateParagraphStyle split info into setProperties & removedProperties
using value "null" for "remove" and "undefined" for "skip" is hard/impossible to map to other languages
2013-07-02 22:58:43 +02:00
Friedrich W. H. Kossebau c71bdb30bf Remove unused property "styleNameBefore" from spec of ops.OpSetParagraphStyle 2013-07-02 22:35:49 +02:00
Philip Peitsch ec2e72a58b Editor uses direct formatting for applying font style changes 2013-07-02 21:19:36 +02:00
Jos van den Oever eecfa4d201 Remove trailing spaces and tabs. 2013-06-19 16:47:52 +02:00
Friedrich W. H. Kossebau 55fc7ab9c6 Switch code to use Node.${XXX}_NODE instead of magic values 2013-06-17 13:49:07 +02:00
Jos van den Oever 6d3bbcc6af Make cdn-index.html independent of the server directory. 2013-06-11 15:06:33 +02:00
Aditya Bhatt ad8199e4cd Don't fire onChange when setting BIUS checked-state programmatically 2013-05-23 14:46:03 +02:00
Jos van den Oever 1c574d4cc9 Fix JSLint issues. 2013-05-14 09:55:46 +02:00
Friedrich W. H. Kossebau 818e4f3a5a ensure consistency between all code which gets the paragraph element in which a given cursor is inside 2013-05-08 14:48:31 +02:00
Friedrich W. H. Kossebau ae7afd4930 No need for height setting in CSS rule for #canvas in editor.js, is overwritten by odf.OdfCanvas 2013-04-24 11:22:48 +02:00
Philip Peitsch f709b07228 Implemented OpInsertTable
* No GUI access to feature yet
* New tables are inserted after the current paragraph
2013-04-17 21:28:45 +10:00
Jos van den Oever e21635d074 Fix parallelization of cmake build.
There is a remark in the CMake documentation that says:
  Do not list the output in more than one independent target that may build in parallel or the two instances of the rule may conflict (instead use add_custom_target to drive the command and make the other targets depend on that one).
This patch makes sure that that advice is followed in many more places in the WebODF build.
2013-04-16 11:40:40 +02:00
Friedrich W. H. Kossebau 6e7e3fe55f Rename OpCloneStyle to OpCloneParagraphStyle, OpDeleteStyle to OpDeleteParagraphStyle 2013-04-10 12:15:07 +02:00
Friedrich W. H. Kossebau d5c27b7892 Extend callbacks in the editorOptions: cursorAddedCallback, cursorRemovedCallback, registerCallbackForShutdown 2013-04-10 10:40:16 +02:00
Friedrich W. H. Kossebau 6f5ced4d1e Do not pass session as parameter to the ops contructors, pass odtDocument instead of domroot in the execute method 2013-04-09 13:45:33 +02:00
Friedrich W. H. Kossebau 7868d6bfa3 Move eventNotifier from ops.Session to ops.OdtDocument 2013-04-09 13:45:33 +02:00
Friedrich W. H. Kossebau dade008500 Add core.EventNotifier, as generic notification handler for both ops.Session and EditoSession 2013-04-09 13:44:49 +02:00
Friedrich W. H. Kossebau 54b3a1381c move all DOM manipulation code to the ops
Also:
* merge paragraphEdited event of ops.OdtDocument into paragraphChanged event of ops.Session
* remove any event subscription/emitting from ops.OdtDocument
2013-04-09 13:44:49 +02:00
Philip Peitsch 1ecc0ec1f9 JSDoc cleanups and dead code removal
* Removed some unused variables and methods
* Removed redundant variable initialisation
* cursorNode in OdtCursor and Cursor is always set to a valid DOM element. Updated jsdoc accordingly
* Ignore WebStorm project-related files
2013-04-09 12:07:56 +10:00