|
|
|
@ -1,14 +1,35 @@
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<th:block th:fragment="sidebarFragment">
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
header + article {
|
|
|
|
|
z -index: 0;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<article>
|
|
|
|
|
<div class="lnb_menu_btn_area open">
|
|
|
|
|
<a href="#" class="lnb_menu_menu">
|
|
|
|
|
<p>메뉴닫기</p>
|
|
|
|
|
<span></span>
|
|
|
|
|
<span></span>
|
|
|
|
|
<span></span>
|
|
|
|
|
<span></span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<nav>
|
|
|
|
|
<ul class="lnb" id="menuSeq1">
|
|
|
|
|
</ul>
|
|
|
|
|
</nav>
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
|
|
<script type=text/javascript>
|
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
testGetAuth();
|
|
|
|
|
})
|
|
|
|
|
}).off(lnbEvt())
|
|
|
|
|
|
|
|
|
|
function testGetAuth() {
|
|
|
|
|
$.ajax({
|
|
|
|
@ -18,56 +39,32 @@
|
|
|
|
|
async: false,
|
|
|
|
|
url: '/rest/test5',
|
|
|
|
|
success: function (data) {
|
|
|
|
|
|
|
|
|
|
data.forEach(function (e, i) {
|
|
|
|
|
// console.log("e data: " + JSON.stringify(e))
|
|
|
|
|
if (e.level == '2') {
|
|
|
|
|
$("#menuList").append('<li><a href="#">' + e.menuName + '</a><ul class="depth' + e.level + '"></ul></li>');
|
|
|
|
|
} else if (e.level == '3') {
|
|
|
|
|
if (e.level >= e.nextLevel) {
|
|
|
|
|
$("#menuList").append('<li><a href="' + e.url + '"><span>' + e.menuName + '</span></a></li>');
|
|
|
|
|
} else if (e.nextLevel == '4') {
|
|
|
|
|
$("#menuList").append('<li><a href="#">' + e.menuName + '</a><ul class="depth' + e.level + '"></ul></li>');
|
|
|
|
|
}
|
|
|
|
|
} else if (e.level == '4') {
|
|
|
|
|
$("#menuList").append('<li><a href="' + e.url + '"><span>' + e.menuName + '</span></a></li>');
|
|
|
|
|
if (e.nextLevel == '2') {
|
|
|
|
|
$("#menuList").append('</ul></li>');
|
|
|
|
|
} else if (e.nextLevel == '3') {
|
|
|
|
|
$("#menuList").append('</ul></li>');
|
|
|
|
|
var addMenu = '';
|
|
|
|
|
if (!(e.level == '0' || e.level == '1' )&& !$("#menuSeq" + e.seq).length > 0) {
|
|
|
|
|
var menuUrl = "#";
|
|
|
|
|
if (e.url != '0') {
|
|
|
|
|
menuUrl = e.url;
|
|
|
|
|
}
|
|
|
|
|
addMenu += '<li>'
|
|
|
|
|
+ '<a href=' + menuUrl + '>'
|
|
|
|
|
+ '<span>'
|
|
|
|
|
+ e.menuName
|
|
|
|
|
+ '</span></a>'
|
|
|
|
|
+ '<ul class="depth' + e.level + '" id="menuSeq' + e.seq + '">'
|
|
|
|
|
+ '</ul>'
|
|
|
|
|
+ '</li>'
|
|
|
|
|
$('#menuSeq' + e.seqUpper).append(addMenu);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style>
|
|
|
|
|
header + article {
|
|
|
|
|
z-index: 0;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<article>
|
|
|
|
|
<div class="lnb_menu_btn_area open">
|
|
|
|
|
<a href="#" class="lnb_menu_menu">
|
|
|
|
|
<p>메뉴닫기</p>
|
|
|
|
|
<span></span>
|
|
|
|
|
<span></span>
|
|
|
|
|
<span></span>
|
|
|
|
|
<span></span>
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<nav>
|
|
|
|
|
<ul class="lnb" id="menuList">
|
|
|
|
|
</ul>
|
|
|
|
|
</nav>
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
|
|
<script th:src="@{/lib/assets/js/scripts.js}"></script>
|
|
|
|
|
|
|
|
|
|
</th:block>
|
|
|
|
|
|
|
|
|
|
</html>
|
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|