Commit graph

137 commits

Author SHA1 Message Date
Catrope aefd6a9792 Fix domWrapperElementType entries in ce that were out of sync with dm
Change-Id: I2684af71af803bc4b57e43a48986bdfced383193
2012-06-14 23:54:06 -07:00
Rob Moen 6b8d8d24aa Clear state of contextview when there is no selection length.
Make context update method work on single call

Change-Id: I2b7f3a31ea5ca1530f927a7e11827d583f134ffb
2012-06-14 21:13:59 -07:00
Rob Moen b31a25c12c Fix context icon update method
Change-Id: I1100e53a0bf4364d6435f648b06ce0be7851e8db
2012-06-14 21:06:16 -07:00
Catrope 7f97520af2 Don't produce an invalid range
I know this code is still being worked on but I felt like I should put
this in anyway, it might save the person working on it some work

Change-Id: I1535399b3798cd8de2fc5334cd1eac64b71e8821
2012-06-14 19:34:30 -07:00
Catrope ef0c551b79 When deleting, collapse the selection before issuing a transaction
This is needed because there are onTransact event handlers that use the
selection and expect it to be up-to-date. The previous behavior caused a
bug when pressing backspace at the end of the document, because the old
selection (at the end) was invalid in the context of the updated
document.

Change-Id: I159e37894d14d437f46495604c14804c0a13e84e
2012-06-14 19:33:13 -07:00
Catrope c0b3de327f Don't add empty annotation objects when inserting text
Empty annotation objects are unexpected by the rest of the data model
and cause weird breakage in the converter, resulting in inserted text
being in its own paragraph

Change-Id: I63de37c3c5e19ac650e7c7f2d1a0bfab21d45da9
2012-06-14 19:24:44 -07:00
Inez Korczynski fc138f3497 Start polling in async mode after document node is focused 2012-06-14 17:24:15 -07:00
Inez Korczynski 9f1885bc4b Typo. Sorry )-: 2012-06-14 17:21:50 -07:00
Inez Korczynski 063cad43b9 Cleanup to startPolling, stopPolling and clearPollData 2012-06-14 17:20:41 -07:00
Christian Williams 87823835ad Starting and stopping polling for Enter
Change-Id: I398b6df242009f105bdb2214120779e6c5e57856
2012-06-14 17:21:05 -07:00
Inez Korczynski e9d02b56a2 Little bit of a cleanup to stopPolling, startPolling and clearPollData 2012-06-14 17:19:05 -07:00
Christian Williams 4ea6d7e7b9 fixing timer var name
Change-Id: Ica8d20942908f6a5fb78206873c4036e4ac7d77b
2012-06-14 17:03:25 -07:00
Inez Korczynski 50999cb8ad Attach handlers to mousedown, mouseup and keydown events on document node focus and disattach on document node blur. 2012-06-14 16:41:03 -07:00
Inez Korczynski 7ab079bc52 Add ve.log, ve.debug and change rendering animation debug effect used in TextNode. 2012-06-14 15:00:29 -07:00
Inez Korczynski 260d3c0413 Fix bug with losing selection direction. 2012-06-14 14:33:33 -07:00
Rob Moen 1e45a06185 Debounced contextView icon on selection in surfaceView.
Squashed old list button methods, list & unlist.

Change-Id: Ic522c761636b2126990ee194b7a441e8bf0396aa
2012-06-14 14:27:01 -07:00
Christian Williams 86d891605d Most of backspace and delete support, methods for starting and stopping polling.
Change-Id: Ic387d9eed3a1368dd70c7a86c7b9761400c76f93
2012-06-14 12:17:42 -07:00
Inez Korczynski 9d487c1824 Special handling in pollChanges loop for case when node is null. 2012-06-13 22:23:59 -07:00
Inez Korczynski 3667c2cf83 Block triple click (select node) - temporary - as long as we don't have robust support for it. 2012-06-13 22:19:10 -07:00
Inez Korczynski c3cf5617fd Use ve.ce.getDomText and ve.ce.getDomHash instead of ve.ce.Surface.getDOMText and ve.ce.Surface.getDOMHash. 2012-06-13 22:05:38 -07:00
Inez Korczynski ba680afcc3 Fix bugs in getDomText method. 2012-06-13 22:04:52 -07:00
Inez Korczynski f4a4952d18 OMG. We have typing, autocorrect and spellcheck working. (Still no IME and still may break cut/paste) 2012-06-13 21:46:29 -07:00
Trevor Parscal 169b7e754d Cleaned up toolbar annotation updates
Change-Id: I8cefd6c871ed6d1ad71f64eb66236de1b8b719b5
2012-06-13 14:31:46 -07:00
Rob Moen 75e9b2cb2d On transact, redraw selection
Change-Id: Ia2f82dd1516113a3c6e77377fec19047fcbd32d0
2012-06-12 13:27:23 -07:00
Trevor Parscal 722c30466d Got rid of wrapping whitespace (like \n and \t) in a span that made text white
This was causing some issues when you started typing there, and it's not clear that the white text is really the best way to go anyways

