Commit graph

4049 commits

Author SHA1 Message Date
jenkins-bot 0eb2581b64 Merge "ve.ui.Context: Add embedding feature" 2013-05-16 18:26:39 +00:00
Trevor Parscal 55b5f30edb ve.ui.Context: Add embedding feature
Objectives:

* Make the context menu display in the top right corner of the currently
  focused inspectable node (if there is one)
* Prevent clicking on anything to do with the toolbar or popup from doing
  anything at all, ever

Bonus:

* While we are using the clever feature in jQuery's on method which allows
  passing boolean false to cancel the event - may as well do that in
  ve.ui.Dialog as well

Changes:

ve.ui.FocusableNode
* Add ability to specify the focusable element so that dimensions can be
  derived from it

ve.ce.Surface
* Add quotes to object keys

ve.ui.MediaDialog
* Change association from being MW specific to handling images in general

ve.ui.Context
* Add embedded styles for context
* Add embedded mode, which is triggered when the context is a single
  focusable node, and the node is large enough to fit the context
  reasonably

ve.ui.Dialog
* Inline mousedown handler

ve.ui.Toolbar, ve.ui.PopupWidget
* Cancel stray mousedown events

Change-Id: I4b25d33f64b4bcb8a3ecfd7e9728f54a2d4886f3
2013-05-16 11:23:59 -07:00
jenkins-bot 57a2de90aa Merge "Emit teardown event before replacing generated content node content and emit setup event after." 2013-05-16 01:23:34 +00:00
Inez Korczyński a191073d72 Create and commit transaction after attributes of the template are changed and applied.
Change-Id: I4a1acdadcd1486ddd5dafcfc794c9b3b93e92592
2013-05-15 17:49:27 -07:00
Inez Korczyński 995a20219a Emit teardown event before replacing generated content node content and emit setup event after.
Change-Id: I397d4dfb5fd0177255a0b4389ba5380807969ef4
2013-05-15 17:35:49 -07:00
Ed Sanders b5ead95ee8 Implement roundtrip update of template contents
Currently there is no Parsoid call for this so we're using the PHP
parser API.

Change-Id: I8bc4f96924d88de7bc67203336bf465ba91fc37b
2013-05-16 00:56:44 +01:00
jenkins-bot a47619cd04 Merge "Introduce createPage method in ve.ui.MWTemplateDialog and even use it!" 2013-05-15 23:40:29 +00:00
jenkins-bot 133a501481 Merge "Fixing block template styling" 2013-05-15 23:39:52 +00:00
Christian Williams e669f8faf6 Fixing block template styling
Trailing comma borks everything.

Change-Id: Ic4eb97f84b45297312b45ab64355836ef8a329d1
2013-05-15 16:37:27 -07:00
Trevor Parscal e64d900fc3 Fix image block node error
When loading an image block node in the demo, there are no classes on the figure, which caused the code to crash because it was assuming that jQuery's attr method would always return a string.

Change-Id: Ib13e7bfa3fb2bd76ac71dfef085bed209d880b4a
2013-05-15 16:24:10 -07:00
Inez Korczyński 1b4b6663c3 Introduce createPage method in ve.ui.MWTemplateDialog and even use it!
Change-Id: I7b063a9380742e157a4c7128c1654abcf3ad8c6f
2013-05-15 16:22:12 -07:00
Inez Korczyński ba5c4f104d Build TemplateDialog based on parameters that are passed to template
(instead of TemplateData as before).

Change-Id: I50b0e6ef1936c4b56f40fa73bd42b03587bdf979
2013-05-15 22:47:59 +00:00
jenkins-bot 4875a4ec0b Merge "Content for Template Dialog" 2013-05-15 22:18:38 +00:00
jenkins-bot 30fb94e94f Merge "Implement ve.dm.MWTemplateNode.getWikitext()" 2013-05-15 22:18:01 +00:00
Catrope 54cd04c391 Implement ve.dm.MWTemplateNode.getWikitext()
Escapes }} and | by wrapping them in <nowiki> tags, and steps around
<nowiki> tags so as to not double-wrap things.

Change-Id: Ia50906524c1fcf55c9f390a114856bc7f20b2d3a
2013-05-15 15:16:34 -07:00
Christian Williams f238683341 Content for Template Dialog
Initial commit of page content.

Change-Id: Iffdf4f4179c6f3b04611d4bd9548e7cf23188856
2013-05-15 15:13:38 -07:00
jenkins-bot 943301f2c9 Merge "Multiline option for ve.ui.TextInputWidget.js" 2013-05-15 21:47:25 +00:00
jenkins-bot e21f8edb60 Merge "Process example template data and add pages to PagedDialog based on it." 2013-05-15 21:44:07 +00:00
jenkins-bot e75f63f279 Merge "Added clearPages method to ve.ui.PagedDialog." 2013-05-15 21:41:34 +00:00
Trevor Parscal 96e49858fa Multiline option for ve.ui.TextInputWidget.js
Objective:

* Add multiline option to text input widget which uses a text area instead of a text input

Changes:

ve.ui.Widget.css
* Add text area support for styles otherwise only targeting input elements

