Commit graph

173 commits

Author SHA1 Message Date
Trevor Parscal 086b4f46ca Fixed context menu position when scrollTop is non-zero 2011-11-30 19:55:44 +00:00
Inez Korczynski 72ec73c063 Placeholder for FormattingDropDown and ClearButton in Toolbar 2011-11-30 08:07:22 +00:00
Inez Korczynski af39b6dc47 Make toolbar buttons Bold and Italic reflect state of current selection 2011-11-30 07:35:59 +00:00
Inez Korczynski 9aa9188798 Create separated classes for each toolbar tool (so far only bold and italic). Use CSS classes instead of img tags for toolbar buttons styling. 2011-11-30 07:10:15 +00:00
Trevor Parscal dee9a0df01 * Using DOM for more of the icon style
* Fixed double-selection rendering issue
2011-11-30 01:23:37 +00:00
Trevor Parscal cc04f0f830 More example tweaks 2011-11-30 00:51:11 +00:00
Trevor Parscal d926cc7165 Fixed some display issues 2011-11-30 00:48:46 +00:00
Trevor Parscal 68c5487c61 Added clear button to menu 2011-11-30 00:35:58 +00:00
Trevor Parscal 69d986d2ec Added images to menu buttons 2011-11-30 00:19:27 +00:00
Trevor Parscal b3e669d988 Moved images 2011-11-30 00:15:43 +00:00
Trevor Parscal 119700856d Added more example menus 2011-11-30 00:06:46 +00:00
Trevor Parscal 62be093c65 Added example menu items 2011-11-29 23:48:11 +00:00
Trevor Parscal 9d34341beb Added es.ContextView 2011-11-29 23:29:02 +00:00
Inez Korczynski 0c814b4d61 Fix revision r103997 2011-11-29 21:34:56 +00:00
Inez Korczynski ffdf68c50b Put $input (textarea) in the same place where cursor is (so it can follow its position nicely) 2011-11-29 21:32:41 +00:00
Inez Korczynski fb9348dbb9 Use spacer element for floating toolbar instead of relaying on padding-top of next sibiling. 2011-11-29 01:13:50 +00:00
Inez Korczynski dc7e601ef0 Make toolbar float nicely in demo and in MediaWiki sandbox special page. 2011-11-29 00:58:40 +00:00
Trevor Parscal 3b18667821 Fix for empty content rendering issue 2011-11-29 00:00:02 +00:00
Inez Korczynski 77486cf8f2 Support select all (ctrl/metakey + a) on mac 2011-11-28 23:54:22 +00:00
Inez Korczynski c80b1d5fb0 Fix the problem with disappearing selection/ranges elements 2011-11-28 23:29:09 +00:00
Inez Korczynski 6a1bd05703 Support for select all (ctrl+a) 2011-11-28 22:47:07 +00:00
Inez Korczynski 6e36c7c439 Put cursor directly in body element. This way it still can be positioned absolutly but without risk that some other element using position other than "static" (like #bodyContent) will change positioning context. 2011-11-28 21:58:46 +00:00
Trevor Parscal 111ce5ada3 Initial MediaWiki Integration 2011-11-28 20:28:28 +00:00
Inez Korczynski ea29c15f32 Added formatting dropdown to toolbar - but it does not work yet. 2011-11-24 01:02:19 +00:00
Trevor Parscal 30ede21d46 No need to fallback to zero, delay must be non-zero for the setTimeout to be run 2011-11-24 00:01:11 +00:00
Trevor Parscal 1b633ede21 Took time-buffered actions out of a timeout if delay is undefined or 0 2011-11-23 23:57:54 +00:00
Trevor Parscal b8b3ed57e2 Added time-buffer to emitting updates 2011-11-23 23:42:41 +00:00
Trevor Parscal dab042b52f Prevented classes from being removed and reset when they didn't actually change 2011-11-23 23:22:59 +00:00
Trevor Parscal 1fa9dfef3c Made class replacement catch spaces too, so we don't keep adding more and more spaces each time we update the class of a heading 2011-11-23 23:17:34 +00:00
Trevor Parscal 22c70e0154 * Added node updates for annotation+retain transactions
* Added time-buffered updates for selection/cursor
2011-11-23 22:21:46 +00:00
Trevor Parscal fc17703f01 Added combine arguments where needed 2011-11-23 22:00:01 +00:00
Inez Korczynski a4c71510d3 Early stage implementation of toolbar 2011-11-23 21:50:47 +00:00
Inez Korczynski 69b11c3399 Build VisualEditor toolbar dynamicly based on configuration. 2011-11-23 07:11:31 +00:00
Inez Korczynski 8c200c94aa Initial separation of toolbar code into ToolbarView 2011-11-23 01:19:11 +00:00
Trevor Parscal ed463eb075 Added soft undo/redo 2011-11-23 00:59:57 +00:00
Trevor Parscal 9beda20191 Routed selection through the SurfaceModel 2011-11-23 00:36:46 +00:00
Trevor Parscal 20da830a26 Rewrite of undo/redo - now completely implemented in es.SurfaceModel 2011-11-22 22:59:05 +00:00
Inez Korczynski 1186949675 Fix bug in deletion: callback for traverseUpstream should get parent of current node, not of the node from which traversal started. 2011-11-22 20:11:23 +00:00
Inez Korczynski 2d8440132e Fix setInterval bug in IE (in IE setInterval doesn't take 3rd parameter) 2011-11-22 19:59:18 +00:00
Inez Korczynski b60a82c50e Make toolbar float when scrolling the page 2011-11-22 07:17:08 +00:00
Inez Korczynski 0fef27aae7 Fix bug with selecting words 2011-11-22 02:23:39 +00:00
Trevor Parscal 56d05ce855 Reverted an issue in r103873 - fall through was intentional 2011-11-22 01:25:15 +00:00
Trevor Parscal 5bb01d20ef Backing out history integration for now 2011-11-22 00:26:50 +00:00
Trevor Parscal ee12891dbe Added support for meta key (mac command key) for undo/redo 2011-11-21 23:54:57 +00:00
Trevor Parscal 70147a166d Fixed breaks in a switch being inside ifs, causing them not to properly terminate the switch 2011-11-21 23:53:37 +00:00
Inez Korczynski 68ea54fcf3 Bind ctrl+z to history undo and ctrl+y to history redo. 2011-11-21 23:25:43 +00:00
Trevor Parscal e0f746d3d5 Installed HistoryModel into SurfaceView 2011-11-21 22:59:40 +00:00
Inez Korczynski db7b4dff64 Auto scroll to cursor is showCursor method 2011-11-21 22:55:48 +00:00
Trevor Parscal 6f8d229416 Cleaned up some issues with scoping, line ending, variable redeclaration, etc. 2011-11-21 22:43:56 +00:00
Trevor Parscal 9590783f50 Added emitting selection on mouse move 2011-11-21 22:07:03 +00:00
Inez Korczynski f840fb7a1f Created generic function 'handleDelete' that is used for content deletion initiated with backspace or delete keys. 2011-11-21 21:50:14 +00:00
Inez Korczynski 61cfdb58fb Improve logic for moving cursor up and down - especially in case of initialBias - code has to be refactored. 2011-11-19 03:07:27 +00:00
Inez Korczynski 77ff26d61d Improve logic for moving cursor up and down - especially in case of initialBias - code has to be refactored. 2011-11-18 23:21:33 +00:00
Inez Korczynski ed299c01d9 Reset value of initialBias and initialLeft states after pressing backspace/delete/enter or typing text 2011-11-18 20:09:13 +00:00
Inez Korczynski bd92a3aaf8 Improve logic for moving cursor up and down - especially in case of initialBias. 2011-11-18 19:57:53 +00:00
Inez Korczynski bf1b9a881f Improve logic for moving cursor up and down - especially in case of initialBias. 2011-11-18 19:48:43 +00:00
Inez Korczynski 2d4c253f5e Place cursor in correct place after deleting selected content. 2011-11-18 08:10:56 +00:00
Inez Korczynski 535139919b Support for "backspace" and "delete" when content is selected - also better support for typing when entire node is selected. 2011-11-18 07:52:28 +00:00
Inez Korczynski 9bfee0642c Temporary handle listitems merging/spliting logic in SurfaceView until it will be fixed in transaction preparation (prepareRemoval) 2011-11-18 06:45:11 +00:00
Inez Korczynski 9df503e788 Proper handling for "delete" & "backspace" keys 2011-11-18 06:43:42 +00:00
Inez Korczynski d02ed50211 Proper handling for "enter" key 2011-11-18 06:17:14 +00:00
Inez Korczynski 307ab3506b Start from removing selected content if there is any when typing 2011-11-18 05:51:50 +00:00
Inez Korczynski d0d8e35f34 Code cleanup in SurfaceView - no any major changes 2011-11-18 05:44:24 +00:00
Trevor Parscal a9d29af962 Using overwrite instead of build and swap method for line data in es.ContentView objects - this way line data is valid between renders 2011-11-17 23:43:53 +00:00
Trevor Parscal 43de57840e Commented out some console.log statements 2011-11-17 17:59:15 +00:00
Inez Korczynski 8f459b5f01 Improve handling for enter, backspace, delete 2011-11-17 00:28:40 +00:00
Inez Korczynski 17cad00776 Added support for enter key in elements with attributes - like headings, listitems. 2011-11-16 23:34:58 +00:00
Inez Korczynski 62e399ef2e Added splitRules for DocumentView 2011-11-16 23:19:29 +00:00
Inez Korczynski a5a09d42d8 Minor fix. 2011-11-16 23:18:22 +00:00
Inez Korczynski 243189a009 Basic support for enter key in heading and paragraphs 2011-11-16 23:16:02 +00:00
Inez Korczynski 3bf8a244f1 Added basic support for deleting selection with delete key. 2011-11-16 22:01:41 +00:00
Inez Korczynski fe3ef45f56 Improved support for combination of ctrl/alt/metakey + up/down/left/right - especially for mac vs. windows. 2011-11-16 21:59:22 +00:00
Inez Korczynski 13775c5116 Added basic support for deleting selection with backspace. 2011-11-16 21:25:48 +00:00
Inez Korczynski a43288be29 Support for moving cursor up and down by "unit" distance when control key pressed down. 2011-11-16 19:51:02 +00:00
Trevor Parscal 3ac24949ce Fixed incorrect registration object being used 2011-11-16 18:54:05 +00:00
Trevor Parscal 79ef19da42 Fixed documentation and use of es.arrayIndexOf to match the actual API of $.inArray (value, array, fromIndex). Renamed function to inArray to reduce confusion about how the function works. 2011-11-15 18:17:26 +00:00
Roan Kattouw 5d619ac6cf Fixed the last array indexOf call that I could find 2011-11-15 16:27:14 +00:00
Inez Korczynski 098f2ae616 Refactor moveCursor code 2011-11-15 01:30:39 +00:00
Trevor Parscal 0e1d3c08fd Added split rules to view classes 2011-11-14 23:59:36 +00:00
Trevor Parscal 8a884ee3b8 Fixed emitting updates when deleting content from the inside of a node 2011-11-14 23:47:07 +00:00
Trevor Parscal 5b1298a6ca Removed alert() - dude, use console.log, and don't leave it in the SVN plz! :P 2011-11-14 19:52:05 +00:00
Inez Korczynski 1359c19cbb Add comments for mouse interaction states 2011-11-14 19:51:04 +00:00
Inez Korczynski 5acd21638a Support for moving cursor with control or alt pressed down 2011-11-11 03:06:47 +00:00
Inez Korczynski 807d9530ac Added support for word selection when shift + ( ctrl || alt ) pressed 2011-11-11 00:26:30 +00:00
Inez Korczynski 8b3880d524 Improvements to selecting with mouse (double, triple clicks) 2011-11-10 23:30:29 +00:00
Alexandre Emsenhuber fa172d1592 svn:eol-style native 2011-11-10 11:51:42 +00:00
Trevor Parscal a8b80bc1fd Added very basic support for highlighting formatting tools when the cursor is over content which is formatted that way 2011-11-10 01:28:01 +00:00
Inez Korczynski 8daf92ee48 Support for word selection with keyboard 2011-11-10 01:23:21 +00:00
Inez Korczynski 4b34eaad0e Support for selecting words and nodes with mouse 2011-11-10 01:13:56 +00:00
Inez Korczynski 915104d6f2 Another way of supporting double and triple clicks in VisualEditor 2011-11-09 23:36:56 +00:00
Inez Korczynski 7fcdcb41df Added support for double click (to select word) and triple click (to select entire node) in VisualEditor 2011-11-09 22:01:42 +00:00
Inez Korczynski d3b7188e7e Delete all our own undo/redo support. It was just experiment / proof of concept - that confirmed transactions works well and we will get back to it later. 2011-11-08 00:15:54 +00:00
Inez Korczynski 2fb840236c Basic support for "pre" elements (space at the beginning of the new paragraph in wikitext) 2011-11-07 23:46:30 +00:00
Inez Korczynski d01cdd859d ListItem now is a branch instead of being leaf. So it contains children - usually it would be just Paragraph, but in some cases Table as well (as Wikitext allows to have HTML table in list item) 2011-11-07 21:30:13 +00:00
Trevor Parscal 187eca34eb Added render from offset support 2011-11-07 19:42:36 +00:00
Trevor Parscal ab44388220 Changed from emphasis to emphasize 2011-11-07 19:28:47 +00:00
Inez Korczynski 7b303e178b Very simple support for undo/redo (with keyboard only: ctrl+z/ctrl+y) 2011-11-05 02:06:51 +00:00
Inez Korczynski cc6fc80bee Support for deleting text with backspace and delete 2011-11-05 00:59:20 +00:00
Inez Korczynski b4b043e06e Very basic support for content (typing on keyboard) insertion 2011-11-05 00:49:48 +00:00
Inez Korczynski 97649e62ee Minor fix 2011-11-05 00:20:22 +00:00