]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - Plugson/www/plugson_persistence.html
issue template update
[Ventoy.git] / Plugson / www / plugson_persistence.html
index 97c6ce9123efdbc1752c8e24c971f0b2cce3961a..6b8caf627c2629d4a5f5d78bbdea9432bdfc7c46 100644 (file)
     var value = $(this).val();\r
     var intval;\r
     \r
-    if (id.length <= 16) {\r
+    if (typeof(id) == 'undefined' || id.length <= 16) {\r
       return;\r
     }\r
 \r
     var id = $(this).attr('id');\r
     var checked = $(this).is(':checked');\r
 \r
-    if (id.length <= 14) {\r
+    if (typeof(id) == 'undefined' || id.length <= 14) {\r
       return;\r
     }\r
 \r
     if (id.startsWith('id_timeout_en_')) {\r
       textid = 'input[id=id_text_timeout_' + index + ']';\r
       value = data.timeout;\r
+      data.timeouten = checked;\r
     } else {\r
       textid = 'input[id=id_text_autosel_' + index + ']';\r
       value = data.autosel;\r
+      data.autoselen = checked;\r
     }\r
     \r
     if (checked) {\r
       $(textid).attr("disabled", false);\r
       $(textid).val(value);\r
+      \r
     } else {\r
       $(textid).attr("disabled", true);\r
       $(textid).val('');\r
 \r
     $('input[type=text]').each(function (){\r
       var id = $(this).attr('id');\r
+      if (typeof(id) == 'undefined') {\r
+        return;\r
+      }\r
       \r
       if (id.startsWith('id_text_timeout_') || id.startsWith('id_text_autosel_')) {\r
         $(this).change(OnInputTextChange);\r