Index: trunk/extensions/ContributionReporting/FundraiserStatistics.css |
— | — | @@ -1,103 +0,0 @@ |
2 | | -div#configholder { |
3 | | - position: absolute; |
4 | | - top: 22px; |
5 | | - right: 0; |
6 | | - z-index: 200; |
7 | | - width: 180px; |
8 | | - border: 1px solid silver; |
9 | | - background-color: white; |
10 | | - padding: 2px 5px 5px 5px; |
11 | | - display: none; |
12 | | -} |
13 | | -div#configtoggle { |
14 | | - position: absolute; |
15 | | - top: 0; |
16 | | - right: 0; |
17 | | - z-index: 199; |
18 | | - height: 17px; |
19 | | - border: 1px solid silver; |
20 | | - background-color: white; |
21 | | - padding: 2px 5px 2px 0px; |
22 | | - cursor: pointer; |
23 | | -} |
24 | | -div#configtoggle a, div#configtoggle a:visited { |
25 | | - background-image: url("arrow.png"); |
26 | | - background-position: 0px -3px; |
27 | | - background-repeat: no-repeat; |
28 | | - padding-left: 16px; |
29 | | - outline: 0; |
30 | | -} |
31 | | - |
32 | | -.fundraiserstats-view-box { |
33 | | - border: solid 1px silver; |
34 | | -} |
35 | | -.fundraiserstats-view-box h3 { |
36 | | - margin-top: 0; |
37 | | - padding-top: 0; |
38 | | -} |
39 | | -.fundraiserstats-today { |
40 | | - position: absolute; |
41 | | - width: 6px; |
42 | | - height: 6px; |
43 | | - background-color: black; |
44 | | - margin-top: 3px; |
45 | | - margin-left: -1px; |
46 | | -} |
47 | | -.fundraiserstats-bar { |
48 | | - width: 2px; |
49 | | -} |
50 | | -.fundraiserstats-bar-2007 { |
51 | | - background-color: #AAAAFF; |
52 | | - border: outset 1px #AAAAFF; |
53 | | -} |
54 | | -.fundraiserstats-bar-2008 { |
55 | | - background-color: #AAFFAA; |
56 | | - border: outset 1px #AAFFAA; |
57 | | -} |
58 | | -.fundraiserstats-bar-2009 { |
59 | | - background-color: #FFAAAA; |
60 | | - border: outset 1px #FFAAAA; |
61 | | -} |
62 | | -.fundraiserstats-bar-2010 { |
63 | | - background-color: #a0e8ff; |
64 | | - border: outset 1px #a0e8ff; |
65 | | -} |
66 | | -.fundraiserstats-bar-2011 { |
67 | | - background-color: #ffd617; |
68 | | - border: outset 1px #ffd617; |
69 | | -} |
70 | | -.fundraiserstats-bar-space { |
71 | | - width: 3px; |
72 | | -} |
73 | | -.fundraiserstats-chart { |
74 | | - padding: 10px; |
75 | | - border-left: solid 1px silver; |
76 | | - border-right: solid 1px silver; |
77 | | -} |
78 | | -.fundraiserstats-chart-tabs { |
79 | | - border-bottom: solid 1px silver; |
80 | | - height: 24px; |
81 | | -} |
82 | | -.fundraiserstats-chart-tab-normal { |
83 | | - padding-left: 6px; |
84 | | - padding-right: 6px; |
85 | | - border: solid 1px silver; |
86 | | - float: left; |
87 | | - line-height: 23px; |
88 | | - height: 23px; |
89 | | - margin-right: 6px; |
90 | | - cursor: pointer; |
91 | | - font-weight: bold; |
92 | | -} |
93 | | -.fundraiserstats-chart-tab-current { |
94 | | - padding-left: 6px; |
95 | | - padding-right: 6px; |
96 | | - border: solid 1px silver; |
97 | | - border-bottom-color: white; |
98 | | - float: left; |
99 | | - line-height: 23px; |
100 | | - height: 23px; |
101 | | - margin-right: 6px; |
102 | | - cursor: pointer; |
103 | | - font-weight: bold; |
104 | | -} |
Index: trunk/extensions/ContributionReporting/FundraiserStatistics.js |
— | — | @@ -1,51 +0,0 @@ |
2 | | -/* JavaScript */ |
3 | | - |
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 | | - $j( '#configholder .yeartoggle' ).click( function() { |
38 | | - $j('.fundraiserstats-'+$j(this).attr( 'id' )).toggle(); |
39 | | - } ); |
40 | | - $j( '#configtoggle' ).click( function() { |
41 | | - $j('#configholder').toggle(); |
42 | | - if ($j( '#configtoggle a' ).css( 'background-position' ) == '0px -18px') { |
43 | | - $j( '#configtoggle a' ).css( 'background-position', '0px -3px' ); |
44 | | - } else { |
45 | | - $j( '#configtoggle a' ).css( 'background-position','0px -18px' ); |
46 | | - } |
47 | | - } ); |
48 | | - $j( '#timezone' ).change( function() { |
49 | | - $j('#configform').submit(); |
50 | | - } ); |
51 | | - |
52 | | -} ); |
Index: trunk/extensions/ContributionReporting/ContributionReporting.php |
— | — | @@ -110,6 +110,20 @@ |
111 | 111 | |
112 | 112 | $wgContributionTrackingStatisticsViewWeeks = 3; |
113 | 113 | |
| 114 | +$commonModuleInfo = array( |
| 115 | + 'localBasePath' => dirname( __FILE__ ) . '/modules', |
| 116 | + 'remoteExtPath' => 'ContributionReporting/modules', |
| 117 | +); |
| 118 | + |
| 119 | +$wgResourceModules['ext.fundraiserstatistics.table'] = array( |
| 120 | + 'styles' => 'ext.fundraiserstatistics.table.css', |
| 121 | +) + $commonModuleInfo; |
| 122 | + |
| 123 | +$wgResourceModules['ext.fundraiserstatistics'] = array( |
| 124 | + 'scripts' => 'ext.fundraiserstatistics.edit.js', |
| 125 | + 'styles' => 'ext.fundraiserstatistics.css', |
| 126 | +) + $commonModuleInfo; |
| 127 | + |
114 | 128 | $wgHooks['ParserFirstCallInit'][] = 'efContributionReportingSetup'; |
115 | 129 | $wgHooks['LanguageGetMagic'][] = 'efContributionReportingTotal_Magic'; |
116 | 130 | |
Index: trunk/extensions/ContributionReporting/FundraiserStatistics_body.php |
— | — | @@ -81,14 +81,8 @@ |
82 | 82 | /* Setup */ |
83 | 83 | |
84 | 84 | $this->setHeaders(); |
| 85 | + $wgOut->addModules( 'ext.fundraiserstatistics' ); |
85 | 86 | $wgOut->addScriptFile( $wgScriptPath . '/extensions/ContributionReporting/FundraiserStatistics.js' ); |
86 | | - $wgOut->addLink( |
87 | | - array( |
88 | | - 'rel' => 'stylesheet', |
89 | | - 'type' => 'text/css', |
90 | | - 'href' => $wgScriptPath . '/extensions/ContributionReporting/FundraiserStatistics.css', |
91 | | - ) |
92 | | - ); |
93 | 87 | |
94 | 88 | /* Display */ |
95 | 89 | |
Index: trunk/extensions/ContributionReporting/ContributionHistory_body.php |
— | — | @@ -24,11 +24,7 @@ |
25 | 25 | |
26 | 26 | $db = efContributionReportingConnection(); |
27 | 27 | |
28 | | - $output = '<style type="text/css">'; |
29 | | - $output .= 'td.left {padding-right: 10px;}'; |
30 | | - $output .= 'td.right {padding-left: 10px; text-align: right;}'; |
31 | | - $output .= 'td.alt {background-color: #DDDDDD;}'; |
32 | | - $output .= '</style>'; |
| 28 | + $wgOut->addModules( 'ext.fundraiserstatistics.table' ); |
33 | 29 | |
34 | 30 | // Paging controls |
35 | 31 | $newer = $db->selectField( 'public_reporting', 'received', |
Index: trunk/extensions/ContributionReporting/modules/ext.fundraiserstatistics.css |
— | — | @@ -0,0 +1,103 @@ |
| 2 | +div#configholder { |
| 3 | + position: absolute; |
| 4 | + top: 22px; |
| 5 | + right: 0; |
| 6 | + z-index: 200; |
| 7 | + width: 180px; |
| 8 | + border: 1px solid silver; |
| 9 | + background-color: white; |
| 10 | + padding: 2px 5px 5px 5px; |
| 11 | + display: none; |
| 12 | +} |
| 13 | +div#configtoggle { |
| 14 | + position: absolute; |
| 15 | + top: 0; |
| 16 | + right: 0; |
| 17 | + z-index: 199; |
| 18 | + height: 17px; |
| 19 | + border: 1px solid silver; |
| 20 | + background-color: white; |
| 21 | + padding: 2px 5px 2px 0px; |
| 22 | + cursor: pointer; |
| 23 | +} |
| 24 | +div#configtoggle a, div#configtoggle a:visited { |
| 25 | + background-image: url("arrow.png"); |
| 26 | + background-position: 0px -3px; |
| 27 | + background-repeat: no-repeat; |
| 28 | + padding-left: 16px; |
| 29 | + outline: 0; |
| 30 | +} |
| 31 | + |
| 32 | +.fundraiserstats-view-box { |
| 33 | + border: solid 1px silver; |
| 34 | +} |
| 35 | +.fundraiserstats-view-box h3 { |
| 36 | + margin-top: 0; |
| 37 | + padding-top: 0; |
| 38 | +} |
| 39 | +.fundraiserstats-today { |
| 40 | + position: absolute; |
| 41 | + width: 6px; |
| 42 | + height: 6px; |
| 43 | + background-color: black; |
| 44 | + margin-top: 3px; |
| 45 | + margin-left: -1px; |
| 46 | +} |
| 47 | +.fundraiserstats-bar { |
| 48 | + width: 2px; |
| 49 | +} |
| 50 | +.fundraiserstats-bar-2007 { |
| 51 | + background-color: #AAAAFF; |
| 52 | + border: outset 1px #AAAAFF; |
| 53 | +} |
| 54 | +.fundraiserstats-bar-2008 { |
| 55 | + background-color: #AAFFAA; |
| 56 | + border: outset 1px #AAFFAA; |
| 57 | +} |
| 58 | +.fundraiserstats-bar-2009 { |
| 59 | + background-color: #FFAAAA; |
| 60 | + border: outset 1px #FFAAAA; |
| 61 | +} |
| 62 | +.fundraiserstats-bar-2010 { |
| 63 | + background-color: #a0e8ff; |
| 64 | + border: outset 1px #a0e8ff; |
| 65 | +} |
| 66 | +.fundraiserstats-bar-2011 { |
| 67 | + background-color: #ffd617; |
| 68 | + border: outset 1px #ffd617; |
| 69 | +} |
| 70 | +.fundraiserstats-bar-space { |
| 71 | + width: 3px; |
| 72 | +} |
| 73 | +.fundraiserstats-chart { |
| 74 | + padding: 10px; |
| 75 | + border-left: solid 1px silver; |
| 76 | + border-right: solid 1px silver; |
| 77 | +} |
| 78 | +.fundraiserstats-chart-tabs { |
| 79 | + border-bottom: solid 1px silver; |
| 80 | + height: 24px; |
| 81 | +} |
| 82 | +.fundraiserstats-chart-tab-normal { |
| 83 | + padding-left: 6px; |
| 84 | + padding-right: 6px; |
| 85 | + border: solid 1px silver; |
| 86 | + float: left; |
| 87 | + line-height: 23px; |
| 88 | + height: 23px; |
| 89 | + margin-right: 6px; |
| 90 | + cursor: pointer; |
| 91 | + font-weight: bold; |
| 92 | +} |
| 93 | +.fundraiserstats-chart-tab-current { |
| 94 | + padding-left: 6px; |
| 95 | + padding-right: 6px; |
| 96 | + border: solid 1px silver; |
| 97 | + border-bottom-color: white; |
| 98 | + float: left; |
| 99 | + line-height: 23px; |
| 100 | + height: 23px; |
| 101 | + margin-right: 6px; |
| 102 | + cursor: pointer; |
| 103 | + font-weight: bold; |
| 104 | +} |
Property changes on: trunk/extensions/ContributionReporting/modules/ext.fundraiserstatistics.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 105 | + native |
Index: trunk/extensions/ContributionReporting/modules/ext.fundraiserstatistics.js |
— | — | @@ -0,0 +1,51 @@ |
| 2 | +/* JavaScript */ |
| 3 | + |
| 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 | + $j( '#configholder .yeartoggle' ).click( function() { |
| 38 | + $j('.fundraiserstats-'+$j(this).attr( 'id' )).toggle(); |
| 39 | + } ); |
| 40 | + $j( '#configtoggle' ).click( function() { |
| 41 | + $j('#configholder').toggle(); |
| 42 | + if ($j( '#configtoggle a' ).css( 'background-position' ) == '0px -18px') { |
| 43 | + $j( '#configtoggle a' ).css( 'background-position', '0px -3px' ); |
| 44 | + } else { |
| 45 | + $j( '#configtoggle a' ).css( 'background-position','0px -18px' ); |
| 46 | + } |
| 47 | + } ); |
| 48 | + $j( '#timezone' ).change( function() { |
| 49 | + $j('#configform').submit(); |
| 50 | + } ); |
| 51 | + |
| 52 | +} ); |
Property changes on: trunk/extensions/ContributionReporting/modules/ext.fundraiserstatistics.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 53 | + native |
Index: trunk/extensions/ContributionReporting/modules/ext.fundraiserstatistics.table.css |
— | — | @@ -0,0 +1,10 @@ |
| 2 | +td.left { |
| 3 | + padding-right: 10px |
| 4 | +} |
| 5 | +td.right { |
| 6 | + padding-left: 10px; |
| 7 | + text-align: right; |
| 8 | +} |
| 9 | +td.alt { |
| 10 | + background-color: #DDDDDD; |
| 11 | +} |
\ No newline at end of file |
Property changes on: trunk/extensions/ContributionReporting/modules/ext.fundraiserstatistics.table.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 12 | + native |