summaryrefslogtreecommitdiffstats
path: root/module/web/static/js/views/headerView.js
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-24 15:51:30 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-03-24 15:51:30 +0100
commit7ca154e613329050885b7c6a799488475266218e (patch)
tree6da18e4565766aee6a3f47f23dd0dfc396fec78e /module/web/static/js/views/headerView.js
parentimplemented interactions for multi user, show waiting queries on webui (diff)
downloadpyload-7ca154e613329050885b7c6a799488475266218e.tar.xz
enter captchas on webui
Diffstat (limited to 'module/web/static/js/views/headerView.js')
-rw-r--r--module/web/static/js/views/headerView.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/module/web/static/js/views/headerView.js b/module/web/static/js/views/headerView.js
index b5b4a9d24..25127a337 100644
--- a/module/web/static/js/views/headerView.js
+++ b/module/web/static/js/views/headerView.js
@@ -158,6 +158,13 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ServerStatus', 'colle
if (data['@class'] === "ServerStatus") {
// TODO: load interaction when none available
this.status.set(data);
+
+ // There tasks at the server, but not in queue: so fetch them
+ // or there are tasks in our queue but not on the server
+ if (this.status.get('notifications') && !this.notificationView.tasks.hasTaskWaiting() ||
+ !this.status.get('notifications') && this.notificationView.tasks.hasTaskWaiting())
+ this.notificationView.tasks.fetch();
+
this.speeds = this.speeds.slice(1);
this.speeds.push([this.speeds[this.speeds.length - 1][0] + 1, Math.floor(data.speed / 1024)]);