@@ -161,16 +161,16 @@ <h1>Statistics</h1>
161
161
< hr >
162
162
163
163
< footer >
164
- < p > © Nova Python 2012</ p >
164
+ < p > © Nova Python 2012-2013 </ p >
165
165
</ footer >
166
166
167
167
</ div > <!--/.fluid-container-->
168
168
169
169
< script src ="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js "> </ script >
170
- <!--<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>-->
171
170
< script src ="/static/js/bootstrap.min.js "> </ script >
172
171
< script src ="/static/js/jquery.flot.min.js "> </ script >
173
172
< script src ="/static/js/jquery.flot.resize.min.js "> </ script >
173
+ < script src ="/static/js/spin.min.js "> </ script >
174
174
< script type ="text/javascript ">
175
175
176
176
var _gaq = _gaq || [ ] ;
@@ -225,19 +225,42 @@ <h1>Statistics</h1>
225
225
226
226
$ ( document ) . ready (
227
227
function ( ) {
228
- setInterval ( rotateimage , 5000 ) ;
228
+ // setInterval(rotateimage, 5000);
229
229
$ ( '#menulist' ) . css ( 'margin-left' ,
230
230
( $ ( document ) . width ( ) / 2 ) - ( $ ( '#menulist' ) . width ( ) / 2 ) ) ;
231
+
231
232
$ . getJSON ( '/events/1546792' ,
232
- function ( data ) {
233
- $ . each ( data . results ,
234
- function ( i , e ) {
235
- link = '<p><a href="' + e . event_url +
236
- '">' + e . name + ' (' + e . yes_rsvp_count +
237
- ' RSVPs)</a></p>' ;
238
- $ ( '#events' ) . append ( link ) ;
239
- } ) ;
240
- } ) ;
233
+ function ( data ) {
234
+ $ . each ( data . results ,
235
+ function ( i , e ) {
236
+ link = '<p><a href="' + e . event_url +
237
+ '">' + e . name + ' (' + e . yes_rsvp_count +
238
+ ' RSVPs)</a></p>' ;
239
+ $ ( '#events' ) . append ( link ) ;
240
+ } ) ;
241
+ } ) ;
242
+
243
+ var opts = {
244
+ lines : 13 , // The number of lines to draw
245
+ length : 7 , // The length of each line
246
+ width : 4 , // The line thickness
247
+ radius : 10 , // The radius of the inner circle
248
+ corners : 1 , // Corner roundness (0..1)
249
+ rotate : 0 , // The rotation offset
250
+ color : '#000' , // #rgb or #rrggbb
251
+ speed : 1 , // Rounds per second
252
+ trail : 60 , // Afterglow percentage
253
+ shadow : false , // Whether to render a shadow
254
+ hwaccel : false , // Whether to use hardware acceleration
255
+ className : 'spinner' , // The CSS class to assign to the spinner
256
+ zIndex : 2e9 , // The z-index (defaults to 2000000000)
257
+ top : 'auto' , // Top position relative to parent in px
258
+ left : 'auto' // Left position relative to parent in px
259
+ } ;
260
+ var total_chart = document . getElementById ( 'totalchart' ) ;
261
+ var member_chart = document . getElementById ( 'memberchart' ) ;
262
+ var total_spinner = new Spinner ( opts ) . spin ( total_chart ) ;
263
+ var member_spinner = new Spinner ( opts ) . spin ( member_chart ) ;
241
264
242
265
$ . getJSON ( '/members/1546792' ,
243
266
function ( data ) {
@@ -284,6 +307,8 @@ <h1>Statistics</h1>
284
307
}
285
308
} ;
286
309
310
+ total_spinner . stop ( ) ;
311
+ member_spinner . stop ( ) ;
287
312
$ . plot ( $ ( '#memberchart' ) , [ { label : 'Joins' , data : joins } ] , opts ) ;
288
313
$ . plot ( $ ( '#totalchart' ) , [ { label : 'Total Members' , data : total } ] , opts ) ;
289
314
0 commit comments