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