From eb401eaf64210bdd33fe2c62cbfe3d9ae42f83aa Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Tue, 13 Jun 2023 09:11:05 +0900 Subject: [PATCH] no message --- .../webapp/WEB-INF/jsp/include/bottom.jsp | 3 +- .../js/base/menu-support-fims-innerPage.js | 145 ------------------ 2 files changed, 2 insertions(+), 146 deletions(-) delete mode 100644 src/main/webapp/resources/js/base/menu-support-fims-innerPage.js diff --git a/src/main/webapp/WEB-INF/jsp/include/bottom.jsp b/src/main/webapp/WEB-INF/jsp/include/bottom.jsp index 3e0b15af..50c282e9 100644 --- a/src/main/webapp/WEB-INF/jsp/include/bottom.jsp +++ b/src/main/webapp/WEB-INF/jsp/include/bottom.jsp @@ -5,8 +5,9 @@
© + , made with XIT Base by (주)엑스아이티 diff --git a/src/main/webapp/resources/js/base/menu-support-fims-innerPage.js b/src/main/webapp/resources/js/base/menu-support-fims-innerPage.js deleted file mode 100644 index 6143417e..00000000 --- a/src/main/webapp/resources/js/base/menu-support-fims-innerPage.js +++ /dev/null @@ -1,145 +0,0 @@ -/************************************************************************** - * Global Variable - ***************************************************************************/ -const innerPageMap = {}, - openMax = 8; - -function openMenu(obj, params) { - - let menuUrl = $(obj)[0].dataset.url; - if(menuUrl == "javascript:void(0);"){ - return; - } - - let menuNm = $(obj).find("div")[0].dataset.i18n; - - let dataKey = $(obj).parent()[0].dataset.key; - - - - const OPEN_TAB_CNT = $('div#tabsForInnerPage > ul > li').length; - - if(innerPageMap[dataKey]){ - // 해당 tab 활성화 - $("#tabsForInnerPage").find("ul li button.nav-link").each((idx, data) => { - if(data.dataset.bsTarget == ("#tab-"+dataKey)) { - $(data).trigger("click"); - } - }); - - let innerPageObj = document.getElementById("div"+dataKey); - return innerPageObj; - } - if(OPEN_TAB_CNT === openMax){ - alert(`메뉴는 최대 ${openMax -1}까지만 열 수 있습니다.`) - return null; - } - - const num_tabs = OPEN_TAB_CNT + 1; - - - let liEl = ''; - $('div#tabsForInnerPage ul').append(liEl); - - $('div#ifrTabContents').append('
'); - - - if(params != null){ - menuUrl = menuUrl + params; - } - - let dynamicPage = document.createElement("div"); - dynamicPage.setAttribute("id","div"+dataKey); - dynamicPage.setAttribute("name","div"+dataKey); - dynamicPage.setAttribute("title",menuNm); - - // .attr("frameborder" , "0") - // .attr("scrolling" , "no") - // .attr("width" , "100%") - // .css("border" , "0") - // .css("height" , "100%") - // .css("min-height" , "800px") - // .css("overflow" , "auto") - // .css("overflow-x" , "no") - ; - - $("#formForInnerPage").remove(); - - - $("#tab-" + dataKey)[0].appendChild(dynamicPage); - - - innerPageMap[dataKey] = dynamicPage; - - - ajax.request({ - type:"POST", - url:menuUrl, - data:{}, - success:resp => { - - var cw = resp.split("")[1]; - var pb = cw.split("")[1]; - - var scriptAterTail1 = resp.split("")[1]; - var scriptAterTail2 = resp.split("//script after tail2")[1]; - $("#div"+dataKey).html(pb + " " + scriptAterTail1 + " " + ""); - } - }); - - - - $("div#tabsForInnerPage ul li button.nav-link").last().trigger("click"); - -} - -function closeTab(menuId) { - if(menuId === 'main' || menuId?.id === 'main') return; - const num_tabs = $('div#tabsForInnerPage ul li').length; - - // click한 tab - const selIdx = id2Index("div#tabsForInnerPage","tab-"+menuId); - - // active tab - let activeTab = $('div#tabsForInnerPage ul li button.nav-link').filter(".active"); - - let activeIdx = $('div#tabsForInnerPage ul li button.nav-link').index(activeTab); - - if(selIdx === activeIdx) { - if (num_tabs - 1 > activeIdx) { - $('div#tabsForInnerPage ul li button.nav-link').eq(activeIdx + 1).trigger("click"); - } else { - $('div#tabsForInnerPage ul li button.nav-link').eq(activeIdx - 1).trigger("click"); - } - } - - document.getElementById("div"+menuId).remove(); - delete innerPageMap[menuId]; - - $("#tab-" + activeIdx).remove(); - $('#tabsForInnerPage').find('#li-'+menuId).remove(); -} - -function id2Index(tabsId, srcId) { - let index = -1; - const nls = $(tabsId).find("li > button.nav-link"); - if(nls.length > 0) { - - nls.each((idx, nl) => { - if (nl.dataset.bsTarget.search(srcId) > 0) { - index = idx; - return false; - } - }); - } - return index; -}