22 Commits
Author SHA1 Message Date
Friedrich W. H. Kossebau c749ca8927 Code cleanups in programs/editor for issues found with JSLint 2015-02-23 17:31:37 +01:00
Friedrich W. H. Kossebau a68442d4e6 Remove duplicated code, linksInSelection is set later again 2014-09-24 17:12:59 +02:00
Friedrich W. H. Kossebau 3053b18ff3 Fix wrongly enabled hyperlink tools with no document loaded 2014-09-24 17:12:58 +02:00
Philip Peitsch bb56bc684c Convert odf.OdfUtils into a static singleton 2014-09-12 10:33:27 +10:00
Philip Peitsch 741ea56a17 Add event subscription tracking object to simplify per-frame subscriptions
A common use-case for UI components is to only update the UI state just
before the next frame is rendered, irrespective of how many times a
signal is fired within a given batch of operations.

The event subscriptions object allows these to be easily created and
tracked, and also makes it easier to ensure all subscriptions are cleaned
up at the end.
2014-09-11 12:00:07 +10:00
Philip Peitsch 05d99e8d9e Avoid enabling remove hyperlink button if hyperlinks feature is disabled 2014-09-11 12:00:07 +10:00
Philip Peitsch 1ba2887e4f Provide "real" selection content to aid text2speech tools
Text-to-speech and screen readers use the browser's selection to determine
what the current selected text is. Some browsers (e.g., Safari on OSX) think
the text content of the event trap is the currently selected content, and
only vocalise the letter "b".

Cope with this by serialising the currently selected text to the input
field on redraw. On a 1000 page text-only document, this can add sizeable
performance impact (400ms to execute synchronizeWindowSelection), but
as this only occurs when the cursor is updated, and only once per redraw,
the actual end user impact is reasonably minimal.
2014-08-01 01:07:04 +10:00
Friedrich W. H. Kossebau 41f8b18ac6 Make sure all toolbar elements are disabled without a session
(and merge any require calls into one per class definition)
2014-07-10 18:19:11 +02:00
Philip Peitsch 010dca4f88 Expand selection to cover newly inserted hyperlink
Mimicking LibreOffice's behaviour here, when a new link + associated
display text is inserted, immediately expand the selection to these
bounds.

This change makes add & edit link behaviours consistent, as the complete
hyperlink is always selected after the edit dialog is closed.
2014-06-20 22:22:40 +10:00
Philip Peitsch 41f1491ffc Select and update the current hyperlink when selection is collapsed
When the current selection is collapsed within a hyperlink and an update
occurs, the selection will now be expanded to the hyperlink bounds and
updated.

Fixes #490.
2014-06-20 22:22:39 +10:00
Philip Peitsch 32855365b0 Only calculate hyperlink text just prior to displaying edit dialog
Calculating hyperlink text is extremely expensive. To avoid a lot of
unnecessary work, only calculate the text prior to displaying the edit
dialog.
2014-06-20 22:22:39 +10:00
Philip Peitsch 1edc07bbc4 Re-arrange editorHyperlinks widget code 2014-06-20 22:22:38 +10:00
Philip Peitsch 575fb64ffc Show complete hyperlink text when selection is collapsed 2014-06-20 22:22:38 +10:00
Friedrich W. H. Kossebau 78a47e0588 Fix hyperlink editor to no longer extract non-odf text for the display text 2014-06-13 11:44:07 +02:00
Aditya Bhatt ed863dcb51 Change widgets that access controllers to cleanly
unsubscribe and subscribe to signals.
2014-06-06 15:11:32 +02:00
Aditya Bhatt 58cbeabf19 Make hyperlink editing respect review mode constraints. 2014-06-06 15:11:31 +02:00
Friedrich W. H. Kossebau 7f80e8e163 Normalize license headers of editor/benchmark/tests/firefox-addon/viewer source files
* remove @license tag, for consistency with library source files
* use copyright@kogmbh.com email address everywhere
* remove "additional permission", to be added only to released stuff
* separate license header by empty line from following content
2014-06-02 17:49:46 +02: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
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