안심번호 팝업 중앙정렬 및 기존 크기 오류 해결
This commit is contained in:
parent
cb88d2c1ec
commit
fc29e38eb6
@ -3195,23 +3195,55 @@ function fnMyMsgAdd(msgId){
|
|||||||
//fnLetterListAjax();
|
//fnLetterListAjax();
|
||||||
|
|
||||||
/* 윈도우팝업 열기 */
|
/* 윈도우팝업 열기 */
|
||||||
|
/* 윈도우팝업 열기 */
|
||||||
|
var infoPopT; // 전역 변수로 선언하여 팝업 추적
|
||||||
|
|
||||||
function infoPop(pageUrl) {
|
function infoPop(pageUrl) {
|
||||||
|
// 기존 팝업이 존재하면 닫기
|
||||||
|
if (infoPopT && !infoPopT.closed) {
|
||||||
|
infoPopT.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 기본값 설정
|
||||||
|
let width = 790, height = 350;
|
||||||
|
|
||||||
|
if (pageUrl === "adrvertisement1") {
|
||||||
|
width = 790;
|
||||||
|
height = 800;
|
||||||
|
} else if (pageUrl === "selectMsgDataView3") {
|
||||||
|
width = 500;
|
||||||
|
height = 550;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔥 현재 브라우저 창 크기 가져오기
|
||||||
|
let screenWidth = window.innerWidth || document.documentElement.clientWidth || screen.width;
|
||||||
|
let screenHeight = window.innerHeight || document.documentElement.clientHeight || screen.height;
|
||||||
|
|
||||||
|
// 💡 팝업을 브라우저 창 중앙에 위치시키기 위해 `top`, `left` 계산
|
||||||
|
let left = (screenWidth - width) / 2 + window.screenX;
|
||||||
|
let top = (screenHeight - height) / 2 + window.screenY;
|
||||||
|
|
||||||
|
// 📝 옵션 문자열 (정확한 중앙 정렬 적용)
|
||||||
|
let options = "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left +
|
||||||
|
",fullscreen=no,menubar=no,status=no,toolbar=no,titlebar=yes,location=no,scrollbars=1";
|
||||||
|
|
||||||
|
console.log('팝업 옵션 : ', options);
|
||||||
|
|
||||||
|
// 🔥 window.open() 호출
|
||||||
|
infoPopT = window.open("", 'infoPop', options);
|
||||||
|
|
||||||
|
// 🔄 폼 데이터 설정 및 제출
|
||||||
document.popForm.pageType.value = pageUrl;
|
document.popForm.pageType.value = pageUrl;
|
||||||
document.popForm.action = "/web/pop/infoPop.do";
|
document.popForm.action = "/web/pop/infoPop.do";
|
||||||
document.popForm.method = "post";
|
document.popForm.method = "post";
|
||||||
if(pageUrl == "adrvertisement1"){
|
|
||||||
window.open("about:blank", 'infoPop', 'width=790, height=800, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=1');
|
|
||||||
}else if(pageUrl == "selectMsgDataView3"){
|
|
||||||
window.open("about:blank", 'infoPop', 'width=500, height=550, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=1');
|
|
||||||
}else{
|
|
||||||
window.open("about:blank", 'infoPop', 'width=790, height=350, top=100, left=100, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbars=1');
|
|
||||||
}
|
|
||||||
|
|
||||||
document.popForm.target = "infoPop";
|
document.popForm.target = "infoPop";
|
||||||
document.popForm.submit();
|
document.popForm.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(document).on('click', '.addressregi_btn', function() {
|
$(document).on('click', '.addressregi_btn', function() {
|
||||||
var tableData = tableL.getRows();
|
var tableData = tableL.getRows();
|
||||||
var dataLen = tableL.getRows().length;
|
var dataLen = tableL.getRows().length;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user