Index: trunk/extensions/ContributionReporting/modules/ext.fundraiserstatistics.js |
— | — | @@ -33,13 +33,20 @@ |
34 | 34 | $j( '.fundraiserstats-current' ).each( function() { |
35 | 35 | replaceView( $j(this).attr( 'rel' ) ) |
36 | 36 | } ); |
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 |
38 | 38 | $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 | + } ); |
40 | 47 | } ); |
41 | 48 | // When someone clicks on Customize, display pop-up menu and change arrow icon. |
42 | 49 | $j( '#configtoggle' ).click( function() { |
43 | | - $j('#configholder').toggle(); |
| 50 | + $j( '#configholder' ).toggle(); |
44 | 51 | if ($j( '#configtoggle a' ).css( 'background-position' ) == '0px -18px') { |
45 | 52 | $j( '#configtoggle a' ).css( 'background-position', '0px -3px' ); |
46 | 53 | } else { |