no message

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

@ -19,39 +19,41 @@
<div class="container-xxl flex-grow-1 container-p-y"> <div class="container-xxl flex-grow-1 container-p-y">
<%--h4 id="pageTitle" class="fw-bold py-3 mb-4">페이지 제목</h4--%> <%--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 --> <!-- Page Body -->
<div class="card"> <div class="card">
<div class="card-datatable text-nowrap"> <div class="card-datatable text-nowrap">
<div id="DataTables_Table_0_wrapper" class="dataTables_wrapper dt-bootstrap5 no-footer"> <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div class="d-flex flex-row justify-content-evenly"> <div class="d-flex flex-row justify-content-evenly">
<div style="width:49%;">
<h5 class="mt-3">레이아웃</h5> <div style="width:49%;">
<div id="menu-tree" class="main-left d-flex flex-column flex-grow-1"> <h5 class="mt-3">레이아웃</h5>
<div class="d-flex justify-content-between" style="padding-top:.5em; padding-bottom:.5em; border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf;"> <div id="menu-tree" class="main-left d-flex flex-column flex-grow-1">
<span> <div class="d-flex justify-content-between" style="padding-top:.5em; padding-bottom:.5em; border-top:1px solid #dfdfdf; border-bottom:1px solid #dfdfdf;">
<button id="menuToggler" onclick="toggleMenus();" class="btn btn-primary"></button> <span>
</span> <button id="menuToggler" onclick="toggleMenus();" class="btn btn-primary"></button>
</div> </span>
<div id="menuTree" style="padding-top:1em; min-height:26em; overflow:auto;"> </div>
</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> <!-- Page Body -->
<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 -->
<hr class="my-5" /> <hr class="my-5" />
</div> </div>

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

@ -27,8 +27,8 @@ function openMenu(obj, params) {
} }
}); });
let iframeObj = document.getElementById(dataKey); let innerPageObj = document.getElementById("div"+dataKey);
return iframeObj; return innerPageObj;
} }
if(OPEN_TAB_CNT === openMax){ if(OPEN_TAB_CNT === openMax){
alert(`메뉴는 최대 ${openMax -1}까지만 열 수 있습니다.`) alert(`메뉴는 최대 ${openMax -1}까지만 열 수 있습니다.`)
@ -56,31 +56,50 @@ function openMenu(obj, params) {
if(params != null){ if(params != null){
menuUrl = menuUrl + params; 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)[0].appendChild(dynamicPage);
$("#tab-" + dataKey).append($dynamicPage);
innerPageMap[dataKey] = dynamicPage;
innerPageMap[dataKey] = $dynamicPage;
$("div#tabsForInnerPage ul li button.nav-link").last().trigger("click"); 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");
let dynamicPageObj = document.getElementById(dataKey);
return dynamicPageObj;
} }
function closeTab(menuId) { function closeTab(menuId) {
@ -103,7 +122,7 @@ function closeTab(menuId) {
} }
} }
innerPageMap[menuId].remove(); document.getElementById("div"+menuId).remove();
delete innerPageMap[menuId]; delete innerPageMap[menuId];
$("#tab-" + activeIdx).remove(); $("#tab-" + activeIdx).remove();

@ -11,7 +11,7 @@ class FimsMenuSupport {
this._template = this._orientation + "-menu-template"; this._template = this._orientation + "-menu-template";
this._menuItem = '<li data-key="{menuID}" class="menu-item">' 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>' +'<i class="menu-icon tf-icons bx bx-layout"></i>'
+'<div data-i18n="{menuName}">{menuName}</div>' +'<div data-i18n="{menuName}">{menuName}</div>'
+'</a>' +'</a>'

Loading…
Cancel
Save