ve.ui.InputWidget.js
* Initialize input element using a method, so it can be fully customized (like making a text area or select input
* Use val() to set the initial value, using jQuery's abstraction around inputs of various types

ve.ui.TextInputWidget.js
* Add multiline option which uses a text area instead of an input

Change-Id: I1bf17c8c76b7f1708c57ee5e95160c071ddd00e9
2013-05-15 14:41:22 -07:00
Inez Korczyński de203cb871 Process example template data and add pages to PagedDialog based on it.
Change-Id: I34ee42e66df26000842f9b1540a577b2621f8839
2013-05-15 14:36:44 -07:00
Inez Korczyński 3895a3ea11 Added clearPages method to ve.ui.PagedDialog.
Change-Id: Ie55f727f649b2dcd4189489c7baa9f524aa5d1c7
2013-05-15 14:31:20 -07:00
jenkins-bot 9a19d26d3b Merge "Rewrite API 'paction' switcher as an actual switch" 2013-05-15 21:24:02 +00:00
jenkins-bot 35fae73a45 Merge "Revert "Localisation updates from http://translatewiki.net."" 2013-05-15 21:20:04 +00:00
Ed Sanders e22a5a6d77 Rewrite API 'paction' switcher as an actual switch
Change-Id: I1f10ee890ea5d1d709739b21c23e35a6a6fd4901
2013-05-15 22:17:06 +01:00
Catrope c52c18441c Revert "Localisation updates from http://translatewiki.net."
This reverts commit b91469867d

Change-Id: I2e48e70597f13ffb6b59c3d780442288b5087046
2013-05-15 21:16:12 +00:00
Translation updater bot cf5cb122be Merge "Localisation updates from http://translatewiki.net." 2013-05-15 21:14:17 +00:00
Translation updater bot b91469867d Localisation updates from http://translatewiki.net.
Change-Id: I405c871bce7014222ee24ed1b995ca29408bff82
2013-05-15 21:11:48 +00:00
jenkins-bot bd0d61c143 Merge "Fix for default sort key crash" 2013-05-15 21:10:57 +00:00
Trevor Parscal 79df2232a5 Fix for default sort key crash
The existing default sort key was being cached when the dialog was
constructed, but on the 2nd time launching it the reference was broken.
This change gets rid of the caching and always grabs a fresh copy when
we need one.

Also, the flag indicating the default sort key has changed wasn't being
reset properly.

Change-Id: I8fb3b088f25212b8c542df65bb5a248550ff6f27
2013-05-15 21:04:10 +00:00
Christian Williams 3f6e127423 Pages in template dialog
Just a starting point for Inez to loop.

Change-Id: I6d418ba955f0904d34b474c984eef7f97be257e9
2013-05-15 13:39:34 -07:00
jenkins-bot f888b79056 Merge "Add level option to ve.ui.OutlineItemWidget" 2013-05-15 20:35:06 +00:00
Trevor Parscal 55f28eecce Add level option to ve.ui.OutlineItemWidget
Objective:

* Add indentation feature to outline items

Changes:

ve.ui.PagedDialog.js
* Pass level argument through addPage method

ve.ui.Widget.css
* Add styles for non-zero levels of outline items

ve.ui.OutlineItemWidget.js
* Add missing config documentation for icon option
* Add level option, with getLevel/setLevel methods
* Add statically configurable number of levels and level class

Change-Id: Ie24761c64918fdc6cd28070b3cf56743c6288970
2013-05-15 12:54:19 -07:00
jenkins-bot d97114ad10 Merge "Implement ve.ui.MWTemplateDialog" 2013-05-15 19:38:20 +00:00
Trevor Parscal 231a50f2b6 Implement ve.ui.MWTemplateDialog
Objective:

* Add button to launch template dialog
* Add template dialog

Changes;

*.php
* Add messages and links to files

ve.ce.Node.css
* Make inline templates display as inline-block to contain their
  contents (allowing shields to work properly)

ve.ui.MWTemplateDialog.js
* New empty dialog for templates

ve.ui.MWTemplateButtonTool.js
* New template button, appears in context and launches dialog

Change-Id: I9174ed7c9012522246a6defc859276bf36763f5b
2013-05-15 19:36:18 +00:00
Timo Tijhof 25d6e6f136 ve.ce.Surface: Append phantoms to overlay instead of surface
Surface can be deep inside a skin layout of which it is not
unlikely for one or more of the parents to have position
relative.

Change-Id: Ie202fa43b837650fd296fa6804d035622e2599e1
2013-05-15 21:28:56 +02:00
Trevor Parscal a56e795f58 ve.Editor
Objectives:

* Split ve.Surface into ve.Editor and ve.ui.Surface
* Move actions, triggers and commands to ve.ui
* Move toolbar wrapping, floating, shadow and actions functionality to configurable options of ve.ui.Toolbar
* Make ve.ce.Surface and ve.ui.Surface inherit ve.Element and use this.$$ for iframe friendliness
* Make the toolbar separately initialized so it's possible to have a surface without one, as well as control where the toolbar is

Some change notes:

VisualEditor.php
* Added standalone module for mediawiki integrated unit testing

ve.ce.Surface.js
* Remove requirement to pass in an attached container to construct object
* Inherit ve.Element and use this.$$ instead of $
* Make getSelectionRect iframe friendly
* Move most of the initialize stuff to a new initialize method to be called after the surface is attached to the DOM

ve.init.mw.ViewPageTarget.js
* Merge toolbar functions into setup/teardown methods
* Add toolbar manually (since it's not added by the surface anymore)

ve.init.sa.Target.js
* Update new init procedure for editor, surface and toolbar separately
* Move toolbar floating stuff to ve.Toolbar

Change-Id: If91a9d6e76a8be8d1b5a2566394765a37d29a8a7
2013-05-15 10:39:12 -07:00
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