Add select all button in exec commands panel.

This commit is contained in:
邱博亞 2022-12-19 13:57:34 +08:00
parent ace95e8b72
commit 202d6f11d7
3 changed files with 11 additions and 1 deletions

View File

@ -92,6 +92,12 @@
$('#super_manager_div').hide() $('#super_manager_div').hide()
} }
}); });
$(document).on("click", ".select_all_server_name_checkbox", function(){
$('.server_name_checkbox').prop('checked', true);
});
$(document).on("click", ".deselect_all_server_name_checkbox", function(){
$('.server_name_checkbox').prop('checked', false);
});
var close_info = false; var close_info = false;
var timeout_id; var timeout_id;
var status_relation = {"starting":"<span style=\"color: skyblue;\">starting</span>","execing":"<span style=\"color: skyblue;\">execing</span>","detecting":"<span style=\"color: skyblue;\">detecting</span>","error":"<span style=\"color: red;\">error</span>","finish": "<span style=\"color: darkseagreen;\">finish</span>","closed":"<span style=\"color: red;\">closed</span>"}; var status_relation = {"starting":"<span style=\"color: skyblue;\">starting</span>","execing":"<span style=\"color: skyblue;\">execing</span>","detecting":"<span style=\"color: skyblue;\">detecting</span>","error":"<span style=\"color: red;\">error</span>","finish": "<span style=\"color: darkseagreen;\">finish</span>","closed":"<span style=\"color: red;\">closed</span>"};
@ -127,7 +133,7 @@
}); });
$("#server_names_block").html($.map(server_names,function(server_name){ $("#server_names_block").html($.map(server_names,function(server_name){
return "<input style='float: left;' class='server_name_checkbox' type='checkbox' id='server_name_"+server_name+"'><label style='float: left;' for='server_name_"+server_name+"'>"+server_name+"</label>" return "<input style='float: left;' class='server_name_checkbox' type='checkbox' id='server_name_"+server_name+"'><label style='float: left;' for='server_name_"+server_name+"'>"+server_name+"</label>"
})) }) + "<div style='clear: both;'></div><a class=\"btn btn-small select_all_server_name_checkbox\"><%=t('client_management.select_all')%></a><a class=\"btn btn-small deselect_all_server_name_checkbox\"><%=t('client_management.deselect_all')%></a>");
} }
function exec_commands(){ function exec_commands(){
var commands = ""; var commands = "";

View File

@ -7,6 +7,8 @@ en:
upload_cert: Upload Cert upload_cert: Upload Cert
cert_management: Cert Management cert_management: Cert Management
client_management: client_management:
select_all: "Select All"
deselect_all: "Deselect All"
get_template: "Get Template" get_template: "Get Template"
finished_reload_page: "Finished!\\nReload Page!" finished_reload_page: "Finished!\\nReload Page!"
apply_change: "Apply Change" apply_change: "Apply Change"

View File

@ -7,6 +7,8 @@ zh_tw:
upload_cert: 上傳憑證 upload_cert: 上傳憑證
cert_management: 憑證管理 cert_management: 憑證管理
client_management: client_management:
select_all: "全選"
deselect_all: "取消全選"
get_template: "獲取版型" get_template: "獲取版型"
finished_reload_page: "已完成!\\n重新載入頁面!" finished_reload_page: "已完成!\\n重新載入頁面!"
apply_change: "設定生效" apply_change: "設定生效"