update selection buttons
This commit is contained in:
@@ -167,16 +167,31 @@
|
||||
reloadList($.mobile.activePage);
|
||||
}
|
||||
|
||||
var pollInterval;
|
||||
function onPollIntervalFired() {
|
||||
|
||||
if (!ApiClient.isWebSocketOpen()) {
|
||||
reloadList($.mobile.activePage);
|
||||
}
|
||||
}
|
||||
|
||||
function startInterval() {
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStart", "1000,1000");
|
||||
}
|
||||
if (pollInterval) {
|
||||
clearInterval(pollInterval);
|
||||
}
|
||||
pollInterval = setInterval(onPollIntervalFired, 1500);
|
||||
}
|
||||
|
||||
function stopInterval() {
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("ScheduledTasksInfoStop");
|
||||
}
|
||||
if (pollInterval) {
|
||||
clearInterval(pollInterval);
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#scheduledTasksPage", function () {
|
||||
|
||||
Reference in New Issue
Block a user