no message

main
이범준 1 year ago
parent 9196ea1a52
commit fb934a77b8

@ -21,7 +21,7 @@
</ul> </ul>
</aside> </aside>
<script src="<c:url value="/resources/js/base/menu-support-fims.js" />"></script> <script src="<c:url value="/resources/js/base/menu-support-fims.js" />"></script>
<script src="<c:url value="/resources/js/base/menu-support-fims-ifrTabs.js" />"></script> <script src="<c:url value="/resources/js/base/menu-support-fims-innerPage.js" />"></script>
<!-- / Menu --> <!-- / Menu -->
<c:set var="userMenus" scope="request">let userMenus = ${userMenus}; <c:set var="userMenus" scope="request">let userMenus = ${userMenus};
<%--if (menus.length < 1) <%--if (menus.length < 1)

@ -8,7 +8,7 @@
<div class="layout-page"> <div class="layout-page">
<jsp:include page="/WEB-INF/jsp/include/top.jsp" /> <jsp:include page="/WEB-INF/jsp/include/top.jsp" />
<div id="ifrTabs" class="nav-align-top mt-3"> <div id="tabsForInnerPage" class="nav-align-top mt-3">
<ul class="nav nav-tabs nav-tabs-ifr"></ul> <ul class="nav nav-tabs nav-tabs-ifr"></ul>
</div> </div>
<div id="ifrTabContents" class="tab-content"></div> <div id="ifrTabContents" class="tab-content"></div>

@ -28,7 +28,7 @@
<%@include file="/WEB-INF/jsp/include/fims/tail-biz.jsp" %> <%@include file="/WEB-INF/jsp/include/fims/tail-biz.jsp" %>
<!-- iframe탭 --> <!-- iframe탭 -->
<script src="/resources/js/base/menu-support-fims-ifrTabs.js"></script> <script src="/resources/js/base/menu-support-fims-innerPage.js"></script>
<!-- 계정정보 화면 오픈 --> <!-- 계정정보 화면 오픈 -->
<script src="${pageContext.request.contextPath}/resources/js/fims/biz/layout/myView.js"></script> <script src="${pageContext.request.contextPath}/resources/js/fims/biz/layout/myView.js"></script>

@ -17,11 +17,11 @@ function openMenu(obj, params) {
const OPEN_TAB_CNT = $('div#ifrTabs > ul > li').length; const OPEN_TAB_CNT = $('div#tabsForInnerPage > ul > li').length;
if(innerPageMap[dataKey]){ if(innerPageMap[dataKey]){
// 해당 tab 활성화 // 해당 tab 활성화
$("#ifrTabs").find("ul li button.nav-link").each((idx, data) => { $("#tabsForInnerPage").find("ul li button.nav-link").each((idx, data) => {
if(data.dataset.bsTarget == ("#tab-"+dataKey)) { if(data.dataset.bsTarget == ("#tab-"+dataKey)) {
$(data).trigger("click"); $(data).trigger("click");
} }
@ -48,7 +48,7 @@ function openMenu(obj, params) {
liEl += '<button type="button" title="닫기" class="btn btn-close" onclick="closeTab('+ dataKey + ')"></button>' liEl += '<button type="button" title="닫기" class="btn btn-close" onclick="closeTab('+ dataKey + ')"></button>'
} }
liEl += '</li>'; liEl += '</li>';
$('div#ifrTabs ul').append(liEl); $('div#tabsForInnerPage ul').append(liEl);
$('div#ifrTabContents').append('<div id="tab-' + dataKey + '" class="tab-pane"></div>'); $('div#ifrTabContents').append('<div id="tab-' + dataKey + '" class="tab-pane"></div>');
@ -77,7 +77,7 @@ function openMenu(obj, params) {
innerPageMap[dataKey] = $dynamicPage; innerPageMap[dataKey] = $dynamicPage;
$("div#ifrTabs ul li button.nav-link").last().trigger("click"); $("div#tabsForInnerPage ul li button.nav-link").last().trigger("click");
let dynamicPageObj = document.getElementById(dataKey); let dynamicPageObj = document.getElementById(dataKey);
return dynamicPageObj; return dynamicPageObj;
@ -85,21 +85,21 @@ function openMenu(obj, params) {
function closeTab(menuId) { function closeTab(menuId) {
if(menuId === 'main' || menuId?.id === 'main') return; if(menuId === 'main' || menuId?.id === 'main') return;
const num_tabs = $('div#ifrTabs ul li').length; const num_tabs = $('div#tabsForInnerPage ul li').length;
// click한 tab // click한 tab
const selIdx = id2Index("div#ifrTabs","tab-"+menuId); const selIdx = id2Index("div#tabsForInnerPage","tab-"+menuId);
// active tab // active tab
let activeTab = $('div#ifrTabs ul li button.nav-link').filter(".active"); let activeTab = $('div#tabsForInnerPage ul li button.nav-link').filter(".active");
let activeIdx = $('div#ifrTabs ul li button.nav-link').index(activeTab); let activeIdx = $('div#tabsForInnerPage ul li button.nav-link').index(activeTab);
if(selIdx === activeIdx) { if(selIdx === activeIdx) {
if (num_tabs - 1 > activeIdx) { if (num_tabs - 1 > activeIdx) {
$('div#ifrTabs ul li button.nav-link').eq(activeIdx + 1).trigger("click"); $('div#tabsForInnerPage ul li button.nav-link').eq(activeIdx + 1).trigger("click");
} else { } else {
$('div#ifrTabs ul li button.nav-link').eq(activeIdx - 1).trigger("click"); $('div#tabsForInnerPage ul li button.nav-link').eq(activeIdx - 1).trigger("click");
} }
} }
@ -107,7 +107,7 @@ function closeTab(menuId) {
delete innerPageMap[menuId]; delete innerPageMap[menuId];
$("#tab-" + activeIdx).remove(); $("#tab-" + activeIdx).remove();
$('#ifrTabs').find('#li-'+menuId).remove(); $('#tabsForInnerPage').find('#li-'+menuId).remove();
} }
function id2Index(tabsId, srcId) { function id2Index(tabsId, srcId) {
Loading…
Cancel
Save