Commit Graph
315 Commits
Author SHA1 Message Date
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
Philip Peitsch 259b203d21 Avatars and modification markers are hidden by default for a non-networked editing session
* The avatar image will not be loaded if the avatar is not visible. The image will be loaded when the avatar is next shown
2013-04-09 12:07:14 +10:00
Tobias Hintze 7455add5fc booting the editor: expose saveCallback and loginProcedure 2013-04-08 16:49:47 +02:00
Friedrich W. H. Kossebau 95d923dc26 Remove unused/unneeded property "position" from OpUpdateParagraphStyle 2013-04-03 18:00:20 +02:00
Tobias Hintze 8c13d0da0e boot_editor.js and Editor cleanup round2:
most notable: untangle init_gui_and_doc:
  provide clean chain of callbacks,
  separate collaborative/network hookup from document loading,
  changeSomeNames, comments and declarations
2013-04-03 13:37:17 +02:00
Tobias Hintze 66eb0054d0 rename SessionImplementation to Session (and thus remove the Session-interface) 2013-03-26 14:15:02 +01:00
Tobias Hintze 2af73a06bd implement the updated concept of getUserDetailsAndUpdates;
adds quite some comments and asserts
2013-03-26 09:37:14 +01:00
Aditya Bhatt 1a7f6a6dd7 Some avatar handle styling changes.
In webodf, the handle's image's border is set with the user's color
instead of the handle background. Also, the cursor span is changed to
2px width for better visibility.
In editor.css, custom CSS overrides are applied to make the handles look
very much like the avatar 'thumbnails' in the people sidebar.
2013-03-26 13:46:54 +05:30
Aditya Bhatt d543584eea whitespace 2013-03-26 13:46:25 +05:30
Aditya Bhatt aa02bf59c6 Need to enclose the dropdownbutton text span within a span, because dojo
restructures the html upto the first descendant span
2013-03-26 13:46:25 +05:30
Aditya Bhatt eacdba133c Fix wrong alignment when strings are too long 2013-03-26 13:46:25 +05:30
Tobias Hintze 28eaa42dc8 make webodf/Editor a class; change getin.js to boot_editor.js 2013-03-26 09:07:59 +01:00
Aditya Bhatt e8e98928e6 if(value) 2013-03-25 15:52:57 +05:30
Aditya Bhatt 21f7e5fff4 Better handling of undefined font family in fontPicker 2013-03-25 15:52:57 +05:30
Aditya Bhatt a1354b010e Some changes to handle undefined font families 2013-03-25 15:52:57 +05:30
Aditya Bhatt df17d620c7 Add a getFamily method to fontPicker, which retrieves the family for a
font with a given name. Use this in the font pane so that we can see
previews for fonts.
2013-03-25 15:52:57 +05:30
Tobias Hintze 7a9e7c50c7 whitespaces 2013-03-20 22:26:01 +01:00
Tobias Hintze e97953f6f1 programs/editor/widgets: make two panes work in a subdir as well 2013-03-20 20:47:03 +01:00
Tobias Hintze c23067a494 removing verbosity on js console 2013-03-20 15:48:21 +01:00