Commit graph

4012 commits

Author SHA1 Message Date
jenkins-bot 44e0b7e345 Merge "Make ve.ce.ProtectedNode use setup (for setup) and teardown (for teardown) events so it is going to work well after node is rewrapped (example: MWBlockImageNode)." 2013-05-15 17:31:53 +00:00
Inez Korczyński 2a53329f0d Make ve.ce.ProtectedNode use setup (for setup) and teardown (for teardown) events so it is going to work well after node is rewrapped (example: MWBlockImageNode).
Change-Id: Ibd539813f4302d8bbf8eaa35af71817a55fb1f4b
2013-05-15 10:28:56 -07:00
jenkins-bot 3bed4284dd Merge "Make MWBlockImageNode a ProtectedNode (by adding mixin)." 2013-05-15 17:27:54 +00:00
jenkins-bot cc0f530479 Merge "Added method getDataFromDomRecursionClean to ve.dm.Converter - used by nodes that handle their own children." 2013-05-15 17:27:08 +00:00
jenkins-bot 7cc65631bf Merge "Return proper error if parsoid is unavailable on serialize" 2013-05-15 17:26:18 +00:00
jenkins-bot e6004016ca Merge "Use new options format for toolbar in mw init" 2013-05-15 17:20:53 +00:00
Inez Korczyński abe81d42d7 Added method getDataFromDomRecursionClean to ve.dm.Converter - used by nodes that handle their own children.
Change-Id: I604cf201515152824ec159b8c86f2010afcd3369
2013-05-15 10:02:08 -07:00
Inez Korczyński b8d81f5238 Make MWBlockImageNode a ProtectedNode (by adding mixin).
Change-Id: Ib15efaf4964f16b86020367e42848d228efd09ba
2013-05-15 10:01:19 -07:00
Ed Sanders 201a1ac478 Return proper error if parsoid is unavailable on serialize
Previously was just returning an empty result.

Bug: 47581
Change-Id: I6bdd177bc9b5a0af9107cf08d8e46470c6778e12
2013-05-15 16:28:51 +01:00
Ed Sanders cc943418cf Use new options format for toolbar in mw init
Wasn't updated after change 63095 and so wasn't setting options.

Bug: 48509
Change-Id: Icda3305e422bedaf0d490b8fbe51f55b8c8e79e8
2013-05-15 14:52:39 +01:00
Ed Sanders eeb1f3a142 Implement 'minordefault' user preference
Marks all edits as minor by default if the user preference is set.

Bug: 48347
Change-Id: Ib5cdcb9433be5ff7b9179d3833f42e5c3453285a
2013-05-15 13:40:54 +01:00
jenkins-bot 3109e96bb1 Merge "Better support for MediaWiki block level images (thumb and frame)" 2013-05-15 02:58:23 +00:00
Christian Williams 991859d5d1 MWInlineImageNode should be img
Change-Id: I0cc43c59031f970b879b64696e824ebaa28a4b53
2013-05-14 17:36:04 -07:00
Inez Korczyński c6c7af5a62 Better support for MediaWiki block level images (thumb and frame)
Change-Id: Id6f65e4e1971e21035c89f32fa7ab0009c84695c
2013-05-14 17:14:36 -07:00
Ed Sanders f675d73204 Move no changes message to separate save dialog slide
Previously it was just being returned as the diff html, which
looked weird becacuse 1: it was the wrong width and 2: the
save buttons were still there.

Bug: 43754
Change-Id: I537bcae91f51a3f30ca4736c41f7a5619bbf321d
2013-05-14 16:40:14 -07:00
Ed Sanders ea6e1b26ed Move edit conflict notice to a save dialog slide
Previously used a confirm() dialog which is a bit ugly.

Bug: 42522
Change-Id: I709d936d998b130515b62de880c6e7aa7978786b
2013-05-14 16:31:58 -07:00
jenkins-bot 85dc52500e Merge "Fix for crashing on save" 2013-05-14 22:59:17 +00:00
Trevor Parscal cce80e63c0 Fix for crashing on save
converter.documentData contains the full data with metadata interleaved,
but it was being sliced using offsets relevant to the element data.

Change-Id: Iddbef23212da818a2a399b4abdc223aad130eb4e
See: I6daff5c5969e5fdc871f8f346cf790b4302ae080
2013-05-14 21:34:06 +00:00
Translation updater bot a3927850e5 Localisation updates from http://translatewiki.net.
Change-Id: I7a5e28780b95155519e2fb9d0d0e09125719bc8b
2013-05-14 21:32:50 +00:00
jenkins-bot b67a22998d Merge "Introduction of setup and teardown events for ve.ce.View nodes" 2013-05-14 19:50:59 +00:00
jenkins-bot 3d2a5417e7 Merge "ve.Element refactor" 2013-05-14 19:49:40 +00:00
jenkins-bot 3212d4468c Merge "Floating toolbar cleanup" 2013-05-14 19:48:13 +00:00
Inez Korczyński a3f6008bd4 Introduction of setup and teardown events for ve.ce.View nodes
* modules/ve/ve.Node.js - remove ve.EventEmitter mixin
* modules/ve/ve.dm.Node.js - added ve.EventEmitter mixin
* modules/ve/ce/ve.ce.BranchNode.js - make updateTagName use newly added
  events

