As described in the bug, ve.getHash performs JSON.stringify so to
customise a hash the object should just return an object to be
hashed, not the hash string itself.
Bug: 46895
Change-Id: If11071d4b04a01e25102ffb57240882f650ee10d
This is one of the blockers for splitting VE up into separate
repositories or extending VE with an extension.
ve.ui.Frame.js
It's critical that we don't emit initialize from ve.ui.Frame until
it's completely loaded, especially its styles, because we will
begin measuring it straight away.
Involved loading the stylesheets using $.ajax and setting base
URL of the iframe to the ve.ui styles directory so all the image
URLs still worked. This won't work for stylesheets from multiple
locations, so we needed a more robust solution.
The new solution uses some trickery described in the code
documentation, but essentially no longer depends on all
stylesheets being located in the same folder.
ve.ui.Dialog.js, ve.ui.Inspector.js, ve.ui.Window.js
Static methods are now being used to extend a window class to
include different stylesheets rather than simple array
concatenation.
Change-Id: I619238732f975d41305f81f8f818a577a40f49da
*/index.php
* Added links to new files
VisualEditor.php
* Added links to new files
* Removed keys of non-existent messages
ve.ui.ContentDialog.js, ve.ui.MetaDialog.js
* Removed redundant comments
ve.ui.MediaDialog.js
* New dialog, just for media
icons.ai, picture.png, picture.svg, ve.ui.Icons-*.css
* Added picture icon
ve.ui.MediaButtonTool.js
* New button, just for media (shows up in the context toolbar)
ve.ui.DialogButtonTool.js
* New base class for dialog buttons
ve.ui.Context.js
* Added basic support for showing dialog buttons, in addition to
annotation buttons, in the context toolbar - to test, select only an
image node
ve.ui.Dialog.js
* Prevent clicks on the click-block from changing focus
* Moved initialize to below the event handlers and updated its
documentation
ve.ui.DialogFactory.js
* Added a way to get the names of dialogs that can be used to edit a
node
ve.ui.Inspector.js
* Removed close handler which set focus, this is done already in window
ve.ui.InspectorFactory.js
* Fixed comment so it's not telling lies anymore
ve.ui.Window.js
* Removed auto-focus on frame, it's changing the focus in the parent
document which blows-away the focus in CE, and it really isn't needed
as it turns out
VisualEditor.18n.php
* Added media dialog title message
* Added media tool tooltip message
Bug: 37870
Change-Id: I9150c46b3e292910fed899fa60d6da433049ca45
To verify
* Save "MediaWiki:Edit" with "Edit page" (anything not "Edit")
* Set this.tabLayout = 'replace';
* Observe that the ve-edit tab is now "Edit" (msg: vector-view-edit)
instead of "Edit page" (msg: edit)
Bug: 42117
Change-Id: I2e7dd85cd14049101e2d49751d37797d77bc7c9d
Depencency tree looked like this
* ext.visualEditor.viewPageTarget
- ve.init.platform
- ve.init.target
** ext.visualEditor.core
- (most ve.* classes)
*** ext.visualEditor.base
- ve.js
Some of the ve classes are calling ve.msg from the global scope
at load time (e.g. in the definition of static properties or in
constructors of classes that were immediately instantiated in
the same file).
Platform needs to be initialised in the base module.
ve.init.Platform.js was already there, but that's just an
abstract base class. The the ve.init.platform property is set
from the implementation classes' files.
Updated makeStaticLoader.php and re-ran for test and demo html.
The fake "Standalone Init" module is now gone, which shows that
this was needed as test/ and demo/ already put their platform
code in/after the 'ext.visualEditor.base' module in the html.
Bug: 45175
Change-Id: I47d7d92495974572194700c98a219d22ecbfaf4b
Created an IndexValueStore class which can store any object and return
an integer index to its hash map.
Linear data is now stored in ve.dm.LinearData instances. Two subclasses
for element and meta data contain methods specific to those data types
(ElementLinearData and MetaLinearData).
The static methods in ve.dm.Document that inspected data at a given
offset are now instance methods of ve.dm.ElementLinearData.
AnnotationSets (which are no longer OrderedHashSets) have been moved
to /dm and also have to be instantiated with a pointer the store.
Bug: 46320
Change-Id: I249a5d48726093d1cb3e36351893f4bff85f52e2
Using element.height was returning 0 if the attribute was empty
when in fact what we mean to store is null (i.e. auto height).
This takes care of the writing of attributes in CE as jQuery
ignores an attribute-set command if the value is null.
Also in this commit I've implemented a basic toDomElements
that outputs the original HTML (code copied from AlienNode).
This stops the code from throwing an exception but will
eventually need to be rewritten to rebuild the HTML from
the attributes stored in the DM.
Bug: 56336
Change-Id: I297a1d0a07e9ebf9d0110fb1cdf266f8415f25b7
When the cursor is between ce="false" elements and an editable next
sibling, IE often sets the anchorNode to be the ce="false" element
(or text node within). This change returns aliens to ce="false"
(abandoning the former true within true IE trick), and ensures that
the cursor is in the right place on keydown by programmatically
setting the selection.
Change-Id: I952488510f32b096b27e8e55d4afc7df930e0072
Also removed a few redundant headings in class documentation
comments. There is already an @class and it looks a bit odd in
the generated pages:
<h2>TextString</h2>
<p>TextString</p>
<p>This class provides a ...</p>
Change-Id: Ie311c6993ed02e79272dbde71f6a1bc252ef3037
*.php
* Updated links to files
ve.ui.MetaDialog
* Added stack panel that now contains category and language editor panels
* Attached outline widget to stack panel
ve.ui.FlaggableWidget -> ve.ui.FlaggableElement
* Moved to elements
ve.ui.GroupWidget -> ve.ui.GroupElement
* Moved to elements
* Removed invalid event documentation
ve.ui.LabledWidget -> ve.ui.LabledElement
* Moved to elements
ve.ui.StackPanelLayout.js
* New class, mutually exclusive panel container
ve.ui.TitledPanelLayout
* Remvoed, using labeled element instead
ve.ui.Element.css
* Added for elements
* Moved label style here, from widget styles
*.css, ve.ui.ButtonWidget.js, ve.ui.InputLabelWidget, ve.ui.OptionWidget, ve.ui.SelectWidget
* Adjusted class names to reflect widget -> element migration
Change-Id: I32f504c844dba7aae1b286eef06ca046627bdc8d
When running from Jenkins, we publish only the docs/ directory.
So the live previews are failing as there is no ../modules to be
found.
This will allow Jenkins to instead pass a different --ve-path.
Also, needed to fix the eval in PHP to not use vePath directly.
The vePath is the path for the web browser to the module directory
not for the server-side.
On the server-side we can just use __DIR__ as maintenance/
is always next to /modules and /VisualEditor.i18n.php.
Change-Id: I02101454a1977938bf861425db2141bdb446725b
When jsduck is executed in a subshell (as we do, to catch output)
it disables the color output. It should have a --color flag, but
it doesn't have that, so manually colourise for now.
Change-Id: I1f8da523b6b4fc1fc6965f751395f8af497b13b5