From 5d68836825a698328ba7adb377f58d078bc1cf27 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Mon, 27 Feb 2012 00:03:14 +0000 Subject: [PATCH] [mediawik.special.changeslist] Remove ugly arrow swapping hack * Use CSS and change the background image, instead of displaying 2 tags and hiding one based on the parent element's class * touches bug 17616 a bit, although it doesn't address the focus issue yet, but does improve the overal structure of this module * Also speeds up by: - Outputting less markup - Having 1 embedded images in the CSS file instead of (N changes)* tags * jquery.makeCollapsible: --- includes/ChangesList.php | 14 +------ .../images/arrow-collapsed-ltr.png | Bin 0 -> 206 bytes .../images/arrow-collapsed-rtl.png | Bin 0 -> 257 bytes .../images/arrow-expanded.png | Bin 0 -> 205 bytes .../mediawiki.special.changeslist.css | 35 +++++++++++------- 5 files changed, 24 insertions(+), 25 deletions(-) create mode 100644 resources/mediawiki.special/images/arrow-collapsed-ltr.png create mode 100644 resources/mediawiki.special/images/arrow-collapsed-rtl.png create mode 100644 resources/mediawiki.special/images/arrow-expanded.png diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 4611611d23..686ee092aa 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -860,16 +860,7 @@ class EnhancedChangesList extends ChangesList { $users = ' [' . implode( $this->message['semicolon-separator'], $users ) . ']'; - # Title for tags - $expandTitle = htmlspecialchars( wfMsg( 'rc-enhanced-expand' ) ); - $closeTitle = htmlspecialchars( wfMsg( 'rc-enhanced-hide' ) ); - - $tl = "" - . "" - . "{$this->sideArrow()}" - . "" - . "{$this->downArrow()}" - . ""; + $tl = ''; $r .= "$tl"; # Main line @@ -974,7 +965,6 @@ class EnhancedChangesList extends ChangesList { $classes = array(); $type = $rcObj->mAttribs['rc_type']; - #$r .= ''.$this->spacerArrow(); $r .= ''; $r .= $this->recentChangesFlags( array( 'newpage' => $rcObj->mAttribs['rc_new'], @@ -1119,7 +1109,7 @@ class EnhancedChangesList extends ChangesList { $r = Html::openElement( 'table', array( 'class' => $classes ) ) . Html::openElement( 'tr' ); - $r .= '' . $this->spacerArrow(); + $r .= ''; # Flag and Timestamp if( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) { $r .= '    '; // 4 flags -> 4 spaces diff --git a/resources/mediawiki.special/images/arrow-collapsed-ltr.png b/resources/mediawiki.special/images/arrow-collapsed-ltr.png new file mode 100644 index 0000000000000000000000000000000000000000..467a555a4ddfb7eb746377d16d454bbb971bbcd8 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$3?vg*uel1OYyx~jTpcwoCzopr05?rd AvH$=8 literal 0 HcmV?d00001 diff --git a/resources/mediawiki.special/images/arrow-collapsed-rtl.png b/resources/mediawiki.special/images/arrow-collapsed-rtl.png new file mode 100644 index 0000000000000000000000000000000000000000..f49e20a2ece71901ea2445af9a67164d308073c0 GIT binary patch literal 257 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$3?vg*uel1OYyx~jTpcwoC^07wj zL1~AUg}Yu}xcfyVY?D{Xk;v3a^_YEy)9>v#{civM{Xk8IhKB4ys?L5%-rnBU)3Q$i zg&0eM{DK)Ap4~_Tagw~{XE)7O>#3NtT< zlKLO1FX=!bJ5LwKkczn66YfF{20YGzF_&K6`M)mXn1=R0FaOi^H#?G??Vl`D+I2LN u)pEo47S}n)r*arM{NkEmZt(NSjJ;i-nI!cUc}##NF?hQAxvXm2Z198IA@=D`M=&(>=kqA=A8O>+F7bbNyl~u y*FK2gddPe^En{J$H*;n70^=i+m*m=}