2013-03-29 18:37:10 +00:00
|
|
|
|
"use strict";
|
|
|
|
|
define([
|
2013-02-22 06:18:36 +00:00
|
|
|
|
'app',
|
|
|
|
|
'AddSeries/RootFolders/RootFolderCollection',
|
|
|
|
|
'Quality/QualityProfileCollection',
|
|
|
|
|
'AddSeries/RootFolders/RootFolderView',
|
2013-05-27 02:53:56 +00:00
|
|
|
|
'AddSeries/AddSeriesView',
|
2013-02-22 06:18:36 +00:00
|
|
|
|
'AddSeries/Existing/ImportSeriesView'
|
2013-02-14 02:28:56 +00:00
|
|
|
|
],
|
2013-02-15 02:40:29 +00:00
|
|
|
|
function (app, rootFolderCollection, qualityProfileCollection) {
|
2013-02-14 02:28:56 +00:00
|
|
|
|
NzbDrone.AddSeries.AddSeriesLayout = Backbone.Marionette.Layout.extend({
|
|
|
|
|
template: 'AddSeries/addSeriesLayoutTemplate',
|
|
|
|
|
|
|
|
|
|
regions: {
|
2013-05-27 02:53:56 +00:00
|
|
|
|
workspace: '#add-series-workspace'
|
2013-02-14 02:28:56 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
events: {
|
2013-05-27 02:53:56 +00:00
|
|
|
|
'click .x-import': '_importSeries'
|
2013-02-14 02:28:56 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onRender: function () {
|
|
|
|
|
|
2013-05-27 02:53:56 +00:00
|
|
|
|
/* rootFolderCollection.fetch({success: function () {
|
|
|
|
|
self.importExisting.show(new NzbDrone.AddSeries.Existing.RootDirListView({model: rootFolderCollection.at(0)}));
|
|
|
|
|
}});*/
|
2013-02-15 02:40:29 +00:00
|
|
|
|
qualityProfileCollection.fetch();
|
2013-05-27 02:53:56 +00:00
|
|
|
|
rootFolderCollection.fetch();
|
2013-02-14 02:28:56 +00:00
|
|
|
|
|
2013-05-27 02:53:56 +00:00
|
|
|
|
this.workspace.show(new NzbDrone.AddSeries.AddSeriesView());
|
2013-02-14 02:28:56 +00:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
2013-05-27 02:53:56 +00:00
|
|
|
|
_importSeries: function () {
|
|
|
|
|
NzbDrone.modalRegion.show(new NzbDrone.AddSeries.RootFolders.Layout());
|
2013-02-15 02:40:29 +00:00
|
|
|
|
}
|
2013-02-14 02:28:56 +00:00
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|