replace mootools .delay method

This commit is contained in:
Andrew Bauer 2021-01-08 12:25:17 -06:00
parent 72eaf267c1
commit 9ec09c0c85
6 changed files with 10 additions and 13 deletions

View File

@ -842,7 +842,7 @@ function exportResponse(data, responseText) {
$j('#downloadLink').attr("href", thisUrl + exportFile);
$j('#exportProgress').addClass( 'text-success' );
$j('#exportProgress').text(exportSucceededString);
startDownload.pass( exportFile ).delay( 1500 );
setTimeout(startDownload, 1500, exportFile);
} else {
$j('#exportProgress').addClass( 'text-danger' );
$j('#exportProgress').text(exportFailedString);

View File

@ -312,7 +312,7 @@ function getCmdResponse( respObj, respText ) {
}
} // end if haev a new auth hash
streamCmdTimer = streamQuery.delay(streamTimeout); //Timeout is refresh rate for progressBox and time display
streamCmdTimer = setTimeout(streamQuery, streamTimeout); //Timeout is refresh rate for progressBox and time display
} // end function getCmdResponse( respObj, respText )
function pauseClicked() {
@ -1149,7 +1149,7 @@ function initPage() {
}
} else {
progressBarNav();
streamCmdTimer = streamQuery.delay(250);
streamCmdTimer = setTimeout(streamQuery, 250);
if ( canStreamNative ) {
if ( !$j('#imageFeed') ) {
console.log('No element with id tag imageFeed found.');

View File

@ -4,7 +4,6 @@ function submitPreset( element ) {
form.target = opener.name;
form.view.value = 'monitor';
form.submit();
closeWindow.delay( 250 );
}
function configureButtons() {

View File

@ -3,7 +3,6 @@ function submitCamera( element ) {
form.target = opener.name;
form.view.value = 'monitor';
form.submit();
closeWindow.delay( 250 );
}
function configureButtons( element ) {

View File

@ -3,7 +3,6 @@ function submitCamera( element ) {
form.target = self.name;
form.view.value = 'monitor';
form.submit();
closeWindow.delay( 250 );
}
function gotoStep1( element ) {

View File

@ -302,7 +302,7 @@ function getStreamCmdResponse(respObj, respText) {
if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) {
streamCmdTimeout = streamCmdTimeout/5;
}
streamCmdTimer = streamCmdQuery.delay(streamCmdTimeout);
streamCmdTimer = setTimeout(streamCmdQuery, streamCmdTimeout);
}
function streamCmdPause( action ) {
@ -516,7 +516,7 @@ function getStatusCmdResponse(respObj, respText) {
if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) {
statusCmdTimeout = statusCmdTimeout/5;
}
statusCmdTimer = statusCmdQuery.delay(statusCmdTimeout);
statusCmdTimer = setTimeout(statusCmdQuery, statusCmdTimeout);
}
function statusCmdQuery() {
@ -704,10 +704,10 @@ function appletRefresh() {
console.error("Nothing found for liveStream"+monitorId);
}
if ( appletRefreshTime ) {
appletRefresh.delay( appletRefreshTime*1000 );
setTimeout(appletRefresh, appletRefreshTime*1000);
}
} else {
appletRefresh.delay( 15*1000 ); //if we are paused or delayed check every 15 seconds if we are live yet...
setTimeout(appletRefresh, 15*1000 ); //if we are paused or delayed check every 15 seconds if we are live yet...
}
}
@ -834,10 +834,10 @@ function initPage() {
if ( monitorType != 'WebSite' ) {
if ( streamMode == 'single' ) {
statusCmdTimer = statusCmdQuery.delay( (Math.random()+0.1)*statusRefreshTimeout );
statusCmdTimer = setTimeout(statusCmdQuery, (Math.random()+0.1)*statusRefreshTimeout );
setInterval(watchdogCheck, statusRefreshTimeout*2, 'status');
} else {
streamCmdTimer = streamCmdQuery.delay( (Math.random()+0.1)*statusRefreshTimeout );
streamCmdTimer = setTimeout(streamCmdQuery, (Math.random()+0.1)*statusRefreshTimeout );
setInterval(watchdogCheck, statusRefreshTimeout*2, 'stream');
}
@ -861,7 +861,7 @@ function initPage() {
} // streamMode native or single
if ( refreshApplet && appletRefreshTime ) {
appletRefresh.delay(appletRefreshTime*1000);
setTimeout(appletRefresh, appletRefreshTime*1000);
}
if ( scale == '0' || scale == 'auto' ) changeScale();
if ( window.history.length == 1 ) {