메뉴 탭 닫기 함수 수정

main
이범준 11 months ago
parent f08ebaf191
commit 7e3075bcde

@ -163,7 +163,7 @@ function closeTab(menuId) {
let activeTab = $('div#tabsForInnerPage ul li button.nav-link').filter(".active"); let activeTab = $('div#tabsForInnerPage ul li button.nav-link').filter(".active");
let activeIdx = $('div#tabsForInnerPage 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#tabsForInnerPage ul li button.nav-link').eq(activeIdx + 1).tab("show"); $('div#tabsForInnerPage ul li button.nav-link').eq(activeIdx + 1).tab("show");
@ -171,12 +171,10 @@ function closeTab(menuId) {
$('div#tabsForInnerPage ul li button.nav-link').eq(activeIdx - 1).tab("show"); $('div#tabsForInnerPage ul li button.nav-link').eq(activeIdx - 1).tab("show");
} }
} }
document.getElementById("innerPage-"+menuId).remove(); document.getElementById("tab-"+menuId).remove();
delete innerPageMap[menuId];
$("#tab-" + activeIdx).remove();
$('#tabsForInnerPage').find('#li-'+menuId).remove(); $('#tabsForInnerPage').find('#li-'+menuId).remove();
delete innerPageMap[menuId];
} }
function id2Index(tabsId, srcId) { function id2Index(tabsId, srcId) {

Loading…
Cancel
Save