This provides better mobile experiences on various pages
and a more consistent UI across both mobile and desktop.
It does this in two ways.
1) Forces HTMLForms to not use table based layouts so as
not to interfere with responsive nature of mediawiki ui elements
2) Applies MediaWiki.UI classes to most pages
If a page is created via Xml or Html classes it will use mediawiki ui
Where possible I've added classes unconditionally, but for cases of buttons
this is behind the $wgUseMediaWikiUIEverywhere global since button styling is
enabled on pages by default and for checkboxes since it is changes HTML markup.
3) Adds all MediaWiki.UI styles to pages which can use it
When enabled:
* Apply these styles to all pages which use HTMLForms
* Apply to EditPage
* Apply to anything that uses certain elements outputted by the
Xml or HTML helper classes
* Apply to History page
* Apply to protection page
* Apply to move page
* Apply to deletion page
Currently kept behind a global to allow us time to finetune
existing elements. After further testing we will look to kill the
globals and make mediawiki.ui the default
See: I430c0fbb79d2a33bb828b2427bda0ee01115d73f
Change-Id: I47db5eab4569514d039261d11b6dedb0eeae17b5
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Change-Id: Ifbb1da2a6278b0bde2a6f6ce2e7bd383ee3fb28a
PHP, particularly with in_array, really has problems with integer 0
versus non-numeric strings. Let's clean that up by converting values to
strings more agressively and using the $strict option to in_array.
Oddly enough, the one place where strict in_array was being used already
broke when If4175332 stringified the values in one array but not the
other.
Bug: 62268
Change-Id: Id34e654eb8d0e70d093b11445273e542e491e265
One shortcoming in HTMLForm is that fields that use the 'options'
parameter (e.g. <select>) have no easy way for the individual labels to
be localized.
This change adds a new parameter type, 'options-messages', where the
keys are message keys rather than bare strings (similar to the
difference between 'label' and 'label-message'). It also abstracts out
the fetching of the various option parameters, and changes the necessary
field classes to use it.
Change-Id: If4175332405d26c7ff2e8fbe100bcad61762ce6f
It is already set for some fields in Special:Block, but are
discarded by HTMLForm and its fields.
Some notes:
- fields with multiple inputs (radio, select and other, select
or other) will have the same tabindex set on all elements
- Some items such as multi-select and check matrix are not yet
implemented
Change-Id: I3e1ba7f16f3a3183f231afcf60dd392ce6d6eb6b