diff options
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; }, |