Commit graph

10 commits

Author SHA1 Message Date
Prateek Saxena
9b461e218a HtmlForm: Use mw-ui-checkbox only if wgUseMediaWikiUIEverywhere is enabled
Change-Id: I5d8f1bbcea72253d71df8c9e13253ff5612be363
2014-09-23 19:14:50 -07:00
Prateek Saxena
358d2980cc Special:EditWatchlist: Use destructive button and style checkboxes
Bug: 71147
Change-Id: Icddec7a3b66ba1cc86459c2776a471391e92c8c7
2014-09-23 14:53:12 -07:00
jdlrobson
aa15d5287d Add blanket support for mediawiki ui via globals
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
2014-08-15 14:48:00 -07:00
umherirrender
dcf6955e5c Fixed some @params documentation (includes/*)
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
2014-04-20 23:33:05 +02:00
umherirrender
23fab68274 Fix spacing after @param and friends in comments
Searched for:
\@(param|return|throws|since|deprecated|access|todo|var)[ \t]{2,}

Change-Id: Icce22ba9fe0635455691ca58d9872d618151f346
2014-04-05 20:02:29 +00:00
Brad Jorsch
5f57d5d657 HTMLForm: Clean up 0 handling
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
2014-03-05 15:40:48 -05:00
Brad Jorsch
f88fcb7461 HTMLForm: Allow i18n of 'options'
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
2014-02-19 23:26:23 +00:00
Alexandre Emsenhuber
cb9a9a7b47 Add support for "tabindex" in HTMLFormField subclasses
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
2014-01-25 04:31:01 +00:00
addshore
8fa2314b2e Formatting fixes in includes/htmlform/*
Change-Id: Iee9e4f3fcf8491022ffe97c74312871f97f8ce9c
2013-12-09 14:23:05 +01:00
addshore
976276338a Split includes/HTMLForm
Change-Id: I6eabfdb064c0e35b69efe9d6142e94df4128b632
2013-12-08 23:13:56 +01:00