settings is fully moved to required.

This commit is contained in:
Keivan Beigi 2013-06-18 18:02:23 -07:00
commit 6f8c73771d
54 changed files with 533 additions and 439 deletions

View file

@ -28,4 +28,7 @@ define(['app', 'Series/SeriesModel'], function () {
}
});
return NzbDrone.Series.Delete.DeleteSeriesView;
});

View file

@ -12,4 +12,7 @@ define(['app', 'Series/EpisodeModel'], function () {
return new NzbDrone.Series.EpisodeCollection(filtered);
}
});
return NzbDrone.Series.EpisodeCollection;
});

View file

@ -87,4 +87,6 @@ define(['app', 'Series/SeriesModel'], function () {
status : 0
}
});
return NzbDrone.Series.EpisodeModel;
});

View file

@ -3,4 +3,6 @@ define(['app'], function () {
NzbDrone.Series.Index.EmptySeriesCollectionView = Backbone.Marionette.CompositeView.extend({
template: 'Series/Index/EmptySeriesIndexTemplate'
});
return NzbDrone.Series.Index.EmptySeriesCollectionView;
});

View file

@ -5,4 +5,6 @@ define(['app'], function () {
NzbDrone.Series.Index.EmptyView = Backbone.Marionette.CompositeView.extend({
template: 'Series/Index/EmptyTemplate'
});
return NzbDrone.Series.Index.EmptyView;
});

View file

@ -7,4 +7,6 @@ define(['app', 'Series/Index/List/ItemView', 'Config'], function () {
itemViewContainer : '#x-series-list',
template : 'Series/Index/List/CollectionTemplate'
});
return NzbDrone.Series.Index.List.CollectionView;
});

View file

@ -8,7 +8,6 @@ define([
'Series/Delete/DeleteSeriesView'
], function () {
NzbDrone.Series.Index.List.ItemView = Backbone.Marionette.ItemView.extend({
template: 'Series/Index/List/ItemTemplate',
@ -31,4 +30,6 @@ define([
NzbDrone.modalRegion.show(view);
}
});
return NzbDrone.Series.Index.List.ItemView;
});

View file

@ -7,4 +7,6 @@ define(['app', 'Series/Index/Posters/ItemView', 'Config'], function () {
itemViewContainer : '#x-series-posters',
template : 'Series/Index/Posters/CollectionTemplate'
});
return NzbDrone.Series.Index.Posters.CollectionView;
});

View file

@ -40,4 +40,6 @@ define([
this.ui.controls.slideToggle();
}
});
return NzbDrone.Series.Index.Posters.ItemView;
});

View file

@ -4,6 +4,7 @@ define([
'Series/Index/List/CollectionView',
'Series/Index/Posters/CollectionView',
'Series/Index/EmptyView',
'Series/SeriesCollection',
'Cells/AirDateCell',
'Cells/SeriesTitleCell',
'Cells/TemplatedCell',
@ -12,7 +13,20 @@ define([
'Config',
'Shared/LoadingView'
],
function () {
function (
App,
ListCollectionView,
PosterCollectionView,
EmptyView,
SeriesCollection,
AirDateCell,
SeriesTitleCell,
TemplatedCell,
SeriesStatusCell,
ToolbarLayout,
Config,
LoadingView)
{
NzbDrone.Series.Index.SeriesIndexLayout = Backbone.Marionette.Layout.extend({
template: 'Series/Index/SeriesIndexLayoutTemplate',
@ -30,7 +44,7 @@ define([
{
name : 'this',
label: 'Title',
cell : NzbDrone.Cells.SeriesTitleCell
cell : SeriesTitleCell
},
{
name : 'seasonCount',
@ -50,21 +64,21 @@ define([
{
name : 'nextAiring',
label: 'Next Airing',
cell : NzbDrone.Cells.AirDateCell
cell : AirDateCell
},
{
name : 'this',
label : 'Episodes',
sortable: false,
template: 'Series/EpisodeProgressTemplate',
cell : NzbDrone.Cells.TemplatedCell
cell : TemplatedCell
},
{
name : 'this',
label : '',
sortable: false,
template: 'Series/Index/Table/ControlsColumnTemplate',
cell : NzbDrone.Cells.TemplatedCell
cell : TemplatedCell
}
],
@ -107,24 +121,24 @@ define([
},
_showList: function () {
var view = new NzbDrone.Series.Index.List.CollectionView();
var view = new ListCollectionView();
this._fetchCollection(view);
},
_showPosters: function () {
var view = new NzbDrone.Series.Index.Posters.CollectionView();
var view = new PosterCollectionView();
this._fetchCollection(view);
},
_showEmpty: function () {
this.series.show(new NzbDrone.Series.Index.EmptyView());
this.series.show(new EmptyView());
},
_fetchCollection: function (view) {
var self = this;
if (this.seriesCollection.models.length === 0) {
this.series.show(new NzbDrone.Shared.LoadingView());
this.series.show(new LoadingView());
this.seriesCollection.fetch()
.done(function () {
@ -145,7 +159,7 @@ define([
},
initialize: function () {
this.seriesCollection = new NzbDrone.Series.SeriesCollection();
this.seriesCollection = new SeriesCollection();
},
onShow: function () {
@ -178,11 +192,13 @@ define([
]
};
this.toolbar.show(new NzbDrone.Shared.Toolbar.ToolbarLayout({
this.toolbar.show(new ToolbarLayout({
right : [ viewButtons],
left : [ this.leftSideButtons],
context: this
}));
}
});
return NzbDrone.Series.Index.SeriesIndexLayou;
});

View file

@ -17,4 +17,7 @@ define(['app', 'Series/SeasonModel', 'backbone.pageable'], function (App, Season
order : null
}
});
return NzbDrone.Series.SeasonCollection;
});

View file

@ -18,5 +18,7 @@ define(['app'], function () {
seasonNumber: 0
}
});
return NzbDrone.Series.SeasonModel;
});

View file

@ -13,4 +13,6 @@ define(['app', 'Series/SeriesModel'], function () {
order: -1
}
});
return NzbDrone.Series.SeriesCollection;
});