Changeset 9663
- Timestamp:
- 04/17/14 08:47:51 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/webif/include/jscript.js
r9662 r9663 158 158 } 159 159 160 161 160 /* 162 161 * General: Eventhandler … … 304 303 * identfy an element within string of elements 305 304 */ 306 function is_nopoll( excludes, value) { 307 return (excludes.indexOf(value) > (-1))? true : false; 305 var poll_excluded; 306 function is_nopoll(value) { 307 return (poll_excluded.indexOf(value) > (-1))? true : false; 308 308 } 309 309 … … 320 320 $.each(data.oscam.users, function(i, item) { 321 321 var uid = "#" + item.user.usermd5; 322 var excluded = ($( uid ).attr('nopoll') != 'undefined') ? $( uid ).attr('nopoll') : '';322 poll_excluded = ($( uid ).attr('nopoll') != undefined) ? $( uid ).attr('nopoll') : ''; 323 323 324 324 switch (item.user.classname) { … … 326 326 $( uid ).attr('class', item.user.classname); 327 327 328 if(!is_nopoll( excluded,'usercol2')){328 if(!is_nopoll('usercol2')){ 329 329 $( uid + " td.usercol2") 330 330 .attr( 'title', 'SLEEP: ' + item.user.stats.expectsleep ) … … 332 332 } 333 333 334 if(!is_nopoll( excluded,'usercol3')){334 if(!is_nopoll('usercol3')){ 335 335 $( uid + " td.usercol3").html( item.user.stats.idle + "<br>" + item.user.stats.timeonchannel.toHHMMSS()); 336 336 } 337 337 338 if(!is_nopoll( excluded,'usercol4')){338 if(!is_nopoll('usercol4')){ 339 339 if(item.user.protoicon.length > 0){ 340 340 if($( uid + " td.usercol4").html().length == 0 ) { … … 352 352 353 353 // channel icon 354 if(!is_nopoll( excluded,'usercol6')){354 if(!is_nopoll('usercol6')){ 355 355 $( uid + " td.usercol6").attr( 'title', item.user.lastchanneltitle ); 356 356 … … 391 391 } 392 392 393 if(!is_nopoll( excluded,'usercol7')) {$( uid + " td.usercol7").text( item.user.stats.cwlastresptime + 'ms');}393 if(!is_nopoll('usercol7')) {$( uid + " td.usercol7").text( item.user.stats.cwlastresptime + 'ms');} 394 394 //usercol8 ??? 395 if(!is_nopoll( excluded,'usercol9')) {$( uid + " td.usercol9").text( item.user.stats.cwok );}396 if(!is_nopoll( excluded,'usercol10')) {$( uid + " td.usercol10").text( item.user.stats.cwnok );}397 if(!is_nopoll( excluded,'usercol11')) {$( uid + " td.usercol11").text( item.user.stats.cwignore );}398 if(!is_nopoll( excluded,'usercol12')) {$( uid + " td.usercol12").text( item.user.stats.cwtimeout );}399 if(!is_nopoll( excluded,'usercol13')) {$( uid + " td.usercol13").text( item.user.stats.cwccyclechecked + ' / ' + item.user.stats.cwcycleok + ' / ' + item.user.stats.cwcyclenok + ' / ' + item.user.stats.cwcycleign );}400 if(!is_nopoll( excluded,'usercol14')) {$( uid + " td.usercol14").text( item.user.stats.cwcache );}401 if(!is_nopoll( excluded,'usercol15')) {$( uid + " td.usercol15").text( item.user.stats.cwtun );}402 if(!is_nopoll( excluded,'usercol16')) {$( uid + " td.usercol16").text( item.user.stats.cwcache );}403 if(!is_nopoll( excluded,'usercol17')) {$( uid + " td.usercol17").text( item.user.stats.emmok );}404 if(!is_nopoll( excluded,'usercol18')) {$( uid + " td.usercol18").text( item.user.stats.emmnok );}405 if(!is_nopoll( excluded,'usercol19')) {$( uid + " td.usercol19").text( item.user.stats.cwrate + item.user.stats.cwrate2 );}406 if(!is_nopoll( excluded,'usercol22')) {$( uid + " td.usercol22").text( item.user.stats.cascusercomb );}407 if(!is_nopoll( excluded,'usercol21')) {$( uid + " td.usercol21").text( item.user.stats.n_requ_m );}408 if(!is_nopoll( excluded,'usercol20')) {395 if(!is_nopoll('usercol9')) {$( uid + " td.usercol9").text( item.user.stats.cwok );} 396 if(!is_nopoll('usercol10')) {$( uid + " td.usercol10").text( item.user.stats.cwnok );} 397 if(!is_nopoll('usercol11')) {$( uid + " td.usercol11").text( item.user.stats.cwignore );} 398 if(!is_nopoll('usercol12')) {$( uid + " td.usercol12").text( item.user.stats.cwtimeout );} 399 if(!is_nopoll('usercol13')) {$( uid + " td.usercol13").text( item.user.stats.cwccyclechecked + ' / ' + item.user.stats.cwcycleok + ' / ' + item.user.stats.cwcyclenok + ' / ' + item.user.stats.cwcycleign );} 400 if(!is_nopoll('usercol14')) {$( uid + " td.usercol14").text( item.user.stats.cwcache );} 401 if(!is_nopoll('usercol15')) {$( uid + " td.usercol15").text( item.user.stats.cwtun );} 402 if(!is_nopoll('usercol16')) {$( uid + " td.usercol16").text( item.user.stats.cwcache );} 403 if(!is_nopoll('usercol17')) {$( uid + " td.usercol17").text( item.user.stats.emmok );} 404 if(!is_nopoll('usercol18')) {$( uid + " td.usercol18").text( item.user.stats.emmnok );} 405 if(!is_nopoll('usercol19')) {$( uid + " td.usercol19").text( item.user.stats.cwrate + item.user.stats.cwrate2 );} 406 if(!is_nopoll('usercol22')) {$( uid + " td.usercol22").text( item.user.stats.cascusercomb );} 407 if(!is_nopoll('usercol21')) {$( uid + " td.usercol21").text( item.user.stats.n_requ_m );} 408 if(!is_nopoll('usercol20')) { 409 409 $( uid + " td.usercol20") 410 410 .attr( 'title', item.user.expview ) … … 416 416 $( uid ).attr('class', item.user.classname); 417 417 418 if(!is_nopoll( excluded,'usercol2')) {418 if(!is_nopoll('usercol2')) { 419 419 $( uid + " td.usercol2") 420 420 .attr( 'title', 'SLEEP: ' ) … … 422 422 } 423 423 424 if(!is_nopoll( excluded,'usercol3')) {$( uid + " td.usercol3").html( item.user.stats.idle + "<br>" + item.user.stats.timeonchannel.toHHMMSS());}425 426 if(!is_nopoll( excluded,'usercol4')) {424 if(!is_nopoll('usercol3')) {$( uid + " td.usercol3").html( item.user.stats.idle + "<br>" + item.user.stats.timeonchannel.toHHMMSS());} 425 426 if(!is_nopoll('usercol4')) { 427 427 if(item.user.protoicon.length > 0){ 428 428 if($( uid + " td.usercol4").html().length == 0 ) { … … 438 438 } 439 439 440 if(!is_nopoll( excluded,'usercol6')) {440 if(!is_nopoll('usercol6')) { 441 441 // channel icon 442 442 $( uid + " td.usercol6").attr( 'title', item.user.lastchanneltitle ); … … 469 469 // last status was online so cleanup offline 470 470 $( uid ).attr('class', item.user.classname); 471 if(!is_nopoll( excluded,'usercol2')) {471 if(!is_nopoll('usercol2')) { 472 472 $( uid + " td.usercol2") 473 473 .attr( 'title', 'SLEEP: ') 474 474 .html( item.user.status ); 475 475 } 476 if(!is_nopoll( excluded,'usercol3')) {$( uid + " td.usercol3").text( '' );}477 if(!is_nopoll( excluded,'usercol7')) {$( uid + " td.usercol7").text( '0' );}478 if(!is_nopoll( excluded,'usercol4')) {476 if(!is_nopoll('usercol3')) {$( uid + " td.usercol3").text( '' );} 477 if(!is_nopoll('usercol7')) {$( uid + " td.usercol7").text( '0' );} 478 if(!is_nopoll('usercol4')) { 479 479 $( uid + " td.usercol4") 480 480 .text( '' ) … … 488 488 489 489 //channelicon 490 if(!is_nopoll( excluded,'usercol6')) {490 if(!is_nopoll('usercol6')) { 491 491 $( uid + " td.usercol6").text( '' ); 492 492 var image = $( uid + " td.usercol6 img.usericon"); … … 548 548 $.each(data.oscam.readers, function(i, item) { 549 549 var uid = "#" + item.labelmd5; 550 poll_excluded = ($( uid ).attr('nopoll') != undefined) ? $( uid ).attr('nopoll') : ''; 550 551 551 552 $( uid ).attr('class', item.classname); 552 553 553 $( uid + " td.readercol4").text(item.stats.ecmsok); 554 $( uid + " td.readercol5").text(item.stats.ecmsnok); 555 $( uid + " td.readercol6").text(item.stats.ecmsfiltered); 556 $( uid + " td.readercol7").text(item.stats.emmerror); 557 $( uid + " td.readercol8").text(item.stats.emmwritten); 558 $( uid + " td.readercol9").text(item.stats.emmskipped); 559 $( uid + " td.readercol10").text(item.stats.emmblocked); 560 $( uid + " td.readercol11").text(item.stats.lbweight); 561 554 if(!is_nopoll('readercol4')) {$( uid + " td.readercol4").text(item.stats.ecmsok);} 555 if(!is_nopoll('readercol5')) {$( uid + " td.readercol5").text(item.stats.ecmsnok);} 556 if(!is_nopoll('readercol6')) {$( uid + " td.readercol6").text(item.stats.ecmsfiltered);} 557 if(!is_nopoll('readercol7')) {$( uid + " td.readercol7").text(item.stats.emmerror);} 558 if(!is_nopoll('readercol8')) {$( uid + " td.readercol8").text(item.stats.emmwritten);} 559 if(!is_nopoll('readercol9')) {$( uid + " td.readercol9").text(item.stats.emmskipped);} 560 if(!is_nopoll('readercol10')) {$( uid + " td.readercol10").text(item.stats.emmblocked);} 561 if(!is_nopoll('readercol11')) {$( uid + " td.readercol11").text(item.stats.lbweight);} 562 563 if ( typeof custompoll == 'function' ) { 564 custompoll(item); 565 } 562 566 }); 563 567 … … 1195 1199 } 1196 1200 1201 poll_excluded = ''; 1202 1197 1203 // Title 1198 1204 var pagename = (typeof page != 'undefined'? page : $(location).attr('pathname').replace(/.*\/|\.[^.]*$/g, ''));
Note:
See TracChangeset
for help on using the changeset viewer.