메뉴 lnb jsp제거

dev_tymeleaf
jangwonseokicom 2 years ago
parent c8617b3345
commit 3d63f2e538

@ -155,6 +155,7 @@ function lnbEvt(){
$('.lnb > li > ul > li > ul').parent().addClass('has_children');
}
$('.lnb > li.has_children > a').attr('href', '#');
$('.lnb > li > a').on('click', function(e){
e.preventDefault();

@ -3,17 +3,16 @@
<!-- Footer -->
<th:block th:fragment="footerFragment">
<div class="footer row gray-bg" style="">
<div class="col-lg-12">
<div class="p-sm">
<div class="pull-right">
<!-- 10GB of <strong>250GB</strong> Free. -->
</div>
<div>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
lnbEvt();
currentPage();
modalUi();
fileupload();
tabUi();
})
</script>
</th:block>
</html>

@ -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>

@ -3,6 +3,6 @@
<th:block th:replace="layout/fragments/head :: headFragment"></th:block>
<th:block th:replace="layout/fragments/sidebar :: sidebarFragment"></th:block>
<!-- <th:block th:replace="layout/fragments/top :: topbarFragment"></th:block>-->
<th:block layout:fragment="content"></th:block>
<!-- <th:block th:replace="layout/fragments/footer :: footerFragment"></th:block>-->
<th:block layout:fragment="content"></th:block>
<!--<th:block th:replace="layout/fragments/footer :: footerFragment"></th:block>-->
</html>
Loading…
Cancel
Save