mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
Fix saving rootDirs (refresh before save)
This commit is contained in:
parent
3a2b67330c
commit
b63dffa3a0
1 changed files with 4 additions and 4 deletions
|
@ -40,8 +40,8 @@ $(document).ready(function() {
|
|||
if (is_default)
|
||||
setDefault($('#rootDirs option').attr('id'));
|
||||
|
||||
$.get(sbRoot+'/config/general/saveRootDirs', { rootDirString: $('#rootDirText').val() });
|
||||
refreshRootDirs();
|
||||
$.get(sbRoot+'/config/general/saveRootDirs', { rootDirString: $('#rootDirText').val() });
|
||||
}
|
||||
|
||||
function editRootDir(path) {
|
||||
|
@ -141,7 +141,7 @@ $(document).ready(function() {
|
|||
function refreshRootDirs() {
|
||||
|
||||
if (!$("#rootDirs").length)
|
||||
return
|
||||
return;
|
||||
|
||||
var do_disable = 'true';
|
||||
|
||||
|
@ -150,7 +150,7 @@ $(document).ready(function() {
|
|||
|
||||
// if nothing's selected then select the default
|
||||
if (!$("#rootDirs option:selected").length && $('#whichDefaultRootDir').val().length)
|
||||
$('#'+$('#whichDefaultRootDir').val()).prop("selected", true)
|
||||
$('#'+$('#whichDefaultRootDir').val()).prop("selected", true);
|
||||
|
||||
// if something's selected then we have some behavior to figure out
|
||||
if ($("#rootDirs option:selected").length) {
|
||||
|
@ -183,7 +183,7 @@ $(document).ready(function() {
|
|||
|
||||
// set up buttons on page load
|
||||
syncOptionIDs();
|
||||
setDefault($('#whichDefaultRootDir').val(), true)
|
||||
setDefault($('#whichDefaultRootDir').val(), true);
|
||||
refreshRootDirs();
|
||||
|
||||
});
|
Loading…
Reference in a new issue