|
|
@ -8,6 +8,7 @@ define(
|
|
|
|
'AddSeries/AddSeriesLayout',
|
|
|
|
'AddSeries/AddSeriesLayout',
|
|
|
|
'Series/Index/SeriesIndexLayout',
|
|
|
|
'Series/Index/SeriesIndexLayout',
|
|
|
|
'Series/Details/SeriesDetailsLayout',
|
|
|
|
'Series/Details/SeriesDetailsLayout',
|
|
|
|
|
|
|
|
'Series/SeriesCollection',
|
|
|
|
'Missing/MissingLayout',
|
|
|
|
'Missing/MissingLayout',
|
|
|
|
'Series/SeriesModel',
|
|
|
|
'Series/SeriesModel',
|
|
|
|
'Calendar/CalendarLayout',
|
|
|
|
'Calendar/CalendarLayout',
|
|
|
@ -17,7 +18,7 @@ define(
|
|
|
|
'System/Layout',
|
|
|
|
'System/Layout',
|
|
|
|
'Shared/NotFoundView',
|
|
|
|
'Shared/NotFoundView',
|
|
|
|
'Shared/Modal/Region'
|
|
|
|
'Shared/Modal/Region'
|
|
|
|
], function (App, Marionette, HistoryLayout, SettingsLayout, AddSeriesLayout, SeriesIndexLayout, SeriesDetailsLayout, MissingLayout, SeriesModel, CalendarLayout,
|
|
|
|
], function (App, Marionette, HistoryLayout, SettingsLayout, AddSeriesLayout, SeriesIndexLayout, SeriesDetailsLayout,SeriesCollection, MissingLayout, SeriesModel, CalendarLayout,
|
|
|
|
LogsLayout, LogFileLayout, ReleaseLayout, SystemLayout, NotFoundView) {
|
|
|
|
LogsLayout, LogFileLayout, ReleaseLayout, SystemLayout, NotFoundView) {
|
|
|
|
return Marionette.Controller.extend({
|
|
|
|
return Marionette.Controller.extend({
|
|
|
|
|
|
|
|
|
|
|
@ -28,15 +29,13 @@ define(
|
|
|
|
|
|
|
|
|
|
|
|
seriesDetails: function (query) {
|
|
|
|
seriesDetails: function (query) {
|
|
|
|
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
var series = SeriesCollection.where({titleSlug : query});
|
|
|
|
this._setTitle('Loading Series');
|
|
|
|
|
|
|
|
var series = new SeriesModel({ id: query });
|
|
|
|
if(series.length != 0){
|
|
|
|
series.fetch({
|
|
|
|
var targetSeries = series[0];
|
|
|
|
success: function (seriesModel) {
|
|
|
|
this._setTitle(targetSeries.get('title'));
|
|
|
|
self._setTitle(seriesModel.get('title'));
|
|
|
|
App.mainRegion.show(new SeriesDetailsLayout({ model: targetSeries }));
|
|
|
|
App.mainRegion.show(new SeriesDetailsLayout({ model: seriesModel }));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
addSeries: function (action) {
|
|
|
|
addSeries: function (action) {
|
|
|
|