Mostly fixes UI glitches for list settings.

Fixes #679
This commit is contained in:
Leonardo Galli 2017-05-26 18:31:11 +02:00
parent 10bceaf370
commit 234827d5fd
2 changed files with 9 additions and 4 deletions

View File

@ -42,9 +42,14 @@ var view = Marionette.ItemView.extend({
}, },
onRender : function() { onRender : function() {
var defaultRoot = Config.getValue(Config.Keys.DefaultRootFolderId); var rootFolder = this.model.get("rootFolderPath")
if (RootFolders.get(defaultRoot)) { if (rootFolder != "") {
this.ui.rootFolder.val(defaultRoot); this.ui.rootFolder.val(rootFolder)
} else {
var defaultRoot = Config.getValue(Config.Keys.DefaultRootFolderId);
if (RootFolders.get(defaultRoot)) {
this.ui.rootFolder.val(defaultRoot);
}
} }
}, },

View File

@ -89,7 +89,7 @@
<label class="col-sm-3 control-label">Folder</label> <label class="col-sm-3 control-label">Folder</label>
<div class="col-sm-5"> <div class="col-sm-5">
<select class="col-md-4 form-control x-root-folder" name="RootFolderPath"> <select class="col-md-4 form-control x-root-folder" name="rootFolderPath">
{{#if rootFolders}} {{#if rootFolders}}
{{#each rootFolders}} {{#each rootFolders}}
<option value="{{id}}">{{path}}</option> <option value="{{id}}">{{path}}</option>