增加标签、性质、类型弹框按钮国际化
去掉APP协议IP界面srcIp的 ipCheck 修改当源ip隐藏时,目的ip非0.0.0.0的校验
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
}
|
||||
// 正常打开
|
||||
top.$.jBox.open("iframe:${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&selectIds="+$("#${id}Id").val()+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}", "<spring:message code='choose'/><spring:message code='${title}'/>", 320, 420, {
|
||||
ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"ok":"ok", ${allowClear?"\"clear\":\"clear\", ":""}"close":true}, submit:function(v, h, f){
|
||||
ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"<spring:message code='ok'/>":"ok", "<spring:message code='clear'/>":"clear","<spring:message code='close'/>":true}, submit:function(v, h, f){
|
||||
if (v=="ok"){
|
||||
var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();
|
||||
var ids = [], names = [], nodes = [];
|
||||
|
||||
@@ -127,7 +127,7 @@ $(function(){
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required ipCheck" type="text" name="destIpAddress" value="${_cfg.destIpAddress}">
|
||||
<input class="required ipCheck" type="hidden" name="srcIpAddress" value="${_cfg.srcIpAddress}">
|
||||
<input class="required" type="hidden" name="srcIpAddress" value="${_cfg.srcIpAddress}">
|
||||
</div>
|
||||
<div for="destIpAddress"></div>
|
||||
</div>
|
||||
|
||||
@@ -211,7 +211,7 @@ var delContent=function(contentClassName,addBtnClassName){
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="voipAccounts[${status.index }].exprType" value="1" class="required"
|
||||
<input type="radio" name="voipAccounts[${status.index }].exprType" value="1" class="hidden"
|
||||
<c:if test="${voipAccount.exprType==1}">checked</c:if>
|
||||
><spring:message code="and_expression"/>
|
||||
</label>
|
||||
|
||||
@@ -181,17 +181,23 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
|
||||
var ipPattern=$(element).parents(".row").parent(".row").find("select[name$='ipPattern']").val();
|
||||
var srcIpAddress=$(element).parents(".row").parent(".row").find("input[name$='srcIpAddress']").val();
|
||||
var destIpAddress=$(element).parents(".row").parent(".row").find("input[name$='destIpAddress']").val();
|
||||
var srcIpIsHidden=$(element).parents(".row").parent(".row").find("input[name$='srcIpAddress']").is(":hidden");
|
||||
var destIpIsHidden=$(element).parents(".row").parent(".row").find("input[name$='destIpAddress']").is(":hidden");
|
||||
if(ipPattern==1){//ip/掩码格式
|
||||
srcIpAddress=srcIpAddress.indexOf("/") >-1 ?srcIpAddress.split("/")[0] : srcIpAddress;
|
||||
destIpAddress=destIpAddress.indexOf("/") >-1 ?srcIpAddress.split("/")[0] : srcIpAddress;
|
||||
destIpAddress=destIpAddress.indexOf("/") >-1 ?destIpAddress.split("/")[0] : destIpAddress;
|
||||
}else if (ipPattern==2){
|
||||
srcIpAddress=srcIpAddress.indexOf("-") >-1 ?srcIpAddress.split("-")[0] : srcIpAddress;
|
||||
destIpAddress=destIpAddress.indexOf("-") >-1 ?srcIpAddress.split("-")[0] : srcIpAddress;
|
||||
destIpAddress=destIpAddress.indexOf("-") >-1 ?destIpAddress.split("-")[0] : destIpAddress;
|
||||
}
|
||||
if(destIpIsHidden){
|
||||
if(srcIpIsHidden){
|
||||
if((srcIpAddress == destIpAddress)){
|
||||
$.validator.messages.ipCheck=$.validator.messages.srcIpIsNotValue+destIpAddress;
|
||||
$.validator.messages.ipCheck=$.validator.messages.destIpIsNotValue+destIpAddress;
|
||||
return false;
|
||||
}
|
||||
}else if(destIpIsHidden){
|
||||
if((srcIpAddress == destIpAddress)){
|
||||
$.validator.messages.ipCheck=$.validator.messages.srcIpIsNotValue+srcIpAddress;
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
destIpNotEqDestIp:" and destination IP ",
|
||||
IpNotEqDestIp:" can't the same",
|
||||
srcIpIsNotValue:"Sourse IP can't be ",
|
||||
destIpIsNotValue:"Destination IP can't be ",
|
||||
ipRange:"Wrong IP format or start IP and end IP in two subnet",
|
||||
ipRange1:"start IP should smaller than end IP",
|
||||
portCheck:"Please enter a correct port",
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
srcIpNotEqDestIp:"Sourse IP ",
|
||||
destIpNotEqDestIp:" and destination IP ",
|
||||
srcIpIsNotValue:"Sourse IP can't be ",
|
||||
destIpIsNotValue:"Destination IP can't be ",
|
||||
IpNotEqDestIp:" can't the same",
|
||||
portMaskRange:"Port and mask must between 0 and 65535.The correct pattern is \"port/mask\".",
|
||||
chooseAreaOrIsp:"The region and the oprater must choose one",
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
ipRange1:"起始IP值应小于结束IP值",
|
||||
portRange:"端口应小于65536,非0数字不能以0开头",
|
||||
srcIpIsNotValue:"源IP不能为 ",
|
||||
destIpIsNotValue:"目的IP不能为",
|
||||
srcIpNotEqDestIp:"源IP ",
|
||||
destIpNotEqDestIp:" 与目的IP ",
|
||||
IpNotEqDestIp:" 不能相同",
|
||||
|
||||
Reference in New Issue
Block a user