Any MW target may want to get a wikitext fragment, not just
ArticleTargets. Requires us to move refreshEditToken up as well.
Change-Id: I27d30e20fefd5ba266d3d8e5f99383e9b4d4993a
* Fix focus and resize/scroll into view after the
captcha has loaded (so after the image has loaded
for FancyCaptch).
* Add margin between input and captcha
* Enable enter-to-submit on captch input field.
* Unify code for simple/math/questy and correctly
render math as HTML (by looking at the mime type)
Change-Id: I10433cefbfea8569674c120dde5b489570e20966
Sites like to customize 'readonlywarning' with things that we can't parse.
Instead, use 'apierror-readonly'. The old message is still shown in edit
notices.
Bug: T163455
Change-Id: I592accde17b256ecee27820df12d9d312499f8f7
If we retry and get another 'badtoken' error, something is very wrong,
and trying again and again is probably pointless. This behavior also
matches how mw.Api#postWithToken handles bad tokens.
Bug: T163493
Change-Id: I488fd7e74e37922044491695d6c9025a45531281
* Pass a wikitext promise, instead of wikitext
* Handle writing of content to the dialog from within
the dialog.
* Handle diff errors within the dialog.
* Never disable the 'Return to save form' (approve) button
* Remove redundant messages
Change-Id: Ibd76e8951998f751abfb4f407682202c2f73ac7e
This will be required later when we have to fetch the original
document from the server before running a visual diff.
Change-Id: I351688f4d1fec892bc297f40c209939cbb2ccf95
Provide a utility funcition in ve.init.mw.LinkCache to do this.
Also use this in ve.ce.MWTransclusionNode/ve.ui.MWPreviewElement, and
introduce to ve.ce.MWExtenionNode
Bug: T73900
Bug: T153535
Change-Id: Ieb9a0274b8c5ae1932c431546f09d18000fa6dd9
Stops us including "[edit]" in the summary when people have marked whole
headings for translation.
Bug: T160911
Change-Id: I906398e6bf45433d904795847f59b5bf0148092f
Distinguish between the initial summary state, and a value stored from the
summary when switching modes. This lets us avoid overwriting a stored value
when section-editing, or assuming a stored value after a switch was never
edited.
Bug: T159686
Change-Id: Ie7640538140a14bbafd539b3a45928f5c55cf804
Switching modes recreates the toolbar, so if someone has already edited the
save summary it shouldn't update the initialEditSummary to that.
Bug: T159686
Change-Id: I4109442853916bebae2bce804fcd6777e3eb6d34
Refactor saveFail's badtoken handling out so it can be reused by
getWikitextFragment.
Bug: T156991
Change-Id: I686cddb5be4484211fa69640044db1bc34eacefc
This is just dead code. We never call `.showMessage( 'captcha', ... )`
(the CAPTCHA is shown in the 'api-save-error' message).
Change-Id: I48f51e89d5b366384d184e2ed505be9e7b8f3401