未变更
This commit is contained in:
@@ -17,12 +17,7 @@
|
||||
|
||||
<a class="nav-link nav-toggle"
|
||||
<c:if test="${secondMenu.href != null && secondMenu.href != ''}" var="secondHref">
|
||||
<c:if test="${fn:startsWith(secondMenu.href,'http')}" var="secondFlag">
|
||||
href="javascript:;" onclick="page_turn('${secondMenu.id }','${secondMenu.functionId }','1','','${secondMenu.href }',this)" target="mainFrame" >
|
||||
</c:if>
|
||||
<c:if test="${!secondFlag}">
|
||||
href="javascript:;" onclick="page_turn('${secondMenu.id }','${secondMenu.functionId }','1','','${ctx}${secondMenu.href }',this)" target="mainFrame" >
|
||||
</c:if>
|
||||
</c:if>
|
||||
<c:if test="${!secondHref }">
|
||||
href="javascript:;" class="nav-link nav-toggle">
|
||||
@@ -47,12 +42,7 @@
|
||||
|
||||
<a class="nav-link nav-toggle"
|
||||
<c:if test="${thirdMenu.href != null && thirdMenu.href != ''}" var="thirdHref">
|
||||
<c:if test="${fn:startsWith(thirdMenu.href,'http')}" var="thirdFlag">
|
||||
href="javascript:;" onclick="page_turn('${thirdMenu.id }','${thirdMenu.functionId }','2','','${thirdMenu.href }',this)" target="mainFrame" >
|
||||
</c:if>
|
||||
<c:if test="${!thirdFlag}">
|
||||
href="javascript:;" onclick="page_turn('${thirdMenu.id }','${thirdMenu.functionId }','2','','${ctx}${thirdMenu.href }',this)" target="mainFrame" >
|
||||
</c:if>
|
||||
|
||||
</c:if>
|
||||
<c:if test="${!thirdHref }">
|
||||
@@ -72,12 +62,7 @@
|
||||
<c:if test="${fourthMenu.isShow==1}">
|
||||
<li class="nav-item" id="menu_${fourthMenu.id }" menu-id="${fourthMenu.id }" menu-name="<spring:message code="${fourthMenu.code}"></spring:message>" >
|
||||
<a href="javascript:;"
|
||||
<c:if test="${fn:startsWith(fourthMenu.href,'http')}" var="fourFlag">
|
||||
onclick="page_turn('${fourthMenu.id }','${fourthMenu.functionId }','3','','${fourthMenu.href }',this)" target="mainFrame"
|
||||
</c:if>
|
||||
<c:if test="${!fourFlag}">
|
||||
onclick="page_turn('${fourthMenu.id }','${fourthMenu.functionId }','3','','${ctx}${fourthMenu.href }',this)" target="mainFrame"
|
||||
</c:if>
|
||||
class="nav-link ">
|
||||
<%-- ${fourthMenu.name } --%> <spring:message code="${fourthMenu.code}"></spring:message>
|
||||
<!-- <span class="badge badge-danger">1</span> -->
|
||||
|
||||
@@ -107,6 +107,7 @@ function page_turn(id, functionId,level, name, url,obj){
|
||||
var $header = $(".page-breadcrumb");//添加头部信息
|
||||
$(".page-breadcrumb").empty();
|
||||
|
||||
var lang = "${cookie.Language.value }".toLowerCase();
|
||||
|
||||
var parent_li = $object.parents("li");
|
||||
var parent_parent_li = $object.parents("li").parents("li");
|
||||
@@ -150,11 +151,18 @@ function page_turn(id, functionId,level, name, url,obj){
|
||||
//}
|
||||
|
||||
//调入页面
|
||||
if(url.indexOf("?")>0){
|
||||
url = url+"&functionId="+functionId;
|
||||
//进行区分是否为外部URL
|
||||
if (postComment(url)) {
|
||||
url="http"+url.split("http")[url.split("http").length-1]+"?test_cookie="+lang;
|
||||
}else{
|
||||
url = url+"?functionId="+functionId;
|
||||
if(url.indexOf("?")>0){
|
||||
url = url+"&functionId="+functionId;
|
||||
}else{
|
||||
url = url+"?functionId="+functionId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
window.frames['mainFrame'].location=url;
|
||||
|
||||
$("#mainFrame").load(function(){
|
||||
@@ -162,6 +170,25 @@ function page_turn(id, functionId,level, name, url,obj){
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 前台页面验证url网址输入是否正确
|
||||
*/
|
||||
function postComment(str) {
|
||||
|
||||
//验证url网址
|
||||
//判断URL地址的正则表达式为:http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?
|
||||
//下面的代码中应用了转义字符"\"输出一个字符"/"
|
||||
var Expression=/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;
|
||||
var objExp=new RegExp(Expression);
|
||||
|
||||
if(objExp.test(str) != true){
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function searchMenu() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user