Changes:
* Override ve.ui.SurfaceWidget for use in MW
* Add mw-body-content class to surface view container
* Assert 1em sizing for surface view container to prevent
mw-body-content from applying its own sizing
* Add new scripts and styles to RL config
Bug: 71652
Change-Id: Iac86facdc0c7a0e48c0f3617e2f6c2e7f001525e
New changes:
6bbcd6a Localisation updates from https://translatewiki.net.
b8d8a5b [BREAKING CHANGE] The Great Selection Rewrite of 2014
Local changes:
Update to use new selection/range API
Change-Id: I5480d5c77d599c93c2d374fac88bb2fdb68b0024
That function needs to return the result immediately, not wait for module loading (via mw.notify).
This was breaking us being able to keep track of what wikitextWarning object was in use (but only
the first time we used the module), and therefore fail to close the warning when the wikitext
disappeared.
Bug: 70168
Change-Id: I0f1427423a5fe82ec8e70e2f0462a3044ca7ace8
New changes:
c4ce5ee Update OOjs UI to v0.1.0-pre (466a8762ac)
Update changes:
* Remove manager arugment from window constructors
* Use this.$content instead of this.frame.$content
* Use this.getDir() instead of this.frame.getDir()
* this.loading is now a promise, not a boolean
Change-Id: Ia83449a60078dd24ea4f976221c0859e5a121279
New changes:
76bbf3b [BREAKING CHANGE] Fix camel-casing of countNonInternalElements
Local changes:
Use renamed countNonInternalElements function
Change-Id: Ib5f86ea5cfeb5e577f61349ed4bbb231ea155638
It can be very slow on pages with lots of references and
isn't required until you click 'Use existing reference'.
What is required is knowing if the list will be empty for
greying out the button, but that can be precomputed very cheaply.
Change-Id: I56909801a5685bb04e0c83cfb95463f705b8dfae
LinkNodeInspector was broken when you clicked away/pressed escape, because data was not set.
Normalizing on data being initialized at the top of get*Process methods if used.
Change-Id: I89728ac558545a6f2c325014b6f457ec6bef17b8
New changes:
56de6f5 Localisation updates from https://translatewiki.net.
f8bda64 Widgetise demo menu
6ac48d8 Localisation updates from https://translatewiki.net.
365e131 builderloader: Omit value for boolean "disabled" attribute per HTML5
706e4b3 Prevent double counting of DM nodes in getNodeAndOffset
b141a7d Update OOjs UI to v0.1.0-pre (d2451ac748)
c5b3921 Localisation updates from https://translatewiki.net.
1606983 Update reference to ConfirmationDialog to use MessageDialog
Deletions:
* Styles for ve.ui.MWBetaWelcomeDialog - not needed anymore because
OO.ui.MessageDialog provides them
* Styles for ve.ui.MWGalleryInspector - not needed anymore because
ve.ui.MWExtensionInspector provides part of them and the rest are being
replaced by programatic sizing
Modifications:
* ve.ui.MWLinkTargetInputWidget - Added support for validation and href
getter
* Split message between tool and dialog title for ve.ui.MWEditModeTool
and ve.ui.MWWikitextSwitchConfirmDialog
General changes:
* Updated inheritance.
* Added manager param to constructors of dialogs and inspectors.
* Updated use of show/hide with toggle.
* Added meaningful descriptions of dialog and inspector classes.
* Configured dialog and inspector sizes statically.
* Configured dialog action buttons statically.
* Interfaced with OO.ui.ActionSet to control action buttons.
* Moved applyChanges code into getActionProcess methods.
* Always using .next in setup/ready process getters and .first in
hold/teardown process getters.
Change-Id: Ia74732e6e32c0808eee021f0a26225b9e6c3f971
Merge the media edit and media insert dialogs. Allow editing
of media properties when inserting a new image, and also
allow the user to replace the image on edit.
Bug: 67170
Change-Id: I35bd95503565dbf95090ee8110284db5a8fbba83
This puts reference insertion and editing tools into the same menu (yay) and
applying-annotations-to-text tools into the same menu, too.
As part of this, I'm re-labelling the generic reference tool to "Basic" (now
that it has some context for users).
Change-Id: I8b8196d3c2e40237d61c8491ab30e737b82597d6
Some surface fragment methods return a clone, so make sure
that is written back to this.fragment in dialogs, as this.fragment.select()
is called on teardown.
Functionally depends on If26cc0a2d in core.
Bug: 65706
Bug: 65716
Change-Id: Ia552b2a4c4c59ffc308a4acdecac78a7803a1c1f
Depends on I468d4eb4 in core.
Uses various hacks to trick the test runner into thinking
an MW target is in use, when in fact we still use SA targets.
Change-Id: If4611307d5d7aaee4af84f86ef82faf9078043b6
By disabling the selection button instead of hiding it.
Also make sure that there are other references before re-enabling it.
Bug: 65689
Change-Id: Ifb3d6ab6eacb71909eb13e3a72e971b49e2595c1
Existing references keep internal records of current saved data, which breaks
the current length check. Instead, use the new function to count all
*non-internal* elements
Relies on I8ecbf387
Related to bug 52182
Change-Id: I4b9bb866babe018d75dc083fab35375b9fb53d3c
Switch to processes for windows (dialogs/inspectors)
This conversion also required the splitting of MWLinkInspector into
MWLinkNodeInspector and MWLinkAnnotationInspector.
New changes:
88fe25f [BREAKING CHANGE] Update OOjs UI to v0.1.0-pre (dd888aba5c)
Change-Id: I662d8985463c9fc881775f70aef87ebeb454a73f
Also adjust calls to InputWidget methods changed in
I324dfc2 in OOUI.
New changes:
9da32d7 Update OOjs UI to v0.1.0-pre (e6edd86d37)
b6aa671 Localisation updates from https://translatewiki.net.
1cba6e0 Update OOjs UI to v0.1.0-pre (9a6c625f5f)
94629f9 Localisation updates from https://translatewiki.net.
Change-Id: Id58d199c7ce3332a104ab2a5c395561ab94ae060
When MWReferenceDialog was modified to inherit from ActionDialog the
search select method didn't get changed to call applyChanges. But really,
you can't just call applyChanges because you need all the promise setup
stuff that onApplyButtonClick does. The API for ActionDialog needs to be
improved, but this works just fine in the mean time.
Bug: 64677
Change-Id: Ib38a624811dc26ead7b9de64cb41aff642820452
Based on I70e88f6 in VE core
* Cleanup dialogs by using node dialog and action dialog
* Move "Loading..." text from label of dialog apply button to dialog title
(repurpose identical message)
Save dialog will be converted in a follow up.
Change-Id: I6a290f4bdc29e577c7c89b4babdab5853c4c10e5
Update dialogs and inspectors for breaking change in VE core
New changes:
a553012 [BREAKING CHANGE] Merge dialog and inspector actions into window actions
f9a0419 Localisation updates from https://translatewiki.net.
cbe81a0 Fix path to spinner in ve.ui.SpecialCharacterInspector.css
Change-Id: Icf90ace6442364283b66b234e3c78fc65212f070
Otherwise the surface ends up in a weird half-focused state which
causes it to behave strangely.
Bug: 63909
Change-Id: I3ebc30fde0202116b383a5b497aca65b66732922
These were being used indirectly in the MW*Model's. Use surface
fragments instead.
Fixes I0fae3e5ff2bd.
Change-Id: I1d6aa5e00a9315cf7088f87f9e9d828833feec64
Move various bits of code from initialize to setup as required.
MWDialog is now useless so use ve.ui.Dialog directly.
New changes:
0b2d03f [BREAKING CHANGE] Pass fragments, not surfaces, to windows (reprise)
0101ac4 Update OOjs UI to v0.1.0-pre (ac6848398c)
Change-Id: I0fae3e5ff2bd0da5b74c244af226b07b1f5883bd
When using a tool that opens a citation or citation transclusion dialog,
the dialog shouldn't use edit mode unless the template in the node and the
template the tool would insert match.
Bug: 63452
Change-Id: I34a5a2da576247f4046da45f742bccc3cec22c5a
This fails before the reference has been inserted, because
it's not yet in keyedNodes at that point.
Bug: 63031
Change-Id: I34ea1a88c0f332c23e43597d1c42158bfb0f1e98
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag
Changes:
* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget
Configuration:
If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:
[
{ "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
{ "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
{ "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
{ "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]
...or...
[
{
"name": "any-name",
"icon": "any-ooui-icon",
"template": "Any template",
"title": "Any title text"
}
]
The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.
Depends on Ic353f91 in oojs-ui
Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
It was excluded, but also promoted, and the toolbar resolves this ambiguity
in favor of promotion.
Bug: 62575
Change-Id: I2f1eadb27cbd16e3258aee0311c7b35f6311ea5a