Data tables should always include a caption for accessibility reasons.
So add a placeholder caption when using the "insert table" button.
Bug: T252350
Change-Id: I6773e2274007946de516ae34e841f66ad20ebc0c
Using an event introduces a race condition where the extension
adding the listener has to do so before WikiEditor finishes loading.
Change-Id: I5a8dc6f8fd1b1939b5d98307b20ef1fd355cee99
This reduces the initial loaded modules.
Also add the dependency on module 'oojs-ui-widgets' because
jquery.wikiEditor.toolbar.js uses OO.ui.ToggleButtonWidget.
Change-Id: I03d0f73fb77bb389dd4e5ad2aa15b3ff5a97e5f5
Also separate out Apex-specific styling into a separate file.
The current toolbar is already supposed to be aligned with Apex
so the visual changes here are minimal.
Bug: T223155
Change-Id: I7a0a21809018e0094d50992054523d20be3c5473
As noted by Jack Phoenix in I07b0e0e030217d74f06bb2b6fc278bd2e28e34b5
the core toolbar has not been present since 1.32 and this hook is
therefore rather pointless.
Change-Id: Ibcf4400237dbf3b195e2bc6a8efee9f1b1527e6d
This was used for setting incremental tabindex attributes
on the <button> elements of the "Find and replace" dialog
as opened from the "Advanced" toolbar section. I was unable to
find a difference in behaviour with and without this code running.
Both with and without this, when tabbing from the first input
field in the dialog, the buttons are in the tab order after
the input fields (matching the visual rendering). Unclear
what this was doing.
This re-applies commit 81b08daa48, which was reverted (5f356b1a),
because I forgot to remove the calls in dialogs.config.js.
Bug: T234581
Bug: T235701
Change-Id: Ic51074c3d2b2e9b9b050c9f42862519a3e78af16
This was used for setting incremental tabindex attributes
on the <button> elements of the "Find and replace" dialog
as opened from the "Advanced" toolbar section.
I was unable to find a difference in behaviour with and without
this code running.
Both with and without this, when tabbing from the first input
field in the dialog, the buttons are in the tab order after
the input fields (matching the visual rendering). Unclear
what this was doing.
Bug: T234581
Change-Id: I5de97733091d0e123913f272b00784205d69267f
This allows us to bundle the wgWikiEditorMagicWords and
mw.msg.wikiEditor(?!) config vars that were previously exported globally
in the startup module.
This code is old and crufty, so this is a somewhat minimal conversion:
* Use require() for jquery.wikiEditor.{dialogs,toolbar}.config.js,
and for jquery.wikiEditor.{dialogs,toolbar}.js
* Don't attempt to convert jquery.wikiEditor.js to something
require-based, instead just run it and let it set the $.wikiEditor and
$.fn.wikiEditor globals
* Consolidate ext.wikiEditor.{dialogs,toolbars}.js into
ext.wikiEditor.js
Bug: T222828
Change-Id: Ia75d685cbde786e8fceb6db36f2436b2beea1499
This is an internal variable that hasn't been used since 2017
with commit be36244c70. It was kept for back-compat with
regards to caching, which as churned long since.
Bug: T219342
Change-Id: I7c71956e34c1d4312037f9a8d26f81125ab82577
Use the new extension.json attribute instead.
Bug: T214211
Change-Id: I79c45c6923fd19f6f9f068492b3bd6548161dd04
Depends-On: I27ecebe27d7aaebe6d1317bc5eaea9cca368b45d
Follows-up T165112, which most the WikiEditor code into a single
module bundle (given they were only ever loaded together).
It left behind some aliases for back-compat to allow for user
migration. Once we've checked with mwgrep and get satisfactory
results, we should finally remove these to lighten the startup
registry.
Bug: T165112
Bug: T202154
Change-Id: I207ebc0f9f9c2beb81f4dfe726f090ee900a1c57
This bumps the extension to requiring the 1.33.x releases of MediaWiki,
which are currently in alpha.
Change-Id: I55f77294d271c81f510ce54181a24435b840d3d2
Depends-On: Ib2faa22c429096d545ddb829a6b4025427ad6071
A new toggle tooltype which makes use of ToggleButtonWidget in order
to provide proper accessibility for all buttons that require on/off
state
Bug: T198781
Change-Id: I8b7fd41571a48fa4f6560790d94bb966972e740f
This moved in OOUI 0.27.0, which was merged into MediaWiki 1.32.0+ in
fc88eea; the old alias is about to be removed from OOUI, so this will
stop it breaking.
Bug: T194104
Depends-On: I2acf232fd172d176b305d65d88db5b7bbfe34b88
Depends-On: I8a0426fc288a499e40f02f1da7a9f1b09e6dbd5f
Change-Id: I1a1409de15559bd614f7d351cdc1df0753b9df5d
Replaces the insert and advanced-insert groups, which
are currently multi-colour icons.
Drops the button-sprite + offset mode, according to
mwgrep there are no other users of this.
Bug: T191031
Bug: T143508
Change-Id: I7032f98908a591ea5c9d3dbbb7616e2c10bbfc80
Many of these modules are depended on in the wild in
user scripts etc. so make them deprecated aliases.
Bug: T165112
Change-Id: I00b888fa55e1e16a490cda22d59692564714dd46
These were always jointly loaded, so they just bloated the module table
to no benefit.
Bug: T165112
Change-Id: I51745e84d6b840a18d84385dfb5ea4f96ada311d
These features were ideas in the Usability Initiative but were never
finished to the level that they would be deployed on Wikimedia wikis
and have been marked as "going to be removed" for years. Now is time
to act on that promise.
Change-Id: Ia1eb91d2dfb1979518d97badc1477146b4606f7c
This avoids the exclusion of the rule
MediaWiki.Files.ClassMatchesFilename.NotMatch in .phpcs.xml.
Change-Id: Ia6fdbe9e9ba726d8a6b4d8168d298820e3efc1d2
This was present right from the start of this repo (in WikiEditor.php back
then) and I can't quite see where it stopped being a thing, except that it
pre-dates the conversion to en.json.
Change-Id: Ifeebb7dcf511f73f74934ee88a7a007dfdbcc803
No idea where these came from; they weren't present in I76e2a685 and yet
appeared in Id90e104 despite that being an apparent script-conversion of
the former.
Bug: T118541
Change-Id: Iac18c3c7ef8b1552313c2bd9f5b8fdc4cb8789b6
These were moved to core in Ifd0ed24 as special-characters-* but were not
removed from here, leading to a lot of failed message loads.
Bug: T118541
Change-Id: I8ccbbbf98177656284712134f3238a9e4482d32d
Move the HTML for the dialogs to separate template files,
using the template mechanism from core.
It is still possible to specify the HTML directly as before,
to be used in gadgets etc.
Change-Id: Ia7ad5aaa9cac429d1c9d706bdf6760e3eda358bc
Per T42972, the current hidesig implementation is broken, and only
hides the signature button in namespace 0 regardless of the value of
$wgContentNamespaces.
Seeing as the old implementation of hidesig was broken, I don't really
think backward compatibility with old configurations is a useful
concern here. In particular, hiding of the signature button is no longer
able to be configured in Special:Preferences (why such a trivial pref was
ever able to be exposed to users, I don't know).
Bug: T59727
Change-Id: I596fd435bc9be8c37da43177c1bea90ebff0b2fe
* Internal links: Show simple example first
* References: Show use of unnamed references
* Discussion: Use --~~~~ for consistency with what the toolbar button inserts
Bug: T26128
Change-Id: I08de0ad416727447eccad914c2ade3a93e5a8ae2
Replace $.escapeRE from 'jquery.mwExtension' by
mw.RegExp.escape from 'mediawiki.RegExp'.
This change requires MediaWiki 1.26+
Bug: T103993
Change-Id: I5fc19e1313fc6a06726981e0365cea6d00abb5f3
Use mw.language.getFallbackLanguageChain() to get the
fallback language chain. This chain currently always contains 'en'
as last element. Remove the last element to prevent a fallback to 'en'.
Reimplement autoIconOrOffset to correctly prefer sprite before icon.
Bug: T87247
Change-Id: I452dd45d20ea4dd542d63274b7aad0272e20ea12
Style modules currently added through addModuleStyles default
to being in the head ("top" position). This is an unhealthy default,
since only critical styles that are needed at pageload should be
in the head. In order to be able to switch the default to "bottom",
existing module positions have to be defined explicitly.
Bug: T97410
Change-Id: I8dbee3e4edf673341e7eb49f360e83e4dac54b17
Extension registration currently doesn't support merging 2d arrays
(T99257), so set it as an explicit global for now in a callback.
Change-Id: If7604a7ed8ec0f940c4a4d2988fcecc383303e1d
* 3cb4714e15 "Bump version to 0.5.0 to reflect massive updates in
last year"
* c9c189fd9d "Add dependency on mw.user"
Change-Id: Ic17a7f6a1bf97c955b79c6500ddbec38201aa650
Some very weird issues going on involving multiple wikiEditor instances being
set up on the same textarea element. It's probably a race condition of some
sort and I'm hoping that restoring the modules like this will fix it.
Bug: T93384
Change-Id: I44c9c013993220ab709893d239614552d7b25d46
Follows-up 74da530f2, which introduced a separate HTTP request
on all pages just for the 665 bytes (compressed) of ext.wikiEditor.init.
Have it join the main load queue instead.
Change-Id: I9e0ce994e632c64f3c781f45ea44582c0a943c65