Catrope
fc4ba3019a
Fix selectNodes() bug: empty range at the start of a node returned []
...
Because of the end>=left condition, the loop was exiting right before
hitting the startBefore case, so use end>=left-1 instead.
Fixing this exposed another bug that caused nodeRange and nodeOuterRange
to be off by one: we need to increment left after storing it in
startOffset, not before
Change-Id: I54e18fb2119c8caefb4f7a7f2be43c6129afc4c0
2012-06-19 17:12:36 -07:00
Catrope
39dbbf9455
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-19 16:19:00 -07:00
Catrope
dc3be737b4
Merge remote-tracking branch 'origin/master' into dmrewrite
...
Conflicts:
VisualEditor.i18n.php
api/ParserService.js
modules/parser/mediawiki.WikitextSerializer.js
Change-Id: I47b299ff3a6d948dcbeaf53cde5786362b23f66c
2012-06-19 16:16:53 -07:00
Trevor Parscal
babb636058
Cleanup
...
Change-Id: I4af98700e5c4739d749ec95abc111710208d2177
2012-06-19 16:08:14 -07:00
Catrope
61f4a8af78
Update the code to account for the fact that sHref is now a string
...
and update tests to reflect the recent changes in link handling
Change-Id: Ie1a3e409c22c09f104c244b1db4764fd202fc885
2012-06-19 16:04:07 -07:00
Catrope
b6ad91655d
Make external links (mostly) work
...
This handles internal and external links separately, only setting
'title' for the former and only 'href' for the latter.
On the way out, detect external links using a simple regex (needs
improvement). Also don't write sHref any more per Gabriel's request.
Change-Id: Ibc2436d0a12de1d027e116f181db640cbcf3d522
2012-06-19 16:04:07 -07:00
Catrope
a80dcf84c6
Prevent the newline hacks from adding newlines before a link
...
We might be able to get rid of these altogether but I'd rather not touch
this too much for now
Change-Id: I0b55af017df7d9dc023b2d23ecd4f891cb75946b
2012-06-19 16:04:07 -07:00
Catrope
980ae78861
Prevent the converter from creating empty list items
...
Change-Id: Iae7d5d791d09400f7d3d799043efe6b8714465ec
2012-06-19 16:04:07 -07:00
Trevor Parscal
268e793b03
Fixed class names to match what's in the DOM now, fixes inspector positioning
...
Change-Id: I0e15c4a9a50b5894a31b1d37251adb3fd4893539
2012-06-19 15:47:17 -07:00
Gabriel Wicke
33dc9abb0d
Clean up sHref handling a bit
...
* sHref is now always a string
* fixes crasher when sHref is not set
Change-Id: If5756948ac6bc26c2d7c04d970b5aba5331cb8bb
2012-06-20 00:34:57 +02:00
Trevor Parscal
ba88697145
Remove the context menu stuff when tearing down
...
Change-Id: I7332d449e428aeec8952f7c70d325db7c5d5366a
2012-06-19 15:32:22 -07:00
Trevor Parscal
c39577a06c
Made context menu not open after selection ends over top of it
...
Also fixed some of the positioning to stay correct while scrolling and resizing a window
Change-Id: I40d57b4fb035aea0b43b998251a93a83a46b9735
2012-06-19 15:26:37 -07:00
Gabriel Wicke
e117f09362
Wikitext escaping and quite complete source range tracking
...
* Started to add more complete tag source range (tsr) annotations to most
start / empty tags. These replace the old sourcePos and sourceTagPos
annotations, and look more promising for general round-tripping than block
source ranges (bsr). See
http://www.mediawiki.org/wiki/User:GWicke/Parsoid_source_ranges for some
notes on this.
* Added an escapeWikitext method in the serializer that tokenizes supposedly
text-only content from the DOM with the tokenizer and wraps runs of returned
non-text tokens into nowiki tags. The source corresponding to non-text
tokens is retrieved using the tsr annotations.
* Removed old (unused) table productions to avoid confusion.
* 276 round-trip tests are passing, vs. 283 without escaping.
Known issues:
* harmless for now, can be improved later: urllinks in external link captions
are wrapped in nowiki. Example HTML:
<a rel='mw:extLink' href="http://example.com ">http://example2.com </a>
* some start-of-line syntax in wiki-syntax preformatted blocks might be
wrapped into nowiki when that would not really be needed. Example HTML DOM:
<pre>
* foo
* bar
</pre>
Change-Id: I01c34aedd5c566614d36924add47a6a960e91987
2012-06-19 23:36:44 +02:00
Rob Moen
89df02cdb6
remove on transact proxy as only listening to change
...
Change-Id: Ifb809a24427f9970fd9a885507fdb376b2dad509
2012-06-19 14:15:31 -07:00
Trevor Parscal
44d50c980f
Added i18n messages to mw.msg fallback
...
Change-Id: Ic4b44eb6ab31392fa727f14ec38800fe6b185d44
2012-06-19 13:58:54 -07:00
Trevor Parscal
39dc10d1d8
Fixed drop-down styling to avoid wrapping
...
Now that the message keys are showing in the demo we can see how bad things look if the drop-down label is too big and wraps
Change-Id: I776a7e480a3f6240c0929f2f50a865c2de4ec0a5
2012-06-19 13:48:50 -07:00
Trevor Parscal
dc6ab4fb95
Introduced ve.msg, an alias for mw.msg if it's available
...
Change-Id: I67c737e585033edc565e2d941c5a729836a2dbec
2012-06-19 13:44:34 -07:00
Trevor Parscal
ecabf9d0cf
Fixed the history buttons to be locked out when disabled
...
Change-Id: Ie68737a271c683ba0e196d910ef562ac1313c69b
2012-06-19 13:05:32 -07:00
Rob Moen
9f3a8e719f
Rewrite updateState for listButtonTool
...
Change-Id: I690ce70304ed49e71836297c701eceb2269d9b97
2012-06-19 12:57:51 -07:00
Trevor Parscal
cc17c81469
Convert content branches to paragraphs before wrapping them in a list
...
Change-Id: I987a92e838b817dfe7afbcaae19c03b9437f7b66
2012-06-19 12:50:01 -07:00
Trevor Parscal
70c8a4fe35
Allow retry after load failure
...
Change-Id: Ib0766427013a20e70cca3c17c29246d25690079f
2012-06-19 12:26:08 -07:00
Trevor Parscal
9dd09e6b4f
Improved error handling and locked the save dialog save button while saving
...
Change-Id: I57483f242ef81e17ec1c9d30871c07c2a177a590
2012-06-19 12:15:57 -07:00
Catrope
4192d1784a
Actually fix the error in the previous commit
...
Change-Id: I5dd841692b2f39c807527dbeb116c904c7cb0994
2012-06-19 12:14:57 -07:00
Catrope
56a98e0d9c
Use jQuery for lastChild as well, for consistency and to prevent errors
...
Change-Id: Ia024dbc5ca60e857987aeb652a9c8af5d423c2d0
2012-06-19 12:10:29 -07:00
Catrope
f2a07014e3
Set sHref on links on the way out
...
This fixes handling of internal links, but this code needs more love
Change-Id: I2424d23bd7e795bd7c9cc3443fe4ec4001f2a8c9
2012-06-19 11:59:28 -07:00
Catrope
f08c0ca3a0
Don't add newlines to text nodes inside lists
...
Change-Id: Ife11f7b87ab540a8a99f13315f889c2aa41a6a32
2012-06-19 11:55:45 -07:00
Trevor Parscal
a62e011d68
Reduced selecting on the documentNode
...
Change-Id: I6f90e931eedad518d6716cb965606b8fb9387f1e
2012-06-19 10:50:41 -07:00
Trevor Parscal
fed9915ba5
Reset the save dialog between uses
...
Also fixed the watchList binding for loading the right state
Change-Id: I25822ba9dfb25d5f8ade765baf6ae69adc9d40ae
2012-06-19 10:50:41 -07:00
Rob Moen
d3cb2ccb26
write update and unlist method for list button tool
...
Change-Id: Ie1f0f8755aac7058d93890e13efefb3c63ee9710
2012-06-19 10:08:05 -07:00
Catrope
97a1edfd72
Crusade against hardcoded English, i18n for everything
...
Change-Id: Ibc658e5f67a373394a4ba149e9b9003f3803023a
2012-06-19 01:30:30 -07:00
Catrope
6a48f2b829
Fix inconsistent parameter lists for loadError and saveError events
...
Change-Id: I7d195793f05f98ff3218f494ef78f9981f6b716f
2012-06-19 01:24:40 -07:00
Catrope
c15b9d04a0
Fix typos in license text
...
Change-Id: I0777955b976c2a5d11e5cde78d12b403b8ec7828
2012-06-19 01:24:40 -07:00
Catrope
5db6504cd3
Fix method docs for change(), you can't actually pass multiple transactions
...
Change-Id: I24dd0bd009cd2a7588d8bd45c4580460d49271c7
2012-06-19 01:24:40 -07:00
Inez Korczynski
3ac2c8e494
Improve handling for enter key - and support typing "on the selection" by removing selection first.
2012-06-18 22:25:16 -07:00
Inez Korczynski
4cef63538f
Replace every second space with and do the same for the first space and last space.
2012-06-18 22:24:18 -07:00
Inez Korczynski
5e845979b8
Merge branch 'dmrewrite' of ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor into dmrewrite
2012-06-18 22:23:15 -07:00
Trevor Parscal
ca4f19c726
Fixed remaining uses of transact to change
...
Change-Id: I63c8fb183be8b37db85ed386d7bf33633e821f80
2012-06-18 22:05:05 -07:00
Trevor Parscal
d6dd113d8d
Adjusted fades and cleaned up URI objects
...
Change-Id: I2c6d5758c958ddc222293152707f13d7ae560343
2012-06-18 21:47:43 -07:00
Trevor Parscal
26dee2c8ea
Switched to using "pageName" instead of "title" since page names include the namespace prefix, so it's more correct
...
Change-Id: Icd1a76ad317fc88f7895654ec1c41144c2695648
2012-06-18 21:47:43 -07:00
Trevor Parscal
ea81d217b5
Work around broken .clone in mw.Uri
...
Change-Id: I5e3605c626fc3429c332feab839f555d279e11f7
2012-06-18 21:47:43 -07:00
Catrope
675bd284c5
Make the converter not return an empty document
...
Various parts of DM and CE choke on completely empty documents, so
return an empty paragraph instead.
Change-Id: I67062b66a44efe53a1bdaf60907653f0cc55dd25
2012-06-18 17:42:12 -07:00
Catrope
0e95b20cda
If the page doesn't exist, create a "Create" tab, not an "Edit" tab
...
Change-Id: Ic9fa936ac96539ca65e2d570a2c5419dc19334df
2012-06-18 17:42:11 -07:00
Trevor Parscal
44d297f8ff
Fixed post-save behavior
...
Change-Id: Ib9bb5d725b1cba2f3e8eb9aa9cf4f2dd2fc87229
2012-06-18 17:39:31 -07:00
Trevor Parscal
4ffc6fff60
Was checking the wrong thing for undefined
...
Change-Id: I11b813fe8708ef03db2f8b884b3766d8cbe887ce
2012-06-18 17:37:12 -07:00
Trevor Parscal
cf1c033bff
Added section edit link functionality from diff pages
...
Change-Id: I2dce543d352f4e086b96c65e53f1a90ef58072fb
2012-06-18 16:52:37 -07:00
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