(1)IP类配置页面修改,支持多选的删除,审核,操作按钮上移
(2)修复验证方法ipCheck影响多个IP配置的bug
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user