Only show "Display Existing Movies" toggle after selecting a folder

pull/2/head
Tim Turner 8 years ago
parent e3e67d1098
commit 7ca53d1073

@ -13,7 +13,11 @@ module.exports = Marionette.Layout.extend({
template : 'AddMovies/AddMoviesLayoutTemplate',
regions : {
workspace : '#add-movies-workspace'
workspace : '#add-movies-workspace',
},
ui : {
$existing : '#show-existing-movies-toggle'
},
events : {
@ -32,25 +36,26 @@ module.exports = Marionette.Layout.extend({
RootFolderCollection.fetch().done(function() {
RootFolderCollection.synced = true;
});
},
_toggleExisting : function(e) {
var showExisting = e.target.checked;
var showExisting = e.target.checked;
vent.trigger(vent.Commands.ShowExistingCommand, {
showExisting: showExisting
});
vent.trigger(vent.Commands.ShowExistingCommand, {
showExisting: showExisting
});
},
onShow : function() {
this.workspace.show(new AddMoviesView());
this.ui.$existing.hide();
},
_folderSelected : function(options) {
vent.trigger(vent.Commands.CloseModalCommand);
this.ui.$existing.show();
this.workspace.show(new ExistingMoviesCollectionView({ model : options.model }));
},
@ -65,6 +70,7 @@ module.exports = Marionette.Layout.extend({
},
_addFromList : function() {
this.ui.$existing.hide();
this.workspace.show(new AddFromListView());
}
});

@ -11,31 +11,33 @@
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-horizontal" style="margin-top: 15px;">
<div class="form-group" style="margin-bottom: 0px;">
<label class="col-sm-3 control-label">Display Existing Movies</label>
<div class="col-md-12">
<div class="form-horizontal" style="margin-top: 15px;">
<div id="show-existing-movies-toggle">
<div class="form-group" style="margin-bottom: 0px;">
<label class="col-sm-3 control-label">Display Existing Movies</label>
<div class="col-sm-8">
<div class="input-group">
<label class="checkbox toggle well">
<input class="x-show-existing" type="checkbox" checked="checked" name="showExisting"/>
<p>
<span>Yes</span>
<span>No</span>
</p>
<div class="col-sm-8">
<div class="input-group">
<label class="checkbox toggle well">
<input class="x-show-existing" type="checkbox" checked="checked" name="showExisting"/>
<p>
<span>Yes</span>
<span>No</span>
</p>
<div class="btn btn-primary slide-button"/>
</label>
<div class="btn btn-primary slide-button"/>
</label>
<span class="help-inline-checkbox">
<i class="icon-sonarr-form-info" title="Should Radarr display movies already in your collection?"/>
</span>
</div>
</div>
<span class="help-inline-checkbox">
<i class="icon-sonarr-form-info" title="Should Radarr display movies already in your collection?"/>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">

Loading…
Cancel
Save