r78414 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78413‎ | r78414 | r78415 >
Date:23:53, 14 December 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Merging r76598 from trunk
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/ContributionReporting/FundraiserStatistics.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/ContributionReporting/FundraiserStatistics.js
@@ -1,22 +1,36 @@
22 /* JavaScript */
33
4 -var currentViewID = 'fundraiserstats-view-box-0';
5 -function replaceView( newLayerID ) {
6 - var currentLayer = document.getElementById( currentViewID );
7 - var newLayer = document.getElementById( newLayerID );
8 - currentLayer.style.display = 'none';
9 - newLayer.style.display = 'block';
10 - currentViewID = newLayerID;
11 -}
12 -var currentChartID = 'fundraiserstats-chart-totals';
13 -function replaceChart( newLayerID ) {
14 - var currentLayer = document.getElementById( currentChartID );
15 - var currentTab = document.getElementById( currentChartID + '-tab' );
16 - var newLayer = document.getElementById( newLayerID );
17 - var newTab = document.getElementById( newLayerID + '-tab' );
18 - currentLayer.style.display = 'none';
19 - currentTab.setAttribute( 'class', 'fundraiserstats-chart-tab-normal' );
20 - newLayer.style.display = 'block';
21 - newTab.setAttribute( 'class', 'fundraiserstats-chart-tab-current' );
22 - currentChartID = newLayerID;
23 -}
 4+$j( document ).ready( function() {
 5+
 6+ var currentViewID = 'fundraiserstats-view-box-0';
 7+ function replaceView( newLayerID ) {
 8+ var currentLayer = document.getElementById( currentViewID );
 9+ var newLayer = document.getElementById( newLayerID );
 10+ currentLayer.style.display = 'none';
 11+ newLayer.style.display = 'block';
 12+ currentViewID = newLayerID;
 13+ }
 14+
 15+ var currentChartID = 'fundraiserstats-chart-totals';
 16+ function replaceChart( newLayerID ) {
 17+ var currentLayer = document.getElementById( currentChartID );
 18+ var currentTab = document.getElementById( currentChartID + '-tab' );
 19+ var newLayer = document.getElementById( newLayerID );
 20+ var newTab = document.getElementById( newLayerID + '-tab' );
 21+ currentLayer.style.display = 'none';
 22+ currentTab.setAttribute( 'class', 'fundraiserstats-chart-tab-normal' );
 23+ newLayer.style.display = 'block';
 24+ newTab.setAttribute( 'class', 'fundraiserstats-chart-tab-current' );
 25+ currentChartID = newLayerID;
 26+ }
 27+
 28+ $j( '.fundraiserstats-bar' ).hover( function() {
 29+ replaceView( $j(this).attr( 'rel' ) )
 30+ } );
 31+ $j( '.fundraiserstats-chart-tab' ).click( function() {
 32+ replaceChart( $j(this).attr( 'rel' ) )
 33+ } );
 34+ $j( '.fundraiserstats-current' ).each( function() {
 35+ replaceView( $j(this).attr( 'rel' ) )
 36+ } );
 37+} );
Property changes on: branches/wmf/1.16wmf4/extensions/ContributionReporting/FundraiserStatistics.js
___________________________________________________________________
Added: svn:mergeinfo
2438 Merged /trunk/extensions/ContributionReporting/FundraiserStatistics.js:r64690-78413
2539 Merged /trunk/phase3/extensions/ContributionReporting/FundraiserStatistics.js:r63545-63546,63549,63643,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,77555,77558-77560,77563-77565,77573
2640 Merged /branches/wmf-deployment/extensions/ContributionReporting/FundraiserStatistics.js:r60970

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76598jQueryified things, made the most recent bar the current one on load.tparscal21:24, 12 November 2010

Status & tagging log