X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/676831dbbe47060a8da8a8bd9fa7136dd43b9b50..8ef9732931bb298c8d5ffd66efcc4d79ad2cdbe2:/Plugson/www/plugson_persistence.html diff --git a/Plugson/www/plugson_persistence.html b/Plugson/www/plugson_persistence.html index 6b8caf6..37359ab 100644 --- a/Plugson/www/plugson_persistence.html +++ b/Plugson/www/plugson_persistence.html @@ -1,10 +1,12 @@
-
+
  

x

- +
+ +
@@ -356,9 +358,13 @@ backend: call_array, type: type }, function(e) { - list.push(data); - FillPersistenceTable(list); - Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS); + if (e.result === 'success') { + list.push(data); + FillPersistenceTable(list); + Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS); + } else if (e.result === 'duplicate') { + Message.error(g_vtoy_cur_language.STR_DUPLICATE_PATH); + } }); } @@ -510,7 +516,27 @@ $('#id_tab_persistence a[href="#tab_3"]').click(OnClickMultiModeTab); $('#id_tab_persistence a[href="#tab_4"]').click(OnClickMultiModeTab); $('#id_tab_persistence a[href="#tab_5"]').click(OnClickMultiModeTab); - + function UpdateTabTitleIcon(data) { + CommonUpdateTabTitleIcon(data.exist_persistence, '#id_tab_persistence a[href="#tab_', 'persistence'); + } + $('#id_btn_reset').click(function() { + Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'persistence')}).on(function(e) { + if (e) { + callVtoySync({ + method : 'persistence_del', + index: current_tab_index, + path: g_del_all_path + }, function(data) { + + }); + + m_data_persistence[current_tab_index].length = 0; + VtoyFillCurrentPageItem(m_data_persistence[g_vtoy_data_default_index]); + Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS); + } + }); + }); + $('#id_tab_persistence a[href="#tab_0"]').tab('show'); VtoyFillCurrentPageItem(m_data_persistence[0]); VtoyPageLanguageChange(g_current_language);