X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/4bf43ab9d4e6b724836724c1d514760d164df79a..fa7e1d5fa0007e5d1d634cc4e41fdfd3aa381a8e:/Plugson/www/plugson_persistence.html diff --git a/Plugson/www/plugson_persistence.html b/Plugson/www/plugson_persistence.html index 97c6ce9..6b8caf6 100644 --- a/Plugson/www/plugson_persistence.html +++ b/Plugson/www/plugson_persistence.html @@ -108,7 +108,7 @@ var value = $(this).val(); var intval; - if (id.length <= 16) { + if (typeof(id) == 'undefined' || id.length <= 16) { return; } @@ -146,7 +146,7 @@ var id = $(this).attr('id'); var checked = $(this).is(':checked'); - if (id.length <= 14) { + if (typeof(id) == 'undefined' || id.length <= 14) { return; } @@ -156,14 +156,17 @@ if (id.startsWith('id_timeout_en_')) { textid = 'input[id=id_text_timeout_' + index + ']'; value = data.timeout; + data.timeouten = checked; } else { textid = 'input[id=id_text_autosel_' + index + ']'; value = data.autosel; + data.autoselen = checked; } if (checked) { $(textid).attr("disabled", false); $(textid).val(value); + } else { $(textid).attr("disabled", true); $(textid).val(''); @@ -277,6 +280,9 @@ $('input[type=text]').each(function (){ var id = $(this).attr('id'); + if (typeof(id) == 'undefined') { + return; + } if (id.startsWith('id_text_timeout_') || id.startsWith('id_text_autosel_')) { $(this).change(OnInputTextChange);