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
Rob Moen
932324c016
Fix clear button tool. Getting / clearing all annotations
...
Change-Id: I2fc2da20da149cd5fdf3f2cd33aeed2e033fd979
2012-06-14 15:04:40 -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
ee475cc54a
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-14 14:33:38 -07:00
Inez Korczynski
260d3c0413
Fix bug with losing selection direction.
2012-06-14 14:33:33 -07:00
Trevor Parscal
656439240d
Added support for clicking section edit links
...
Also now hiding the TOC with animation
Change-Id: Ia355d4104e0bfc276fe0c08d6faa2719e3556c06
2012-06-14 14:31:23 -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
Catrope
bb5c82745e
Handle aliens correctly in the converter
...
Previously, data-mw-gc (generated content) elements were unconditionally
converted to alienInline nodes, and unrecognized elements were
unconditionally converted to alienBlock nodes. This is wrong and
produced weird results when I started experimenting with <code> tags.
Instead, I made both gc and unknown element trigger alienation, but the
decision of whether we generate an alienInline or an alienBlock node is
separate and is based only on whether we're inside a content node.
Change-Id: I12335337c3fa60c725ae7bcfbfb52a1dda153fb5
2012-06-14 12:24:14 -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
Inez Korczynski
94d29eaf49
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-13 21:17:13 -07:00
Catrope
e6751e3f03
Set data.title based on sHref so LinkInspector can use it
...
Change-Id: I7589740ec5661afd7c8dd0f54e955d170e3096e6
2012-06-13 19:32:49 -07:00
Catrope
f83cdc4eaa
Hack around Parsoid bug in link handling
...
Parsoid ignores sHref when converting back to wikitext, so we have to
set the href attribute to "/$title"
Change-Id: I1068116c0be72197619d0df3b4d1231a3879fa14
2012-06-13 18:53:13 -07:00
Catrope
9c939047be
Fix return value of ve.ui.LinkInspector.getSelectedLinkAnnotations()
...
Was returning a single annotation, but all callers were expecting an
object.
Change-Id: I55be083e5451f4ace5e54dfecb904ae53041054b
2012-06-13 18:49:38 -07:00
Catrope
9d9c06f4e2
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-13 18:31:05 -07:00
Catrope
d0adb112c0
Needs copyArray instead of copyObject, d'oh
...
Change-Id: Ic185d328a87579262458fe24fd01539c495f09a2
2012-06-13 18:30:50 -07:00
Trevor Parscal
75ac5b03e6
Improved appearance of activating and deactivating editor
...
Also prevented double-initializing
Change-Id: I9e64eb1f331489f6acee469fdab64133d817e7b1
2012-06-13 18:26:21 -07:00
Inez Korczynski
092e84d31f
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-13 17:19:11 -07:00
Trevor Parscal
31a2a0243a
Removed duplicate update event on length change and cleaned up some methods that were being called by symbolic operation name
...
Change-Id: Ica623d1c5619b8268eb97f631e09f9e2f5b67bf0
2012-06-13 17:16:04 -07:00
Trevor Parscal
e266905b94
Moved history tracking into a startable/stoppable service
...
And made it not start on it's own, but be started by ve.Surface - this makes it so it's not polling in the unit tests, for instance
Change-Id: I940df04d392fd134d18847949efe0e2232328323
2012-06-13 17:16:04 -07:00
Catrope
efa93c24be
Copy objects in newFromWrap() to prevent reference pollution
...
Change-Id: Ia1f71341342bea44f6ca08088a1276d54187b22a
2012-06-13 16:56:51 -07:00
Inez Korczynski
29a8ac77c3
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-13 16:23:35 -07:00
Inez Korczynski
81473a8119
Make method ve.dm.Document.addAnnotationsToData accept collection of annotations as a param - instead of an array
2012-06-13 16:23:19 -07:00
Catrope
7dd65cda91
Add newFromWrap(), ported 98% verbatim from the old code
...
Change-Id: I81fc74b1d23bc6b60e476bfefbae4d7d9a9bf5f6
2012-06-13 16:17:23 -07:00
Catrope
0bc1693998
Fix partial undo of ab0c37 in 2ea103
...
Change-Id: I42225802c45b3867a2aafd40e6941754b1b415b4
2012-06-13 16:16:07 -07:00
Trevor Parscal
429225fb57
Whitespace fixes (jshint was tweaking out)
...
Change-Id: Id75a097ae4958029caf0a0315343c2fab9c99b89
2012-06-13 16:06:21 -07:00
Trevor Parscal
56c0f597cd
Fixed use of "pre", "preformatted" is the correct symbolic name
...
Change-Id: Ifc7e8e3291b8dd29a7fa4c42529bb4fd36a6ed9a
2012-06-13 15:15:05 -07:00
Trevor Parscal
8cb5cbf75d
Merge branch 'refs/heads/master' into dmrewrite
2012-06-13 15:00:44 -07:00
Trevor Parscal
84ce839ce5
Removed context menus on tear down of surface
...
There needs to be a proper tear down system for ve at some point
Change-Id: I6454423ab96a15932695fbc5429d9e731acc9071
2012-06-13 15:00:13 -07:00
Trevor Parscal
1628038bdb
Using wikiLink instead of internal to match actual documents
...
Change-Id: I24b9c0a5f27ed8f4a7861090ab4049c4614cea78
2012-06-13 14:48:29 -07:00
Trevor Parscal
95c601c8e9
Make save dialog initially hidden
...
Change-Id: I8fc4bd67f16266d9355fe639487728ad91ad6ede
2012-06-13 14:44:39 -07:00
Trevor Parscal
169b7e754d
Cleaned up toolbar annotation updates
...
Change-Id: I8cefd6c871ed6d1ad71f64eb66236de1b8b719b5
2012-06-13 14:31:46 -07:00
Rob Moen
26e0f6ed5f
Real cross browser fix for invisible iframe bug.
...
Change-Id: Ia2d3c83562542aaaddf0b81dfeaef9aa408aaed3
2012-06-13 13:29:18 -07:00
Subramanya Sastry
bf0f5d1b7e
Minor code cleanup
...
Change-Id: Ic5d99b6c483841310b0c295c1c30246f907455b4
2012-06-13 13:47:26 -05:00
Subramanya Sastry
23ec054013
Fixed round-tripping of interwiki links.
...
Change-Id: If0427b9865b3e9cf8c0ad0b4efaebc9f9f7fb865
2012-06-13 13:39:18 -05:00
Subramanya Sastry
445780b4d3
Revert default tokenization result from null to ''
...
* As part of an earlier fix, I had changed default value of 'res'
to null instead of ''. But, this was potentially buggy because
the previous check was (res !== '') which could be triggered
by return values of handlers. By changing the check to null,
I was effectively changing the code paths for those handlers that
returned ''.
Change-Id: I2302023be7422ce4fb384ff5a50fe53fa7732855
2012-06-13 11:53:05 -05:00
Subramanya Sastry
cfe94eed1f
Minor code refactoring
...
Change-Id: Iec3cb4d83d16174371f0b1f3f23b1056aeed458e
2012-06-13 09:46:34 -05:00
Rob Moen
a991cefbe7
Fix inspector close bug where iframe was blocking editor below
...
Fix Inspector bug which prevented applying a link annotation to data
already containing annotations.
Change-Id: I6f315d50805c8c71f2155f955ea5674a7ce98656
2012-06-12 13:52:42 -07:00
Rob Moen
b843762d9e
rewrite comment
...
Change-Id: Ibc8aab4843ecc0211149aa673d312384e9bd668e
2012-06-12 13:29:13 -07:00
Rob Moen
75e9b2cb2d
On transact, redraw selection
...
Change-Id: Ia2f82dd1516113a3c6e77377fec19047fcbd32d0
2012-06-12 13:27:23 -07:00
Catrope
c9605066cd
Merge remote-tracking branch 'origin/master' into dmrewrite
2012-06-12 11:57:32 -07:00
Subramanya Sastry
f882a65153
Fix serialization of <pre> tags
...
Change-Id: I7ae95e7ec06167d0c1bfdaba3d0c67d941043299
2012-06-12 13:54:35 -05:00
Rob Moen
bf5b682809
Fix clearButtonTool
...
Change-Id: I92e55efb9c82f4d2ef55a71bea318cdc7495c2ea
2012-06-12 11:43:56 -07:00
Rob Moen
bf08347922
Fix js error
...
Change-Id: I3424f205649345a97a7f4d28c4c040c3c3bb6aa7
2012-06-12 11:17:46 -07:00
Rob Moen
2ea1030ab4
Rewrite document annotation getters to return collection objects
...
vs arrays
Change-Id: Ib48a39fff501cdb769f5b9b9fc7717805b74236e
2012-06-12 11:10:29 -07:00
Rob Moen
da3e366758
Updating tools on transactions. Working towards finishing clear
...
button
Change-Id: I7b6f8cae04fc181b7c8c61d4977e42480e608829
2012-06-12 10:44:58 -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
Trevor Parscal
9b9dcca6e2
Made save page button only work when an edit is made
...
Also added confirmation dialog for abandoning unsaved changes
Change-Id: I3388a8f7def9bee5eda32b97ef78e9565a7e33ea
2012-06-12 10:32:19 -07:00
Trevor Parscal
cd3cf1d856
Changed use of getSurfaceModel to getModel and surfaceModel to model
...
Also cleaned up other stuff that was a little wonky
Change-Id: I6769b0cb53adb9fd4a9411937084efb03a6e3029
2012-06-12 10:32:18 -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
Trevor Parscal
77853609ed
Merge branch 'refs/heads/master' into dmrewrite
...
Conflicts:
.gitignore
Change-Id: I73ff881ef3beef702748a2bfffee9e1661004f86
2012-06-11 18:36:46 -07:00
Trevor Parscal
70234d2507
Fixed missing arg, kept stuff from saving
...
Change-Id: I6c02b2a009f03b2d9e293591166819743fe7ee24
2012-06-11 18:35:24 -07:00
Trevor Parscal
4cc88b9850
Fixed some minor-ish UI stuff
...
Change-Id: Ibc3fa2fb7ce9193703263ab708ce18f6aefe5b09
2012-06-11 18:21:41 -07:00
Trevor Parscal
f0ef6bda70
Fixed drop-down arrow placement
...
Change-Id: Ia9ce735a7938c2db0bad28b44384cf7d206a2023
2012-06-11 18:21:40 -07:00
Catrope
92d715df92
Fix some comment typos
...
Change-Id: I58e21bb4cb75580369b89a10cf324c100ed15724
2012-06-11 18:19:12 -07:00
Catrope
44af6bdb18
Factor out redundant getNodeFromOffset() call
...
Change-Id: Ie01282447fab589466554f7c637515289cf570af
2012-06-11 18:10:09 -07:00
Catrope
ab0c37def9
Rip out the offset map
...
The offset map was broken from the start because it wasn't updated when
adjusting the length of a text node, and if we fix that bug it's
doubtful whether the costs of updating the offset map outweigh the
benefits, especially considering that adjusting the length of a text
node is something we do for almost every keypress. If it turns out
having an offset map does make sense, we can always reintroduce it
later.
Change-Id: I59e8bc154f7d07aa1bab2f473c13ff466d0e463f
2012-06-11 18:10:08 -07:00
Catrope
407ea15373
Make the LinkAnnotation code a bit more robust
...
Change-Id: I42603788cf112541df67811858bd8854dd224b24
2012-06-11 18:10:06 -07:00
Catrope
48abc8e30a
Terrible hacks to work around Parsoid bugs
...
This makes my test document round-trip cleanly though, yay!
2012-06-11 17:32:58 -07:00
Rob Moen
dcf104428f
Clear button tool now properly clearning selection annotations.
...
Create method to return matched annotations button tool pattern.
Change-Id: I5ba2369f1ec81a74570bcfeb1ee86bb7ef07e691
2012-06-11 16:29:09 -07:00
Rob Moen
810ba6df89
Modify FormatDropDownTool to use new transaction builder
...
newFromContentBranchConversion
Change-Id: Ifcec60ed57c7c92a5c08219d5f046e904300d5c2
2012-06-11 16:20:14 -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
7d7fd74d29
Renamed EditPageTarget to ViewPageTarget (since it's targeting view pages, not edit pages, duh...)
...
Change-Id: I810de87940e0d061c59d32de6654f1f2431f8d82
2012-06-11 16:06:35 -07:00
Trevor Parscal
c8c4ed8f99
Added ve.dm.Transaction.newFromContentBranchConversion
...
Change-Id: I0e272b24dddae028e44d4c693297b1875000ef57
2012-06-11 15:58:44 -07:00
Trevor Parscal
2c393d4cad
Added normalization to ranges given to selectNodes
...
Change-Id: I11b7d9b4f8359ab60c1a2f0443dea209a3735711
2012-06-11 15:58:44 -07:00
Trevor Parscal
9891adf116
Added getRange and getOuterRange to ve.dm.Node
...
Change-Id: If1b226d7944335e9b78d59433e322faf5d48382e
2012-06-11 15:58:44 -07:00
Subramanya Sastry
727c2119bb
Refactored serializeToken method and added special-case handling of
...
paragraphs in lists.
* We need to look at other special-case handling requirements of
html tags in lists (and other contexts like tables).
Change-Id: I84b8402d90a186c9075c2d45263c94377312927a
2012-06-11 17:55:41 -05:00
Inez Korczynski
a609afe52f
Port static method addAnnotationsToData from ve to ve2
2012-06-11 15:31:55 -07:00
Catrope
dcdc1737ca
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-11 14:53:28 -07:00
Rob Moen
542131e080
Properly clearing link annotations now
...
Change-Id: I2342ad496566e6d7f6e39a30f70af1f886398069
2012-06-11 14:50:52 -07:00
Catrope
b26649a2e8
Guard against passing undefined into ve.compareObjects(), was causing errors
2012-06-11 14:48:46 -07:00
Trevor Parscal
82c409ca18
Changed loading graphic, added focus on load
...
Change-Id: I2d91c25edc7b759f07fe1581953fa0e5baecb51c
2012-06-11 13:24:35 -07:00
Rob Moen
29c76e6dd4
Fix link annotation from inspector by changing link type to wikiLink
...
Change-Id: I5b3497755c6a13e2767f59cc5c95b3e4b43b3be7
2012-06-11 12:56:18 -07:00
Trevor Parscal
a0d5cbd42a
Animated the margin of the first heading and fixed animation of save dialog
...
Change-Id: If4a37aa9e35d9d507577643e4bd40ea4fa3dfad8
2012-06-11 12:28:31 -07:00
Trevor Parscal
17fff0d163
Fixed dependency on mw, now demo works again
...
Change-Id: I26599e065a521cf08a16f5a65e36960a692421e9
2012-06-11 12:11:07 -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
ce8efd6b15
Refactored veCore class into ve.init and ve.init.EditPageTarget
...
Change-Id: I52ef09aee38471ca49f3f4a845daf02e6dcc024c
2012-06-10 23:54:41 -07:00
Rob Moen
38e64418b5
Move inspectors into iframe loaded in contextView.
...
TODO- needs cleanup
Change-Id: I62d86260b48ef570ce18833dee3390ec9fff47e1
2012-06-08 17:17:11 -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
Christian Williams
80194260f3
Undo and Redo
...
Change-Id: I2d7c1bfd164a42e5d52001054e52e47ca245ad18
2012-06-08 16:21:47 -07:00
Trevor Parscal
a2231cb6ca
jQuery expects a string for the data, not a DOM element
...
Change-Id: I16b6f00952a2d9e38d631409b9bf3dd7ada644e7
2012-06-08 16:00:30 -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