]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - Plugson/www/plugson_theme.html
Fix the VentoyPlugson issue that default_file value is wrong for more than 10 theme...
[Ventoy.git] / Plugson / www / plugson_theme.html
index c59a58087b1bc536e39b1a7ac64b113bc8522896..1e6e8b0d59f4275522c494025d4a615e22498846 100644 (file)
       var id = $(this).attr('id');\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
+          var prelen = 'id_theme_file_radio'.length;\r
+          m_data_theme[current_tab_index].default_file = parseInt(id.substr(id.length - 1));\r
+          if (id.substr(0, prelen) === 'id_theme_file_radio') {\r
+              m_data_theme[current_tab_index].default_file = parseInt(id.substr(prelen));\r
+          }\r
+          \r
           VtoySaveCurrentPage();\r
         });\r
       }\r