(1)IP类配置页面修改,支持多选的删除,审核,操作按钮上移

(2)修复验证方法ipCheck影响多个IP配置的bug
This commit is contained in:
wangxin
2018-04-11 13:45:04 +08:00
parent f94e377819
commit 76d190e78a
13 changed files with 773 additions and 174 deletions

View File

@@ -169,7 +169,7 @@ jQuery.validator.addMethod("notStartZero",function(value, element) {
//ip地址校验
jQuery.validator.addMethod("ipCheck",function(value, element) {
if(value.length==0||value.trim().length==0){return true;}
var typeInt=$("select[name$='ipType']").val();
var typeInt=$(element).parents(".row").siblings().find("select[name$='ipType']").val();
if(typeInt==4){
return this.optional(element)||(/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(value) && (RegExp.$1 <256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256));
}else if(typeInt==6){
@@ -179,7 +179,7 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
jQuery.validator.addMethod("ipMask",function(value, element) {
if(value.length==0||value.trim().length==0){return true;}
obj=value;
var typeInt=$("select[name$='ipType']").val();
var typeInt=$(element).parents(".row").siblings().find("select[name$='ipType']").val();
if(typeInt==4){
if(obj=="255.255.255.255"){
return true;