r78421 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78420‎ | r78421 | r78422 >
Date:00:35, 15 December 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Merging r76595, r76598 of trunk
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/ContributionReporting/FundraiserStatistics_body.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/ContributionReporting/FundraiserStatistics_body.php
@@ -93,8 +93,9 @@
9494 // HTML-time!
9595 $view = 0;
9696 $htmlViews = '';
97 - foreach ( $egFundraiserStatisticsFundraisers as $fundraiser ) {
 97+ foreach ( $egFundraiserStatisticsFundraisers as $fundraiserIndex => $fundraiser ) {
9898 $days = $this->query( 'dailyTotals', $fundraiser['start'], $fundraiser['end'] );
 99+ $mostRecentFundraiser = $fundraiserIndex == count( $egFundraiserStatisticsFundraisers ) - 1;
99100 foreach ( $charts as $name => $chart ) {
100101 $column = 0;
101102 foreach( $days as $i => $day ) {
@@ -104,9 +105,12 @@
105106 $height = $chart['factor'] * $day[$chart['index']];
106107 $attributes = array(
107108 'style' => "height:{$height}px",
108 - 'class' => "fundraiserstats-bar-{$fundraiser['id']}",
109 - 'onMouseOver' => "replaceView( 'fundraiserstats-view-box-{$view}' )"
 109+ 'class' => "fundraiserstats-bar fundraiserstats-bar-{$fundraiser['id']}",
 110+ 'rel' => "fundraiserstats-view-box-{$view}",
110111 );
 112+ if ( $mostRecentFundraiser && $i == count( $days ) -1 ) {
 113+ $attributes['class'] .= ' fundraiserstats-current';
 114+ }
111115 $charts[$name]['data'][$column] .= Xml::tags(
112116 'td', array( 'valign' => 'bottom' ), Xml::element( 'div', $attributes, '', false )
113117 );
@@ -146,7 +150,7 @@
147151 Xml::tags(
148152 'h3',
149153 array( 'style' => 'float:left;color:black;' ),
150 - wfMsgExt( 'fundraiserstats-day', array( 'parseinline' ), $i + 1, $fundraiser['title'] )
 154+ wfMsgExt( 'fundraiserstats-day', array( 'parseinline' ), $wgLang->formatNum( $i + 1 ), $fundraiser['title'] )
151155 ) .
152156 Xml::element( 'div', array( 'style' => 'clear:both;' ), '', false )
153157 )
@@ -170,8 +174,8 @@
171175 'div',
172176 array(
173177 'id' => "fundraiserstats-chart-{$chart}-tab",
174 - 'class' => 'fundraiserstats-chart-tab-' . ( $first ? 'current' : 'normal' ),
175 - 'onClick' => "replaceChart( 'fundraiserstats-chart-{$chart}' )"
 178+ 'class' => 'fundraiserstats-chart-tab fundraiserstats-chart-tab-' . ( $first ? 'current' : 'normal' ),
 179+ 'rel' => "fundraiserstats-chart-{$chart}"
176180 ),
177181 wfMsg( 'fundraiserstats-tab-' . $chart )
178182 );
Property changes on: branches/wmf/1.16wmf4/extensions/ContributionReporting/FundraiserStatistics_body.php
___________________________________________________________________
Added: svn:mergeinfo
179183 Merged /branches/wmf-deployment/extensions/ContributionReporting/FundraiserStatistics_body.php:r60970
180184 Merged /trunk/extensions/ContributionReporting/FundraiserStatistics_body.php:r64690-67673,76496,76558,76586,76596-78420
181185 Merged /trunk/phase3/extensions/ContributionReporting/FundraiserStatistics_body.php:r63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76595Reverting lots of changes by Reedy that broke this extension pretty badly.tparscal20:50, 12 November 2010
r76598jQueryified things, made the most recent bar the current one on load.tparscal21:24, 12 November 2010

Status & tagging log