|
|
|
@ -3,16 +3,15 @@ var Marionette = require('marionette');
|
|
|
|
|
var Backgrid = require('backgrid');
|
|
|
|
|
var CutoffUnmetCollection = require('./CutoffUnmetCollection');
|
|
|
|
|
var SelectAllCell = require('../../Cells/SelectAllCell');
|
|
|
|
|
var SeriesTitleCell = require('../../Cells/SeriesTitleCell');
|
|
|
|
|
var EpisodeNumberCell = require('../../Cells/EpisodeNumberCell');
|
|
|
|
|
var EpisodeTitleCell = require('../../Cells/EpisodeTitleCell');
|
|
|
|
|
var MovieTitleCell = require('../../Cells/MovieTitleCell');
|
|
|
|
|
var MovieStatusWithTextCell = require('../../Cells/MovieStatusWithTextCell');
|
|
|
|
|
var RelativeDateCell = require('../../Cells/RelativeDateCell');
|
|
|
|
|
var EpisodeStatusCell = require('../../Cells/EpisodeStatusCell');
|
|
|
|
|
var GridPager = require('../../Shared/Grid/Pager');
|
|
|
|
|
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
|
|
|
|
var LoadingView = require('../../Shared/LoadingView');
|
|
|
|
|
var Messenger = require('../../Shared/Messenger');
|
|
|
|
|
var CommandController = require('../../Commands/CommandController');
|
|
|
|
|
|
|
|
|
|
require('backgrid.selectall');
|
|
|
|
|
require('../../Mixins/backbone.signalr.mixin');
|
|
|
|
|
|
|
|
|
@ -37,32 +36,25 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
sortable : false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name : 'series',
|
|
|
|
|
label : 'Series Title',
|
|
|
|
|
cell : SeriesTitleCell,
|
|
|
|
|
sortValue : 'series.sortTitle'
|
|
|
|
|
name : 'this',
|
|
|
|
|
label : 'Movie Title',
|
|
|
|
|
cell : MovieTitleCell,
|
|
|
|
|
sortValue : this.sortTitle
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name : 'this',
|
|
|
|
|
label : 'Episode',
|
|
|
|
|
cell : EpisodeNumberCell,
|
|
|
|
|
sortable : false
|
|
|
|
|
name : 'inCinemas',
|
|
|
|
|
label : 'In Cinemas',
|
|
|
|
|
cell : RelativeDateCell
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name : 'this',
|
|
|
|
|
label : 'Episode Title',
|
|
|
|
|
cell : EpisodeTitleCell,
|
|
|
|
|
sortable : false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name : 'airDateUtc',
|
|
|
|
|
label : 'Air Date',
|
|
|
|
|
cell : RelativeDateCell
|
|
|
|
|
name : 'physicalRelease',
|
|
|
|
|
label : 'Physical Release',
|
|
|
|
|
cell : RelativeDateCell
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name : 'status',
|
|
|
|
|
label : 'Status',
|
|
|
|
|
cell : EpisodeStatusCell,
|
|
|
|
|
cell : MovieStatusWithTextCell,
|
|
|
|
|
sortable : false
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
@ -105,11 +97,6 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
callback : this._searchSelected,
|
|
|
|
|
ownerContext : this,
|
|
|
|
|
className : 'x-search-selected'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title : 'Season Pass',
|
|
|
|
|
icon : 'icon-sonarr-monitored',
|
|
|
|
|
route : 'seasonpass'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
@ -148,9 +135,9 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
CommandController.bindToCommand({
|
|
|
|
|
element : this.$('.x-search-selected'),
|
|
|
|
|
command : {
|
|
|
|
|
name : 'episodeSearch'
|
|
|
|
|
element : this.$('.x-search-selected'),
|
|
|
|
|
command : {
|
|
|
|
|
name : 'moviesSearch'
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
@ -172,7 +159,7 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
if (selected.length === 0) {
|
|
|
|
|
Messenger.show({
|
|
|
|
|
type : 'error',
|
|
|
|
|
message : 'No episodes selected'
|
|
|
|
|
message : 'No movies selected'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
@ -180,9 +167,9 @@ module.exports = Marionette.Layout.extend({
|
|
|
|
|
|
|
|
|
|
var ids = _.pluck(selected, 'id');
|
|
|
|
|
|
|
|
|
|
CommandController.Execute('episodeSearch', {
|
|
|
|
|
name : 'episodeSearch',
|
|
|
|
|
episodeIds : ids
|
|
|
|
|
CommandController.Execute('moviesSearch', {
|
|
|
|
|
name : 'moviesSearch',
|
|
|
|
|
movieIds : ids
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|