1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-18 21:35:51 -04:00

rjs -> webpack

This commit is contained in:
Keivan Beigi
2015-02-02 17:18:45 -08:00
parent 344f3d66ef
commit 428a1439e5
399 changed files with 11591 additions and 16139 deletions
+16 -24
View File
@@ -1,26 +1,18 @@
'use strict';
define(
[
'backbone',
'Commands/CommandModel',
'Mixins/backbone.signalr.mixin'
], function (Backbone, CommandModel) {
var Backbone = require('backbone');
var CommandModel = require('./CommandModel');
require('../Mixins/backbone.signalr.mixin');
var CommandCollection = Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/command',
model: CommandModel,
findCommand: function (command) {
return this.find(function (model) {
return model.isSameCommand(command);
});
}
});
var collection = new CommandCollection().bindSignalR();
collection.fetch();
return collection;
module.exports = (function(){
var CommandCollection = Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/command',
model : CommandModel,
findCommand : function(command){
return this.find(function(model){
return model.isSameCommand(command);
});
}
});
var collection = new CommandCollection().bindSignalR();
collection.fetch();
return collection;
}).call(this);