update
This commit is contained in:
@@ -46,18 +46,26 @@ echo $grid -> draw();
|
||||
{
|
||||
jQuery( '#cron-container' ).css( 'opacity', '0.8' );
|
||||
},
|
||||
success: function( data )
|
||||
success: function( data )
|
||||
{
|
||||
response = jQuery.parseJSON( data );
|
||||
|
||||
try {
|
||||
var response = JSON.parse( data );
|
||||
} catch(e) {
|
||||
delay++;
|
||||
if ( delay > 120 ) delay = 120;
|
||||
$( '#cron-container' ).prepend( '<div class="msg">Błąd parsowania odpowiedzi serwera.</div>' );
|
||||
$( '.countdown.callback' ).removeClass('ended').data('countdown').update( +( new Date ) + delay * 1000 ).start();
|
||||
return;
|
||||
}
|
||||
|
||||
jQuery( '#cron-container' ).css( 'opacity', '1' );
|
||||
|
||||
|
||||
if ( response.status === 'empty' )
|
||||
{
|
||||
delay++;
|
||||
if ( delay > 60 )
|
||||
delay = 60;
|
||||
|
||||
|
||||
$( '.countdown.callback' ).removeClass('ended').data('countdown').update( +( new Date ) + delay * 1000 ).start();
|
||||
if ( typeof value === "undefined" )
|
||||
$( '#cron-container' ).prepend( '<div class="msg">W tej chwili nie ma nic do wykonania.</div>' );
|
||||
|
||||
Reference in New Issue
Block a user