Commit graph

3979 commits

Author SHA1 Message Date
Translation updater bot f94d5cccc1 Localisation updates from http://translatewiki.net.
Change-Id: I9185e045a20582b04962a03392f67c73aee8fe0f
2013-05-13 19:55:10 +00:00
jenkins-bot d3d695ef03 Merge "Send a full document back to Parsoid" 2013-05-13 19:24:41 +00:00
jenkins-bot 3fc753e39b Merge "Fix categories with multiple ../ in their hrefPrefix" 2013-05-13 19:00:02 +00:00
jenkins-bot 3c8c8da311 Merge "ListAction tests" 2013-05-13 18:26:33 +00:00
Catrope 9611bf9f64 Send a full document back to Parsoid
To do this, we take the document generated by the converter and
transplant things from the original Parsoid document into it.

Change-Id: I2f5058220669526130a360cec3389c3f42b41771
2013-05-13 11:23:34 -07:00
Catrope f586d3ea8f Fix categories with multiple ../ in their hrefPrefix
Was already fixed for links.

Bug: 48408
Change-Id: I84d2b23a05585890b2d5023c7c7f38a43889fd7f
2013-05-13 11:10:02 -07:00
Ed Sanders 89b0dce8ec ListAction tests
Unwrap and wrap cases.

Change-Id: If4df07eae1d70347dc55b57dc117f2ff5c7385df
2013-05-13 18:59:53 +01:00
jenkins-bot 2dddb90731 Merge "Fix indent action when acting on multiple list items" 2013-05-13 17:49:00 +00:00
jenkins-bot 0d006f5976 Merge "Use consistent capitalisation of Html" 2013-05-13 17:33:33 +00:00
Ed Sanders a9d0a5c7ef Fix indent action when acting on multiple list items
Same as https://gerrit.wikimedia.org/r/#/c/63394/ but for
indentation, as well as unindentation.

Bug: 48390
Change-Id: I5ce0c385214f30c5e5c66b5b5b755c9937267cd0
2013-05-13 18:27:21 +01:00
jenkins-bot d380186c8f Merge "Optimise code for first/last child detection in fixupInsertion" 2013-05-13 17:26:39 +00:00
jenkins-bot 78bbd60a0c Merge "Fix unindent action when acting on multiple list items" 2013-05-13 16:04:11 +00:00
jenkins-bot 04f73d268f Merge "Don't use VE on non-wikitext pages" 2013-05-13 16:02:36 +00:00
Inez Korczyński 9f8ababfa9 Fix inability to split lists
Fixes change made in I7a8d6c474ecca5af02b72b6453c900ed61acea58 by using
DOM_VK_ENTER instead of DOM_VK_RETURN (which is not defined anymore).

Bug: 48386
Change-Id: I8d7aeffc8166487806e3489b054f508c5e9418ff
2013-05-13 14:59:16 +00:00
Ed Sanders 2c782fba92 Optimise code for first/last child detection in fixupInsertion
The code to record the first/last child stacks was written before
I decided on using a recursive call going only one step when such
a stack was encountered.

As we only ever test the length of the stack most of the code around
calculating the stack can be thrown away, and all we need is a simple
test to see if we are the first/last child of the immediate parent.

Change-Id: Iffb03c649e166c9f89061a4d944fa07633f16aba
2013-05-13 12:37:01 +01:00
Ed Sanders 1261a5f471 Fix unindent action when acting on multiple list items
This is caused by a limitation of surface fragments in that they
always expand to include insertions touching them. In this case
we build surface fragments contain adjacent listItems, so when
the first listItem is de-listed a transaction is first created to
split the list. This insertion of ('/list', 'list') is adjacent
to the second surface fragment and so becomes part of that fragment.

This then causes the wrong node to be passed to unindentListItem.

The workaround is to use the inner range of the listItem, not
the outer range.

Bug: 48390

