数据列表中的查看子配置选项卡切换公共JS提取至js文件
This commit is contained in:
@@ -20,7 +20,7 @@
|
|||||||
<!-- 排除,不进行装饰的路径 -->
|
<!-- 排除,不进行装饰的路径 -->
|
||||||
<mapping path="/javadoc/*" exclue="true"/>
|
<mapping path="/javadoc/*" exclue="true"/>
|
||||||
<mapping path="/brochures/*" exclue="true"/>
|
<mapping path="/brochures/*" exclue="true"/>
|
||||||
<mapping path="/nis/ntc/website/ajaxHttpSubList" exclue="true"/>
|
<mapping path="/nis/ntc/website/ajax*" exclue="true"/>
|
||||||
|
|
||||||
<!-- 对同一路径,启用多个装饰器 -->
|
<!-- 对同一路径,启用多个装饰器 -->
|
||||||
<mapping>
|
<mapping>
|
||||||
|
|||||||
@@ -78,17 +78,6 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function switchInfo(flag,index){
|
|
||||||
$("div[name='subCfg"+index+"']").hide();
|
|
||||||
$("div[id='"+flag+"Info"+index+"']").show();
|
|
||||||
$("div[name='tabTitle"+index+"']").removeClass("badge-info");
|
|
||||||
$("div[id='"+flag+"Title"+index+"']").addClass("badge-info");
|
|
||||||
$("i[name='tabFlag"+index+"']").addClass("fa-angle-double-up");
|
|
||||||
$("i[name='tabFlag"+index+"']").removeClass("fa-angle-double-down");
|
|
||||||
$("i[id='"+flag+index+"']").addClass("fa-angle-double-down");
|
|
||||||
$("i[id='"+flag+index+"']").removeClass("fa-angle-double-up");
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<c:if test="${fn:length(_cfg.ipPortList)>0}">
|
<c:if test="${fn:length(_cfg.ipPortList)>0}">
|
||||||
<div id="ipTitle${index}" onclick="switchInfo('ip',${index})"
|
<div id="ipTitle${index}" onclick="switchSubCfgTabInfo('ip',${index})"
|
||||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||||
<spring:message code='http_ip_title' />
|
<spring:message code='http_ip_title' />
|
||||||
<i id="ip${index}" class="fa" name="tabFlag${index}"></i>
|
<i id="ip${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
@@ -19,35 +19,35 @@
|
|||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${fn:length(_cfg.httpUrlList)>0}">
|
<c:if test="${fn:length(_cfg.httpUrlList)>0}">
|
||||||
<div id="urlTitle${index}" onclick="switchInfo('url',${index})"
|
<div id="urlTitle${index}" onclick="switchSubCfgTabInfo('url',${index})"
|
||||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||||
<spring:message code='http_url_title' />
|
<spring:message code='http_url_title' />
|
||||||
<i id="url${index}" class="fa" name="tabFlag${index}"></i>
|
<i id="url${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${fn:length(_cfg.httpReqHdrList)>0}">
|
<c:if test="${fn:length(_cfg.httpReqHdrList)>0}">
|
||||||
<div id="reqHdrTitle${index}" onclick="switchInfo('reqHdr',${index})"
|
<div id="reqHdrTitle${index}" onclick="switchSubCfgTabInfo('reqHdr',${index})"
|
||||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||||
<spring:message code='http_req_hdr_title' />
|
<spring:message code='http_req_hdr_title' />
|
||||||
<i id="reqHdr${index}" class="fa" name="tabFlag${index}"></i>
|
<i id="reqHdr${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${fn:length(_cfg.httpReqBodyList)>0}">
|
<c:if test="${fn:length(_cfg.httpReqBodyList)>0}">
|
||||||
<div id="reqBodyTitle${index}" onclick="switchInfo('reqBody',${index})"
|
<div id="reqBodyTitle${index}" onclick="switchSubCfgTabInfo('reqBody',${index})"
|
||||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||||
<spring:message code='http_req_hdr_title' />
|
<spring:message code='http_req_hdr_title' />
|
||||||
<i id="reqBody${index}" class="fa" name="tabFlag${index}"></i>
|
<i id="reqBody${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${fn:length(_cfg.httpResHdrList)>0}">
|
<c:if test="${fn:length(_cfg.httpResHdrList)>0}">
|
||||||
<div id="resHdrTitle${index}" onclick="switchInfo('resHdr',${index})"
|
<div id="resHdrTitle${index}" onclick="switchSubCfgTabInfo('resHdr',${index})"
|
||||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||||
<spring:message code='http_res_hdr_title' />
|
<spring:message code='http_res_hdr_title' />
|
||||||
<i id="resHdr${index}" class="fa" name="tabFlag${index}"></i>
|
<i id="resHdr${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${fn:length(_cfg.httpResBodyList)>0}">
|
<c:if test="${fn:length(_cfg.httpResBodyList)>0}">
|
||||||
<div id="resBodyTitle${index}" onclick="switchInfo('resBody',${index})"
|
<div id="resBodyTitle${index}" onclick="switchSubCfgTabInfo('resBody',${index})"
|
||||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||||
<spring:message code='http_res_body_title' />
|
<spring:message code='http_res_body_title' />
|
||||||
<i id="resBody${index}" class="fa" name="tabFlag${index}"></i>
|
<i id="resBody${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
|
|||||||
@@ -77,18 +77,6 @@
|
|||||||
$("#"+closeId).parent().parent().next("tr").hide();
|
$("#"+closeId).parent().parent().next("tr").hide();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function switchInfo(flag,index){
|
|
||||||
$("div[name='subCfg"+index+"']").hide();
|
|
||||||
$("div[id='"+flag+"Info"+index+"']").show();
|
|
||||||
$("div[name='tabTitle"+index+"']").removeClass("badge-info");
|
|
||||||
$("div[id='"+flag+"Title"+index+"']").addClass("badge-info");
|
|
||||||
$("i[name='tabFlag"+index+"']").addClass("fa-angle-double-up");
|
|
||||||
$("i[name='tabFlag"+index+"']").removeClass("fa-angle-double-down");
|
|
||||||
$("i[id='"+flag+index+"']").addClass("fa-angle-double-down");
|
|
||||||
$("i[id='"+flag+index+"']").removeClass("fa-angle-double-up");
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
|
<c:forEach items="${tabList}" var="region" varStatus="regionStatus">
|
||||||
<div id="${region[1]}Title${index}" onclick="switchInfo('${region[1]}',${index})"
|
<div id="${region[1]}Title${index}" onclick="switchSubCfgTabInfo('${region[1]}',${index})"
|
||||||
class="col-md-1 tabInfo" name="tabTitle${index }">
|
class="col-md-1 tabInfo" name="tabTitle${index }">
|
||||||
<spring:message code='${region[1]}' />
|
<spring:message code='${region[1]}' />
|
||||||
<i id="${region[1]}${index}" class="fa" name="tabFlag${index}"></i>
|
<i id="${region[1]}${index}" class="fa" name="tabFlag${index}"></i>
|
||||||
|
|||||||
@@ -474,3 +474,14 @@ function delAreaIsp(obj){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//切换配置列表中显示子配置的选项卡样式
|
||||||
|
function switchSubCfgTabInfo(flag,index){
|
||||||
|
$("div[name='subCfg"+index+"']").hide();
|
||||||
|
$("div[id='"+flag+"Info"+index+"']").show();
|
||||||
|
$("div[name='tabTitle"+index+"']").removeClass("badge-info");
|
||||||
|
$("div[id='"+flag+"Title"+index+"']").addClass("badge-info");
|
||||||
|
$("i[name='tabFlag"+index+"']").addClass("fa-angle-double-up");
|
||||||
|
$("i[name='tabFlag"+index+"']").removeClass("fa-angle-double-down");
|
||||||
|
$("i[id='"+flag+index+"']").addClass("fa-angle-double-down");
|
||||||
|
$("i[id='"+flag+index+"']").removeClass("fa-angle-double-up");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user