(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;
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
$(function(){
|
||||
//全选及取消
|
||||
$("#checkAll").change(function(){
|
||||
if($("#checkAll").prop("checked")){
|
||||
$("input.i-checks").prop("checked",true);
|
||||
}else{
|
||||
$("input.i-checks").prop("checked",false);
|
||||
}
|
||||
});
|
||||
});
|
||||
var switchIpType=function(obj){
|
||||
var type=$(obj).val();
|
||||
var row=$(obj).parents('.row');
|
||||
@@ -64,6 +74,18 @@ var switchIpType=function(obj){
|
||||
}else if($(dstIp).val()=="0.0.0.0"){
|
||||
$(dstIp).val("::");
|
||||
}
|
||||
if(!$(srcPort).val()){
|
||||
$(srcPort).val("0");
|
||||
}
|
||||
if(!$(dstPort).val()){
|
||||
$(dstPort).val("0");
|
||||
}
|
||||
if(!$(srcPortMask).val()){
|
||||
$(srcPortMask).val("65535");
|
||||
}
|
||||
if(!$(dstPortMask).val()){
|
||||
$(dstPortMask).val("65535");
|
||||
}
|
||||
}
|
||||
}
|
||||
var areaControlInit=function(){
|
||||
|
||||
Reference in New Issue
Block a user