Inez Korczynski
f97ef02370
Early version of support for typing in "slug" (turning it into paragraph)
2012-06-18 15:50:20 -07:00
Inez Korczynski
6276938d21
Fix problem with turning elements of one type into elements of another type.
2012-06-18 15:30:23 -07:00
Inez Korczynski
6d5e524817
Cleanup in ve.ce.Surface - no significant changes
2012-06-18 15:11:54 -07:00
Inez Korczynski
52aaabd499
Fix ListButtonTool to use method "change" instead of old "transact"
2012-06-18 15:04:30 -07:00
Inez Korczynski
79b1726b70
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-18 15:04:00 -07:00
Inez Korczynski
78028ff588
Ported method debounce from underscore.js to ve.
2012-06-18 15:03:38 -07:00
Trevor Parscal
f49aa141aa
Redirect through the view page when coming from a diff page
...
Also added URL mixup using window.history.replaceState
Change-Id: If84998b0fe945d82fdfa9a8c88391db30286e972
2012-06-18 14:53:28 -07:00
Inez Korczynski
81375698a2
Fix minor bug in ve.log
2012-06-18 14:48:42 -07:00
Trevor Parscal
70b8c92660
Converted more uses of console.log to ve.log
...
Change-Id: Id41130de088e56dbe8774689317002baa66f5950
2012-06-18 14:19:07 -07:00
Trevor Parscal
76bca4f520
Added veaction param which auto-initializes the editor
...
Made edit tabs rendered on non view pages work correctly by routing them to the view page with an extra param that auto-initializes the editor
Change-Id: I4fd9106c8b45c6fc79af9ccb44e18944e9b9d8b9
2012-06-18 14:13:26 -07:00
Trevor Parscal
11a3d883f2
Using resource loader debug scripts to unstub ve.log
...
Also added ve.dir and converted use of console.log to ve.log
Change-Id: Ibbfd78b6ece163f54f40e997c79a01de6609c2b4
2012-06-18 13:30:39 -07:00
Inez Korczynski
1fa1908402
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-18 13:19:24 -07:00
Inez Korczynski
8b823a7dc6
Introduce new method in Surface model called "change" and get rid of "setSelection" and "transact". Start using new method in Surface view - which right away fixes two bugs - typing at the and of the document, and typing in newly created paragraph/heading.
2012-06-18 13:19:07 -07:00
Trevor Parscal
005721cb81
Major cleanup, fixes and refactoring of ve.init
...
This solves lots of issues in the integration work, and also makes it much easier to extend this class to integrate it into other skins
Change-Id: I3b3c5b22a5664e6cf37e429cc0ac3be2e75b630f
2012-06-18 13:12:47 -07:00
Trevor Parscal
debef5671c
Made the first paragraph in a list item have no margins or padding to simulate raw text
...
Change-Id: I7e0aeb9a15db4a56f2a3552430c0da0202f97a97
2012-06-18 13:12:47 -07:00
Christian Williams
ad1e4947d7
Fixing ve.log for IE9
...
Change-Id: Idfcb68abcdae606a4fd78bfec51cb18a8fb495a2
2012-06-18 12:21:22 -07:00
Catrope
b74f24851a
Actually fix getRange() this time. Hopefully.
...
Change-Id: I583a9c2c1ae01370988b4a34ddbf7d3d231e0a74
2012-06-15 16:09:08 -07:00
Christian Williams
3885eb766d
Using empty pseudo selector and blank image dataURI to battle IE's ridiculous hasLayout bug.
...
Change-Id: I2acec8ff4d7444726b94c46fc53c0085457c959e
2012-06-15 15:14:13 -07:00
Christian Williams
8805cebc6e
Start/stop poll handling for cut and paste
...
Change-Id: I8a9dcad6f320bdc90b79bfeaad10622543483ffa
2012-06-15 11:47:05 -07:00
Rob Moen
d1eba674b1
Write a better debounced onSelect method for showing the context
...
view icon after select events are finished being fired.
Change-Id: I4e1307b90eed14b1c9167830018e50b9c7832ae6
2012-06-15 10:46:45 -07:00
Catrope
0be0ebf4a8
Forgot to add dl as a sublist type
...
Change-Id: Ie04904ffdaf20402dbb22ebe96bcaf2db9ea8b8a
2012-06-15 00:07:09 -07:00
Catrope
a4589106ec
Add a TODO note about preventDefault in alien nodes
...
Change-Id: I9aa0c6bec1587bdc65f1585c9ea3562c6d2153e6
2012-06-14 23:57:40 -07:00
Catrope
be05c9d7ef
Add a TODO to the image code about width&height
...
Change-Id: I75569c1191a7846567e4a4af2dbcd45449cb729c
2012-06-14 23:54:30 -07:00
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
Catrope
dae599ac2f
Fix the newline workarounds (for Parsoid newline handling) for headings
...
* Parsoid outputs bare newlines after a heading unless it's followed by
a <p>, so strip leading and trailing newlines in all bare text
* Adding a leading newline in <p>s is only needed if preceded by a
heading, don't add it otherwise
* Headings need a bare newline after them unless followed by a <p>
* Headings also need a bare newline before them if preceded by a <pre>
Change-Id: Ib02f800b26453541604e920fbb3845c51cdc6dea
2012-06-14 22:50:46 -07:00
Catrope
13c44dd336
Apply <p> tag workaround to <dd> and <dt> too
...
Change-Id: Ie639c8fd740adc8d9fa26d61ebae2716e41eb2ba
2012-06-14 22:50:46 -07:00
Catrope
37a1bf7cc8
Fix indentation of comment, remove commented-out debugger statements
...
Change-Id: I7db94e262100cb83be382de4ac4858a1535bc9f5
2012-06-14 22:50:46 -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
6b2fb7b2e0
More dirty hacks to deal with Parsoid's behavior re newlines in <p>s
...
This strips certain newlines added by Parsoid so they don't end up in
the linear model, and puts them back in on the way out so Parsoid
doesn't freak out and produce invalid wikitext
Change-Id: I256aaded4229c915868dc868ec6eaa1a73e00be1
2012-06-14 19:35:39 -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
da306ae08d
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-14 17:25:16 -07:00
Inez Korczynski
fc138f3497
Start polling in async mode after document node is focused
2012-06-14 17:24:15 -07:00
Rob Moen
846d027ff7
Rewrite listButtonTool list and unlist methods.
...
Need to rewrite updateState method and polish unlist.
Change-Id: Ia18e038b4941a32f176747e00ed1881887cb1a8d
2012-06-14 17:22:45 -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
Christian Williams
945f39fe1a
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-14 17:02:47 -07:00
Christian Williams
0413c5bc7e
Stop and start polling for undo and redo
...
Change-Id: I041f4c1d28a44797101da278c70e5e1759ebe6d2
2012-06-14 17:02:29 -07:00
Catrope
884e107a24
Fix typo rawr
...
Change-Id: Ib80b5e62aa4053c070ebdd065f327b54a30dc90f
2012-06-14 16:57:09 -07:00
Inez Korczynski
a57be133fb
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-14 16:41:15 -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
Catrope
6d6914c3bc
Fix missing adjustment in TransactionProcessor
...
I forgot to adjust a range based on this.cursor for this.adjustment .
This indirectly caused Rob to get an exception when trying to wrap
the last node in the document, because the unadjusted range was past the
end of the document.
Change-Id: If9d5b76568fae25ba2c0f405f1c4fcdd8d879e4f
2012-06-14 16:36:16 -07:00
Trevor Parscal
45bf3577b8
Restored animated toolbar positioning
...
Change-Id: Ie7d44c6cd0fc459cfd02b6a68fa317ceadac7e7b
2012-06-14 16:30:31 -07:00
Catrope
2393ce4627
Fix broken getRange() function, wasn't skipping the opening element
...
Change-Id: Ib02cf9d22ba612e1cee02a4dd75f106907b74949
2012-06-14 16:23:20 -07:00
Catrope
bd69fdd93f
Don't blow away attributes coming from toDataElement()
...
This fixed a bug where an <h2> element with HTML attributes would be
converted to a 'heading' element with those HTML attributes but without
the 'level' attribute, which indirectly caused an exception somewhere in
ve.ce
Change-Id: I8bf32ff0d8e0f9d016b2abc6cb31824df05bdfc2
2012-06-14 16:06:35 -07:00