r107646 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107645‎ | r107646 | r107647 >
Date:19:03, 30 December 2011
Author:kaldari
Status:ok
Tags:
Comment:
fix for bug 32441, making the year toggles work consistantly for all the charts
Modified paths:
  • /trunk/extensions/ContributionReporting/modules/ext.fundraiserstatistics.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionReporting/modules/ext.fundraiserstatistics.js
@@ -33,13 +33,20 @@
3434 $j( '.fundraiserstats-current' ).each( function() {
3535 replaceView( $j(this).attr( 'rel' ) )
3636 } );
37 - // When someone clicks on a year, hide or show that year in the chart
 37+ // When someone clicks on a year, hide or show that year in the charts
3838 $j( '#configholder .yeartoggle' ).click( function() {
39 - $j('.fundraiserstats-'+$j(this).attr( 'id' )).toggle();
 39+ var checked = $j(this).is( ':checked' );
 40+ $j( '.fundraiserstats-' + $j(this).attr( 'id' ) ).each( function() {
 41+ if ( checked ) {
 42+ $j(this).css( 'display', 'block' );
 43+ } else {
 44+ $j(this).css( 'display', 'none' );
 45+ }
 46+ } );
4047 } );
4148 // When someone clicks on Customize, display pop-up menu and change arrow icon.
4249 $j( '#configtoggle' ).click( function() {
43 - $j('#configholder').toggle();
 50+ $j( '#configholder' ).toggle();
4451 if ($j( '#configtoggle a' ).css( 'background-position' ) == '0px -18px') {
4552 $j( '#configtoggle a' ).css( 'background-position', '0px -3px' );
4653 } else {

Status & tagging log