mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
rjs -> webpack
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user