mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
Changed: Improve model and UI handling for lists. Should finally fix root folder errors. (#3133)
Fixes #3036 (supposedly)
This commit is contained in:
committed by
Leonardo Galli
parent
0783402470
commit
07cb844ce6
@@ -44,11 +44,9 @@ var view = Marionette.ItemView.extend({
|
|||||||
onRender : function() {
|
onRender : function() {
|
||||||
var rootFolder = this.model.get("rootFolderPath");
|
var rootFolder = this.model.get("rootFolderPath");
|
||||||
if (rootFolder !== "") {
|
if (rootFolder !== "") {
|
||||||
//this.ui.rootFolder.val(rootFolder);
|
|
||||||
this.ui.rootFolder.children().filter(function() {
|
this.ui.rootFolder.children().filter(function() {
|
||||||
//may want to use $.trim in here
|
return $.trim($(this).text()) === rootFolder;
|
||||||
return $(this).text() === rootFolder;
|
}).prop('selected', true);
|
||||||
}).attr('selected', true);
|
|
||||||
} else {
|
} else {
|
||||||
var defaultRoot = Config.getValue(Config.Keys.DefaultRootFolderId);
|
var defaultRoot = Config.getValue(Config.Keys.DefaultRootFolderId);
|
||||||
if (RootFolders.get(defaultRoot)) {
|
if (RootFolders.get(defaultRoot)) {
|
||||||
@@ -58,7 +56,7 @@ var view = Marionette.ItemView.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onBeforeSave : function() {
|
_onBeforeSave : function() {
|
||||||
var profile = this.ui.profile.val();
|
var profile = parseInt(this.ui.profile.val(), 10);
|
||||||
var minAvail = this.ui.minimumAvailability.val();
|
var minAvail = this.ui.minimumAvailability.val();
|
||||||
var rootFolderPath = this.ui.rootFolder.children(':selected').text();
|
var rootFolderPath = this.ui.rootFolder.children(':selected').text();
|
||||||
this.model.set({
|
this.model.set({
|
||||||
|
|||||||
Reference in New Issue
Block a user