Change-Id: I8a9d6571ea204603729e96b7ff77184279a31a95
2012-06-12 10:40:44 -07:00
Christian Williams 05ee4e7dac Binding to 'before paste' for IE only
Change-Id: I3e3125d2faf75ea79e7f4c4d86fa1ccd666074b6
2012-06-12 10:23:58 -07:00
Christian Williams 1e4c52237c Enter key handling
Change-Id: I1b5f901a542328c3ae7c19a5cd816112dcac4042
2012-06-11 19:40:09 -07:00
Catrope 44af6bdb18 Factor out redundant getNodeFromOffset() call
Change-Id: Ie01282447fab589466554f7c637515289cf570af
2012-06-11 18:10:09 -07:00
Trevor Parscal 59f9bdf22f Made use of ve.proxy instead of surface having it's own implementation
Other cleanup as well

Change-Id: I5de5c048e341dd3dc3ef222ae5686c49e51a32a5
2012-06-11 16:11:49 -07:00
Trevor Parscal 21ff108c28 Bring link converter in line with Parsoid
Parsoid outputs rel="mw:wikiLink" or rel="mw:extLink", so we convert that to link/wikiLink and wiki/extLink respectively.

Also preserve the data-mw attribute; we probably need to do this more generally but this'll do for now.

Change-Id: I32e570bffa5a73a733a120d52cfd8b75d3191e02
2012-06-11 00:36:20 -07:00
Trevor Parscal c40dd953ca Remove stray debugger statement
Change-Id: Ie7c37e658d6d6bc15d5d7c24b2f5cd13945c5243
2012-06-11 00:33:13 -07:00
Trevor Parscal 2e1b304a48 Cleaned up styles for editor in both demo and sandbox/integration
Change-Id: I9b4a3727fd04b3c3ff3f297c6656db2592856173
2012-06-08 16:20:37 -07:00
Trevor Parscal 89b2260bfc Revert "Support for basic text insertion - typing"
This reverts commit 21056ff5ec.

Change-Id: I86bb28d868b2c931f4b6e18ba5023a8a75b40231
2012-06-08 15:54:05 -07:00
Inez Korczynski 21056ff5ec Support for basic text insertion - typing 2012-06-08 15:31:29 -07:00
Trevor Parscal 402d6dc53a Added rendering for link/unknown
Change-Id: I47cdc8679c533f15059b290bf30ae74518dce724
2012-06-08 15:15:43 -07:00
Trevor Parscal 2e0d4ef094 Make tableCell represent both <td> and <th>
Adding a 'style' attribute which is set to either 'data' or 'header'

This breaks even more tests because of missing style attributes

Change-Id: I0a75d8c1578b4414eeae8c484f6c4d6f8a59472a
2012-06-08 12:27:22 -07:00
Trevor Parscal c614d3391b Add ve.dm.TableSectionNode and ve.ce.TableSectionNode
Yes, this breaks a bunch of tests, because tableRows are now required to be inside tableSections

Change-Id: Idb52d988df69173647c85f7602344650456e078e
2012-06-08 12:26:45 -07:00
Christian Williams 244551ff96 Updating model selection after cut and paste
Change-Id: Iefaec5a3d705c6caae76941bc05810152d870bb8
2012-06-07 14:48:46 -07:00
Rob Moen 9fe6658a0e Put getSelectionRect method back in surface view.
Change-Id: Iaec899bec157ef39810d391b2ed51d4f8fe3be9d
2012-06-07 14:13:55 -07:00
Rob Moen 4b940c3b19 Init rangy in case of Toshiba
Annotate button redraws selection after annotation
Added contextView hooks to select listener in toolbar.

Change-Id: I598fe715dd84976862eed63e4f55cb6bc6e75b18
2012-06-07 14:04:39 -07:00
Christian Williams 1f86885d47 Fixing copy and paste
Change-Id: I57ead6a6d831aa739df49960f97cb2f91f672730
2012-06-07 14:03:48 -07:00
Inez Korczynski 6704b01e30 Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-07 11:44:35 -07:00
Inez Korczynski 5c41fa2fb8 Define min-height for P and HX tags - needed when those tags are empty.
Change-Id: I0ba1c950cc06b3ff040c208c1b9a4970b2f73493
2012-06-07 11:44:05 -07:00
Trevor Parscal 18461387c0 Roan officially does not owe the team lunch (at this precise moment)
Change-Id: I90a6198da97ea90f60d9668c21d7386984a03ff0
2012-06-07 11:33:58 -07:00
Inez Korczynski 02f913a7db Added accidently removed registrations for events handling.
Change-Id: I6e5df649909b025f7e7aeb35ff9e8ff0b7fcd5f9
2012-06-07 11:10:08 -07:00
Inez Korczynski 97001e1301 Improvements to selection mechanism.
Change-Id: I031dd3493832034c985b15bf213cafe2c4813136
2012-06-07 11:03:22 -07:00
Inez Korczynski 95297a2c73 Delete from ce.BranchNode code that is not needed anymore.
Change-Id: I64f869a9fd54d089d2c6a31d827ddaccb9ece900
2012-06-07 11:02:59 -07:00
Inez Korczynski f711d78d4d Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-07 10:58:42 -07:00
Christian Williams 51aa317df3 Undo and Redo support
Change-Id: Icdbebccefe3cc162b9ff6c0d978d5e4fc1f2c561
2012-06-06 20:28:06 -07:00
Inez Korczynski d96db8dce7 Merge branch 'dmrewrite' of ssh://review/mediawiki/extensions/VisualEditor into dmrewrite 2012-06-06 18:50:02 -07:00