mirror of https://github.com/Radarr/Radarr
Series editor cleanup
This commit is contained in:
parent
1d70c97983
commit
dd6dc38672
|
@ -5,6 +5,14 @@ var _ = require('underscore');
|
|||
module.exports = Backgrid.Cell.extend({
|
||||
className : 'profile-cell',
|
||||
|
||||
_originalInit : Backgrid.Cell.prototype.initialize,
|
||||
|
||||
initialize : function () {
|
||||
this._originalInit.apply(this, arguments);
|
||||
|
||||
this.listenTo(ProfileCollection, 'sync', this.render);
|
||||
},
|
||||
|
||||
render : function() {
|
||||
|
||||
this.$el.empty();
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
var _ = require('underscore');
|
||||
var Marionette = require('marionette');
|
||||
var Backgrid = require('backgrid');
|
||||
var vent = require('vent');
|
||||
var Profiles = require('../../Profile/ProfileCollection');
|
||||
var RootFolders = require('../../AddSeries/RootFolders/RootFolderCollection');
|
||||
var ToolbarLayout = require('../../Shared/Toolbar/ToolbarLayout');
|
||||
var RootFolderLayout = require('../../AddSeries/RootFolders/RootFolderLayout');
|
||||
var UpdateFilesSeriesView = require('./Organize/OrganizeFilesView');
|
||||
var Config = require('../../Config');
|
||||
|
@ -18,9 +16,8 @@ module.exports = Marionette.ItemView.extend({
|
|||
seasonFolder : '.x-season-folder',
|
||||
rootFolder : '.x-root-folder',
|
||||
selectedCount : '.x-selected-count',
|
||||
saveButton : '.x-save',
|
||||
organizeFilesButton : '.x-organize-files',
|
||||
container : '.series-editor-footer'
|
||||
container : '.series-editor-footer',
|
||||
actions : '.x-action'
|
||||
},
|
||||
|
||||
events : {
|
||||
|
@ -96,19 +93,9 @@ module.exports = Marionette.ItemView.extend({
|
|||
this.ui.selectedCount.html('{0} series selected'.format(selectedCount));
|
||||
|
||||
if (selectedCount === 0) {
|
||||
this.ui.monitored.attr('disabled', '');
|
||||
this.ui.profile.attr('disabled', '');
|
||||
this.ui.seasonFolder.attr('disabled', '');
|
||||
this.ui.rootFolder.attr('disabled', '');
|
||||
this.ui.saveButton.attr('disabled', '');
|
||||
this.ui.organizeFilesButton.attr('disabled', '');
|
||||
this.ui.actions.attr('disabled', 'disabled');
|
||||
} else {
|
||||
this.ui.monitored.removeAttr('disabled', '');
|
||||
this.ui.profile.removeAttr('disabled', '');
|
||||
this.ui.seasonFolder.removeAttr('disabled', '');
|
||||
this.ui.rootFolder.removeAttr('disabled', '');
|
||||
this.ui.saveButton.removeAttr('disabled', '');
|
||||
this.ui.organizeFilesButton.removeAttr('disabled', '');
|
||||
this.ui.actions.removeAttr('disabled');
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -3,27 +3,17 @@
|
|||
<div class="form-group col-md-2">
|
||||
<label>Monitored</label>
|
||||
|
||||
<select class="form-control x-monitored">
|
||||
<select class="form-control x-action x-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>Season Folder</label>
|
||||
|
||||
<select class="form-control x-season-folder">
|
||||
<option value="noChange">No change</option>
|
||||
<option value="true">Yes</option>
|
||||
<option value="false">No</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<label>Profile</label>
|
||||
|
||||
<select class="form-control x-profiles">
|
||||
<select class="form-control x-action x-profiles">
|
||||
<option value="noChange">No change</option>
|
||||
{{#each profiles.models}}
|
||||
<option value="{{id}}">{{attributes.name}}</option>
|
||||
|
@ -31,10 +21,20 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-2">
|
||||
<label>Season Folder</label>
|
||||
|
||||
<select class="form-control x-action x-season-folder">
|
||||
<option value="noChange">No change</option>
|
||||
<option value="true">Yes</option>
|
||||
<option value="false">No</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label>Root Folder</label>
|
||||
|
||||
<select class="form-control x-root-folder" validation-name="RootFolderPath">
|
||||
<select class="form-control x-action x-root-folder" validation-name="RootFolderPath">
|
||||
<option value="noChange">No change</option>
|
||||
{{#each rootFolders}}
|
||||
<option value="{{id}}">{{path}}</option>
|
||||
|
@ -46,8 +46,8 @@
|
|||
<div class="form-group col-md-3 actions">
|
||||
<label class="x-selected-count">0 series selected</label>
|
||||
<div>
|
||||
<button class="btn btn-primary x-save">Save</button>
|
||||
<button class="btn btn-danger x-organize-files">Organize</button>
|
||||
<button class="btn btn-primary x-action x-save">Save</button>
|
||||
<button class="btn btn-danger x-action x-organize-files" title="Organize and rename episode files">Organize</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue