mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 14:55:20 -07:00
Only show "Display Existing Movies" toggle after selecting a folder
This commit is contained in:
parent
e3e67d1098
commit
7ca53d1073
2 changed files with 34 additions and 26 deletions
|
@ -13,7 +13,11 @@ module.exports = Marionette.Layout.extend({
|
||||||
template : 'AddMovies/AddMoviesLayoutTemplate',
|
template : 'AddMovies/AddMoviesLayoutTemplate',
|
||||||
|
|
||||||
regions : {
|
regions : {
|
||||||
workspace : '#add-movies-workspace'
|
workspace : '#add-movies-workspace',
|
||||||
|
},
|
||||||
|
|
||||||
|
ui : {
|
||||||
|
$existing : '#show-existing-movies-toggle'
|
||||||
},
|
},
|
||||||
|
|
||||||
events : {
|
events : {
|
||||||
|
@ -32,8 +36,6 @@ module.exports = Marionette.Layout.extend({
|
||||||
RootFolderCollection.fetch().done(function() {
|
RootFolderCollection.fetch().done(function() {
|
||||||
RootFolderCollection.synced = true;
|
RootFolderCollection.synced = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_toggleExisting : function(e) {
|
_toggleExisting : function(e) {
|
||||||
|
@ -45,12 +47,15 @@ module.exports = Marionette.Layout.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow : function() {
|
onShow : function() {
|
||||||
|
|
||||||
this.workspace.show(new AddMoviesView());
|
this.workspace.show(new AddMoviesView());
|
||||||
|
this.ui.$existing.hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
_folderSelected : function(options) {
|
_folderSelected : function(options) {
|
||||||
vent.trigger(vent.Commands.CloseModalCommand);
|
vent.trigger(vent.Commands.CloseModalCommand);
|
||||||
|
this.ui.$existing.show();
|
||||||
this.workspace.show(new ExistingMoviesCollectionView({ model : options.model }));
|
this.workspace.show(new ExistingMoviesCollectionView({ model : options.model }));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -65,6 +70,7 @@ module.exports = Marionette.Layout.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
_addFromList : function() {
|
_addFromList : function() {
|
||||||
|
this.ui.$existing.hide();
|
||||||
this.workspace.show(new AddFromListView());
|
this.workspace.show(new AddFromListView());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-horizontal" style="margin-top: 15px;">
|
<div class="form-horizontal" style="margin-top: 15px;">
|
||||||
|
<div id="show-existing-movies-toggle">
|
||||||
<div class="form-group" style="margin-bottom: 0px;">
|
<div class="form-group" style="margin-bottom: 0px;">
|
||||||
<label class="col-sm-3 control-label">Display Existing Movies</label>
|
<label class="col-sm-3 control-label">Display Existing Movies</label>
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div id="add-movies-workspace"></div>
|
<div id="add-movies-workspace"></div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue