X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/4bf43ab9d4e6b724836724c1d514760d164df79a..dd906e0b16352e68a3df1384ffb6ee2ae421bb45:/Plugson/www/plugson_theme.html diff --git a/Plugson/www/plugson_theme.html b/Plugson/www/plugson_theme.html index 16bc973..e6f96a0 100644 --- a/Plugson/www/plugson_theme.html +++ b/Plugson/www/plugson_theme.html @@ -1,10 +1,12 @@
-
+
  

主题插件

- +
+ +
@@ -299,7 +301,7 @@ $('input[type=radio]').each(function(){ var id = $(this).attr('id'); - if (id.startsWith('id_theme_file')) { + 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)); VtoySaveCurrentPage(); @@ -513,6 +515,36 @@ $('#id_tab_theme a[href="#tab_4"]').click(OnClickMultiModeTab); $('#id_tab_theme a[href="#tab_5"]').click(OnClickMultiModeTab); + function UpdateTabTitleIcon(data) { + CommonUpdateTabTitleIcon(data.exist_theme, '#id_tab_theme a[href="#tab_', 'theme'); + } + $('#id_btn_reset').click(function() { + Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'theme')}).on(function(e) { + if (e) { + callVtoySync({ + method : 'theme_del_file', + index: current_tab_index, + path: g_del_all_path + }, function(data) { + + }); + + callVtoySync({ + method : 'theme_del_font', + index: current_tab_index, + path: g_del_all_path + }, function(data) { + + }); + + m_data_theme[current_tab_index].filelist.length = 0; + m_data_theme[current_tab_index].fontslist.length = 0; + VtoyFillCurrentPageItem(m_data_theme[g_vtoy_data_default_index]); + VtoySaveCurrentPage(); + } + }); + }); + $('#id_tab_theme a[href="#tab_0"]').tab('show'); VtoyFillCurrentPageItem(m_data_theme[0]); VtoyPageLanguageChange(g_current_language);