헤더복사 수정
eapim-admin CI / build (push) Has been cancelled

This commit is contained in:
eastargh
2026-08-18 13:52:10 +09:00
parent ca9c3240bf
commit eb5e289a4e
@@ -802,6 +802,35 @@ $(document).ready(function() {
$("html, hbody").css("overflow-x","scroll");
}
function copyTextToClipboard(text, successMessage){
if (typeof(navigator.clipboard) == 'undefined'){
var textArea = document.createElement("textarea");
textArea.value = text;
textArea.style.position = "fixed";
document.body.appendChild(textArea);
textArea.focus();
textArea.select();
var successful = false;
try{
successful = document.execCommand('copy');
}catch(err){
}
document.body.removeChild(textArea);
if (successful){
alert(successMessage);
}else{
prompt("Ctrl+C 를 눌러 클립보드로 복사하세요.", text);
}
}else{
navigator.clipboard.writeText(text).then(function(){
alert(successMessage);
}).catch(function(){
prompt("클립보드 복사에 실패했습니다. Ctrl+C 를 눌러 복사하세요.", text);
});
}
}
$('#headerToClipboard').click(function(){
if($('#grid1').get(0) == null || $('#grid1').get(0).jexcel == null){
return;
@@ -813,13 +842,11 @@ $(document).ready(function() {
paddedValues += row[5].padEnd(row[4], " ");
}
navigator.clipboard.writeText(paddedValues);//클립보드로 복사
alert('헤더값이 복사되었습니다.')
copyTextToClipboard(paddedValues, '헤더값이 복사되었습니다.');
});
$('#messageToClipboard').click(function() {
navigator.clipboard.writeText(fullMessageData);//클립보드로 복사
alert('전체 전문 복사되었습니다.')
copyTextToClipboard(fullMessageData, '전체 전문 복사되었습니다.');
});
$('#btn_pretty_print').click(function () {