Commit graph

6 commits

Author SHA1 Message Date
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