Commit graph

11 commits

Author SHA1 Message Date
Thiemo Kreuz
fd7363a1e1 Fix broken PHPDoc comments that don't start with /**
Change-Id: I8db56ff0f73873864dde260e51adcd729aa74e94
2020-07-23 16:09:41 +00:00
Nikki Nikkhoui
6b0e9eafe1 HTML Classes stability annotations
Add stability annotations for HTML classes.

Bug: T247862
Change-Id: I4dad7b98213ceceb8c04b24e5d52e6fecadb3538
2020-07-13 14:54:28 +02:00
James D. Forrester
0958a0bce4 Coding style: Auto-fix MediaWiki.Usage.IsNull.IsNull
Change-Id: I90cfe8366c0245c9c67e598d17800684897a4e27
2020-01-10 14:17:13 -08:00
Thalia
84552a9814 Improve error message for HTML multiselect fields
Introduce a more specific message for when the number of selected items
exceeds the maximum number allowed.

Change-Id: I359b65ac397b4acef32940ff8ff9af33651f7a7b
2019-11-14 04:57:35 +00:00
Reedy
c13fee87d4 Collapse some nested if statements
Change-Id: I9a97325d738d09370d29d35d5254bc0dadc57ff4
2019-04-04 19:02:22 +00:00
Moriel Schottlender
a7fd92a95e mw.widgets.TitleWidget: Add 'excludeDynamicNamespaces' config
Allow excluding all pages that are in dynamic (negative) namespaces.

Bug: T208355
Change-Id: I9b39f66ac828bc0c100a2fc347b365f75672efb1
2019-02-14 17:26:03 -08:00
Thalia
1d442c19cf Fix TitlesMultiselectWidget documentation
Change-Id: I4b6bad233b4a4dfd840385f26a10bd190f6cb6b9
2018-12-10 18:28:14 +00:00
Thalia
a61d51af9e TitlesMultiSelectWidget: pass through 'input' config
Also set 'autocomplete' to false in the 'input' config
in Special:Block.

Bug: T208551
Change-Id: I0376e4ce809aeb48496530cdd5d39ac9142c28bd
2018-11-13 19:29:04 +00:00
Thalia
8fec7ed09a TitlesMultiselectWidget: rename 'limit' config to 'tagLimit'
To avoid conflicting with TitleWidget config.

Bug: T209057
Change-Id: Ia0dbc49f38a116202eb2658b7556fb7f0627f1bb
2018-11-13 19:29:04 +00:00
Thalia
61a6a0445b TitlesMultiselectWidget: pass through additional configs
Pass through 'limit' and 'showMissing' configs.

Also set 'showMissing' to false for partial blocks.

Bug: T208626
Bug: T208627
Change-Id: Ifa75e2d390bf349226ad69d68adcdcaf742ab560
2018-11-13 19:28:54 +00:00
Moriel Schottlender
07a5c71646 TitlesMultiselectWidget: Add a widget that allows selection of multiple titles
Add the widget in both PHP and JS for OOUI, and into HTMLForm
definitions.

In JS, the widget uses the engine from mw.widgets.TitleWidget
with the async support from OO.ui.mixin.RequestManager.

The PHP version provides a textarea, like UsersMultiselectWidget.php
which is then infused if JS is available.

Also, add highlightSearchQuery option for TitleWidget to allow for
not highlighting the partial search query the user typed in, if the
UI requires it. This option (highlighting partial result) is already
optional in the TitleOptionWidget, so this config exposes that
optionality in the TitleWidget widget for its menu children.

Notes:

HTMLTitlesMultiselectField is a duplication of HTMLUsersMultiselectField
except for:
- The configuration variable changed to 'titles' (from 'users')
- OOUI modules were adjusted for the TitlesMultiselectWidget
- The PHP version instantiates a MediaWiki\Widget\TitlesMultiselectWidget

TitlesMultiselectWidget is a duplication of UsersMultiselectWidget
except for:
- $usersArray was renamed to $titlesArray
- getJavascriptClassName returns the correct js class for
  mw.widgets.TitlesMultiselectWidget for infusion.

Bug: T197109
Depends-On: I675316dddf272fd0d6172ecad3882160752bf780
Change-Id: Ie96947a35f70b76731e16ae5b85de815dfa4a8ce
2018-10-24 00:46:48 +00:00