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
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
Friedrich W. H. Kossebau
51af6f6140
Ensure that style name (id, not the display name) is properly encoded and unique
2013-03-19 10:35:41 +01:00
Friedrich W. H. Kossebau
44db72f74a
Stop passing odfCanvas via document.odfCanvas to the zoomSlider, use new EditorSession.getOdfCanvas
2013-03-12 12:00:26 +01:00
Aditya Bhatt
0b0f9160aa
Avoid a little race condition by moving the onchange handler for
...
stylePicker inside the creation of ParagraphStyles
2013-03-06 19:51:19 +05:30
Aditya Bhatt
29df7b772a
* Move XHR from editor.js to EditorSession, stop making fonts global,
...
and make this synchronous
* Some explanatory comments about the simple css parsing
* Use a better technique for deduplicating font family declarations,
pick the alphabetically first font name
2013-03-06 19:51:19 +05:30
Aditya Bhatt
1f894d0691
Remove lots of whitespace
2013-03-06 19:51:19 +05:30
Aditya Bhatt
3d74878cd1
* getUsedFonts -> getDeclaredFonts renaming.
...
* documentation
2013-03-06 19:51:19 +05:30
Aditya Bhatt
cf583fc8ea
Explanatory Comments
2013-03-06 19:51:19 +05:30
Aditya Bhatt
0fa56a7dc9
Remove forced smallish width of fontpicker
2013-03-06 19:51:19 +05:30
Aditya Bhatt
5f4f38be35
Move onAdd and onRemove to inside the stylePicker initialization so we
...
don't get race exceptions
2013-03-06 19:51:19 +05:30
Aditya Bhatt
3c062a76cd
* A new widget, fontPicker.js, made in a similar way to
...
paragraphStyles.js.
* Remove old declarative 'placeholder' font selector from
fontEffectsPane.html, and attach programmatically the new fontPicker in
it's place. Rename fontFamily to fontName, since we are actually dealing
with font-names here when we work with styles.
2013-03-06 19:51:19 +05:30
Aditya Bhatt
bc984d41ec
add explanatory comment to dialog.onShow
2013-02-22 13:12:10 +05:30
Aditya Bhatt
be776e62b7
Open current paragraph's style when the dialog is opened.
2013-02-22 12:01:16 +05:30
Aditya Bhatt
546b26d3d0
Add @constructor annotation as discussed in RR #35 .
2013-02-20 13:35:47 +05:30