Index: branches/wmf/1.16wmf4/extensions/ContributionReporting/FundraiserStatistics.js |
— | — | @@ -1,22 +1,36 @@ |
2 | 2 | /* JavaScript */ |
3 | 3 | |
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 |
24 | 38 | Merged /trunk/extensions/ContributionReporting/FundraiserStatistics.js:r64690-78413 |
25 | 39 | 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 |
26 | 40 | Merged /branches/wmf-deployment/extensions/ContributionReporting/FundraiserStatistics.js:r60970 |