moved most of addseries to use require.js

This commit is contained in:
Keivan Beigi
2013-02-13 18:28:56 -08:00
committed by kay.one
parent 5e26596623
commit 52d815b1d4
39 changed files with 21945 additions and 10312 deletions

View File

@@ -1,23 +1,25 @@
/// <reference path="../app.js" />
/// <reference path="RootFolders/RootDirCollection.js" />
/// <reference path="../Quality/qualityProfileCollection.js" />
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
mutators: {
seriesYear: function () {
var date = Date.utc.create(this.get('firstAired')).format('({yyyy})');
define(['app', 'AddSeries/RootFolders/RootFolderCollection', 'Quality/QualityProfileCollection'], function () {
//don't append year, if the series name already has the name appended.
if (this.get('seriesName').endsWith(date)) {
return "";
} else {
return date;
NzbDrone.AddSeries.SearchResultModel = Backbone.Model.extend({
mutators: {
seriesYear: function () {
var date = Date.utc.create(this.get('firstAired')).format('({yyyy})');
//don't append year, if the series name already has the name appended.
if (this.get('seriesName').endsWith(date)) {
return "";
} else {
return date;
}
}
}
},
},
defaults: {
qualityProfiles: new NzbDrone.Quality.QualityProfileCollection(),
rootFolders: new NzbDrone.AddSeries.RootDirCollection()
}
defaults: {
qualityProfiles: new NzbDrone.Quality.QualityProfileCollection(),
rootFolders: new NzbDrone.AddSeries.RootFolders.RootFolderModel()
}
});
});