Change-Id: I349155b8e986fe09b615bb5f0617409d723936ef
2013-05-14 19:47:40 +00:00
Trevor Parscal c2defc9783 ve.Element refactor
Objectives:

* Move ve.ui.Element to ve.Element
* Make CE nodes inherit from ve.Element

Changes:

ve.ui.Element.js, ve.Element.js
* Move and rename
* Move ve.ui.get$$ to ve.Element.static.get$$
* Add static getDocument and getWindow methods
* Add instance getElementDocument and getElementWindow methods
* Add getTagName method, which by default reads the static tagName property, but when overridden can return a tag name based on other factors

*.php
* Updated file link

ve.ce.*Annotation.js, ve.ce.*Node.js, ve.ce.View.js, ve.ce.Document
* Added config options pass through
* Replaced passing elements through constructor with defining static tag names
* Added getTagName overrides where needed that derive tag name from model
* Refactore dom wrapper methods, now consistently using getTagName

ve.ce.Surface.js
* Removed static initialization (not needed)

ve.dm.Model.js, ve.ui.Window.js
* Added missing docs

ve.ui.GroupElement.js, ve.ui.Layout.js, ve.ui.Widget.js,
* Updated class name for elements

ve.ui.Frame.js, ve.ui.LookupInputWidget.js
* Updated location of get$$

ve.ui.js
* Move get$$ to ve.Element

ve.js
* Add auto-init of static properties to mixinClass

Change-Id: I39ae14966456903728e4d9e53f806ddce9ca2b70
2013-05-14 19:47:32 +00:00
Trevor Parscal 5012ed101b Floating toolbar cleanup
Objective:

Move toolbar floating functionality to ve.init and clean it up

As a bonus:

demo.css
* Fix CSS path to set width of inputs properly

Changes:

demos/ve/index.php
* Allow ve.init.sa.Target to construct it's own surface object

ve.ce.Surface.js
* Move object resizing and table editing disabling commands from ve.Surface
* Add method for getting the currently focused node

ve.init.mw.ViewPageTarget.js
* Remove initializing surface property (now done in parent class)
* Normalize all uses of "setup" to "setUp"
* Replace uses of getDocumentModel with getModel().getDocument()
* Add calls to set up and tear down for toolbar floating

ve.init.mw.Target.js
* Replace uses of getDocumentModel with getModel().getDocument()

ve.init.sa.Target.js
* Move example from ve.Surface
* Change constructor to accept document model
* Create ve.Surface object in constructor
* Add set up for toolbar floating

ve.ui.init.Target.js
* Initialize surface property
* Move and cleanup toolbar floating functionality from ve.Surface

ve.ui.Surface.js
* Remove example now that init.sa creates it's own surface (moved)
* Document options
* Simplify toolbar options and remove the concept of multiple toolbars
* No longer cache the options object
* Move toolbar initialization to constructor
* Change setupCommands to addCommands, making it useful after construction
* Inline selection initialization
* Move and cleanup toolbar floating functionality to ve.ce.Surface
* Reorganize a few methods
* Move toolbar floating to ve.init.Target.js

Change-Id: I393a426e35567d57c048122bf64a83c1ef45e6e8
2013-05-14 12:43:30 -07:00
jenkins-bot b47b0db374 Merge "Updating to Rangy 1.3 alpha" 2013-05-13 22:51:27 +00:00
jenkins-bot 85402149c1 Merge "Reference dialog" 2013-05-13 22:45:21 +00:00
Christian Williams 69e1cc3280 Updating to Rangy 1.3 alpha
We previously tried Rangy 1.3 alpha but rolled back due to a bug
with getting cursor position in IE. Rangy developer Tim Down fixed
the issue here:
https://code.google.com/p/rangy/source/detail?r=780

Both 1.2 (filenames without file versions) and 1.3 in the repo
for now.

Change-Id: I26263fc1d10e3c2bdda7f1c9135544ca3bc05d97
2013-05-13 14:44:16 -07:00
jenkins-bot 4f70d23bc8 Merge "Revert "Fix check for existing category in article."" 2013-05-13 21:27:56 +00:00
Trevor Parscal 8d4a351059 Revert "Fix check for existing category in article."
This reverts commit 50c48a1cac

Change-Id: I3eca792883171a3390a9fc6f95ca42bfdedcf986
2013-05-13 21:24:03 +00:00
jenkins-bot 5c4f14de0b Merge "Fix check for existing category in article." 2013-05-13 21:23:31 +00:00
Trevor Parscal 67a2613a12 Reference dialog
Objective:

Add a basic (empty) dialog for mediawiki references. Editor to follow.

Changes:

*.php
* Added file links and messages

ve.ui.MWMetaDialog.js
* Moved initialize method to the top (for consistent ordering)

ve.ui.MWReferenceDialog.js
* New class, basic empty dialog for references

ve.ui.LinkInspector.js, ve.ui.MWLinkInspector.js, ve.ui.MediaButtonTool.js
* Cleanup documentation
* Whitespace

icons.ai, reference.png, reference.svg
* Switch to reference icon being 3 books on a shelf

ve.ui.MWReferenceButtonTool.js
* New class, basic dialog button for references

Change-Id: Ia4e30e9239fa1e3b28c0a1ef1ca0a6515a8103ef
2013-05-13 13:10:59 -07:00
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