UI Cleanup - Updated Series subtree.

This commit is contained in:
Taloth Saldono
2015-02-13 23:09:36 +01:00
parent 1bf433872a
commit b69ea349ce
25 changed files with 970 additions and 618 deletions

View File

@@ -2,21 +2,27 @@ var Backbone = require('backbone');
var EpisodeFileModel = require('./EpisodeFileModel');
module.exports = Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/episodefile',
model : EpisodeFileModel,
url : window.NzbDrone.ApiRoot + '/episodefile',
model : EpisodeFileModel,
originalFetch : Backbone.Collection.prototype.fetch,
initialize : function(options){
initialize : function(options) {
this.seriesId = options.seriesId;
this.models = [];
},
fetch : function(options){
if(!this.seriesId) {
fetch : function(options) {
if (!this.seriesId) {
throw 'seriesId is required';
}
if(!options) {
if (!options) {
options = {};
}
options.data = {seriesId : this.seriesId};
options.data = { seriesId : this.seriesId };
return this.originalFetch.call(this, options);
}
});