Commit Graph
518 Commits
Author SHA1 Message Date
Aditya Bhatt a478b71e66 Disable -webkit-box and siblings to avoid horizontal scrolling 2013-07-31 19:04:16 +02:00
Friedrich W. H. Kossebau b10f41de7b Rename "OpApplyStyle" to "OpApplyDirectStyling" and its spec elemnt "info" to "setProperties" 2013-07-30 12:05:09 +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
Philip Peitsch f25d936355 Removing a cursor will now cause the associated caret to be removed
Removing the local cursor (e.g., calling SessionController.endEditing)
previously left behind an orphaned caret that would continue to receive
focus/blur commands and attempt to remain visible. This would cause an
error to be thrown after most operations.

This change turns CaretFactory into a manager that is responsible for
proper disposal of carets unpon the corresponding cursor's removal from
the document.
2013-07-26 22:26:11 +10:00
Lu Li c75f303cfb handle shortcuts for applying bold, italic & underline 2013-07-24 09:58:17 +02:00
Philip Peitsch cf3445e493 Added configurable option to suppress the caret when a range is selected
Various editors have inconsistent behaviour on this front.
* LibreOffice (Mac) - always blinks even with range select
* Firefox, Chrome, Word (Mac) - hides the caret on range
2013-07-24 01:26:58 +02:00
Lu Li 0eff2c6a0a Refactor odf.Formatting class
* move getTextNode from OdfUtils to StyleHelper
* move some of the unit tests under FormattingTests to StyleHelperTests
2013-07-22 16:47:42 +02:00
Friedrich W. H. Kossebau 455839d83b Add german translations for new strings 2013-07-22 12:15:00 +02:00
Aditya Bhatt 17717c7f8d Add touchable overlays!
* Close button in presentation mode
* Left and right navigation buttons in small screen fit-to-page modes
that fade in when interaction happens and then fade out
2013-07-16 20:06:09 +02:00
Aditya Bhatt ad2d6f9cd5 Move the presentation, fullscreen, and download buttons to the top 2013-07-16 14:37:54 +02:00
Aditya Bhatt 07cb8426b0 Center align the displayed document both vertically and horizontally 2013-07-15 18:46:39 +02:00
Aditya Bhatt 3948818397 Remove annoying background image from default state of button (only
visible in mobile)
2013-07-15 18:08:45 +02:00
Aditya Bhatt 917b7f8b19 Tiny fix: Call showPage before setting the zoom level in viewer, so that
only the dimensions of the visible slide are taken into account for
calculating scale. Fixes the bug where in firefox the slideshow can
sometimes start off as very tiny.
2013-07-15 10:52:44 +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
Aditya Bhatt 77c2357ff5 * Cleaer code
* Additional very simple keyboard shortcuts for navigation in
presentation mode: click, right-click, space, shift+space.
2013-07-14 01:03:24 +02:00
Aditya Bhatt 465eb8c3e7 Add a 'presentation mode' that switches to fullscreen and hides the UI. 2013-07-13 23:50:45 +02:00
Aditya Bhatt 665478f7d8 Let plugins load their own styles themselves 2013-07-12 11:54:28 +02:00
Aditya Bhatt a12f490e2b Make ODFViewerPlugin.js load webodf.js upon initialization, instead of
hard-linking it in index.html
2013-07-12 11:50:01 +02:00
Aditya Bhatt 221e0f59e3 * Make index.html completely agnostic of any plugins
* Add a PluginLoader with knowledge of filetype -> plugin mapping
2013-07-11 16:17:43 +02:00
Jos van den Oever 1dd372b23c Fix invalid css. 2013-07-10 22:49:52 +02:00
Jos van den Oever edcabfa249 Move addition of undo manager to before the widgets are initialized.
This way, the ui actually detects that there is an undo manager.
2013-07-10 16:09:23 +02:00
Jos van den Oever 8e633684bc JSLint fixes. 2013-07-10 15:51:03 +02:00
Jos van den Oever 71058c5b5c Add ODFViewerPlugin.js to viewer build target. 2013-07-10 14:35:45 +02:00
Jos van den Oever aa8c2b8c19 Include FileSaver.js in the editor build. 2013-07-10 13:09:02 +02:00
Jos van den Oever 5ba3664284 Fix dojo paths in the editor to be relative. 2013-07-10 13:00:54 +02:00
Jos van den Oever 3d367b2aed Add load and save buttons to the editor.
Due to the use of FileReader and Blob this will not work in older browsers.
2013-07-10 11:02:57 +02:00
Jos van den Oever 92102b5168 Whitespace fixes. 2013-07-10 11:02:57 +02:00
Jos van den Oever 087196110c Omit release zips from the default builds. 2013-07-09 10:53:01 +02:00
Philip Peitsch a3dd2374dd SessionController now better hides absence of an undo manager
Consumers of the SessionController would all need to check if and how
undo was supported. As a result, it makes more sense to simply expose
the necessary signals for UI purposes, and encapsulate how the signals
are bound inside SessionController
2013-07-09 02:18:34 +10: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
Aditya Bhatt 48904fcc24 New changes to viewer deemed necessary after writing a PDF plugin:
* Reduced the number of getElementById calls for some often-used elements
* Added canvasContainer.onscroll handling - which will call the onScroll
of the viewer plugin, if present; for example for updating page numbers
or updating the rendering (if we are using lazy loading)
* Added a delayedRefresh() function which starts a timeout to run the
onScroll() function for lazy rendering refresh, but unloads the previous
timeout if delayedRefresh() is called again, so you can resize the
window rapidly as much as you want and as long as you want and the
rendering redraw will only happen 300 milliseconds after you stop doing
that. (In case of ODF, this will still seem butter-smooth and
continuously resizing because it's just CSS scaling, and no canvas
redrawing since the onScroll of ODFViewerPlugin is not defined)
* Added several small fixes suggested by Jos
2013-07-05 13:47:23 +02:00
Aditya Bhatt 41b6655d2b Always call fixContainerSize when switching pages via the PageSwitcher,
to account for slide dimensions (which may not be the same as the entire
document's size)
2013-07-05 13:47:22 +02:00
Aditya Bhatt 290832d755 Use evt.keyCode instead of keyIdentifier, more crossplatform 2013-07-05 13:47:22 +02:00
Aditya Bhatt dda70df798 Remove methods that should not be directly accessible, from the viewer
api.
Apidox++
2013-07-05 13:47:22 +02:00
Aditya Bhatt a932baac8a Make the slideshow flag into a method, and make the logic for displaying
toolbars more clear
2013-07-05 13:47:22 +02:00
Aditya Bhatt 21d92bb0e6 Remove unneeded variables, fix zooming 2013-07-05 13:47:22 +02:00
Aditya Bhatt 9ed4acb905 Refactor and make API
Rename viewer.js to ODFViewerPlugin.js
Add a viewer.js and pull non-odf specific methods into this API from
the ODF plugin

Initialize Viewer with ODFViewerPlugin during window.onload
2013-07-05 13:47:22 +02:00
Friedrich W. H. Kossebau a9e386a7a0 Fixup API dox of EditorSession.updateParagraphStyle() 2013-07-05 12:44:02 +02:00
Friedrich W. H. Kossebau 78b24d2f4a remove broken disable/enableEditHighlighting
these days only results in AvatarStyleInfo missing after replay for those members
whose cursors are added during the replay and for which the userdata arrives
already before the replay is finished, so that setAvatarInfoStyle() is never
called for them (unless there is an update on the userdata, but that rarely
happens)
2013-07-04 23:04:15 +02:00
Friedrich W. H. Kossebau f558e33231 During initial ops replay there is no own cursor yet added, so either test for the cursor or do not do cursor-using things 2013-07-03 14:57:28 +02:00
Friedrich W. H. Kossebau f6c017a7f3 in ops.OpUpdateParagraphStyle split info into setProperties & removedProperties
using value "null" for "remove" and "undefined" for "skip" is hard/impossible to map to other languages
2013-07-02 22:58:43 +02:00
Friedrich W. H. Kossebau c71bdb30bf Remove unused property "styleNameBefore" from spec of ops.OpSetParagraphStyle 2013-07-02 22:35:49 +02: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
Jos van den Oever f3da300fa7 Add version number to php code. 2013-06-17 14:25:46 +02:00
Friedrich W. H. Kossebau 55fc7ab9c6 Switch code to use Node.${XXX}_NODE instead of magic values 2013-06-17 13:49:07 +02:00
Tobias Hintze ffcb7d1996 improve wordpress plugin
(by removing features)
2013-06-13 16:54:55 +02:00
Jos van den Oever 8b9f1a040a Put webodf components in wv/ directory in the wordpress plugin. 2013-06-13 16:53:27 +02:00
Jos van den Oever a13239457b Do not put wordpress files in a dir in the zip file. 2013-06-13 16:38:01 +02:00
Jos van den Oever 8476050295 Rewrite xpi creation and add xpi to main zip. 2013-06-13 15:32:41 +02:00