mirror of https://github.com/lidarr/Lidarr
series structure cleanup.
This commit is contained in:
parent
62f15d4d96
commit
4a4e440ec0
|
@ -1,8 +1,8 @@
|
||||||
define(['app', 'Shared/ModalRegion', 'AddSeries/AddSeriesLayout',
|
define(['app', 'Shared/ModalRegion', 'AddSeries/AddSeriesLayout',
|
||||||
'Series/SeriesCollectionView', 'Upcoming/UpcomingCollectionView',
|
'Series/Index/SeriesIndexCollectionView', 'Upcoming/UpcomingCollectionView',
|
||||||
'Calendar/CalendarCollectionView', 'Shared/NotificationView',
|
'Calendar/CalendarCollectionView', 'Shared/NotificationView',
|
||||||
'Shared/NotFoundView', 'MainMenuView', 'HeaderView',
|
'Shared/NotFoundView', 'MainMenuView', 'HeaderView',
|
||||||
'Series/Details/SeriesDetailsView', 'Series/Details/EpisodeCollection'],
|
'Series/Details/SeriesDetailsView', 'Series/EpisodeCollection'],
|
||||||
function (app, modalRegion) {
|
function (app, modalRegion) {
|
||||||
|
|
||||||
var controller = Backbone.Marionette.Controller.extend({
|
var controller = Backbone.Marionette.Controller.extend({
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
series: function (action, query) {
|
series: function (action, query) {
|
||||||
this.setTitle('NzbDrone');
|
this.setTitle('NzbDrone');
|
||||||
NzbDrone.mainRegion.show(new NzbDrone.Series.SeriesCollectionView());
|
NzbDrone.mainRegion.show(new NzbDrone.Series.Index.SeriesIndexCollectionView());
|
||||||
},
|
},
|
||||||
|
|
||||||
upcoming: function (action, query) {
|
upcoming: function (action, query) {
|
||||||
|
|
|
@ -137,7 +137,7 @@
|
||||||
<Content Include="Series\EmptySeriesCollectionTemplate.html" />
|
<Content Include="Series\EmptySeriesCollectionTemplate.html" />
|
||||||
<Content Include="Series\SeriesCollection.js" />
|
<Content Include="Series\SeriesCollection.js" />
|
||||||
<Content Include="Series\SeriesCollectionTemplate.html" />
|
<Content Include="Series\SeriesCollectionTemplate.html" />
|
||||||
<Content Include="Series\SeriesCollectionView.js" />
|
<Content Include="Series\SeriesIndexCollectionView.js" />
|
||||||
<Content Include="Series\SeriesItemTemplate.html" />
|
<Content Include="Series\SeriesItemTemplate.html" />
|
||||||
<Content Include="Series\SeriesItemView.js" />
|
<Content Include="Series\SeriesItemView.js" />
|
||||||
<Content Include="Series\SeriesModel.js" />
|
<Content Include="Series\SeriesModel.js" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
define(['app', 'Series/SeriesModel'], function () {
|
define(['app', 'Series/SeriesModel'], function () {
|
||||||
|
|
||||||
NzbDrone.Series.DeleteSeriesView = Backbone.Marionette.ItemView.extend({
|
NzbDrone.Series.Delete.DeleteSeriesView = Backbone.Marionette.ItemView.extend({
|
||||||
template:'Series/Delete/DeleteSeriesTemplate',
|
template:'Series/Delete/DeleteSeriesTemplate',
|
||||||
tagName:'div',
|
tagName:'div',
|
||||||
className:"modal",
|
className:"modal",
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(['app', 'Series/Details/EpisodeModel'], function () {
|
|
||||||
NzbDrone.Series.Details.EpisodeCollection = Backbone.Collection.extend({
|
|
||||||
url: NzbDrone.Constants.ApiRoot + '/episode',
|
|
||||||
model: NzbDrone.Series.Details.EpisodeModel
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,5 +1,5 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
define(['app', 'Series/Details/SeasonModel'], function () {
|
define(['app', 'Series/SeasonModel'], function () {
|
||||||
|
|
||||||
NzbDrone.Series.Details.EpisodeItemView = Backbone.Marionette.ItemView.extend({
|
NzbDrone.Series.Details.EpisodeItemView = Backbone.Marionette.ItemView.extend({
|
||||||
template: 'Series/Details/EpisodeItemTemplate',
|
template: 'Series/Details/EpisodeItemTemplate',
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
define(['app','Series/Details/SeasonModel'], function () {
|
|
||||||
NzbDrone.Series.Details.SeasonCollection = Backbone.Collection.extend({
|
|
||||||
url: NzbDrone.Constants.ApiRoot + '/season',
|
|
||||||
model: NzbDrone.Series.Details.SeasonModel
|
|
||||||
});
|
|
||||||
});
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['app', 'Quality/QualityProfileCollection', 'Series/Details/SeasonCompositeView', 'Series/Details/SeasonCollection'], function () {
|
define(['app', 'Quality/QualityProfileCollection', 'Series/Details/SeasonCompositeView', 'Series/SeasonCollection'], function () {
|
||||||
NzbDrone.Series.Details.SeriesDetailsView = Backbone.Marionette.CompositeView.extend({
|
NzbDrone.Series.Details.SeriesDetailsView = Backbone.Marionette.CompositeView.extend({
|
||||||
|
|
||||||
itemView: NzbDrone.Series.Details.SeasonCompositeView,
|
itemView: NzbDrone.Series.Details.SeasonCompositeView,
|
||||||
|
@ -6,7 +6,7 @@ define(['app', 'Quality/QualityProfileCollection', 'Series/Details/SeasonComposi
|
||||||
template: 'Series/Details/SeriesDetailsTemplate',
|
template: 'Series/Details/SeriesDetailsTemplate',
|
||||||
|
|
||||||
initialize: function () {
|
initialize: function () {
|
||||||
this.collection = new NzbDrone.Series.Details.SeasonCollection();
|
this.collection = new NzbDrone.Series.SeasonCollection();
|
||||||
this.collection.fetch({data: { seriesId: this.model.get('id') }});
|
this.collection.fetch({data: { seriesId: this.model.get('id') }});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
define(['app', 'Series/SeriesModel', 'Series/Delete/DeleteSeriesView', 'Quality/QualityProfileCollection'], function () {
|
define(['app', 'Series/SeriesModel', 'Series/Delete/DeleteSeriesView', 'Quality/QualityProfileCollection'], function () {
|
||||||
|
|
||||||
NzbDrone.Series.EditSeriesView = Backbone.Marionette.ItemView.extend({
|
NzbDrone.Series.Edit.EditSeriesView = Backbone.Marionette.ItemView.extend({
|
||||||
template: 'Series/Edit/EditSeriesTemplate',
|
template: 'Series/Edit/EditSeriesTemplate',
|
||||||
tagName: 'div',
|
tagName: 'div',
|
||||||
className: "modal",
|
className: "modal",
|
||||||
|
@ -36,7 +36,7 @@ define(['app', 'Series/SeriesModel', 'Series/Delete/DeleteSeriesView', 'Quality/
|
||||||
},
|
},
|
||||||
|
|
||||||
removeSeries: function () {
|
removeSeries: function () {
|
||||||
var view = new NzbDrone.Series.DeleteSeriesView({ model: this.model });
|
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
|
||||||
NzbDrone.modalRegion.show(view);
|
NzbDrone.modalRegion.show(view);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
define(['app', 'Series/EpisodeModel'], function () {
|
||||||
|
NzbDrone.Series.EpisodeCollection = Backbone.Collection.extend({
|
||||||
|
url: NzbDrone.Constants.ApiRoot + '/episode',
|
||||||
|
model: NzbDrone.Series.EpisodeModel
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,5 +1,5 @@
|
||||||
define(['app'], function (app) {
|
define(['app'], function () {
|
||||||
NzbDrone.Series.Details.EpisodeModel = Backbone.Model.extend({
|
NzbDrone.Series.EpisodeModel = Backbone.Model.extend({
|
||||||
|
|
||||||
mutators: {
|
mutators: {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
define(['app', 'Quality/QualityProfileCollection', 'Series/SeriesItemView'], function (app, qualityProfileCollection) {
|
define(['app', 'Quality/QualityProfileCollection', 'Series/Index/SeriesItemView'], function (app, qualityProfileCollection) {
|
||||||
NzbDrone.Series.SeriesCollectionView = Backbone.Marionette.CompositeView.extend({
|
NzbDrone.Series.Index.SeriesIndexCollectionView = Backbone.Marionette.CompositeView.extend({
|
||||||
itemView: NzbDrone.Series.SeriesItemView,
|
itemView: NzbDrone.Series.Index.SeriesItemView,
|
||||||
itemViewContainer: 'tbody',
|
itemViewContainer: 'tbody',
|
||||||
template: 'Series/SeriesCollectionTemplate',
|
template: 'Series/Index/SeriesIndexTemplate',
|
||||||
qualityProfileCollection: qualityProfileCollection,
|
qualityProfileCollection: qualityProfileCollection,
|
||||||
//emptyView: NzbDrone.Series.EmptySeriesCollectionView,
|
//emptyView: NzbDrone.Series.EmptySeriesCollectionView,
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ define(['app', 'Quality/QualityProfileCollection', 'Series/SeriesItemView'], fun
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
NzbDrone.Series.EmptySeriesCollectionView = Backbone.Marionette.CompositeView.extend({
|
NzbDrone.Series.Index.EmptySeriesCollectionView = Backbone.Marionette.CompositeView.extend({
|
||||||
template: 'Series/EmptySeriesCollectionTemplate',
|
template: 'Series/Index/EmptySeriesCollectionTemplate',
|
||||||
tagName: 'tr'
|
tagName: 'tr'
|
||||||
});
|
});
|
|
@ -9,8 +9,8 @@ define([
|
||||||
|
|
||||||
], function () {
|
], function () {
|
||||||
|
|
||||||
NzbDrone.Series.SeriesItemView = Backbone.Marionette.ItemView.extend({
|
NzbDrone.Series.Index.SeriesItemView = Backbone.Marionette.ItemView.extend({
|
||||||
template: 'Series/SeriesItemTemplate',
|
template: 'Series/Index/SeriesItemTemplate',
|
||||||
tagName: 'tr',
|
tagName: 'tr',
|
||||||
|
|
||||||
ui: {
|
ui: {
|
||||||
|
@ -40,7 +40,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
removeSeries: function () {
|
removeSeries: function () {
|
||||||
var view = new NzbDrone.Series.DeleteSeriesView({ model: this.model });
|
var view = new NzbDrone.Series.Delete.DeleteSeriesView({ model: this.model });
|
||||||
NzbDrone.vent.trigger(NzbDrone.Events.OpenModalDialog, {
|
NzbDrone.vent.trigger(NzbDrone.Events.OpenModalDialog, {
|
||||||
view: view
|
view: view
|
||||||
});
|
});
|
|
@ -0,0 +1,6 @@
|
||||||
|
define(['app','Series/SeasonModel'], function () {
|
||||||
|
NzbDrone.Series.SeasonCollection = Backbone.Collection.extend({
|
||||||
|
url: NzbDrone.Constants.ApiRoot + '/season',
|
||||||
|
model: NzbDrone.Series.SeasonModel
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,5 +1,5 @@
|
||||||
define(['app'], function () {
|
define(['app'], function () {
|
||||||
NzbDrone.Series.Details.SeasonModel = Backbone.Model.extend({
|
NzbDrone.Series.SeasonModel = Backbone.Model.extend({
|
||||||
|
|
||||||
mutators: {
|
mutators: {
|
||||||
seasonTitle: function () {
|
seasonTitle: function () {
|
|
@ -30,6 +30,7 @@ define('app', function () {
|
||||||
|
|
||||||
window.NzbDrone = new Backbone.Marionette.Application();
|
window.NzbDrone = new Backbone.Marionette.Application();
|
||||||
window.NzbDrone.Series = {};
|
window.NzbDrone.Series = {};
|
||||||
|
window.NzbDrone.Series.Index = {};
|
||||||
window.NzbDrone.Series.Edit = {};
|
window.NzbDrone.Series.Edit = {};
|
||||||
window.NzbDrone.Series.Delete = {};
|
window.NzbDrone.Series.Delete = {};
|
||||||
window.NzbDrone.Series.Details = {};
|
window.NzbDrone.Series.Details = {};
|
||||||
|
|
Loading…
Reference in New Issue