Commit graph

17 commits

Author SHA1 Message Date
Volker E
36263dd18c TablePager: Reduce pagination button in visual strength
Reducing buttons to `frameless` buttons and reposition icons of
next and last page button to be symmetrically harmonious.

Bug: T214128
Change-Id: I1c0a621d7699b5fadc2559abdf6003a0db0aabae
2019-01-17 16:56:21 -08:00
Thiemo Kreuz
5b1cda7ae1 Mark protected IndexPager properties also as protected in subclasses
I'm intentionally only touching these protected properties and nothing
else, because I believe these are uncontroversial. They should be protected
according to modern SOLID standards, and actually are declared as
protected in the base class. What this patch effectively does is documenting
this fact, but it does not change anything.

Change-Id: I625307b58bd419c4a72e9842b2b46c08ed9b4f8e
2018-12-20 18:25:19 +01:00
addshore
6ecf8d044d Remove unused $links in TablePager::getNavigationBar
Change-Id: I43ba3390c47e4955704cfd82b16627008f9e6bc8
2018-07-18 19:37:16 +00:00
Fomafix
125cbd8c01 Use \u{00A0} instead of   or  
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0) instead of
the HTML/XML entities   or   or  .

With the UTF-8 character the generated HTML is shorter and better to read.

Also change the special value for the label in HTMLForm from   to
U+00A0 but also support   for backward compability.

Bug: T154300
Change-Id: I882599ac1120789bb4e524c4394870680caca4f4
2018-06-24 01:20:13 +00:00
Bartosz Dziewoński
485f66f174 Use PHP 7 '??' operator instead of '?:' with 'isset()' where convenient
Find: /isset\(\s*([^()]+?)\s*\)\s*\?\s*\1\s*:\s*/
Replace with: '\1 ?? '

(Everywhere except includes/PHPVersionCheck.php)
(Then, manually fix some line length and indentation issues)

Then manually reviewed the replacements for cases where confusing
operator precedence would result in incorrect results
(fixing those in I478db046a1cc162c6767003ce45c9b56270f3372).

Change-Id: I33b421c8cb11cdd4ce896488c9ff5313f03a38cf
2018-05-30 18:06:13 -07:00
Ed Sanders
91e49be2a7 OOUI-ificiation of TablePager nav
Depends on next OOUI release for new icons.

Bug: T163715
Change-Id: Ia750131aae52c35181209277c5b951a447db1b5a
2017-05-03 14:34:20 +01:00
Max Semenik
f23a964170 Fix type annotations
Change-Id: Ib72c98358b2f0b3b73b6f105adea47346373d46d
2016-12-15 14:11:12 -08:00
Fomafix
202f695f67 Update weblinks in comments from HTTP to HTTPS
Use HTTPS instead of HTTP where the HTTP link is a redirect to the HTTPS link.

Also update some defect links.

Change-Id: Ic3a5eac910d098ed5c2a21e9f47c9b6ee06b2643
2016-11-07 15:24:46 +01:00
Ricordisamoa
5c20a532b8 Make some TablePager methods actually protected
* getTableClass
* getNavClass
* getSortHeaderClass

Change-Id: I459ca456149635e3300c7ca7cfed4c1edc1c12b1
2016-04-09 06:37:33 +02:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
addshore
72bd5c9e56 Add protected getCurrentRow to TablePager
This makes unit testing TablePagers easier

Change-Id: I899ec6b056fb1f007a6caf0be320324cffe08326
2015-08-29 12:13:47 +00:00
Kunal Mehta
25fa587753 TablePager: Use wfScript() instead of $wgScript
Change-Id: Ib12bd3dfa102dc673789c27506becc2fd8138f56
2014-09-13 07:04:34 +00:00
Bartosz Dziewoński
6a637fb0bc IndexPager: Introduce constants for values of $mDefaultDirection
I've spent several hours looking at related code and I still can't
remember which direction is 'true' and which is 'false'.

Change-Id: I58694f7a0892c986e7215f59b56b014cece8d40d
2014-09-03 19:54:34 +02:00
Bartosz Dziewoński
987a860df4 TablePager: Redo arrow icons from scratch as CSS backgrounds
Redrawn the images with SVG versions.

Intentionally did not preserve the value of the 'alt' attribute of the old
images, it doesn't seem very useful to me. Instead, added 'title'
attributes on the sort links that describe their action. This should be
more useful than the old version for both visual and aural mediums.

Bug: 69277
Change-Id: Ibaec75e81d3eb8338d911ac84d91570047f475f5
2014-08-31 00:48:45 +02:00
Bartosz Dziewoński
7443cd97bf TablePager: Load images via CSS backgrounds rather than HTML <img>s
Moved files from directory: skins/common/images → resources/src/mediawiki/images
and renamed:

* arrow_disabled_last_25.png  → pager-arrow-disabled-fastforward-ltr.png
* arrow_disabled_first_25.png → pager-arrow-disabled-fastforward-rtl.png
* arrow_disabled_right_25.png → pager-arrow-disabled-forward-ltr.png
* arrow_disabled_left_25.png  → pager-arrow-disabled-forward-rtl.png
* arrow_last_25.png           → pager-arrow-fastforward-ltr.png
* arrow_first_25.png          → pager-arrow-fastforward-rtl.png
* arrow_right_25.png          → pager-arrow-forward-ltr.png
* arrow_left_25.png           → pager-arrow-forward-rtl.png

The new names are not very intuitive, but there's a mostly reasonable
system behind them and we need names like this to have them
automatically flipped for RTL styles.

Bug: 69277
Change-Id: Ica34cdd5fcc9340a94fb5e60bb34c30266953dcb
2014-08-31 00:48:44 +02:00
Bartosz Dziewoński
1683741e71 TablePager: Modernize style loading
* Create a CSS module for pager styling (table and navigation),
  pulling in existing styles for shared.css. Load it on all pages
  where the pager itself is shown.
* Build a ParserOutput object encapsulating the return HTML and
  required modules, rather than only providing the HTML. Added some
  hacks for backwards-compatibility with old-style calls and
  soft-deprecated them (there are many usages in extensions).

Other cleanup:
* Remove styles in oldshared.css, they were all overwritten by
  shared.css or by styles for .mw-datatable.
* Remove inline styles where possible, explain them where impossible.
* On SpecialListFiles, display navigation bar above the table as well
  as below (this seems to be the convention for other pages).

Change-Id: Iae976f854b96b5c61691918787c4dff7db089c28
2014-08-31 00:48:43 +02:00
Bartosz Dziewoński
7d04663398 Split includes/Pager.php
Change-Id: I67fcffca4e3de081a895deb1a285a5545940ece9
2014-08-23 14:25:02 +02:00