This essentially creates a static debouncer, so if you have
multiple instances calling that method at the same time, only
one of them will fire.
Change-Id: I4c257b557e87f5638b459811655a14b8625de2e3
Pass through the current document when available, otherwise
assume the current surface's document.
Also add a getter for getPageName, so that can vary based
on the target document.
Bug: T193856
Change-Id: Ifdc951fdc6a43b924d102e3fcd7e59e52023757b
* Provide config option to specify which API
ve.ui.MWCategoryInputWidget will use.
* To be used in Iec79e687eff8c63434054282650c97cc882f348d
Change-Id: Ib8869d4facf8b3210b309200d944fad4508d7eee
Figuring out why it broke doesn't seem like a very interesting task,
so let's just throw the whole logic out and use OOjs UI PopupWidget's
new built-in ability to position itself relative to anything.
Bug: T163269
Change-Id: Ie464e4668001f4bc6151b40cef469937aa8c6e48
Original title will preserve the case of what the user entered
into the inspector. Noramlized title will remove any unwanted
leading colons from file/category links.
Bug: T118408
Bug: T124410
Bug: T160977
Change-Id: I92ffc19eab4eead0d124e84afc1e5a0a3e535867
After 79ccfb9372cb57afa569036ef39ead13abfba673, MediaWiki's `<pre>`
tags get rendered as `<pre typeof="mw:Extension/pre">` in Parsoid HTML.
MediaWiki's indent-pre syntax (block indented by a single space) is
still rendered as `<pre>` in Parsoid HTML, however.
Indent-pre is still handled by MWPreformattedNode (no changes).
Introducing MWPreNode, which will handle `<pre>` extension tags,
and MWPreDialog to change its contents (and allow converting
to MWPreformattedNode).
Pieces copied from MWGalleryNode, MWLinkNodeInspector, CommentInspector.
Possible future improvements:
* Add a specific icon for MWPreContextItem
* Avoid API roundtrips for rendering (but rendering wikitext <pre>
is not as simple as it looks)
* Consider a way to insert these other than '<pre' sequence
Bug: T159900
Change-Id: I5bc4ea6e5d893736f65ef0dd43b08c18cb1a1e85
A gallery tag is parsed line by line, so captions
(and other image data) should not contain line breaks
Bug: T153373
Change-Id: Ib1d1c18216d07c83b2d4358d2dda71c9d17e3e44
New changes:
f1297b8 [BREAKING CHANGE] Allow target widgets to be re-used
Local changes:
Re-use target widgets
Change-Id: I5decb918f398704d4b6c108a16fbc1cc073ef077
Change I94f4fadd84cd3e prevents the gallery dialog from inserting
duplicate images into the gallery dialog after one request (e.g.
so double-clicking on an image in the search widget doesn't cause
the image to be inserted twice). However, galleries can
intentionally contain duplicates of the same image, so it is
possible to make a spearate request to insert a duplicate image.
When the dialog is first opened, it requests all the images in
the gallery at once, so the above change was causing the
duplicates in an existing gallery to be dropped. Duplicates
should be allowed to be inserted following this initial request.
Bug: T150894
Change-Id: I34353bc9b8db947488474c4be52292e0a1447705
require bypasses Ace's internal loadModule() logic which is capable of
on demand loading of Ace modules. Because unloaded modules are not
defined, they cannot be required, and because we don't use RL to preload
all modes (because it's a lot of bytes), currently only very few of the
available language modes were currently available.
Also validate language mode names passed to Ace.
Bug: T148518
Change-Id: I82d278920695be12aa80a79548abf8b8ce5445fd
Quick fix to the problem that searching for the file name or
page title currently returns the image, but searching for the
URL does not.
Bug: T121354
Change-Id: I13e665226e5dc15ba626126dc4806ce8f4e0040b
Always use #getQueryValue which trims whitespace, so we
don't pass whitespace to the API.
Also rename some variables for clarity, and remove some
unused arguments.
Change-Id: I0d27f59488295bc1c398d0fd287e3e16a3f5aaec
Configure the basePath for Ace, so that its own loader knows from where
to lazy-load additional resources. This will enable all known modes and
the worker scripts for linting.
Bug: T124419
Change-Id: Ie71518917ab966743e8397b23ffb050ca47e9ff4