fix: biz tab close 반영

main
Jonguk. Lim 2 years ago
parent 5abe9c8916
commit add52d0a1d

@ -86,6 +86,7 @@
<script defer src="${pageContext.request.contextPath}/resources/biz/common/js/contentTabs.js"></script>
<script defer type="text/javascript">
//document.domain = "xit.com";
$(document).ready(() => {
$('#ifrTabs').tabs({

@ -1,10 +1,7 @@
/**************************************************************************
* Global Variable
***************************************************************************/
const menuTab = null,
menuScrollable = null,
iframeMap = {},
menuTabScrollable = null
const iframeMap = {},
openMax = 6;
function openMenu(menuId, menuNm, menuUrl) {
@ -54,11 +51,8 @@ function openMenu(menuId, menuNm, menuUrl) {
;
//$("#content").append($iframe);
//$("#ifrTabs").tabs('option', 'active');
$("#tab-" + menuId).append($iframe);
iframeMap[menuId] = $iframe;
}
@ -66,8 +60,6 @@ function closeTab(menuId, selTab) {
if(menuId === 'main' || menuId?.id === 'main') return;
const num_tabs = $('div#ifrTabs ul li.tab').length;
const iframe = iframeMap[menuId];
let activeTab = $("#ifrTabs").tabs('option', 'active');
if(num_tabs - 1 > activeTab){
@ -76,12 +68,10 @@ function closeTab(menuId, selTab) {
$('#ifrTabs').tabs({active: activeTab - 1})
}
iframeMap[menuId].remove();
delete iframeMap[menuId];
$("#tab-" + activeTab).remove();
$('#ifrTabs').find('#li-'+menuId).remove();
$('#ifrTabs').tabs("refresh");
}

Loading…
Cancel
Save