CategorySelector: Add different ways of searching
authorPrateek Saxena <prtksxna@gmail.com>
Fri, 11 Sep 2015 09:22:22 +0000 (14:52 +0530)
committerPrateek Saxena <prtksxna@gmail.com>
Wed, 23 Sep 2015 11:41:59 +0000 (17:11 +0530)
commit15429a09736c1ffbc9ecca2dc8edb7add3c6144b
treedaf332f6e8d1667f79ddb3a7c8eb16097de2fef5
parentd51732b3d43f0a13df7c141d476daa733be571f8
CategorySelector: Add different ways of searching

We'll need this for HotCat. We'll be able to set multiple ways of
searching, build an array of promises and collate the results once all
of them have resolved.

Also adds methods to set searchTypes and validates the list.

searchCategories() is too long right now, but can be easily broken down
into multiple routines, not sure if that is helpful though.

This also allows the user to choose categories that don't exist yet.

Bug: T113462
Change-Id: I5a350a2d91b0afb0567f4290654770c74607ce63
resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js