Commit graph

19 commits

Author SHA1 Message Date
Stanislav Malyshev
3562f0afc7 Enable configuration to supply options for Special:Search form
This for example will allow to display descriptions by setting:

$wgSpecialSearchFormOptions['showDescriptions'] = true;

Bug: T55652

Change-Id: Ifdbca4c508314cb950f2835ee65caea18e0af5b1
2019-05-22 17:30:53 -07:00
Ed Sanders
e8a2f22aae SearchInputWidget: Replace pushPending hack
Use the showPendingRequest config option instead of setting
a prototype method to false.

Bug: T222329
Change-Id: I0e3176141c63ed9a849326c2f9a5a26ffc2b273f
2019-05-02 17:27:37 +01:00
Thiemo Mättig
e8b10f6804 Simplify documentation headers of includes/widgets/…Widget.php files
Most notably: The documentation header repeats the file name. This
appears to be fully automatically generated, but does not add helpful
information.

Change-Id: I9edf15dd25ef6cc52fe931fffde69f0bd9042474
2018-01-10 13:44:05 +01:00
Umherirrender
23ef520a1c Improve some parameter docs
Change-Id: I31e983d7ac287158101b18ad95779d83537302a2
2018-01-07 11:39:08 +01:00
Bartosz Dziewoński
a0d6118af7 Put menus/popups of infused PHP widgets into the default overlay
With some special tweaks:
* Remove weird custom overlay handling in DateInputWidget that nobody
  actually used. I think if you need something special like that, you
  can just write two lines of JS code to attach the dropdown elsewhere.
* Also handle the CapsuleMultiselectWidget produced by HTMLForm's
  'multiselect' field in the same way.

Bug: T183069
Change-Id: I693f406194aeb826a3ab5bc78c97015b0b8a7fdb
2018-01-02 23:40:02 +01:00
Thiemo Mättig
544122a6c2 Remove self-explaining "section heading" comments from classes
I can see that "parent::__construct" literally calls the parent
constructor. I can see that stuff preceeded by the keyword "protected"
is protected. I really (really) don't need comments explaining such.

Change-Id: I7458e714976a6acd3ba6a7c93fdc27d03903df83
2017-12-28 16:12:08 +01:00
Ed Sanders
348d16867f Remove setting of SearchInputWidget configs to already-default values
Change-Id: I2710051386ba826895db9d9c675263847625e17f
2017-10-08 19:55:14 +01:00
James D. Forrester
8212363b18 SearchInputWidget: Don't show images
But we should also have a different class name for this, as this isn't
upstream's SearchInputWidget.

Bug: T177659
Change-Id: Ie62e8678e89b2403d769694adb23fe21a047019c
2017-10-06 13:01:14 -07:00
Umherirrender
3f1a52805e Use short type bool/int in param documentation
Enable the phpcs sniffs for this and used phpcbf

Change-Id: Iaa36687154ddd2bf663b9dd519f5c99409d37925
2017-08-20 13:20:59 +02:00
EBernhardson
baf123f07d Revert "Make mw.widgets.SearchInputWidget extend OO.ui.SearchInputWidget"
Typing a search query into the main box on Special:Search
causes the search to be performed for the first autocomplete
result, rather than the typed query. The first autocomplet 
result should only be searched for if explicitly selected with
the mouse or arrow key.

This reverts commit 7882e3b660.

Bug: T171112
Change-Id: I1af6ba90542fafe3ed1aeca420e9d6df6612f7d0
2017-07-19 21:39:36 +00:00
Bartosz Dziewoński
7882e3b660 Make mw.widgets.SearchInputWidget extend OO.ui.SearchInputWidget
Mixin mw.widgets.TitleWidget instead of extending mw.widgets.TitleInputWidget.

* Remove code that reimplemented pieces of OO.ui.SearchInputWidget.
* Remove code that overrode pieces of mw.widgets.TitleInputWidget.
* Copy the code from mw.widgets.TitleInputWidget that we actually want.

This should result in no functional changes, other than losing the
TitleInputWidget API (some methods and config options) that no one
relied on, as far as I can tell.

Bug: T169194
Change-Id: Ic1482b4c7cfde7d4cf0b8900654bd3a454776010
2017-06-29 22:25:56 +02:00
Bartosz Dziewoński
49eeea2124 SearchInputWidget: Fix documented default for 'pushPending' option
Change-Id: Iadee48af255498c6608cfd00fca29eed9b14f1be
2017-06-29 22:24:56 +02:00
Bartosz Dziewoński
e218f21d44 mw.widgets.SearchInputWidget: Do not pass type: 'search' to TextInputWidget
Causes deprecation warnings.

Most of this code is copy-pasted from OO.ui.SearchInputWidget.

Bug: T148471
Change-Id: I81d52ba938a8b90c5d2c173f1f2682d9e3300e43
2017-03-14 21:44:42 +00:00
Bartosz Dziewoński
7c987a0235 Don't magically make MediaWiki\Widget classes infusable
For consistency with how normal OOjs UI widgets behave.
Only one usage outside of HTMLForm needed updating. There
are no usages in extensions in Gerrit.

Change-Id: I9b5de86307a13ca7355b7541e8683e4d6a10431f
2016-07-26 13:56:47 +02:00
James D. Forrester
9c83f632ef SearchInputWidget: Use isset on dataLocation in case it isn't
Change-Id: I88f4d1624ee0e1f64d8f591dd8936e875211c53d
2016-07-01 12:34:51 +01:00
Kunal Mehta
63b562b3f5 Fix file permissions on SearchInputWidget.php
Change-Id: I0c7b149a0c62f02b655e53c255ba01a92fc6c4a8
2016-06-09 16:11:29 -07:00
Florian
36784f7c35 Search: Change dataLocation default value and add docs
Implemented Krinkle's comments of the followed up commit.

Follow up I2480149

Change-Id: I8e51c0d3a3ca1690ea3ea08469a1cd52d9c151f3
2016-05-06 12:18:19 +00:00
Florian
e429497501 Convert Special:Search input to OOUI
Bug: T100898
Change-Id: I24801495dfad71f457bc4afdd28474f74b219024
2016-03-22 18:38:52 +01:00
Florian
18c6615d01 MediaWiki Widgets: Add new SearchInputWidget
SearchInputWidget is similar to a TitleInputWidget, but doesn't has
a visible loading indication, doesn't highlight the first result and
uses the opensearch api endpoint for suggestions, instead of
prefixsearch.

Extra points:
 * Improve documentation of mw.widgets.TitleInputWidget's configuration
   option validateTitle

Bug: T118443
Change-Id: I8b8098041fe2971389fa908d007d2e77255829ec
2016-03-03 16:29:40 +00:00