- URL 하드코딩 → .env APP_URL 기반 동적 URL로 변경 - DB 연결 하드코딩 → .env 기반으로 변경 - MySQL strict mode DATE 오류 수정
50 lines
1.5 KiB
PHP
50 lines
1.5 KiB
PHP
<script>
|
|
var ajaxRequest_write = null;
|
|
var ajaxRequest = null;
|
|
var ajaxRequest5 = null;
|
|
var ajaxRequest6 = null;
|
|
var ajaxRequest7 = null;
|
|
var isDisplaying = false;
|
|
|
|
$(document).ready(function(){
|
|
var loader = document.getElementById('loadingOverlay');
|
|
loader.style.display = 'none';
|
|
});
|
|
|
|
function generatePDF() {
|
|
var workplace = '<?php echo $title_message; ?>';
|
|
var today = new Date();
|
|
var formattedDate = "(" + String(today.getFullYear()).slice(-2) + "." + ("0" + (today.getMonth() + 1)).slice(-2) + "." + ("0" + today.getDate()).slice(-2) + ")";
|
|
var result = 'KD(' + workplace +')' + formattedDate + '.pdf';
|
|
|
|
var element = document.getElementById('content-to-print');
|
|
var opt = {
|
|
margin: [10, 3, 12, 3], // Top, right, bottom, left margins
|
|
filename: result,
|
|
image: { type: 'jpeg', quality: 0.98 },
|
|
html2canvas: { scale: 1 },
|
|
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' },
|
|
pagebreak: { mode: [''] }
|
|
};
|
|
html2pdf().from(element).set(opt).save();
|
|
}
|
|
|
|
function captureReturnKey(e) {
|
|
if(e.keyCode==13 && e.srcElement.type != 'textarea')
|
|
return false;
|
|
}
|
|
|
|
function recaptureReturnKey(e) {
|
|
if(e.keyCode==13 && e.srcElement.type != 'textarea')
|
|
return false;
|
|
}
|
|
|
|
|
|
// 부트스트랩 툴팁
|
|
$(document).ready(function() {
|
|
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
|
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|
return new bootstrap.Tooltip(tooltipTriggerEl);
|
|
});
|
|
});
|
|
</script> |