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
+21 -31
View File
@@ -1,32 +1,22 @@
'use strict';
define(
[
'backbone',
'Series/EpisodeFileModel'
], function (Backbone, EpisodeFileModel) {
return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/episodefile',
model: EpisodeFileModel,
var Backbone = require('backbone');
var EpisodeFileModel = require('./EpisodeFileModel');
originalFetch: Backbone.Collection.prototype.fetch,
initialize: function (options) {
this.seriesId = options.seriesId;
this.models = [];
},
fetch: function (options) {
if (!this.seriesId) {
throw 'seriesId is required';
}
if (!options) {
options = {};
}
options.data = { seriesId: this.seriesId };
return this.originalFetch.call(this, options);
}
});
});
module.exports = Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/episodefile',
model : EpisodeFileModel,
originalFetch : Backbone.Collection.prototype.fetch,
initialize : function(options){
this.seriesId = options.seriesId;
this.models = [];
},
fetch : function(options){
if(!this.seriesId) {
throw 'seriesId is required';
}
if(!options) {
options = {};
}
options.data = {seriesId : this.seriesId};
return this.originalFetch.call(this, options);
}
});