Fix the VentoyPlugson issue that default_file value is wrong for more than 10 theme files. (#2608)

This commit is contained in:
longpanda
2023-10-14 22:15:24 +08:00
parent 854d17a4e9
commit 39703cabb7
5 changed files with 13 additions and 8 deletions

View File

@@ -357,7 +357,12 @@
var id = $(this).attr('id');
if (typeof(id) != 'undefined' && id.startsWith('id_theme_file')) {
$(this).change(function() {
m_data_theme[current_tab_index].default_file =parseInt(id.substr(id.length - 1));
var prelen = 'id_theme_file_radio'.length;
m_data_theme[current_tab_index].default_file = parseInt(id.substr(id.length - 1));
if (id.substr(0, prelen) === 'id_theme_file_radio') {
m_data_theme[current_tab_index].default_file = parseInt(id.substr(prelen));
}
VtoySaveCurrentPage();
});
}