Commit Graph
42 Commits
Author SHA1 Message Date
Friedrich W. H. Kossebau 3758ebf9e5 Add flag "showRemoveButton" to AnnotationViewManager, to not show the button if wanted 2013-12-12 18:07:42 +01:00
Friedrich W. H. Kossebau 62db9e22fe Add API dox for Editor.addEventListener, with possible event ids and error codes 2013-12-03 18:32:40 +01:00
Friedrich W. H. Kossebau 50f18a109e For OperationRouter turn explicit subscription methods into generic ones + explicit state getters 2013-12-03 18:32:40 +01:00
Friedrich W. H. Kossebau 42c5a7c617 Export errors and other oprouter states in the Editor API, experimental use in collabeditor.js 2013-12-03 18:32:39 +01:00
Friedrich W. H. Kossebau 14bf18d40d Catch any errors in the OperationRouter & calling the server and report in separate callback 2013-12-03 17:03:55 +01:00
Aditya Bhatt e16cc38edb == Op-ify member data handling ==
* New operations: OpAddMember, OpRemoveMember,
OpUpdateMember.
* Member data is now handled in a memberDataManager
instance inside OdtDocument.
* Any operations must be executed only if a member
is present within this model.
* All polling code for member data has been removed;
colors, names, and images now instantly update
whenever a member data operation is executed.
* Added relevant entries to the OT Matrix.
2013-11-20 18:56:47 +01:00
Friedrich W. H. Kossebau db0ecac6ee Make directTextStyler no longer optional, now that it works also in collab mode 2013-11-15 15:30:32 +01:00
Aditya Bhatt 2dcd55205b Have dedicated Editor.closeDocument and Editor.closeSession
methods to correspond to openDocument and openSession.
Remove unused EditorSession.close method, not sure what it was
used for.
2013-11-14 21:47:26 +01:00
Friedrich W. H. Kossebau 72cd3888a1 Add backend for pullbox-type server to programs/editor 2013-11-07 10:51:01 +01:00
Aditya Bhatt 6a4f0e69ab Add translations support to runtime.js,
and programs/editor/Translator.js which is a reference
implementations of a translator.
The programs/editor/Translator code is used entirely in
localeditor.js/collabeditor.js and the editor itself, or webodf,
and need not know anything about the translation mechanism.

Translate all strings within the editor and all
user-facing strings in webodf core itself using
runtime.tr();
2013-11-05 18:38:41 +01:00
Friedrich W. H. Kossebau c2a795e668 Update link to repo: now https://github.com/kogmbh/WebODF/ 2013-10-23 18:20:30 +02:00
Friedrich W. H. Kossebau 508570dab8 Add copy of the AGPL3 to sources (+ add to created zip files) 2013-10-21 17:55:16 +02:00
Friedrich W. H. Kossebau 55e6322bf7 Little fixes in editor code that closure compiler did not like 2013-10-07 10:45:41 +02:00
Philip Peitsch 84e221082f Allow event focus to be returned to SessionController without scrolling to the top of the ODF canvas
Element.focus() has additional logic that attempts to bring the top of
the element into view. This causes the a document that has been vertically
scrolled to reset back to the top of the document each time an Editor
button is clicked.

This redesign abstracts the event management away, and uses an invisible
div as the primary event trap. Because the div is always visible and
centred, the browser does not perform any scrolling. Non-bubbling events
are automatically forwarded from the event trap to subscribers.

Fixes Issue #44
2013-10-04 19:24:13 +02:00
Philip Peitsch 3f6790ef5f Add insert image button to the editor 2013-10-02 16:37:49 +10:00
Friedrich W. H. Kossebau 67c7941757 Remove out-dated editing code from odf.OdfCanvas 2013-09-24 15:13:28 +02:00
Friedrich W. H. Kossebau 55d5ac8ac8 Add callback to set focus to canvas once done to most tools in the toolbar 2013-09-16 18:45:19 +02:00
Friedrich W. H. Kossebau eb57ef2def Add gui.DirectTextStyler, a UI-less tool specialized on direct styling of text 2013-09-10 13:02:28 +02:00
Friedrich W. H. Kossebau 1f7469884f redo class Editor (for proper re-usage and also destruction)
* Editor can have three states: without a document/session, with a document/session, destroyed
* Editor is created without any document/session initially
* document/session has to be closed before loading another one
* EditorSession/Session are bound to a document/session, recreated for another one
* all other objects are reused with another document/session
* destroy() cleans up the Editor from the webpage it is embedded (at least good enough for now)
* startEditing/endEditing have to be done by the user of Editor
2013-09-03 01:02:48 +02:00
Friedrich W. H. Kossebau d12da85554 Add an optional Close button to the toolbar 2013-09-03 01:02:48 +02:00
Friedrich W. H. Kossebau 870aba86ab Add argument unstableFeaturesEnabled to Editor, disable direct styling & annotations for collab sessions 2013-09-03 01:02:47 +02:00
Friedrich W. H. Kossebau 479ecd79f8 Turn widgets.js into Tools.js, make tools work without a editorSession object set 2013-09-03 01:02:47 +02:00
Friedrich W. H. Kossebau f2b56083e6 add a ops.Server interface + a ServerFactory interface, move Nowjs-based server stuff into programs/editor/server/nowjs
MemberModel, SessionList, and OperationRouter are proxy classes which use
the server object to communicate with the server, while the server does
not always need to know about them
e.g. some server could not provide a SessionList, while another could have
that and more, while sharing the same basic server protocol.
Thus the serverfactory instance is separated from the server instance.
2013-08-28 16:33:49 +02:00
Friedrich W. H. Kossebau 6c1864c574 Rename MemberList to MemberListView 2013-08-18 20:13:29 +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 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
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
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
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 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
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 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 d5c27b7892 Extend callbacks in the editorOptions: cursorAddedCallback, cursorRemovedCallback, registerCallbackForShutdown 2013-04-10 10:40:16 +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
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 28eaa42dc8 make webodf/Editor a class; change getin.js to boot_editor.js 2013-03-26 09:07:59 +01:00