r58312 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58311‎ | r58312 | r58313 >
Date:14:15, 29 October 2009
Author:happy-melon
Status:ok
Tags:
Comment:
Use CSS rather than hardcoded nbsps to add space before the sorting arrows in SortableTables. The nbsps cause headers to be pushed off-centre when the arrow wraps to the next line; the symmetrical margin ensures that the arrows are themselves centred when that happens.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)
  • /trunk/phase3/skins/common/wikibits.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/common/shared.css
@@ -815,3 +815,8 @@
816816 background-position: middle middle;
817817 background-repeat: no-repeat;
818818 }
 819+
 820+/* Sort arrows added by SortableTables */
 821+a.sortheader {
 822+ margin: 0 0.3em;
 823+}
Index: trunk/phase3/skins/common/wikibits.js
@@ -534,8 +534,7 @@
535535 for (var i = 0; i < firstRow.cells.length; i++) {
536536 var cell = firstRow.cells[i];
537537 if ((" "+cell.className+" ").indexOf(" unsortable ") == -1) {
538 - cell.innerHTML += '&nbsp;&nbsp;'
539 - + '<a href="#" class="sortheader" '
 538+ cell.innerHTML += '<a href="#" class="sortheader" '
540539 + 'onclick="ts_resortTable(this);return false;">'
541540 + '<span class="sortarrow">'
542541 + '<img src="'
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1605,7 +1605,7 @@
16061606 * to ensure that client-side caches do not keep obsolete copies of global
16071607 * styles.
16081608 */
1609 -$wgStyleVersion = '249';
 1609+$wgStyleVersion = '250';
16101610
16111611
16121612 # Server-side caching:

Status & tagging log