Fixed: Readded series monitoring flag to Season Pass view.

pull/3113/head
Taloth Saldono 9 years ago
parent 293bc55e58
commit c8b7446f7c

@ -8,12 +8,13 @@ module.exports = Marionette.ItemView.extend({
template : 'SeasonPass/SeasonPassFooterViewTemplate',
ui : {
monitor : '.x-monitor',
selectedCount : '.x-selected-count',
container : '.series-editor-footer',
actions : '.x-action',
indicator : '.x-indicator',
indicatorIcon : '.x-indicator-icon'
seriesMonitored : '.x-series-monitored',
monitor : '.x-monitor',
selectedCount : '.x-selected-count',
container : '.series-editor-footer',
actions : '.x-action',
indicator : '.x-indicator',
indicatorIcon : '.x-indicator-icon'
},
events : {
@ -38,11 +39,17 @@ module.exports = Marionette.ItemView.extend({
_update : function() {
var self = this;
var selected = this.editorGrid.getSelectedModels();
var seriesMonitored = this.ui.seriesMonitored.val();
var monitoringOptions;
_.each(selected, function(model) {
monitoringOptions = self._getMonitoringOptions(model);
if (seriesMonitored === 'true') {
model.set('monitored', true);
} else if (seriesMonitored === 'false') {
model.set('monitored', false);
}
monitoringOptions = self._getMonitoringOptions(model);
model.set('addOptions', monitoringOptions);
});
@ -86,6 +93,10 @@ module.exports = Marionette.ItemView.extend({
var lastSeason = _.max(model.get('seasons'), 'seasonNumber');
var firstSeason = _.min(_.reject(model.get('seasons'), { seasonNumber : 0 }), 'seasonNumber');
if (monitor === 'noChange') {
return null;
}
model.setSeasonPass(firstSeason.seasonNumber);
var options = {

@ -1,9 +1,20 @@
<div class="series-editor-footer">
<div class="row">
<div class="form-group col-md-2">
<label>Monitor</label>
<label>Monitor series</label>
<select class="form-control x-action x-series-monitored">
<option value="noChange">No change</option>
<option value="true">Monitored</option>
<option value="false">Unmonitored</option>
</select>
</div>
<div class="form-group col-md-2">
<label>Monitor episodes</label>
<select class="form-control x-action x-monitor">
<option value="noChange">No change</option>
<option value="all">All</option>
<option value="future">Future</option>
<option value="missing">Missing</option>

@ -9,6 +9,7 @@ var FooterView = require('./SeasonPassFooterView');
var SelectAllCell = require('../Cells/SelectAllCell');
var SeriesStatusCell = require('../Cells/SeriesStatusCell');
var SeriesTitleCell = require('../Cells/SeriesTitleCell');
var SeriesMonitoredCell = require('../Cells/ToggleCell');
var SeasonsCell = require('./SeasonsCell');
require('../Mixins/backbone.signalr.mixin');
@ -38,6 +39,15 @@ module.exports = Marionette.Layout.extend({
cell : SeriesTitleCell,
cellValue : 'this'
},
{
name : 'monitored',
label : '',
cell : SeriesMonitoredCell,
trueClass : 'icon-sonarr-monitored',
falseClass : 'icon-sonarr-unmonitored',
tooltip : 'Toggle series monitored status',
sortable : false
},
{
name : 'seasons',
label : 'Seasons',

@ -12,6 +12,7 @@
padding : 4px;
font-size : 14px;
height : 25px;
}
.label:first-child {

Loading…
Cancel
Save