Commit graph

21 commits

Author SHA1 Message Date
gerritbot 685ce2b154 styles: Replace 'mediawiki.ui/variables' call with skin variables
Replacing 'mediawiki.ui/variables.less' @import with
new skin-aware 'mediawiki.skin.variables.less' standard.
Also
- replacing several static values with new Codex design token featuring
  skin variables.
Bump to required MediaWiki core version >= v1.41.0.

Bug: T332541
Change-Id: I1ba1bed9b4f5d49014d2e51c116df8b0f320b949
2023-03-30 10:09:42 -07:00
Umherirrender b197b9ffe7 Improve Hooks::onMediaWikiPerformAction
- Use IContextSource::getActionName directly and not
MediaWiki::getAction
- Use IContextSource::getConfig instead of MainConfig
- Use getRawVal to check against constant value
- Use local var to avoid repeatly calls

Change-Id: I592e4451035c37c35fe181fa69b080f3f7a31ec8
2022-11-11 11:58:02 +01:00
jenkins-bot fa050f51bb Merge "Hide interactive inputbox in print" 2021-12-21 20:55:02 +00:00
Isabelle Hurbain-Palatin cbead9bfbb Introducing a namespace for InputBox
This is a pre-patch for I5144fd6c54 to add a namespace for InputBox and
making sure that this still works, independently of what we're doing
later.

Change-Id: Iaaff18b50619f490a4437be7f4d95845c8e0eedb
2021-12-10 19:15:56 +01:00
Derk-Jan Hartman f07b3cd650 Hide interactive inputbox in print
Bug: T173900
Change-Id: I52722af4447461629298c58c02a2ab9c0fa465d3
2021-12-05 23:07:14 +01:00
Fomafix 2e375a712d Use HookHandlers to inject services and replace global variables
This change requires MediaWiki 1.35+ which is already required in
extension.json.

Change-Id: Ieb636c9e96c534ed6dccd8cce5308fed160c3410
2021-11-12 16:41:59 +00:00
Umherirrender b234d79a45 Use services from Parser
getTargetLanguageConverter is 1.38
(I536543c516bf952967ada17cc781a9d125421b3e)

Change-Id: Ie0456734576cee770662622a03420b6ec76d932a
2021-11-04 20:09:34 +00:00
Timo Tijhof 93351fb7d9 Use native <input required> instead of JS-based disabled toggling
Remove the JavaScript module and its logic to toggle the disabled
state on the submit button. Instead, let the browser handle this
natively by setting the `required` attribute, which naturally prevents
early submissions.

Retain the current styling for 99% of cases by using the
:required:invalid selector to target the submit button to make it
appear disabled. This slight duplication of styles is needed because,
despite the form effectively being disabled natively, the core
mediawiki-ui styles only account for :disabled on the button directly
and not e.g. inherited via form:invalid. It is also unclear whether
we would want that, since there is some value to be had from having
the form give a consistent look with a progressive button that can
be submitted even at the wrong time to yield an assistive message to
the required field, so hence handling this locally for now instead of
with a generalised approach.

In order to use the required true/false idiom, I have switched the
generating of the HTML string from the old Xml::element method
to Html::element. This means there is no need to store it in an array
first and conditionally set it since true/false will result in absence
or required="" as needed.

As side-effect from this, redundant attributes like value="" and
type="text" are ommitted from the output, just as MediaWiki core does
more generally.

Bug: T283303
Change-Id: I2c75e09dd3f89fa11fca311b4e1f8133946b01b1
2021-05-21 21:04:02 +01:00
Sébastien Beyou 253eb5e85a Replace use of deprecated $.debounce()
Bug: T213426
Change-Id: I1502a1bd68ea260e94a47fcce047bafce3e47f0b
2021-04-30 00:49:27 +00:00
Reedy 5ef98e8775 Convert to manifest_version 2
Bug: T252470
Change-Id: I22b8c6151272a81a58ffcab3730e247f175646ed
2020-05-12 00:03:08 +01:00
Umherirrender 1e200ba116 Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: I537f8b2679bc546606856e4bf031efcd52cb381e
2018-04-13 20:15:44 +02:00
Kunal Mehta 431f955a81 Move classes to includes/
Change-Id: Ia65adfc9d9d6a117d8d4fc711e97414328b42440
2018-02-24 13:57:32 -08:00
zoranzoki21 fab2eacd44 Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: I6c7f04d69a0d7871012ebe37954ad7f8b4694dbc
2018-02-12 15:55:45 +01:00
Max Semenik 84b7716487 Don't use deprecated Sanitizer::escapeId()
Change-Id: I99ce7bdea39c0b6fe0daed7c0be5fec0c8680321
2017-10-24 14:25:40 -07:00
Umherirrender 7ffb957f31 Prefer descriptionmsg over description in extension.json
Change-Id: If5f4e779c9c4663edab3f4dc26b7cdcb22cd5609
2017-01-27 20:19:58 +01:00
Tim Starling f7491d3484 Add parser tests
Change-Id: I718b0e0c1dd0a4507e77abc7e2cb88800ae2176a
2016-07-08 16:20:57 +10:00
Kunal Mehta 5a03081a98 Set license-name to "MIT-Licence"
Follows-up d5dbe717b, which accidentally lost all licensing information.

Bug: T106642
Change-Id: I44024a0041040bbff42afceb650170af1d0b6c66
2015-08-24 00:39:42 +05:30
Florian 3a640f0368 Add mobile target to styles module
Bug: T103274
Change-Id: If3b63deb85840ad9ca88068815cfdc6e3c265004
2015-06-21 21:10:19 +02:00
Kunal Mehta 87092c8732 Set manifest_version in extension.json
Bug: T100745
Change-Id: I33fd8c9e44015c5df2e0bbf2afaa8c7b487f37d5
2015-05-28 20:39:14 -07:00
Kunal Mehta 562fa9c684 Re-apply a6a7dc02e5
Got lost in rebasing d5dbe717b6

Change-Id: I9ae3f702ff3e1aa7b5cb9c600e40e4044b0f2368
2015-05-04 15:23:31 -07:00
Florian d5dbe717b6 Convert InputBox.php to extension.json for extension registration
Bug: T87931
Change-Id: Ib3cd4714c842ebf17da5b1f0932fd886dbc65c66
2015-05-04 13:25:16 -07:00