Commit Graph
164 Commits
Author SHA1 Message Date
Friedrich W. H. Kossebau fb4b2b7ca4 Add about dialog to editor component 2014-05-16 14:57:40 +02:00
Friedrich W. H. Kossebau 27b533e10e attribute style:display-name is only optional, use style:name as fallback for display 2014-04-30 12:03:14 +02:00
Aditya Bhatt 01b3bf5ff2 Fix return type annotation of mappedProperties 2014-04-04 11:39:00 +02:00
Aditya Bhatt 8eee65c2ec Only save style properties which have actually
been modified by the user in the dialog, upon
pressing "OK".
2014-04-04 11:36:44 +02:00
Aditya Bhatt 4e3b2bbc08 Use setStyle whenever selecting a new
style in the dialog.

This requires directly selecting a style
when cloning it, without waiting for onAdd.
2014-04-02 13:03:28 +02:00
Philip Peitsch 82d1d7cd85 Cope with non-cm image dimensions
Style-related operations are slowly being moved towards px as the
default unit to improve consistency. Standardising getContentSize to
work in px rather than cm provides better re-use of CSSUnits as well.
2014-03-27 22:57:44 +11:00
Friedrich W. H. Kossebau 63371ad9dc define size of paragraphstyle dialog internally, not by general css rule on .dijitDialogPaneContent 2014-03-10 18:09:59 +01:00
Aditya Bhatt 887e248b9a Do not fire the zoom slider's onChange
event when programmatically setting the
slider position.
2014-03-04 02:13:12 +01:00
Aditya Bhatt 40158417a7 Make the zoom slider's zoomLevel=1
position centered.
2014-03-04 02:12:56 +01:00
Aditya Bhatt f428ff008f Link the zoom slider to the current zoom level
of the ZoomHelper.
2014-03-03 22:46:51 +01:00
Philip Peitsch 90c5402add Restore focus back to the event trap after clicking the undo button
Partially fixes issue #426.
2014-02-27 13:33:11 +11:00
Philip Peitsch a5011a501f Update undo/redo widget coding style
Widgets no longer use the nested callback approach to instantiation.
2014-02-27 11:12:11 +11:00
Friedrich W. H. Kossebau dd6f6fa2eb Fix file headers missing AGPL copy note & @source not yet pointing to github 2014-02-12 15:58:15 +01:00
lli 32f148930a Preserve the text style when splitting at the end of paragraph.
At the moment, splitting at the end of the following paragraph
<p style-name="standard">hello <span style-name="bold">world|</span></p>
will create a new paragraph like below
<p style-name="standard">|<span style-name="bold"></span></p>

The cursor is moved out of the span due to empty span is not considered as
a valid cursor position in the current design. this causes newly entered
text are not formatted correctly.

Merged DirectTextStyler and DirectParagraphStyler into
DirectFormattingController. These have become closely related concepts as
a result of changes in this patch.
2014-01-20 22:32:24 +11:00
Aditya Bhatt 5f056eb079 Fix hyperlink UI translations for english. 2013-12-17 13:19:47 +01:00
Friedrich W. H. Kossebau 60626b01dc Fix widget js files to only call runtime.loadClass(...) in the setup method, not at definition time 2013-12-16 23:52:59 +01:00
Philip Peitsch 9ed4ac0db4 Renamed HyperlinkManager to HyperlinkController 2013-12-13 23:35:51 +11:00
lli 353b4b68f1 Added editor buttons for applying or deleting hyperlinks 2013-12-13 17:40:22 +11:00
Aditya Bhatt ca3cb713e7 Do not fire onChange in paragraph styles
dropdown when setting the value programmatically.
2013-11-26 12:23:48 +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
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 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
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
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
Philip Peitsch 3f6790ef5f Add insert image button to the editor 2013-10-02 16:37:49 +10: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
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
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 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 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
Philip Peitsch c7eac5bd5e Added buttons to editor for modifying paragraph alignment and indentation 2013-09-06 18:30:53 +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 ba10c691e0 Make UI strings for style cloning/deleting translatable 2013-08-28 17:38:59 +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
Lu Li c75f303cfb handle shortcuts for applying bold, italic & underline 2013-07-24 09:58:17 +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
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
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
Aditya Bhatt ad8199e4cd Don't fire onChange when setting BIUS checked-state programmatically 2013-05-23 14:46:03 +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
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