From 7ca154e613329050885b7c6a799488475266218e Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 24 Mar 2013 15:51:30 +0100 Subject: enter captchas on webui --- module/web/static/js/views/headerView.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'module/web/static/js/views/headerView.js') 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)]); -- cgit v1.2.3