diff --git a/web/src/main/webapp/WEB-INF/jsp/index.jsp b/web/src/main/webapp/WEB-INF/jsp/index.jsp index 9cd6edb..4ee7dfa 100644 --- a/web/src/main/webapp/WEB-INF/jsp/index.jsp +++ b/web/src/main/webapp/WEB-INF/jsp/index.jsp @@ -34,16 +34,16 @@ $($(this).attr('href')).addClass('active show'); $($(this).attr('href')).siblings().removeClass('active show'); - $("#menu"+$(this).data('id')).addClass('active show'); - $("#menu"+$(this).data('id')).siblings().removeClass('active show'); + $("#menu" + $(this).data('id')).addClass('active show'); + $("#menu" + $(this).data('id')).siblings().removeClass('active show'); }); $("#tabs").on('click', 'i', function () { - button=$(this).parent(); + button = $(this).parent(); $(button.attr('href')).remove(); - if(button.next().length==0){ + if (button.next().length == 0) { button.prev().click(); - }else{ + } else { button.next().click(); } @@ -73,10 +73,18 @@ - +
+ +
+ +
+ + + - diff --git a/web/src/main/webapp/WEB-INF/jsp/menu.jsp b/web/src/main/webapp/WEB-INF/jsp/menu.jsp index 56c41ec..20edb03 100644 --- a/web/src/main/webapp/WEB-INF/jsp/menu.jsp +++ b/web/src/main/webapp/WEB-INF/jsp/menu.jsp @@ -35,33 +35,34 @@ } - function addMenu(menus, level, id) { + function addMenu(menus) { for (var menu in menus) { - href = menus[menu].href; - menuId = '#menu' + menus[menu].id; - $("#list-tab").append('\n' + - ' ' + menus[menu].menuName + '\n' + + id = menus[menu].id; + menuId = '#menu' + id; + $("#list-tab").append('\n' + + ' ' + menus[menu].menuName + '\n' + ' '); - if (level > 0) { - $(menuId).addClass('offset-' + level).addClass('menu' + id); + if (menus[menu].menuLevel > 0) { + $(menuId).addClass('offset-' + menus[menu].menuLevel).addClass('menu' + menus[menu].parentId); $(menuId).hide(); } if (menus[menu].childMenu.length > 0) { $(menuId).append('' + menus[menu].childMenu.length + '').click(showMenu); - addMenu(menus[menu].childMenu, level + 1, menus[menu].id); + addMenu(menus[menu].childMenu,menus[menu].href); } else { + // $(menuId+'>span:last').append(''); $(menuId).click(function () { - btnId = '#btn' + $(this).data('id'); + btnId = '#btn' + $(this).attr('id'); if ($(btnId).length == 0) { - $("#tabs").append('') } $(btnId).click(); - iframe = '#iframe' + $(this).data('id'); + iframe = '#iframe' + $(this).attr('id'); if ($(iframe).length == 0) { $(top.document).find('#nav-tabContent').append('
\n' + ' \n' + @@ -76,9 +77,7 @@ } $(function () { - addMenu(${menus}.data, 0 - ) - ; + addMenu(${menus}['data']); }); diff --git a/web/src/main/webapp/WEB-INF/jsp/test.jsp b/web/src/main/webapp/WEB-INF/jsp/test.jsp index 5231d73..ffb5cbe 100644 --- a/web/src/main/webapp/WEB-INF/jsp/test.jsp +++ b/web/src/main/webapp/WEB-INF/jsp/test.jsp @@ -15,7 +15,7 @@
-
+
test