Change-Id: I7418910412d292ef4953e294a97f66e48d6f776f
2013-05-12 22:15:09 +01:00
Krenair 4f7859895b Don't use VE on non-wikitext pages
Bug: 47456
Change-Id: Iae6510f661feedec181fd8697d799353edb5eac8
2013-05-11 22:26:51 +01:00
Translation updater bot da4ddbc4d9 Localisation updates from http://translatewiki.net.
Change-Id: Ifd9a13e5f4236c55b2313c1df5ec189baca08ec6
2013-05-11 19:43:28 +00:00
Ed Sanders 634947198a Use consistent capitalisation of Html
If the previous commit properInnerHTML was renamed to
properInnerHtml, but its invocations weren't (a bug).
While DOM uses .innerHTML we use Html throughout the
rest of our code so we should be consistent either way.

Change-Id: If46bb256e938a097951c159b7a278667fd8e06a6
2013-05-11 13:04:00 +01:00
jenkins-bot 50e6f052c7 Merge "Add ve.properOuterHtml" 2013-05-11 10:57:02 +00:00
Ed Sanders 375a7fceff Access keys for edit and edit source
Set up 'v' for edit, and 'e' for edit source as access keys.

Bug: 48107
Change-Id: I598177bc75ed84dea35952a3b2b1b2111aac89b2
2013-05-10 17:10:26 -07:00
Catrope 606baacc1b Add ve.properOuterHtml
Like ve.properInnerHtml but for outerHTML. Factored out the shared code
into ve.fixupPreBug.

Change-Id: I5c5b6d017936c6c2e71631fb8859ba1dbd95615a
2013-05-10 17:03:04 -07:00
Catrope 9d99cdbb67 Fix breaking getLength() call
Change-Id: Iaa6cb22bf93a677aff077ce38ee11e606430cee5
2013-05-10 17:02:07 -07:00
jenkins-bot db644e915f Merge "Fieldsets and default sort keys" 2013-05-10 23:58:17 +00:00
jenkins-bot 89aebd5112 Merge "Edit and Edit source tab were reversed in RTL in the Vector integration" 2013-05-10 23:49:30 +00:00
jenkins-bot d2c7e5b136 Merge "Switching back to Rangy 1.2" 2013-05-10 23:47:44 +00:00
Trevor Parscal 8409d16f0f Fieldsets and default sort keys
Objective:
* Add default sort key field to meta dialog
* Replace PagePanelLayout with a generic panel containing one or more FieldsetLayout elements

Changes:

*.php
* Added/removed file links

ve.dm.MWDefaultSortMetaItem.js
* Added getContent method

ve.dm.MetaItem.js
* Added replaceWith method

ve.dm.MetaList.js
* Allow insertion at the end by omitting offset and index

ve.dm.MWMetaDialog.js
* Added default sort key field
* Put category and default sort fields inside fieldsets
* Added loading/saving default sort key

ve.ui.PagedLayout.js
* Changed class used for pages to generic panel layout

ve.ui.PagePanelLayout
* Moved title/icon stuff to field set

ve.ui.FieldsetLayout.js
* New class, adds fieldset with legend

ve.ui.StackPanelLayout.js
* Moved up to the layouts directory

ve.ui.Dialog.css
* Moved style for paged panel from layout stylesheet

ve.ui.Layout.css
* Added styles for fieldsets

ve.ui.Widget.css
* Adjusted margins of input label widgets

ve.ui.MWCategoryWidget.js, ve.ui.MWCategoryPopupWidget.js
* Added setDefaultSortKey method

Change-Id: I979f5e3f08a688790c9f54086206ed1999af13ea
2013-05-10 16:46:08 -07:00
Christian Williams 741fa76868 Switching back to Rangy 1.2
Rangy files are now 1.2 and I've added 1.3 alpha versions to make
it easier to switch between while testing.

Change-Id: I2f5d86b14bd4f87719d01e3255c28f0ae8764f4f
2013-05-10 16:44:32 -07:00
jenkins-bot d96a17156a Merge "Output a nice message when the diff is empty" 2013-05-10 23:21:09 +00:00
Catrope 3f9f764949 Output a nice message when the diff is empty
Bug: 43754
Change-Id: I8daae124b060ccf54ce5ca7c1e1a6d18b7265ade
2013-05-10 15:34:18 -07:00
jenkins-bot 5f8db49a9f Merge "(bug 48022) Ignore certain function keys in key press handler" 2013-05-10 21:33:52 +00:00
Inez Korczyński b32b5702d4 (bug 48022) Ignore certain function keys in key press handler
This is a temporary solution that still may some function keys go through.

