Jos van den Oever
8e633684bc
JSLint fixes.
2013-07-10 15:51:03 +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
Friedrich W. H. Kossebau
a9e386a7a0
Fixup API dox of EditorSession.updateParagraphStyle()
2013-07-05 12:44:02 +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
Friedrich W. H. Kossebau
818e4f3a5a
ensure consistency between all code which gets the paragraph element in which a given cursor is inside
2013-05-08 14:48:31 +02:00
Philip Peitsch
f709b07228
Implemented OpInsertTable
...
* No GUI access to feature yet
* New tables are inserted after the current paragraph
2013-04-17 21:28:45 +10:00
Friedrich W. H. Kossebau
6e7e3fe55f
Rename OpCloneStyle to OpCloneParagraphStyle, OpDeleteStyle to OpDeleteParagraphStyle
2013-04-10 12:15:07 +02:00
Friedrich W. H. Kossebau
6f5ced4d1e
Do not pass session as parameter to the ops contructors, pass odtDocument instead of domroot in the execute method
2013-04-09 13:45:33 +02:00
Friedrich W. H. Kossebau
7868d6bfa3
Move eventNotifier from ops.Session to ops.OdtDocument
2013-04-09 13:45:33 +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
Friedrich W. H. Kossebau
54b3a1381c
move all DOM manipulation code to the ops
...
Also:
* merge paragraphEdited event of ops.OdtDocument into paragraphChanged event of ops.Session
* remove any event subscription/emitting from ops.OdtDocument
2013-04-09 13:44:49 +02:00
Philip Peitsch
1ecc0ec1f9
JSDoc cleanups and dead code removal
...
* Removed some unused variables and methods
* Removed redundant variable initialisation
* cursorNode in OdtCursor and Cursor is always set to a valid DOM element. Updated jsdoc accordingly
* Ignore WebStorm project-related files
2013-04-09 12:07:56 +10:00
Philip Peitsch
259b203d21
Avatars and modification markers are hidden by default for a non-networked editing session
...
* The avatar image will not be loaded if the avatar is not visible. The image will be loaded when the avatar is next shown
2013-04-09 12:07:14 +10:00
Friedrich W. H. Kossebau
95d923dc26
Remove unused/unneeded property "position" from OpUpdateParagraphStyle
2013-04-03 18:00:20 +02:00
Tobias Hintze
66eb0054d0
rename SessionImplementation to Session (and thus remove the Session-interface)
2013-03-26 14:15:02 +01:00
Tobias Hintze
2af73a06bd
implement the updated concept of getUserDetailsAndUpdates;
...
adds quite some comments and asserts
2013-03-26 09:37:14 +01:00
Aditya Bhatt
e8e98928e6
if(value)
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
Tobias Hintze
c23067a494
removing verbosity on js console
2013-03-20 15:48:21 +01:00
Aditya Bhatt
f5dda183da
Add dojo/text!resources/fonts/fonts.css explanation
2013-03-20 19:01:21 +05:30
Tobias Hintze
fb11ddd99a
Merge remote-tracking branch 'abheap/master'
...
Conflicts:
programs/editor/cdn-index.html
2013-03-20 12:18:17 +01:00
Aditya Bhatt
b25ec1d952
Let's also call init() after declaring. :/
2013-03-20 15:11:46 +05:30
Aditya Bhatt
3a44cb0ac8
Append font css as a text node
2013-03-20 15:11:46 +05:30
Aditya Bhatt
2fa9df09f7
Move style loading of fonts from editor.css to js
2013-03-20 15:11:46 +05:30
Aditya Bhatt
a1c0c28866
Move fonts/fonts.css to a resources/ dir, and update the paths
...
dojoConfig paths accordingly to resolve pathes starting with
'resources/'.
2013-03-20 15:11:46 +05:30
Tobias Hintze
bedb9a2c94
improve AMD pattern usage; remove explicit require() calls
2013-03-19 21:44:48 +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
Friedrich W. H. Kossebau
78ae8f19af
Remove unused EditorSession.getDocument
2013-03-12 11:57:59 +01:00
Friedrich W. H. Kossebau
4942a201bf
rename opfDocument to odtDocument in EditorSession
2013-03-06 20:44:40 +01:00
Friedrich W. H. Kossebau
6a568a8f58
Split ops.OdtCursor from core.Cursor & rename ops.Document to ops.OdtDocument
...
Also:
* rename gui.CaretTests to ops.OdtCursorTests (as it is testing ops.OdtCursor)
* remove test-less CaretTests.js, had broken setup now
2013-03-06 15:44:28 +01:00
Aditya Bhatt
261a530a0a
Use better regex matching
2013-03-06 19:51:20 +05:30
Aditya Bhatt
91849f78b1
Return empty array, avoid fontpicker exception
2013-03-06 19:51:20 +05:30
Aditya Bhatt
48fa116ff8
Use dojo's AMD loader for fonts css, avoid manual XHRing and race
...
problems
2013-03-06 19:51:20 +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
b03066b7e5
Remove whitespace
2013-03-06 19:51:19 +05:30
Aditya Bhatt
fc3f08c1da
How did this file get deleted???? Adding back
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
7ef88fc872
Retrieve the font face declarations map from Style2CSS in Formatting.js.
...
Expose this map to EditorSession, and add a getUsedFonts method to
EditorSession that removes number-suffixed duplicate font-names like
Arial1, Arial2, etc and returns a reduced font name-to-family map.
2013-03-06 19:51:18 +05:30
Aditya Bhatt
8f526248f3
Add a signalParagraphStyleModified, and make the BIUS buttons listen to
...
it so that they are updated when a dialog changes the current style's properties
2013-02-20 13:35:47 +05:30
Aditya Bhatt
46f89dbe6f
Use a bit more specific signals for styleChanged and styleDeleted. Make
...
the paragraphStyles selector dynamically add/remove styles instead of
reloading everytime. Pass style name in signal argument.
2013-02-18 14:41:31 +05:30
Aditya Bhatt
3307555380
Make cursor move to the beginning of the first text node upon addition.
...
Also, track a cursor in the editor upone addition, so that we know it's
paragraph style and various such info.
2013-02-18 14:41:31 +05:30
Aditya Bhatt
3f1b552ddf
Some jsdoc for EditorSession
2013-02-11 14:29:30 +05:30
Aditya Bhatt
8a7e9ad586
Use OpDeleteStyle in editor
2013-02-11 14:29:30 +05:30
Aditya Bhatt
694def8fb3
Add a method hasDerivedStyles to StyleInfo.js, and use a method
...
isStyleUsed to Formatting.js and EditorSession, and test it in the
styles dialog when a new style is picked
2013-02-11 14:29:30 +05:30