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