]> glassweightruler.freedombox.rocks Git - Ventoy.git/blobdiff - Plugson/www/plugson_theme.html
Update ko_KR.txt (#2025)
[Ventoy.git] / Plugson / www / plugson_theme.html
index 16bc97333b88e259f753f4b5c0c5d5eaf8b3dc51..e6f96a0226915ced5bbbc44acda03b09eb7e596a 100644 (file)
@@ -1,10 +1,12 @@
 <div class="box box-primary" id="control">\r
     <div class="box-header">\r
-        <div class="col-sm-10" style="padding-top:8px;">\r
+        <div class="col-sm-9" style="padding-top:8px;">\r
             <i class="fa fa-file-image-o">&nbsp;&nbsp;</i>\r
             <h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">主题插件</h1>\r
         </div>\r
-        \r
+        <div class="col-sm-1" style="padding-top:2px;">\r
+          <button id="id_btn_reset" class="btn btn-sm btn-danger btn-del"><i class="fa fa-trash"></i><span id="id_btn_span_reset">Reset</span></button>\r
+        </div>\r
         <div class="col-sm-2" style="font-size:16px;padding-top:8px;">\r
             <a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/cn/plugin_theme.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>\r
         </div>\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
   $('#id_tab_theme a[href="#tab_4"]').click(OnClickMultiModeTab);\r
   $('#id_tab_theme a[href="#tab_5"]').click(OnClickMultiModeTab);\r
 \r
+  function UpdateTabTitleIcon(data) {\r
+    CommonUpdateTabTitleIcon(data.exist_theme, '#id_tab_theme a[href="#tab_', 'theme');\r
+  }\r
+  $('#id_btn_reset').click(function() { \r
+    Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'theme')}).on(function(e) {\r
+        if (e) {            \r
+            callVtoySync({\r
+                method : 'theme_del_file',\r
+                index: current_tab_index,\r
+                path: g_del_all_path\r
+            }, function(data) {\r
+                \r
+            });\r
+            \r
+            callVtoySync({\r
+                method : 'theme_del_font',\r
+                index: current_tab_index,\r
+                path: g_del_all_path\r
+            }, function(data) {\r
+                \r
+            });\r
+            \r
+            m_data_theme[current_tab_index].filelist.length = 0;\r
+            m_data_theme[current_tab_index].fontslist.length = 0;\r
+            VtoyFillCurrentPageItem(m_data_theme[g_vtoy_data_default_index]);\r
+            VtoySaveCurrentPage();\r
+        }\r
+    });\r
+  });\r
+  \r
   $('#id_tab_theme a[href="#tab_0"]').tab('show');\r
   VtoyFillCurrentPageItem(m_data_theme[0]);\r
   VtoyPageLanguageChange(g_current_language);\r