Make some of the methods we currently use to render the node
static so we can re-use them before inserting. We do the evaluation
without inserting the node so as not to dirty the document and
transcation history.
In the unlikely case the request fails, just fallback to inline.
This only handles insertions for now as type changes on edit will be
very rare.
This changes the signature of insertTransclusionNode, which is used
in Cite and Citoid extensions.
Bug: T51784
Change-Id: Ibc2fc66e6866084b0a4deeb082c8a1ca412febb2
Building DOM trees while attached is much slower. This makes
things about twice as fast.
Remove unused StackLayout wrapper this.panels.
Bug: T134814
Change-Id: Idb269cf3f06c350ffe28b66e2e883c0a7a3348cd
Double-clicking the "insert" button would double-insert the template. Counting
the close as a pending action avoids that.
Bug: T129725
Change-Id: I41af7c051fd54004cecd563d7a6cf8fdb452840f
OO.ui.BookletLayout does not respect tabindices when trying to focus
the first focusable element after a page is switched. Remove the need
for manually set tabindices in ve.ui.MWTemplateDialog by using natural
DOM order and absolutely positioning things to keep current design.
Bug: T114562
Change-Id: I7a18a455f9fa80eb3d2ea17bff8139e0194c0fbf
We were selecting the outer <div>s rather than the actual links which you could
interact with via the keyboard.
Bug: T97323
Change-Id: I797739e45f2c0b4a1d39e4b1901bc0836c82f281
In the template dialog, keep the parameter search widget expanded
with all parameters showing if it was already expanded once.
Also keep the parameter list available after inserting each parameter
instead of asking the user to click the add details repeatedly.
Bug: T95696
Change-Id: I14a47dbea5c69532238e7e67290e613121fdc40e
When the dialog opens make sure the first input is focused.
** Depends on OOUI change I9f1e908e0d **
Bug: T95450
Change-Id: I789bcf98ada7c3e2b9544426546775f65bab0edd
Again. Originally done in I5a664f86, the crucial part of which was reversed
in I1500f480.
Bug: T89913
Change-Id: I39b0cdcdb5f76fa75f506c874ef6223d8d8d53e6
New changes:
50ccb23 Localisation updates from https://translatewiki.net.
9240a51 Update OOjs UI to v0.7.0
Local changes:
* MWTemplateDialog: Stop waiting for removed loading promise to
finish, as in OOjs UI I2bfa013 the loading promise is removed
since iframes were the only reason we needed it.
Change-Id: I1500f480d40d06e417366014b9c2a76f7ce9c29b
Focus the page in the booklet layout so the add template
input is also focused at the opening of the template dialog.
Bug: T85484
Change-Id: Id9ae4653dc2a2e1d1dc16c83c540e22e30f4ea55
Follows-up b0e8900, 447e8de, d3f26e65.
Contrary to binding a reference, this-overiddes for inline
functions gets messy and fragile. There's also a minor
performance overhead that can be avoided. No separation of
concerns, eiter, as the object is held by the closure.
Also:
* Remove left-over instances of @method.
* Remove redundant '0' argument to setTimeout.
* Use null instead of $ for apply() on static methods like $.when.
* Use .empty().append() instead of .html(). Does the same but
without additional overhead and without confusion association
with "html" which isn't used (it doesn't serialise and re-parse
or clone, it just appends when given one or more nodes).
Change-Id: I797a3667c67d52568150be9be5d043d149f22077
Also change this.$overlay (which doesn't even exist) to
config.$overlay in MWTemplatePlaceholderPage and document it.
Compensates for I39df86373ea in oojs-ui.
Change-Id: I4a233c058439d6cfb38d80ece890c8fe57d58f49
Rather than make a new function to determine whether it should be apply-able or
not (and run some checks again), move the enable/disable call into a new
function to do these checks and set the result.
Bug: 72191
Change-Id: I133afa1784e1afd44054f93ed84018894f7c6400
Wikia has done some work on the template user experience, including
automatically showing all available parameters without the use of
TemplateData. In order to make our changes, we had to make some changes
to VE-MW.
ve.dm.MWTransclusionModel.js
* this.specCache is created so subclasses can reference it.
* Promise handlers in the fetch() method have been broken out as class
methods so they can be overridden in subclasses.
ve.ui.MWTemplateDialog.js
* addPromptedParameters() has been moved to the
initializeNewTemplateParameters() class method so subclasses can
overwrite. In Wikia's implementation, we have a method of getting
all parameters and a dialog that shows all of the parameters, so the
request to addPromptedParameters is overwritten.
* Added a done() handler to the transclusionModel promise for Wikia
extensibility.
Change-Id: I073c5850420e7719e82957f879423c2717af674a
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
Relies on I5d894f8a in MW core. We'll need to update our wfUseMW when that gets merged.
Bug: 50747
Change-Id: I35e55658a3990121afe4d996ef4ee06547d2aa0c
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
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