summaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorSimon Rettberg2014-05-28 18:18:34 +0200
committerSimon Rettberg2014-05-28 18:18:34 +0200
commite4e79982dd3c447a4ced762a6069db553e246f59 (patch)
treed17f74565ed5347350edeab412a07c77bd80a636 /script
parentWIP (diff)
downloadslx-admin-e4e79982dd3c447a4ced762a6069db553e246f59.tar.gz
slx-admin-e4e79982dd3c447a4ced762a6069db553e246f59.tar.xz
slx-admin-e4e79982dd3c447a4ced762a6069db553e246f59.zip
Fixed some bugs from Sateserver v05
Diffstat (limited to 'script')
-rw-r--r--script/taskmanager.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/script/taskmanager.js b/script/taskmanager.js
index a34b3aa4..822d1421 100644
--- a/script/taskmanager.js
+++ b/script/taskmanager.js
@@ -10,7 +10,8 @@ function tmInit()
return;
tmItems.each(function(i, item) {
item = $(item);
- if (item.find('.data-tm-icon').length !== 0) return;
+ if (item.find('.data-tm-icon').length !== 0)
+ return;
if (item.is('[data-tm-progress]')) {
item.append('<div class="data-tm-progress"><div class="progress"><div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div></div></div>');
}
@@ -38,17 +39,16 @@ function tmUpdate()
return;
$.post('api.php?do=taskmanager', {'ids[]': active, token: TOKEN}, function(data, status) {
// POST success
- tmIsRunning = tmResult(data, status)
+ tmIsRunning = tmResult(data, status);
if (tmIsRunning) {
setTimeout(tmUpdate, 1000);
}
}, 'json').fail(function(jqXHR, textStatus, errorThrown) {
// POST failure
console.log("TaskManager Error: " + textStatus + " - " + errorThrown);
- if (++tmErrors < TM_MAX_ERRORS)
+ tmIsRunning = (++tmErrors < TM_MAX_ERRORS);
+ if (tmIsRunning)
setTimeout(tmUpdate, 2000);
- else
- tmIsRunning = false;
});
}