Commit Graph
598 Commits
Author SHA1 Message Date
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 6d9fa2108b Remove no longer needed spans for menubar (slipped the last cleanup it seems) 2013-11-20 18:46:38 +01:00
Friedrich W. H. Kossebau 248e35ad8b Rename AnnotationManager to AnnotationController
also call do not call AnnotationViewManager objects not annotationManager
2013-11-19 19:56:15 +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
Philip Peitsch ba18df5017 Add profiling and performance application
Custom documents can be specified in the url by adding
the file-name after the url #. E.g., "src-index.html#1000pages.odt"
2013-11-13 17:39:18 +11: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
Tobias Hintze 84cd8e1a03 build utility: remove double shift for mergeIntoDojo.js
(that bug did not surface before because the utility
was always used with exactly one mergee)
2013-11-04 21:50:36 +01:00
Aditya Bhatt e74d7d2dca Properly destroy all dojo widgets when Tools is destoy()'d 2013-10-23 20:48:23 +02: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 f9249c08b8 Fix regression: fonts listed in resources/fonts/fonts.css became ignored
fixup for b426aab73f
2013-10-18 15:38:26 +02:00
Friedrich W. H. Kossebau 80e75c6b73 Separate annotation handling logic into a tool class AnnotationManager and UI into a editor/widgets/annotation.js
Also enable "Add annotation" button only if not inside annotations
2013-10-16 17:20:14 +02:00
Philip Peitsch 1ff4d6f9ec Upgrade from magical empty-string to const for shadow cursor memberId
In various parts of the code, the magical empty-string cursor id is used
to determine whether the object is a shadow cursor or not. Converting
this into a constant instead and removing the constructor arg prevents
some mistakes being made with this.
2013-10-16 21:43:00 +11:00
lli 94ceb41a03 Disable font and paragraph formating toolbar items on the editor when image is selected.
LO/AOO actually hides those options.
2013-10-15 21:42:21 +11:00
Aditya Bhatt aae55aca50 * Add a new ShadowCursor class. This class is meant, for now, to only
hold the 'selected range' fed to it, like with any other OdtCursor. It
provides a minimal OdtCursor-like interface, with only the methods
absolutely required to make it work. It does not modify the DOM in any
way.
* Make the shadowCursor object an instance of ShadowCursor, not
OdtCursor. This is ideal because ShadowCursor does not modify anything
in the DOM, and therefore is safer and faster to use for tracking
browser selections. This makes backwards-selections work finally,
because now there are no anchor nodes to interfere with the selection
whilst dragging.
* With the introduction of the ShadowCursor, we no longer have the
selection range's endpoints coinciding the with beginning and end of the
respective startContainer and endContainer. Therefore, modify
getExtremeRanges to reflect this. If an endpoint of the selection range
does not lie within a TextNode, we latch on to the nearest text node
within.
* In the SessionController, call maintainShadowSelection() if the
selection might leak outside the allowed local root, so that the
window selection object remains root-confined.
* Clone ranges if they may be later modified.
Properly detach ranges once they are used in SelectionView, less
memory leaks.
2013-10-15 11:44:24 +02:00
Aditya Bhatt b426aab73f Add a SelectionView class that can be initialized with a cursor, a
SelectionViewManager that maintains SelectionView instances, and a
shadow cursor object that is an invisible caret-less cursor, fed to both
SessionController and SessionView, which follows the selection as it
changes.
Selections by each cursor are colored according to their memberid
2013-10-15 11:44:23 +02:00
Friedrich W. H. Kossebau 094151847f Improve ImageInserter: use img.onload, drop hidden image helper after usage, call onToolDone only when really done 2013-10-07 11:50:36 +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
Friedrich W. H. Kossebau 7e95109b06 Update CDN versions to use dojo 1.8.3 2013-10-04 19:24:13 +02:00
Friedrich W. H. Kossebau f46bb9e502 Change ops.OperationRouter.push to take a sequence of ops
Taking a sequence of ops also enables to give the guarantee that all
contained operations will be executed directly after each other,
in the given order. So creator of the ops can calculate the spec of each op
by relying on the known effect of the other ops.
2013-10-02 19:29:52 +02:00
Philip Peitsch 3f6790ef5f Add insert image button to the editor 2013-10-02 16:37:49 +10:00
Friedrich W. H. Kossebau 72b0e29996 <script/></script> -> <script></script> 2013-09-27 17:26:18 +02:00
Friedrich W. H. Kossebau f1933da020 Fix localeditor/collabeditor.html to check for navigator.language before using it, IE does not have it 2013-09-27 17:11:55 +02:00
Aditya Bhatt 30d8bff132 Stop handling keyboard input on the font size picker because dojo does
not yet afford enough control and we want to not let it steal focus.
2013-09-24 16:57:10 +02: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 297562afb3 Consistency: "named" style -> "common" style 2013-09-20 18:50:29 +02:00
Lu Li bbb5ecef8a Refactoring: changed Op(Add|Remove)ParagraphStyle to Op(Add|Remove)Style, so they can handle all style families NOT just paragraph 2013-09-20 17:36:41 +02:00
Aditya Bhatt 5b3d1b2fcd Make onToolDone an overrideable member function that is called whenever
a tool is done. Now we don't pass onToolDone as a callback argument.
Make styles dialog, zoom slider, and other widgets restore focus to the
document once they are done.
2013-09-19 18:54:37 +02:00
Friedrich W. H. Kossebau 5cbca527dc In localeditor demo app fix unpossible loading of the same file directly again 2013-09-19 18:25:08 +02:00
Friedrich W. H. Kossebau 43caf1f333 In collabeditor demo app set the current sessionid as fragment to the location 2013-09-19 14:31:06 +02:00
Friedrich W. H. Kossebau 9d2a79c6f9 Fix localeditor demo for files loaded by file selector, properly end editing of old document 2013-09-19 13:19:37 +02:00
Friedrich W. H. Kossebau eb142f81a7 In collabeditor demo app set focus to login field on start 2013-09-18 23:36:22 +02:00
Friedrich W. H. Kossebau e60785b46a In collabeditor demo app after login directly go to session if id passed as fragment in the url 2013-09-18 23:36:01 +02:00
Aditya Bhatt 57c8e6c462 Handle default styles properly in the editor.
* EditorSession gets a bit of abstraction which allows smoothly
using the same functions to handle paragraph styles, where an empty
styleName means the default style.
* The paragraphStyles widget now names the default style as ":default"
internally, because dojo could not handle "" properly as an entry value.
* OpUpdateParagraphStyle now knows to treat "" as default style.
* Translations for defaultStyle
2013-09-17 16:27:29 +02:00
Friedrich W. H. Kossebau fa42907b82 Less harsh shadow color in MemberListView 2013-09-16 18:46:52 +02:00
Friedrich W. H. Kossebau a5fd9a76a8 Darker color for Editor container background for better focus on document 2013-09-16 18:46:52 +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 6031e31cb8 Remove no longer needed preset bogus data call in MemberListView, now done by all MemberLists for consistent data
Fixup for 0187905b3d
2013-09-11 14:14:50 +02:00
Friedrich W. H. Kossebau de1103fcfe Add gui.DirectParagraphStyler, a UI-less tool specialized on direct styling of paragraphs 2013-09-10 15:52:39 +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
Philip Peitsch 15f4bba862 Clarified document signals (common style created/deleted)
Creating an automatic style was firing signalStyleCreated/Deleted events
unexpectedly. Renamed these to signalCommonParagraphStyle* instead to
clarify that this signal only fires when "common" styles are created.

Terminology was taken from ODF specs:
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415058_253892949
2013-09-09 19:58:44 +10:00
Philip Peitsch d1cdcfb2cb Add direct font family and size styling support to Editor
* tweak fontPicker wrapper to be a little easier to use within other
  widgets
* keep annotation button stays in same position
2013-09-09 09:16:04 +02:00
Friedrich W. H. Kossebau e58eb93ffb Allow download of last saved session state in SessionListView 2013-09-08 18:16:14 +02:00
Friedrich W. H. Kossebau 0187905b3d Have MemberModel define the temporary data for members, not the UI 2013-09-07 17:00:58 +02:00
Friedrich W. H. Kossebau ed86ae77de Only enable direct styling of paragraph if args.directStylingEnabled is set
(still need to check OT)
2013-09-07 17:00:58 +02:00
Friedrich W. H. Kossebau 0a87345d71 German translation for UI strings of buttons for modifying paragraph alignment and indentation 2013-09-06 18:30:53 +02:00
Philip Peitsch 0d7aa91424 Forward on paragraph change events for all paragraphs within the user's selection 2013-09-06 18:30:53 +02:00