2012-02-22 19:09:46 +00:00
$ ( function ( ) {
$ ( 'button' ) . button ( ) ;
$ ( '#rundiag' ) . click ( function ( ) {
2012-11-25 00:22:18 +00:00
var val = $ ( '#diagsel' ) . val ( ) ;
if ( val == '0' )
val = $ ( '#seq' ) . val ( ) ;
2012-02-22 19:09:46 +00:00
$ ( '#results' )
. slideDown ( )
2012-11-25 00:22:18 +00:00
. html ( '<br><br><img src=/img/loading.gif> ' +
'Running diagnostic, please wait...' )
. load ( 'rundiag.jim?diag=' + encodeURIComponent ( val ) , function ( ) {
2012-02-22 19:09:46 +00:00
$ ( '#results' ) . wrapInner ( '<pre>' ) ;
} ) ;
} ) ;
$ ( '#runfopkg' ) . click ( function ( ) {
$ ( '#results' )
. slideDown ( )
. text ( '\n\nForcibly re-installing package, please wait...\n\n' )
. load ( '/cgi-bin/opkg.jim?cmd=install+--force-reinstall+' +
encodeURIComponent ( $ ( '#fopkg' ) . val ( ) ) , function ( ) {
$ ( '#results' ) . wrapInner ( '<pre>' ) ;
$ ( '#fopkg' ) . val ( '' ) ;
} ) ;
} ) ;
2012-12-01 22:00:03 +00:00
$ ( 'a.log' ) . click ( function ( e ) {
e . preventDefault ( ) ;
2012-02-22 19:09:46 +00:00
$ ( '#results' )
. slideDown ( )
. text ( '\n\nLoading log, please wait...\n\n' )
. load ( '/cgi-bin/cat.jim?file=' +
encodeURIComponent ( $ ( this ) . attr ( 'file' ) ) , function ( ) {
$ ( '#results' ) . wrapInner ( '<pre>' ) ;
} ) ;
} ) ;
2012-12-01 22:00:03 +00:00
$ ( 'a.logclear' ) . click ( function ( e ) {
var t = $ ( this ) ;
e . preventDefault ( ) ;
if ( ! confirm ( 'Delete ' + $ ( this ) . attr ( 'file' ) + '?' ) )
return ;
$ ( '#results' )
. slideDown ( )
. text ( '\n\nClearing log, please wait...\n\n' )
. load ( 'clearlog.jim?file=' +
encodeURIComponent ( $ ( this ) . attr ( 'file' ) ) , function ( ) {
$ ( '#results' ) . wrapInner ( '<pre>' ) ;
$ ( t ) . prev ( 'span.lsize' ) . html ( '0 bytes' ) ;
} ) ;
} ) ;
2012-02-22 19:09:46 +00:00
$ ( '#runedit' ) . click ( function ( e ) {
e . preventDefault ( ) ;
window . location = '/edit/edit.jim' ;
} ) ;
2012-04-05 20:30:40 +00:00
$ ( '#dbinfo' ) . click ( function ( e ) {
e . preventDefault ( ) ;
window . location = '/cgi-bin/db.jim' ;
} ) ;
$ ( '#channelinfo' ) . click ( function ( e ) {
e . preventDefault ( ) ;
window . location = '/cgi-bin/channel.jim' ;
} ) ;
2012-10-25 23:31:09 +00:00
$ ( '#diskdiag' ) . click ( function ( e ) {
e . preventDefault ( ) ;
window . location = 'disk.jim' ;
} ) ;
2012-04-08 23:26:38 +00:00
$ ( '#dlna' ) . click ( function ( e ) {
e . preventDefault ( ) ;
window . location = '/dlna/dlna.jim' ;
} ) ;
2013-07-30 20:07:13 +00:00
$ ( '#dspace' ) . click ( function ( e ) {
e . preventDefault ( ) ;
window . location = 'dspace/index.jim' ;
} ) ;
2012-03-11 00:26:14 +00:00
$ ( '#reboot' ) . click ( function ( e ) {
e . preventDefault ( ) ;
if ( confirm ( 'Are you sure you wish to perform a reboot now?' ) )
if ( confirm ( 'Really sure?\n\nThere is a small chance the ' +
' Humax may not restart\n' +
'without physical intervention.\n\n' +
'i.e. pressing the standby button or using the remote control' ) )
window . location = '/cgi-bin/restart.jim' ;
} ) ;
2012-02-23 22:06:39 +00:00
$ ( '#runreset' ) . click ( function ( e ) {
e . preventDefault ( ) ;
if ( ! confirm ( 'Are you sure? This will completely remove all packages and settings.' ) )
return ;
if ( ! confirm ( 'Are you really sure?' ) )
return ;
if ( ! confirm ( 'One last time, are you sure?' ) )
return ;
$ . get ( '/cgi-bin/cfwreset.cgi' , function ( ) {
$ ( 'button' ) . disable ( ) ;
$ ( '#resetdone' ) . slideDown ( ) ;
} ) ;
} ) ;
2012-02-22 19:09:46 +00:00
2012-11-05 22:36:04 +00:00
$ ( '#runrma' ) . click ( function ( e ) {
e . preventDefault ( ) ;
if ( ! confirm ( 'Are you sure? This will completely remove all packages and settings and return the unit to state where you can re-install official firmware ready to return a faulty box to Humax for repair.' ) )
return ;
if ( ! confirm ( 'Are you really sure?' ) )
return ;
if ( ! confirm ( 'One last time, are you sure?' ) )
return ;
$ . get ( '/cgi-bin/cfwreset.cgi?rma=1' , function ( ) {
$ ( 'button' ) . disable ( ) ;
$ ( '#resetdone' ) . slideDown ( ) ;
} ) ;
} ) ;
2012-02-22 19:09:46 +00:00
} ) ;
2012-02-23 22:06:39 +00:00