diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-24 15:51:30 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-24 15:51:30 +0100 |
commit | 7ca154e613329050885b7c6a799488475266218e (patch) | |
tree | 6da18e4565766aee6a3f47f23dd0dfc396fec78e /module/web/static/js/collections/InteractionList.js | |
parent | implemented interactions for multi user, show waiting queries on webui (diff) | |
download | pyload-7ca154e613329050885b7c6a799488475266218e.tar.xz |
enter captchas on webui
Diffstat (limited to 'module/web/static/js/collections/InteractionList.js')
-rw-r--r-- | module/web/static/js/collections/InteractionList.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/module/web/static/js/collections/InteractionList.js b/module/web/static/js/collections/InteractionList.js index 88651970e..9ec175892 100644 --- a/module/web/static/js/collections/InteractionList.js +++ b/module/web/static/js/collections/InteractionList.js @@ -10,13 +10,17 @@ define(['jquery', 'backbone', 'underscore', 'app', 'models/InteractionTask'], }, fetch: function(options) { - options = App.apiRequest('getInteractionTasks/0'); + options = App.apiRequest('getInteractionTasks/0', null, options); + var self = this; + options.success = function(data) { + self.update(data); + }; - return Backbone.Collection.prototype.fetch.apply(this, options); + return $.ajax(options); }, toJSON: function() { - var data = {queries: 0, notifications: 0, empty: false}; + var data = {queries: 0, notifications: 0}; this.map(function(task) { if (task.isNotification()) @@ -25,9 +29,6 @@ define(['jquery', 'backbone', 'underscore', 'app', 'models/InteractionTask'], data.queries++; }); - if (!data.queries && !data.notifications) - data.empty = true; - return data; }, |