Change-Id: I7a8d6c474ecca5af02b72b6453c900ed61acea58
2013-05-10 13:51:23 -07:00
jenkins-bot 57b05aa433 Merge "Clean up variable initialization in setupSkinTabs()" 2013-05-10 20:31:03 +00:00
Translation updater bot adf53d8abc Merge "Localisation updates from http://translatewiki.net." 2013-05-10 19:59:06 +00:00
Translation updater bot 5c40ba89c0 Localisation updates from http://translatewiki.net.
Change-Id: I263431ad6d92d3d62497bffcc0abd930f675c9aa
2013-05-10 19:57:31 +00:00
Catrope 2efd4f0061 Edit and Edit source tab were reversed in RTL in the Vector integration
If we're in RTL mode and the skin is Vector-based, we need to reverse
the order of the tabs in the DOM, because that's a weird thing that
Vector does to render tabs in RTL.

See https://bugzilla.wikimedia.org/show_bug.cgi?id=46947 for discussion
about the Vector behavior.

Bug: 48017
Change-Id: Ie1214b08450aefed893739a2b862cb1e9b23a2ef
2013-05-10 11:43:05 -07:00
Catrope b295dc8d99 Clean up variable initialization in setupSkinTabs()
Change-Id: Ic596f1c98162557f33f5ca398d2358e91a3d5cb0
2013-05-10 11:43:01 -07:00
Ed Sanders 634714bab9 Remove hack for old version of Parsoid
Removing check for parsoid returning document fragments.

Change-Id: I5a8729d93907d13c699a1f3cf43ffd3e0c45b003
2013-05-10 19:42:35 +01:00
jenkins-bot 326879b75b Merge "Use pageLanguage rather than pageViewLanguage for the surface's lang&dir" 2013-05-10 18:13:09 +00:00
Catrope a65ff4fdb9 Use pageLanguage rather than pageViewLanguage for the surface's lang&dir
Bug: 33175
Change-Id: Ica006404227dcd286c387de4f637036341b17eae
2013-05-10 11:04:31 -07:00
jenkins-bot fa73dbeca5 Merge "Make reference list nodes render contents again" 2013-05-10 17:49:30 +00:00
Trevor Parscal 8858ed932f Make reference list nodes render contents again
Really Roan? How dare you!

See I3f5116d7dfbaa5889b7c5cac01d7341272749c58

Change-Id: Ia0ae514fc07752edb7b7100716e09163d3bfacba
2013-05-10 10:47:10 -07:00
jenkins-bot 51388095e2 Merge "Category UI improvements" 2013-05-10 17:32:34 +00:00
jenkins-bot 8bac303893 Merge "When removing an empty list item, also remove the list if it's now empty" 2013-05-10 17:17:36 +00:00
jenkins-bot ff15fbf21b Merge "Whitespace between unwrapped inline nodes assigned to paragraph" 2013-05-10 17:13:15 +00:00
Ed Sanders 328dd8e21f Whitespace between unwrapped inline nodes assigned to paragraph
In stopWrapping we assign any left over whitespace to the paragraph
in position 3, however we weren't clearing this whitespace buffer
if an inline content node followed it.

Change-Id: I8b3ee3915044abd6bafda386430bf7f992ca4aa8
2013-05-10 16:40:11 +01:00
jenkins-bot f966e9c41d Merge "Clone template dom elements being sent to converter" 2013-05-10 15:37:24 +00:00
jenkins-bot d7c3dd8ec6 Merge "Reduction of renderContents calls" 2013-05-10 15:35:37 +00:00
Catrope 811721f1e1 When removing an empty list item, also remove the list if it's now empty
When the user presses Enter in an empty list item, we remove it. But if
the list item was the only child of the list, that leaves an empty list
which then gets a block slug, leading to all sorts of weird things, and
even pawns in Firefox. So check whether the list item was the last child
and if so, remove the list.

Bug: 48287
Change-Id: If22d9b904b8861e24d56944d791545635b2e4254
2013-05-09 17:47:36 -07:00
Inez Korczyński 1e85621bd9 Reduction of renderContents calls
There is no need to call renderContents in ContentBranchNode constructor
because it is going to be called anyways in onSplice

Change-Id: Id1ab983668299658ecd6e89a37667cc34c701689
2013-05-10 00:28:30 +00:00