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
e75284e528 escapes a few messages too
eagerly but 1fc00749fb only fixes one
of such mistakes.
Without this change, the labels of some toolbar buttons (e.g. Italian
'Redirect', Welsh 'Numbered list') display ''' where apostrophes
should be.
Change-Id: I3265631512c5d22ecc3dafb9d56acecc7d50ad1d
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
An <a href="#"> element
* shows a status line with a URL on hover and
* opens a new tab on middle click.
For still supporting keyboard navigation the replacement uses
* tabindex="0" to have the normal tab order and
* .on( 'keydown' ) to catch the Enter key.
The image example in the help does not need a link or a keyboard
navigation.
Change-Id: I6d75f75871bb29bdd878451f282f2055ed3f4f5c
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
Also, clean up the invalid logging of some prefixed schema items.
Depends-On: I79e04dda6323ebb05b129bb96c0323db112bcdd0
Bug: T229079
Change-Id: I73eae25d83b8d3f73128d3b800b267a8288a76e8
This appears to have been an oversight in the above change. Since the magic
words variable was no longer set, magicWordsI18N became null which broke
things, and caused whitespace info to not get recorded, which broke the
ability to handle the dialog being submitted too.
Bug: T230078
Change-Id: I5c44ed348de6ac2363d3d789b38053caa3935f62
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 commit adds a function to parse image syntax selected in the
editor and uses the parsed data to automatically fill the fields
of the WikiEditor image dialog. Surrounding whitespace in the
selected wikitext is now included in the result. This causes an
issue with the ownline option in line 840, which appends an extra
line regardless of the post text.
Bug: T40829
Change-Id: Ib117a2e6350400f9298d4892a00981ac41f3dbbf
Also, avoid distorting the logging of abort when VE is switched to from
WikiEditor. Log it immediately, rather than waiting until the end of the VE
session triggers a page-unload.
Bug: T221191
Change-Id: I3ddccd8df973a289f3bcdc4cdc42df1ab23ce6a4
These modules are deprecated and will be removed, see parent task for
details and deprecation information.
Bug: T223286
Change-Id: I72a1ab68f94842b2fa9bcd84c21ea736a48e0614
Similar to makecollapsible.. Played around with CSS transitions, but
due to the non-predictable and variant sizing of the section elements
isn't really worth the trouble in my opinion.
Also was an accessibility issue on the select (header) dropdown.
Bug: T210671
Bug: T175379
Change-Id: I6fa476645bae7f0e1b01c563c4395e2af003c2c5
This bumps the extension to requiring the 1.33.x releases of MediaWiki,
which are currently in alpha.
Change-Id: I55f77294d271c81f510ce54181a24435b840d3d2
Depends-On: Ib2faa22c429096d545ddb829a6b4025427ad6071
When you use replace, before having used find, matchIndex gets out of
sync with what replace is expecting and encapsulateSelection won't
have a selection and thus defaults to position 0.
Bug: T76750
Change-Id: I1dcc724e7548690a3cc63672f93a3099c028f123
The old S&R implementation introduces problems with regexes (T58228 and
T50614) and is also rather slow. At some point in the past it was faster
to do multiple search/replace actions using textSelection perhaps, but
with current browsers doing a one shot replace will perform much faster.
If you have CodeMirror enabled, there will be a delay after replacing
all content on a major page, but no worse than the original page load
one, which I think is acceptable.
Bug: T58228
Bug: T50614
Bug: T25510
Change-Id: Ifab1d071d9f09ec55aa6556b5dca04378c4e5273
1: reftoolbar is used in more advanced situations
2: it doesn't actually do much
3: leaner
Keeping it in the same file, because that will preserve order. seems
safer.
Change-Id: I9bb2cf1e8731d12551a00b717b11602e6192d299
Use proper placeholder attribute instead of faking it with a value.
This predated even jquery.placeholder and is no longer needed.
Also fixes a bug where it was checking with the API for the existence
of the placeholder value.
Bug: T133716
Change-Id: I290ec48f6b1d250da28efffd7ebdb6b681c0227e
At the default line-height the background image tends to
get clipped. Set it to the same line-height as the adjacent label
and both the label and the icon are aligned and the icon won't be
cutoff
Bug: T193480
Change-Id: Id94ba02a305a5150ad5b266bb0e2bb01b8a637ac
CodeMirror forces WikiEditor to load. While CodeMirror handles readonly
textareas, the WikiEditor toolbar doesn't. CodeMirror and
syntaxhighlighting is pretty useful in readonly actually,
so I'm making WikiEditor a tad more resistent against readonly mode.
Bug: T188817
Change-Id: I927a780e1aea86a19750387f530bad84b1ff5ef4
The schema itself is being renamed, and many of the field names are
different.
Bug: T207803
Depends-On: I2949c9782669b75cf17978698c8cef21fdee6dea
Change-Id: I07d9bc1530005914043911b7906c1602522c9162
Respect the config var exported by WikimediaEvents that, if set to true,
forces oversampling. When oversampling, all events are logged even if
they would have been sampled out. The isOversample property is set to
true if the event was oversampled and would not otherwise have been
logged.
Bug: T206543
Depends-On: I5fdf5fdd2dc0d99a0a0d7eb7ab2e3dce4798009b
Change-Id: I7e504884a888c4d080cd4762549b72489126ed65
Instead of hard-coding the 6.25% sampling rate, allow it to be
controlled by the config variable in the WikimediaEvents extension
(which also defines the RL module for the Edit schema).
Also use sampling code from EventLogging so we can configure the
sampling rate as a number, rather than using a hex-digit based strategy.
Bug: T206543
Depends-On: I00383cec62f6c2a0137b329565b0ca84bfbb223f
Depends-On: Ib746fc708e7b752cebc5fd8d080e40819dfa34f3
Change-Id: I2956efc9294768742dd49dcb36770f0509e4090f
The only use of raw HTML messages is in the help panel, which is the only user
of `layout: 'table'`, so we can replace all other callers.
Bug: T154891
Change-Id: I2df3ec8c05d4daaa094378354566356a822c081f
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
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
There is quite low contranst between dialog
background and the overlay, so it makes sense
to just leave the border, which is consistent
with MWUI dialogs in OOUI.
Change-Id: I90ad752b91d15a25e8b36d43df44ac56df75cd9c
The backgorund colour is more selectively applied
elsewhere. This just causes problems if the skin
sets <textarea>s to transparent (e.g. Minerva).
Change-Id: I6695dc5af9224238efdc3eac97817010cf52237d
Five tools are registered in toolbar.config, then overridden
in dialogs.config with more advanced verisons. As the dialog
module is no longer optional, the simplified versions are
no longer accessible.
Change-Id: Ib66025d209a36fb821c5619cbfe63330fb6c9a1f