signalr cleanup

This commit is contained in:
kay.one 2013-09-10 23:33:47 -07:00 committed by Keivan Beigi
parent feda4a9b67
commit 25e2c98c45
219 changed files with 2035 additions and 1495 deletions

View file

@ -1,4 +1,4 @@
'use strict';
'use strict';
define(
[
'backbone',
@ -8,10 +8,19 @@ define(
var CommandCollection = Backbone.Collection.extend({
url : window.ApiRoot + '/command',
model: CommandModel
model: CommandModel,
findCommand: function (command) {
return this.find(function (model) {
return model.isSameCommand(command);
});
}
});
var collection = new CommandCollection().bindSignalR();
collection.fetch();
return collection;
});