no message

main
이범준 1 year ago
parent fb934a77b8
commit 1fd741aea0

@ -19,39 +19,41 @@
<div class="container-xxl flex-grow-1 container-p-y">
<%--h4 id="pageTitle" class="fw-bold py-3 mb-4">페이지 제목</h4--%>
<c:set var="prefixName" scope="request">메뉴</c:set>
<c:set var="prefixName" scope="request">메뉴</c:set>
<!-- Page Body -->
<div class="card">
<div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="d-flex flex-row justify-content-evenly">
<div style="width:49%;">
<h5 class="mt-3">레이아웃</h5>
<div id="menu-tree" class="main-left d-flex flex-column flex-grow-1">
<div class="d-flex justify-content-between" style="padding-top:.5em; padding-bottom:.5em; border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf;">
<span>
<button id="menuToggler" onclick="toggleMenus();" class="btn btn-primary"></button>
</span>
</div>
<div id="menuTree" style="padding-top:1em; min-height:26em; overflow:auto;">
</div>
<div class="card">
<div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="d-flex flex-row justify-content-evenly">
<div style="width:49%;">
<h5 class="mt-3">레이아웃</h5>
<div id="menu-tree" class="main-left d-flex flex-column flex-grow-1">
<div class="d-flex justify-content-between" style="padding-top:.5em; padding-bottom:.5em; border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf;">
<span>
<button id="menuToggler" onclick="toggleMenus();" class="btn btn-primary"></button>
</span>
</div>
<div id="menuTree" style="padding-top:1em; min-height:26em; overflow:auto;">
</div>
</div>
</div>
<div style="width:49%;">
<h5 class="mt-3">등록 정보</h5>
<div class="d-flex flex-row justify-content-end p-3">
<div>
<button id="btnRemoveMenus" onclick="removeMenus();" class="btn btn-primary">- 제거</button>
</div>
</div>
<jsp:include page="menu-info.jsp" />
</div>
</div>
</div>
</div>
</div>
</div>
<div style="width:49%;">
<h5 class="mt-3">등록 정보</h5>
<div class="d-flex flex-row justify-content-end p-3">
<div>
<button id="btnRemoveMenus" onclick="removeMenus();" class="btn btn-primary">- 제거</button>
</div>
</div>
<jsp:include page="menu-info.jsp" />
</div>
</div>
</div>
</div>
</div>
<!--/ Page Body -->
<!-- Page Body -->
<hr class="my-5" />
</div>

@ -17,6 +17,7 @@
</div>
</div>
<jsp:include page="/WEB-INF/jsp/include/tail.jsp" />
<script >
${functions}

@ -27,8 +27,8 @@ function openMenu(obj, params) {
}
});
let iframeObj = document.getElementById(dataKey);
return iframeObj;
let innerPageObj = document.getElementById("div"+dataKey);
return innerPageObj;
}
if(OPEN_TAB_CNT === openMax){
alert(`메뉴는 최대 ${openMax -1}까지만 열 수 있습니다.`)
@ -56,31 +56,50 @@ function openMenu(obj, params) {
if(params != null){
menuUrl = menuUrl + params;
}
const $dynamicPage = $("<div></div>");
$dynamicPage.attr("id" , dataKey)
.attr("name" , menuNm)
.attr("title" , menuNm)
.attr("frameborder" , "0")
.attr("scrolling" , "no")
.attr("width" , "100%")
.attr("src" , menuUrl)
.css("border" , "0")
.css("height" , "100%")
.css("min-height" , "800px")
.css("overflow" , "auto")
.css("overflow-x" , "no")
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).append($dynamicPage);
innerPageMap[dataKey] = $dynamicPage;
$("#tab-" + dataKey)[0].appendChild(dynamicPage);
$("div#tabsForInnerPage ul li button.nav-link").last().trigger("click");
let dynamicPageObj = document.getElementById(dataKey);
return dynamicPageObj;
innerPageMap[dataKey] = dynamicPage;
ajax.request({
type:"POST",
url:menuUrl,
data:{},
success:resp => {
console.log("ok");
var sp1 = resp.split("<!-- Content wrapper -->")[1];
sp1 = resp.split("<!-- Page Body -->")[1];
console.log(sp1);
$("#div"+dataKey).html(sp1);
}
});
$("div#tabsForInnerPage ul li button.nav-link").last().trigger("click");
}
function closeTab(menuId) {
@ -103,7 +122,7 @@ function closeTab(menuId) {
}
}
innerPageMap[menuId].remove();
document.getElementById("div"+menuId).remove();
delete innerPageMap[menuId];
$("#tab-" + activeIdx).remove();

@ -11,7 +11,7 @@ class FimsMenuSupport {
this._template = this._orientation + "-menu-template";
this._menuItem = '<li data-key="{menuID}" class="menu-item">'
+'<a href="#" data-url="{url}" onclick="openMenu(this)" class="menu-link{toggle}">'
+'<a data-url="{url}" onclick="openMenu(this)" class="menu-link{toggle}">'
+'<i class="menu-icon tf-icons bx bx-layout"></i>'
+'<div data-i18n="{menuName}">{menuName}</div>'
+'</a>'

Loading…
Cancel
Save