]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
fix plugson page language issue
authorlongpanda <admin@ventoy.net>
Tue, 11 Jan 2022 01:39:01 +0000 (09:39 +0800)
committerlongpanda <admin@ventoy.net>
Tue, 11 Jan 2022 01:39:01 +0000 (09:39 +0800)
Plugson/www/plugson_auto_install.html
Plugson/www/plugson_control.html
Plugson/www/plugson_image_list.html
Plugson/www/plugson_persistence.html
Plugson/www/plugson_theme.html

index ec5410b9343fbd8ddd3fc04d64bc9623c387c1d7..4b3066c090fc83f60f32a7e92d9eb0c4b8bb4016 100644 (file)
     var id = $(this).attr('id');\r
     var value = $(this).val();\r
     var intval;\r
     var id = $(this).attr('id');\r
     var value = $(this).val();\r
     var intval;\r
-    \r
-    if (id.length <= 16) {\r
+\r
+    if (typeof(id) == 'undefined' || id.length <= 16) {\r
       return;\r
     }\r
 \r
       return;\r
     }\r
 \r
     var id = $(this).attr('id');\r
     var checked = $(this).is(':checked');\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
       return;\r
     }\r
 \r
 \r
     $('input[type=text]').each(function (){\r
       var id = $(this).attr('id');\r
 \r
     $('input[type=text]').each(function (){\r
       var id = $(this).attr('id');\r
-      \r
+      if (typeof(id) == 'undefined') {\r
+        return;\r
+      }\r
       if (id.startsWith('id_text_timeout_') || id.startsWith('id_text_autosel_')) {\r
         $(this).change(OnInputTextChange);\r
       }\r
       if (id.startsWith('id_text_timeout_') || id.startsWith('id_text_autosel_')) {\r
         $(this).change(OnInputTextChange);\r
       }\r
 \r
     $('input[type=checkbox]').each(function (){\r
       var id = $(this).attr('id');\r
 \r
     $('input[type=checkbox]').each(function (){\r
       var id = $(this).attr('id');\r
+      if (typeof(id) == 'undefined') {\r
+        return;\r
+      }\r
       if (id.startsWith('id_timeout_en_') || id.startsWith('id_autosel_en_')) {\r
         $(this).click(OnCheckBoxChange);\r
       }\r
       if (id.startsWith('id_timeout_en_') || id.startsWith('id_autosel_en_')) {\r
         $(this).click(OnCheckBoxChange);\r
       }\r
index 60c8fc75443d79e43536b3271432f0ab9f65e9ab..b686455628822e9f3a6c24e567c260974b5f7b24 100644 (file)
 \r
   $('input[type=radio]').each(function(){\r
     var id = $(this).attr('id');\r
 \r
   $('input[type=radio]').each(function(){\r
     var id = $(this).attr('id');\r
-    if (id.startsWith('id_ctrl')) {\r
+    if (typeof(id) != 'undefined' && id.startsWith('id_ctrl')) {\r
       $(this).change(VtoySaveCurrentPage);\r
     }\r
   });\r
       $(this).change(VtoySaveCurrentPage);\r
     }\r
   });\r
index 4fc770feda1a2c46a7bf3a7a390c9f8ff5f22633..ff538ba182b51a56013c87095e7c6939dd9be099 100644 (file)
 \r
   $('input[type=radio]').each(function(){\r
     var id = $(this).attr('id');\r
 \r
   $('input[type=radio]').each(function(){\r
     var id = $(this).attr('id');\r
-    if (id.startsWith('id_image_list_type')) {\r
+    if (typeof(id) != 'undefined' && id.startsWith('id_image_list_type')) {\r
       $(this).change(VtoySaveCurrentPage);\r
     }\r
   });\r
       $(this).change(VtoySaveCurrentPage);\r
     }\r
   });\r
index 03d5bea6eae0131e9a4200f1e95dc1685f525530..60e013480f391221f10a57361084f04f69b5f748 100644 (file)
     var value = $(this).val();\r
     var intval;\r
     \r
     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
       return;\r
     }\r
 \r
     var id = $(this).attr('id');\r
     var checked = $(this).is(':checked');\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
       return;\r
     }\r
 \r
 \r
     $('input[type=text]').each(function (){\r
       var id = $(this).attr('id');\r
 \r
     $('input[type=text]').each(function (){\r
       var id = $(this).attr('id');\r
+      if (typeof(id) == 'undefined') {\r
+        retunrn;\r
+      }\r
       \r
       if (id.startsWith('id_text_timeout_') || id.startsWith('id_text_autosel_')) {\r
         $(this).change(OnInputTextChange);\r
       \r
       if (id.startsWith('id_text_timeout_') || id.startsWith('id_text_autosel_')) {\r
         $(this).change(OnInputTextChange);\r
index 16bc97333b88e259f753f4b5c0c5d5eaf8b3dc51..b30d19a06fcc30567ffdaff71fdb654f9e90364d 100644 (file)
 \r
     $('input[type=radio]').each(function(){\r
       var id = $(this).attr('id');\r
 \r
     $('input[type=radio]').each(function(){\r
       var id = $(this).attr('id');\r
-      if (id.startsWith('id_theme_file')) {\r
+      if (typeof(id) != 'undefined' && id.startsWith('id_theme_file')) {\r
         $(this).change(function() {\r
           m_data_theme[current_tab_index].default_file =parseInt(id.substr(id.length - 1));\r
           VtoySaveCurrentPage();\r
         $(this).change(function() {\r
           m_data_theme[current_tab_index].default_file =parseInt(id.substr(id.length - 1));\r
           VtoySaveCurrentPage();\r