Commit Graph
493 Commits
Author SHA1 Message Date
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 92102b5168 Whitespace fixes. 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
Aditya Bhatt 48904fcc24 New changes to viewer deemed necessary after writing a PDF plugin:
* Reduced the number of getElementById calls for some often-used elements
* Added canvasContainer.onscroll handling - which will call the onScroll
of the viewer plugin, if present; for example for updating page numbers
or updating the rendering (if we are using lazy loading)
* Added a delayedRefresh() function which starts a timeout to run the
onScroll() function for lazy rendering refresh, but unloads the previous
timeout if delayedRefresh() is called again, so you can resize the
window rapidly as much as you want and as long as you want and the
rendering redraw will only happen 300 milliseconds after you stop doing
that. (In case of ODF, this will still seem butter-smooth and
continuously resizing because it's just CSS scaling, and no canvas
redrawing since the onScroll of ODFViewerPlugin is not defined)
* Added several small fixes suggested by Jos
2013-07-05 13:47:23 +02:00
Aditya Bhatt 41b6655d2b Always call fixContainerSize when switching pages via the PageSwitcher,
to account for slide dimensions (which may not be the same as the entire
document's size)
2013-07-05 13:47:22 +02:00
Aditya Bhatt 290832d755 Use evt.keyCode instead of keyIdentifier, more crossplatform 2013-07-05 13:47:22 +02:00
Aditya Bhatt dda70df798 Remove methods that should not be directly accessible, from the viewer
api.
Apidox++
2013-07-05 13:47:22 +02:00
Aditya Bhatt a932baac8a Make the slideshow flag into a method, and make the logic for displaying
toolbars more clear
2013-07-05 13:47:22 +02:00
Aditya Bhatt 21d92bb0e6 Remove unneeded variables, fix zooming 2013-07-05 13:47:22 +02:00
Aditya Bhatt 9ed4acb905 Refactor and make API
Rename viewer.js to ODFViewerPlugin.js
Add a viewer.js and pull non-odf specific methods into this API from
the ODF plugin

Initialize Viewer with ODFViewerPlugin during window.onload
2013-07-05 13:47:22 +02: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
Jos van den Oever f3da300fa7 Add version number to php code. 2013-06-17 14:25:46 +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
Tobias Hintze ffcb7d1996 improve wordpress plugin
(by removing features)
2013-06-13 16:54:55 +02:00
Jos van den Oever 8b9f1a040a Put webodf components in wv/ directory in the wordpress plugin. 2013-06-13 16:53:27 +02:00
Jos van den Oever a13239457b Do not put wordpress files in a dir in the zip file. 2013-06-13 16:38:01 +02:00
Jos van den Oever 8476050295 Rewrite xpi creation and add xpi to main zip. 2013-06-13 15:32:41 +02:00
Jos van den Oever 9b83512ada Add wordpress plugin as zipped file. 2013-06-13 15:32:41 +02:00
Jos van den Oever 54b9e14086 Remove unneeded targets. 2013-06-13 15:32:41 +02:00
Jos van den Oever afea6bfd74 Zip viewer, editor and wordpress in to a single zip file. 2013-06-13 15:32:41 +02:00
Aditya Bhatt c7aa8ff852 Make viewer runnable from source directory 2013-06-12 12:35:58 +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
Friedrich W. H. Kossebau a3ba82f92a Turn odf.Namespace from a class into a singleton object 2013-04-18 14:26:09 +02:00
Friedrich W. H. Kossebau 7741d55f2e Create new class odf.Namespaces 2013-04-18 10:46:24 +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