no message

main
이범준 1 year ago
parent 86e7af4778
commit 9196ea1a52

@ -1,7 +1,7 @@
/**************************************************************************
* Global Variable
***************************************************************************/
const iframeMap = {},
const innerPageMap = {},
openMax = 8;
function openMenu(obj, params) {
@ -19,7 +19,7 @@ function openMenu(obj, params) {
const OPEN_TAB_CNT = $('div#ifrTabs > ul > li').length;
if(iframeMap[dataKey]){
if(innerPageMap[dataKey]){
// 해당 tab 활성화
$("#ifrTabs").find("ul li button.nav-link").each((idx, data) => {
if(data.dataset.bsTarget == ("#tab-"+dataKey)) {
@ -56,8 +56,8 @@ function openMenu(obj, params) {
if(params != null){
menuUrl = menuUrl + params;
}
const $iframe = $("<iframe></iframe>");
$iframe.attr("id" , dataKey)
const $dynamicPage = $("<div></div>");
$dynamicPage.attr("id" , dataKey)
.attr("name" , menuNm)
.attr("title" , menuNm)
.attr("frameborder" , "0")
@ -73,14 +73,14 @@ function openMenu(obj, params) {
;
$("#tab-" + dataKey).append($iframe);
$("#tab-" + dataKey).append($dynamicPage);
iframeMap[dataKey] = $iframe;
innerPageMap[dataKey] = $dynamicPage;
$("div#ifrTabs ul li button.nav-link").last().trigger("click");
let iframeObj = document.getElementById(dataKey);
return iframeObj;
let dynamicPageObj = document.getElementById(dataKey);
return dynamicPageObj;
}
function closeTab(menuId) {
@ -103,8 +103,8 @@ function closeTab(menuId) {
}
}
iframeMap[menuId].remove();
delete iframeMap[menuId];
innerPageMap[menuId].remove();
delete innerPageMap[menuId];
$("#tab-" + activeIdx).remove();
$('#ifrTabs').find('#li-'+menuId).remove();

Loading…
Cancel
Save