|
|
@ -7,7 +7,8 @@ define([
|
|
|
|
'Series/Index/Table/AirDateCell',
|
|
|
|
'Series/Index/Table/AirDateCell',
|
|
|
|
'Series/Index/Table/SeriesStatusCell',
|
|
|
|
'Series/Index/Table/SeriesStatusCell',
|
|
|
|
'Shared/Toolbar/ToolbarLayout',
|
|
|
|
'Shared/Toolbar/ToolbarLayout',
|
|
|
|
'Config'
|
|
|
|
'Config',
|
|
|
|
|
|
|
|
'Shared/LoadingView'
|
|
|
|
],
|
|
|
|
],
|
|
|
|
function () {
|
|
|
|
function () {
|
|
|
|
NzbDrone.Series.Index.SeriesIndexLayout = Backbone.Marionette.Layout.extend({
|
|
|
|
NzbDrone.Series.Index.SeriesIndexLayout = Backbone.Marionette.Layout.extend({
|
|
|
@ -63,6 +64,32 @@ define([
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
leftSideButtons: {
|
|
|
|
|
|
|
|
type : 'default',
|
|
|
|
|
|
|
|
storeState: false,
|
|
|
|
|
|
|
|
items : [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: 'Add Series',
|
|
|
|
|
|
|
|
icon : 'icon-plus',
|
|
|
|
|
|
|
|
route: 'series/add'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title : 'RSS Sync',
|
|
|
|
|
|
|
|
icon : 'icon-rss',
|
|
|
|
|
|
|
|
command : 'rsssync',
|
|
|
|
|
|
|
|
successMessage: 'RSS Sync Completed',
|
|
|
|
|
|
|
|
errorMessage : 'RSS Sync Failed!'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title : 'Update Library',
|
|
|
|
|
|
|
|
icon : 'icon-refresh',
|
|
|
|
|
|
|
|
command : 'refreshseries',
|
|
|
|
|
|
|
|
successMessage: 'Library was updated!',
|
|
|
|
|
|
|
|
errorMessage : 'Library update failed!'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
showTable: function () {
|
|
|
|
showTable: function () {
|
|
|
|
|
|
|
|
|
|
|
|
this.series.show(new Backgrid.Grid(
|
|
|
|
this.series.show(new Backgrid.Grid(
|
|
|
@ -93,12 +120,16 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
onShow: function () {
|
|
|
|
onShow: function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//This gets cleared immediately because of the viewButton callback
|
|
|
|
|
|
|
|
this.series.show(new NzbDrone.Shared.LoadingView());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: Move this outside of the function - 'this' is not available for the call back though (use string like events?)
|
|
|
|
var viewButtons = {
|
|
|
|
var viewButtons = {
|
|
|
|
type : 'radio',
|
|
|
|
type : 'radio',
|
|
|
|
storeState : true,
|
|
|
|
storeState : true,
|
|
|
|
menuKey : 'seriesViewMode',
|
|
|
|
menuKey : 'seriesViewMode',
|
|
|
|
defaultAction: 'listView',
|
|
|
|
defaultAction: 'listView',
|
|
|
|
items : [
|
|
|
|
items : [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
key : 'tableView',
|
|
|
|
key : 'tableView',
|
|
|
|
title : '',
|
|
|
|
title : '',
|
|
|
@ -120,41 +151,12 @@ define([
|
|
|
|
]
|
|
|
|
]
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var leftSideButtons = {
|
|
|
|
|
|
|
|
type : 'default',
|
|
|
|
|
|
|
|
storeState: false,
|
|
|
|
|
|
|
|
items : [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title: 'Add Series',
|
|
|
|
|
|
|
|
icon : 'icon-plus',
|
|
|
|
|
|
|
|
route: 'series/add'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title : 'RSS Sync',
|
|
|
|
|
|
|
|
icon : 'icon-rss',
|
|
|
|
|
|
|
|
command : 'rsssync',
|
|
|
|
|
|
|
|
successMessage: 'RSS Sync Completed',
|
|
|
|
|
|
|
|
errorMessage : 'RSS Sync Failed!'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
title : 'Update Library',
|
|
|
|
|
|
|
|
icon : 'icon-refresh',
|
|
|
|
|
|
|
|
command : 'refreshseries',
|
|
|
|
|
|
|
|
successMessage: 'Library was updated!',
|
|
|
|
|
|
|
|
errorMessage : 'Library update failed!'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.toolbar.show(new NzbDrone.Shared.Toolbar.ToolbarLayout({
|
|
|
|
this.toolbar.show(new NzbDrone.Shared.Toolbar.ToolbarLayout({
|
|
|
|
right : [ viewButtons],
|
|
|
|
right : [ viewButtons],
|
|
|
|
left : [ leftSideButtons],
|
|
|
|
left : [ this.leftSideButtons],
|
|
|
|
context: this
|
|
|
|
context: this
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
});
|
|
|
|
;
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
;
|
|
|
|
|
|
|
|