15 Commits
Author SHA1 Message Date
Lukas Reschke 5bd39aba43 Prevent hyperlink handler for potential dangerous URIs
This prevents the user from clicking on URIs starting with `javascript:` or `data:`. The reason behind this is that this may be used to trick users in executing dangerous JS when viewing an untrusted document. (which is the case in our deployment for ownCloud)

I'm not absolutely happy with that patch since it uses a blacklisting instead a whitelisting approach, but I consider it a feasible approach. Especially, considering all the possible values. (`mailto:foo@bar.com`, `ftp://`, `skype://`, etc...)

Conflicts:
	ChangeLog.md
2015-01-07 20:27:20 +01:00
Philip Peitsch bb56bc684c Convert odf.OdfUtils into a static singleton 2014-09-12 10:33:27 +10:00
Friedrich W. H. Kossebau 1e2a4a8323 Normalize license headers of the webodf.js source files
* remove @license tag (to prevent Closure compiler keeping the comment)
* use copyright@kogmbh.com email address everywhere
* remove "additional permission", to be added only to released webodf.js
* separate license header by empty line from following content
2014-06-02 12:19:05 +02:00
Friedrich W. H. Kossebau fd020eee3f Use Error objects in callback passed to "destroy" methods
The currently plain undefined objects are not useful at all, because
the properties are undefined.
2014-04-11 13:53:10 +02:00
lli cba658f622 Add tooltip support for hyperlink 2014-03-17 22:39:09 +11:00
Philip Peitsch 158f873ab8 Refactor HyperlinkClickHandler to cleanup event binding
Move control of event bindings from SessionController to
HyperlinkClickHandler so bindings will be updated whenever modifier is
changed. This allows some simplification as HyperlinkClickHandler can
simply use the KeyboardHandler.Modifier.
2014-03-17 22:39:08 +11:00
Philip Peitsch 57298f1b7b Clean up API dox 2014-03-11 22:53:02 +11:00
Philip Peitsch 80b94262d4 Toggle hyperlink active state via classes rather than custom XML attrs
Toggling a custom attribute on a custom XML element doesn't properly
update the visual state on some browsers (e.g., WebKit on OSX). Using
CSS classes instead seems to be better handled in these browsers,
correctly updating the mouse cursor icon on the fly.
2014-03-11 22:52:58 +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
Jos van den Oever 6dddd69904 Fix the return type and remove unneeded casts. 2014-02-10 15:18:28 +01:00
Jos van den Oever ed7270442f Remove loadClass calls from class files. The load system reads the dependencies from the manifest.json files now. 2014-02-07 15:38:09 +01:00
lli aa63f73510 Stops FireFox from opening two new tabs upon ctrl/cmd + click a hyperlink
Fixes issue #70 and partially for #69 by prevent browser default action.
2014-01-23 14:52:48 +11:00
lli 2acd473a19 In edit mode, only open a hyperlink with Command+Click on MacOS
This matches the behaviour of LibreOffice.
2014-01-23 12:09:44 +11:00
lli ce77b46352 Make HyperlinkClickHandler.js 100% typed 2013-12-18 11:38:05 +11:00
lli dca79408b0 Hyperlink usability improvement
Current behaviour:
Left click causes navigation in both edit and view mode

After the change:
Same as current behaviour in view mode.
In edit mode, left click will just move the cursor to desired position. In order to navigate, user need to hold control key and then click
2013-12-17 17:59:17 +11:00