mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-08-27 16:01:14 +00:00
VentoyPlugson Update:
1. Add preview json feature 2. Add reset button 3. Add configuration active identifier for each tab 4. Bug fix
This commit is contained in:
@@ -1 +1 @@
|
||||
20220921 18:42:35
|
||||
20221021 14:42:35
|
@@ -57,6 +57,14 @@
|
||||
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="javascript:void(0)" id="id_a_preview">
|
||||
<span class="fa fa-file-code-o"></span>
|
||||
<span id="id_span_preview" class="hidden-xs">Preview</span>
|
||||
<span class="hidden-xs"> </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="javascript:void(0)" id="id_a_language">
|
||||
<span class="fa fa-language"></span>
|
||||
@@ -710,6 +718,32 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal" id="JsonPreviewModal">
|
||||
<div class="modal-dialog" style="width: 80%;">
|
||||
<div class="modal-content">
|
||||
<form id="JsonPeviewForm" class="form-horizontal">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4>
|
||||
<b id="JsonPreviewForm_lang_1">JSON</b>
|
||||
<button type="button" id="id_btn_json_copy" class="btn btn-primary"><span class="fa fa-copy"> </span><span id="id_span_copy">Copy</span></button>
|
||||
</h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea id="pre_json_preview" class="form-control" rows="30" style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="PrewForm_lang_2" type="button" class="btn btn-primary btn-flat" data-dismiss="modal">确定</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
@@ -723,7 +757,7 @@
|
||||
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b id="plugson_build_date">20220921 18:42:35</b>
|
||||
<b id="plugson_build_date">20221021 14:42:35</b>
|
||||
</div>
|
||||
<strong><a href="https://www.ventoy.net" target="_blank">https://www.ventoy.net</a></strong>
|
||||
</footer>
|
||||
@@ -745,8 +779,8 @@
|
||||
<script src="/static/js/jquery.validate.min.js"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js?v=100"></script>
|
||||
|
||||
<script src="/static/js/vtoy.js?v=100"></script>
|
||||
<script src="/static/js/jquery.vtoy.alert.js?v=100"></script>
|
||||
<script src="/static/js/vtoy.js?v=100"></script>
|
||||
<script src="/static/js/md5.min.js"></script>
|
||||
|
||||
<!-- Bootstrap 3.3.5 -->
|
||||
@@ -760,6 +794,36 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function VtoyJsonCopyClick() {
|
||||
var copyText = document.getElementById("pre_json_preview");
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999); // For mobile devices
|
||||
|
||||
try {
|
||||
var successful = document.execCommand('copy');
|
||||
copyText.setSelectionRange(0, 0);
|
||||
if (successful) {
|
||||
Message.success(g_vtoy_cur_language.STR_JSON_COPY_SUCCESS);
|
||||
} else {
|
||||
Message.error(g_vtoy_cur_language.STR_JSON_COPY_FAILED);
|
||||
}
|
||||
} catch (err) {
|
||||
Message.error(g_vtoy_cur_language.STR_JSON_COPY_FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
function VtoyPreviewClick() {
|
||||
callVtoySync({
|
||||
method : 'preview_json'
|
||||
}, function(data) {
|
||||
$('#JsonPeviewForm #JsonPreviewForm_lang_1').text(g_vtoy_cur_language.STR_JSON_PREVIEW);
|
||||
$('#JsonPeviewForm #PrewForm_lang_2').text(g_vtoy_cur_language.STR_BTN_OK);
|
||||
|
||||
$('#pre_json_preview').text(atob(data.json));
|
||||
$("#JsonPreviewModal").modal();
|
||||
});
|
||||
}
|
||||
|
||||
function VtoyLanguageClick() {
|
||||
var defaultPage = window.location.hash;
|
||||
|
||||
@@ -791,6 +855,8 @@
|
||||
|
||||
});
|
||||
|
||||
$('#id_btn_json_copy').click(VtoyJsonCopyClick);
|
||||
$('#id_a_preview').click(VtoyPreviewClick);
|
||||
$('#id_a_language').click(VtoyLanguageClick);
|
||||
|
||||
$("#plugson-menu a").click(function() {
|
||||
@@ -846,9 +912,13 @@
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof(UpdateTabTitleIcon)==='function') {
|
||||
UpdateTabTitleIcon(data);
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
ventoy_handshake();
|
||||
}, 1000);
|
||||
}, 200);
|
||||
},
|
||||
|
||||
function(xmlHttpRequest, textStatus, errorThrown) {
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-desktop"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">x</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_autoinstall.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -543,7 +545,27 @@
|
||||
$('#id_tab_autoins a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_autoins a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_autoins a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_auto_install, '#id_tab_autoins a[href="#tab_', 'auto_install');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'auto_install')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'auto_install_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_autoins[current_tab_index].length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_autoins[g_vtoy_data_default_index]);
|
||||
Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_autoins a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_autoins[0]);
|
||||
VtoyPageLanguageChange(g_current_language);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-floppy-o"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title"></h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_automemdisk.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -172,7 +174,27 @@
|
||||
$('#id_tab_auto_memdisk a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_auto_memdisk a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_auto_memdisk a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_auto_memdisk, '#id_tab_auto_memdisk a[href="#tab_', 'auto_memdisk');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'auto_memdisk')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'auto_memdisk_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_memdisk[current_tab_index].length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_memdisk[g_vtoy_data_default_index]);
|
||||
Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_auto_memdisk a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_memdisk[0]);
|
||||
VtoyPageLanguageChange(g_current_language);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-retweet"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">菜单别名插件</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_bootconf_replace.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -268,7 +270,27 @@
|
||||
$('#id_tab_conf_replace a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_conf_replace a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_conf_replace a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_conf_replace, '#id_tab_conf_replace a[href="#tab_', 'conf_replace');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'conf_replace')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'conf_replace_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_conf_replace[current_tab_index].length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_conf_replace[g_vtoy_data_default_index]);
|
||||
Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_conf_replace a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_conf_replace[0]);
|
||||
VtoyPageLanguageChange(g_current_language);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-8" style="padding-top:8px;">
|
||||
<div class="col-sm-7" style="padding-top:8px;">
|
||||
<i class="fa fa-wrench"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">全局控制插件</h1>
|
||||
</div>
|
||||
@@ -10,6 +10,10 @@
|
||||
<button id="id_btn_expand" class="btn btn-sm btn-primary"><i style="font-size: 14px;" class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/cn/plugin_control.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -991,6 +995,7 @@
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
function VtoyPageLanguageChange(newlang) {
|
||||
VtoyCommonChangeLanguage(newlang);
|
||||
|
||||
@@ -1303,6 +1308,18 @@
|
||||
$('#id_tab_control a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_control a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_control a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_control, '#id_tab_control a[href="#tab_', 'control');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'control')}).on(function(e) {
|
||||
if (e) {
|
||||
VtoyFillCurrentPageItem(m_data_control[g_vtoy_data_default_index]);
|
||||
VtoySaveCurrentPage();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_control a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_control[0]);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="glyphicon glyphicon-cd"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">x</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_dud.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -355,7 +357,27 @@
|
||||
$('#id_tab_dud a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_dud a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_dud a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_dud, '#id_tab_dud a[href="#tab_', 'dud');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'dud')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'dud_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_dud[current_tab_index].length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_dud[g_vtoy_data_default_index]);
|
||||
Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_dud a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_dud[0]);
|
||||
VtoyPageLanguageChange(g_current_language);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-list-alt"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title"></h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_imagelist.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -262,7 +264,27 @@
|
||||
$('#id_tab_image_list a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_image_list a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_image_list a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_image_list, '#id_tab_image_list a[href="#tab_', 'image_list');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'image_list')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'image_list_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_imagelist[current_tab_index].list.length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_imagelist[g_vtoy_data_default_index]);
|
||||
VtoySaveCurrentPage();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_image_list a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_imagelist[0]);
|
||||
VtoyPageLanguageChange(g_current_language);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-plus-circle"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">x</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_injection.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -237,7 +239,27 @@
|
||||
$('#id_tab_injection a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_injection a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_injection a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_injection, '#id_tab_injection a[href="#tab_', 'injection');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'injection')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'injection_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_injection[current_tab_index].length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_injection[g_vtoy_data_default_index]);
|
||||
Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_injection a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_injection[0]);
|
||||
VtoyPageLanguageChange(g_current_language);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-clone"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">菜单别名插件</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_menualias.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -232,6 +234,27 @@
|
||||
$('#id_tab_menu_alias a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_menu_alias a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_menu_alias, '#id_tab_menu_alias a[href="#tab_', 'menu_alias');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'menu_alias')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'alias_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_alias[current_tab_index].length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_alias[g_vtoy_data_default_index]);
|
||||
Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_menu_alias a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_alias[0]);
|
||||
VtoyPageLanguageChange(g_current_language);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-list-ul"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">xx</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_menuclass.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -270,6 +272,26 @@
|
||||
$('#id_tab_menu_class a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_menu_class a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_menu_class a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_menu_class, '#id_tab_menu_class a[href="#tab_', 'menu_class');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'menu_class')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'class_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_class[current_tab_index].length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_class[g_vtoy_data_default_index]);
|
||||
Message.success(g_vtoy_cur_language.STR_SAVE_SUCCESS);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_menu_class a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_class[0]);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-commenting"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title"></h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_menutip.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -373,6 +375,30 @@
|
||||
$('#id_tab_menu_tip a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_menu_tip a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_menu_tip, '#id_tab_menu_tip a[href="#tab_', 'menu_tip');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'menu_tip')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'tip_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_tip[current_tab_index].left = m_data_tip[g_vtoy_data_default_index].left;
|
||||
m_data_tip[current_tab_index].top = m_data_tip[g_vtoy_data_default_index].top;
|
||||
m_data_tip[current_tab_index].color = m_data_tip[g_vtoy_data_default_index].color;
|
||||
m_data_tip[current_tab_index].tips.length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_tip[g_vtoy_data_default_index]);
|
||||
VtoySaveCurrentPage();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_menu_tip a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_tip[0]);
|
||||
VtoyPageLanguageChange(g_current_language);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="glyphicon glyphicon-lock"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title"></h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_password.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -234,7 +236,7 @@
|
||||
}
|
||||
|
||||
current_tab_index = index;
|
||||
VtoyFillCurrentPageItem(m_data_pwd[index].tips);
|
||||
VtoyFillCurrentPageItem(m_data_pwd[index]);
|
||||
}
|
||||
|
||||
function VtoyGetCurrentPageItem(data) {
|
||||
@@ -557,6 +559,27 @@ function VtoySetPassword(common, type, cb, data) {
|
||||
$('#id_tab_password a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_password a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_password, '#id_tab_password a[href="#tab_', 'password');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'password')}).on(function(e) {
|
||||
if (e) {
|
||||
callVtoySync({
|
||||
method : 'password_del',
|
||||
index: current_tab_index,
|
||||
path: g_del_all_path
|
||||
}, function(data) {
|
||||
|
||||
});
|
||||
|
||||
m_data_pwd[current_tab_index].list.length = 0;
|
||||
VtoyFillCurrentPageItem(m_data_pwd[g_vtoy_data_default_index]);
|
||||
VtoySaveCurrentPage();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_tab_password a[href="#tab_0"]').tab('show');
|
||||
VtoyFillCurrentPageItem(m_data_pwd[0]);
|
||||
VtoyPageLanguageChange(g_current_language);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-database"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">x</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<a id="id_a_official_doc" target="_blank" href="https://www.ventoy.net/en/plugin_persistence.html"><span class="fa fa-link"></span><span id="id_span_official_doc">官网文档</span></a>
|
||||
</div>
|
||||
@@ -510,7 +512,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);
|
||||
|
@@ -1,10 +1,12 @@
|
||||
<div class="box box-primary" id="control">
|
||||
<div class="box-header">
|
||||
<div class="col-sm-10" style="padding-top:8px;">
|
||||
<div class="col-sm-9" style="padding-top:8px;">
|
||||
<i class="fa fa-file-image-o"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">主题插件</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-1" style="padding-top:2px;">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-sm-2" style="font-size:16px;padding-top:8px;">
|
||||
<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>
|
||||
</div>
|
||||
@@ -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);
|
||||
|
@@ -288,71 +288,6 @@ String.prototype.endsWith = function(str) {
|
||||
return false;
|
||||
}
|
||||
|
||||
window.Message = function() {
|
||||
var _showMsg = function(type, msg, time) {
|
||||
var o = {type : type, msg : msg };
|
||||
if(time) {
|
||||
o.time = time;
|
||||
}
|
||||
_show(o);
|
||||
}
|
||||
|
||||
var _show = function(options) {
|
||||
var ops = {
|
||||
msg : "提示内容",
|
||||
type: 'S',
|
||||
time: 3000
|
||||
};
|
||||
$.extend(ops, options);
|
||||
|
||||
var msg_class = 'alert-success';
|
||||
if('S' === ops.type || 's' === ops.type) {
|
||||
msg_class = 'alert-success';
|
||||
} else if ('E' === ops.type || 'e' === ops.type) {
|
||||
msg_class = 'alert-danger';
|
||||
} else if ('W' === ops.type || 'w' === ops.type) {
|
||||
msg_class = 'alert-warning';
|
||||
} else if ('I' === ops.type || 'i' === ops.type) {
|
||||
msg_class = 'alert-info';
|
||||
} else {
|
||||
alert("未知的类型,请使用: w-警告;s-成功;e-失败;i-提示");
|
||||
return;
|
||||
}
|
||||
var $messageContainer = $("#fcss_message");
|
||||
if($messageContainer.length === 0) {
|
||||
$messageContainer = $('<div id="fcss_message" style="position:fixed; left: 20%; right: 20%; top:0px; z-index:99999999"></div>');
|
||||
$messageContainer.appendTo($('body'));
|
||||
}
|
||||
var $div = $('<div class="alert ' + msg_class + ' alert-dismissible fade in" role="alert" style="margin-bottom: 0; padding-top:10px; padding-bottom: 10px;"></div>');
|
||||
var $btn = $('<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>');
|
||||
$div.append($btn).append(ops.msg).appendTo($messageContainer);
|
||||
setTimeout(function() {
|
||||
$div.remove();
|
||||
}, ops.time);
|
||||
}
|
||||
|
||||
var _success = function(msg, time) {
|
||||
_showMsg('s', msg, time);
|
||||
}
|
||||
var _error = function(msg, time) {
|
||||
_showMsg('e', msg, time || 5000);
|
||||
}
|
||||
var _warn = function(msg, time) {
|
||||
_showMsg('w', msg, time);
|
||||
}
|
||||
var _info = function(msg, time) {
|
||||
_showMsg('i', msg, time);
|
||||
}
|
||||
|
||||
return {
|
||||
success : _success,
|
||||
error : _error,
|
||||
warn : _warn,
|
||||
info : _info,
|
||||
show : _show
|
||||
}
|
||||
}();
|
||||
|
||||
|
||||
var g_vtoy_cur_language_en =
|
||||
{
|
||||
@@ -376,6 +311,7 @@ var g_vtoy_cur_language_en =
|
||||
"STR_OPT_SETTING": "Option Setting",
|
||||
"STR_OPT_DESC": "Option Description",
|
||||
"STR_EDIT": "Edit",
|
||||
"STR_RESET": "Reset",
|
||||
"STR_FILE": "File",
|
||||
"STR_DIR": "Dir",
|
||||
"STR_SAVE_TIP": "Data in current page has been modified. Do you want to save it?",
|
||||
@@ -489,6 +425,10 @@ var g_vtoy_cur_language_en =
|
||||
"STR_INVALID_CONFIG_TIP": "Invalid configuration detected in ventoy.json, so the configuration is not loaded!",
|
||||
"STR_CONFIG_SAVE_ERROR_TIP": "Failed to write ventoy.json file. Check VentoyPlugson.log for more details!",
|
||||
|
||||
"STR_JSON_PREVIEW": "JSON Preview",
|
||||
"STR_JSON_COPY_SUCCESS": "JSON Copy Success",
|
||||
"STR_JSON_COPY_FAILED": "JSON Copy Failed",
|
||||
|
||||
"STR_XXX": "xxx"
|
||||
};
|
||||
|
||||
@@ -514,6 +454,7 @@ var g_vtoy_cur_language_cn =
|
||||
"STR_OPT_SETTING": "选项设置",
|
||||
"STR_OPT_DESC": "选项说明",
|
||||
"STR_EDIT": "设置",
|
||||
"STR_RESET": "重置",
|
||||
"STR_FILE": "文件",
|
||||
"STR_DIR": "目录",
|
||||
"STR_SAVE_TIP": "当前页面数据已经修改,是否保存?",
|
||||
@@ -625,6 +566,9 @@ var g_vtoy_cur_language_cn =
|
||||
"STR_INVALID_CONFIG_TIP": "ventoy.json 文件中存在错误配置,配置未加载!",
|
||||
"STR_CONFIG_SAVE_ERROR_TIP": "ventoy.json 文件写入失败,详细信息请参考 VentoyPlugson.log 文件!",
|
||||
|
||||
"STR_JSON_PREVIEW": "JSON 预览",
|
||||
"STR_JSON_COPY_SUCCESS": "JSON 内容复制成功",
|
||||
"STR_JSON_COPY_FAILED": "JSON 内容复制失败",
|
||||
|
||||
"STR_XXX": "xxx"
|
||||
};
|
||||
@@ -635,12 +579,45 @@ var g_current_language = 'cn';
|
||||
var g_vtoy_cur_language = g_vtoy_cur_language_cn;
|
||||
var g_vtoy_data_default_index = 6;
|
||||
|
||||
var g_bios_postfix = [ "", "_legacy", "_uefi", "_ia32", "_aa64", "_mips" ];
|
||||
var g_del_all_path = '4119ae33-98ea-448e-b9c0-569aafcf1fb4';
|
||||
var g_file_with_extra = false;
|
||||
var g_dir_with_extra = false;
|
||||
var g_file_fuzzy_match = 0;
|
||||
var g_file_modal_callback;
|
||||
var g_dir_modal_callback;
|
||||
|
||||
function GetResetTabConfigTipMsg(index, name) {
|
||||
var msgstr;
|
||||
|
||||
if (g_current_language === 'en') {
|
||||
msgstr = 'Are you sure to reset all the configurations on the <code>' + name + g_bios_postfix[index] + '</code> tab ?';
|
||||
} else {
|
||||
msgstr = '确认要重置 <code>' + name + g_bios_postfix[index] + '</code> 标签页下的所有配置?';
|
||||
}
|
||||
|
||||
return msgstr;
|
||||
}
|
||||
|
||||
function CommonUpdateTabTitleIcon(exists, id, name) {
|
||||
var exspan = " <span id='tab_0_icon' class='fa fa-circle' style='color:red;'></span>";
|
||||
for (var i = 0; i < g_vtoy_data_default_index; i++) {
|
||||
var fid = id + i + '"]';
|
||||
var oldhtml = $(fid).html();
|
||||
var newhtml;
|
||||
|
||||
if (exists[i]) {
|
||||
newhtml = name + g_bios_postfix[i] + exspan;
|
||||
} else {
|
||||
newhtml = name + g_bios_postfix[i];
|
||||
}
|
||||
|
||||
if (newhtml != oldhtml) {
|
||||
$(fid).html(newhtml);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ventoy_file_submit(form, extra) {
|
||||
var filepath = $("#FilePath").val();
|
||||
var fileextra = $("#FileExtra").val();
|
||||
@@ -920,6 +897,8 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
$(this).text(" Plugin Official Document");
|
||||
});
|
||||
|
||||
$('#id_span_copy').text("Copy");
|
||||
$('#id_span_preview').text("Preview");
|
||||
$('#id_span_language').text("中文");
|
||||
|
||||
$("tr[id=tr_title_desc_cn]").each(function(){
|
||||
@@ -966,6 +945,8 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
$(this).text(" 插件官网文档");
|
||||
});
|
||||
|
||||
$('#id_span_copy').text("复制");
|
||||
$('#id_span_preview').text("预览");
|
||||
$('#id_span_language').text("English");
|
||||
|
||||
$("tr[id=tr_title_desc_cn]").each(function(){
|
||||
@@ -1002,7 +983,10 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
$('#id_span_save').text(g_vtoy_cur_language.STR_SAVE);
|
||||
$('#id_span_reset').text(g_vtoy_cur_language.STR_RESET);
|
||||
$('#id_span_donation').text(g_vtoy_cur_language.STR_PLUG_DONATION);
|
||||
|
||||
|
||||
$('span[id=id_btn_span_reset]').each(function(){
|
||||
$(this).text(' ' + g_vtoy_cur_language.STR_RESET);
|
||||
});
|
||||
$("span[id=id_span_btn_add]").each(function(){
|
||||
$(this).text(g_vtoy_cur_language.STR_ADD);
|
||||
});
|
||||
|
Reference in New Issue
Block a user