summaryrefslogtreecommitdiffstats
path: root/module/web/app/scripts/collections/InteractionList.js
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/app/scripts/collections/InteractionList.js')
-rw-r--r--module/web/app/scripts/collections/InteractionList.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/module/web/app/scripts/collections/InteractionList.js b/module/web/app/scripts/collections/InteractionList.js
deleted file mode 100644
index 24f8b9248..000000000
--- a/module/web/app/scripts/collections/InteractionList.js
+++ /dev/null
@@ -1,49 +0,0 @@
-define(['jquery', 'backbone', 'underscore', 'app', 'models/InteractionTask'],
- function($, Backbone, _, App, InteractionTask) {
- 'use strict';
-
- return Backbone.Collection.extend({
-
- model: InteractionTask,
-
- comparator: function(task) {
- return task.get('iid');
- },
-
- fetch: function(options) {
- options = App.apiRequest('getInteractionTasks/0', null, options);
- var self = this;
- options.success = function(data) {
- self.set(data);
- };
-
- return $.ajax(options);
- },
-
- toJSON: function() {
- var data = {queries: 0, notifications: 0};
-
- this.map(function(task) {
- if (task.isNotification())
- data.notifications++;
- else
- data.queries++;
- });
-
- return data;
- },
-
- // a task is waiting for attention (no notification)
- hasTaskWaiting: function() {
- var tasks = 0;
- this.map(function(task) {
- if (!task.isNotification())
- tasks++;
- });
-
- return tasks > 0;
- }
-
- });
-
- }); \ No newline at end of file