From 7eececadca247f8c1a818ea09d6011dc690cf269 Mon Sep 17 00:00:00 2001 From: zhangwq Date: Thu, 29 Nov 2018 11:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=95=8C=E9=9D=A2=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=97=A5=E5=BF=97=E6=80=BB=E9=87=8F=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=97=A5=E5=BF=97=20=E8=8F=9C=E5=8D=95=E7=9B=B8=E5=BA=94?= =?UTF-8?q?=E5=88=87=E6=8D=A2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../messages/message_zh_CN.properties | 2 +- .../webapp/static/global/scripts/pzLog.js | 68 ++++++++++++++++++- .../webapp/static/pages/scripts/pageLogs.js | 1 + 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 2b1946ef3..aeb8ca8b2 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -57,7 +57,7 @@ website_control=\u7F51\u7AD9 host_control=HOST\u963B\u65AD url_control=URL\u963B\u65AD website_keyword_control=\u7F51\u9875\u5185\u5BB9\u5173\u952E\u5B57\u963B\u65AD -mail_control=\u90AE\u4EF6 +mail_control=\u90AE\u7BB1 recipient_control=\u6536\u4EF6\u4EBA\u963B\u65AD sender_control=\u53D1\u4EF6\u4EBA\u963B\u65AD subject_control=\u4E3B\u9898\u963B\u65AD diff --git a/src/main/webapp/static/global/scripts/pzLog.js b/src/main/webapp/static/global/scripts/pzLog.js index 83c5a486f..3a6a698c0 100644 --- a/src/main/webapp/static/global/scripts/pzLog.js +++ b/src/main/webapp/static/global/scripts/pzLog.js @@ -113,9 +113,75 @@ var toLogSearch = function(index){ var date=$(this).attr("date"); var pathName=window.document.location.pathname.substring(0,window.document.location.pathname.indexOf("/nis")+4); + switchMenu("152"); window.location.href = pathName+"/toLogSearch?service="+serviceId+"&functionId="+functionId+"&cfgId="+compileId+"&date="+date+"&isLogTotalSearch=yes"; } }); -} \ No newline at end of file +} + +var switchMenu = function(topMenuId){ + // 顶部菜单切换 menuId: Policies/86 Logs/152 + $(".hor-menu ul li",parent.document).each(function(){ + var id = $(this).children("a").attr("id"); + if(id == topMenuId){ + $(this).addClass("active"); + }else{ + $(this).removeClass("active"); + } + }); + + // 保留左侧菜单特征 + var menusObj = $(".page-sidebar ul[class!='hide'] .active",parent.document); + var firstMenuName = menusObj.attr("menu-name"); + var lastMenuName = $(menusObj,parent.document).last("li[class='nav-item active']").attr("menu-name"); + + var middleMenu = new Array(); + $(menusObj,parent.document).find("li").each(function(){ + if($(this).hasClass("active")){ + middleMenu.push($(this).attr("menu-name")); + } + }); + + // 左侧菜单切换 + $(".page-sidebar",parent.document).find("ul[id]").each(function(){ + var id = $(this).attr("id") + if(id.indexOf(topMenuId) != -1){ + $(this).removeClass("hide"); + // 收回展开的菜单 + $(this).find("li").each(function(index){ + $(this).children("a").children("span").next().removeClass("open"); + $(this).children("ul").hide(); + }); + + // 选中左侧菜单 + $(this).children("li").each(function(){ + if($(this).attr("menu-name") == firstMenuName){ + $(this).addClass("active open");// 选中主菜单 + $(this).children("a").children("span").next().addClass("open");//﹀ + $(this).children("ul").show(); + + $(this).find("li").each(function(){ + if($.inArray($(this).attr("menu-name"),middleMenu) != -1){ + $(this).addClass("active open"); + $(this).children("a").children("span").next().addClass("open"); + $(this).children("ul").show(); + } + if($(this).attr("menu-name") == lastMenuName){ + //$(this).addClass("active"); + $(this).children("a").trigger("click"); + return false; + } + + }); + + } + + }); + }else{ + $(this).addClass("hide"); + } + }); + //loading('onloading'); +} diff --git a/src/main/webapp/static/pages/scripts/pageLogs.js b/src/main/webapp/static/pages/scripts/pageLogs.js index 970aa3380..313cc65b6 100644 --- a/src/main/webapp/static/pages/scripts/pageLogs.js +++ b/src/main/webapp/static/pages/scripts/pageLogs.js @@ -87,5 +87,6 @@ function getPixelsCount(str, strFontSize){ function back(){ // 获取配置界面URl并跳转 var url = sessionStorage.getItem('cfgUrl'); + switchMenu("86"); window.location.href = url; } \ No newline at end of file