1.校验搜索框的时间,开始时间不能晚于结束时间
2.校验dns相应策略配置增加中的最大\小存活时间,最小存活时间不能大于最大存活时间
This commit is contained in:
@@ -212,7 +212,7 @@ remarks=Remark
|
|||||||
operation=Operation
|
operation=Operation
|
||||||
submit=Submit
|
submit=Submit
|
||||||
cancel=Cancel
|
cancel=Cancel
|
||||||
begin_date=Begin Time
|
begin_date=Start Time
|
||||||
end_date=End Time
|
end_date=End Time
|
||||||
delete=Delete
|
delete=Delete
|
||||||
special_task=Special Task
|
special_task=Special Task
|
||||||
@@ -1056,3 +1056,4 @@ Maintenance=Advanced
|
|||||||
Proxy=Proxy
|
Proxy=Proxy
|
||||||
selective=Selective
|
selective=Selective
|
||||||
ip_protocol=IP Protocol
|
ip_protocol=IP Protocol
|
||||||
|
max_shouldnot_less_than_min=The max item should not be less than the min item.
|
||||||
@@ -212,7 +212,7 @@ remarks=remarks
|
|||||||
operation=operation
|
operation=operation
|
||||||
submit=submit
|
submit=submit
|
||||||
cancel=cancel
|
cancel=cancel
|
||||||
begin_date=begin date
|
begin_date=start date
|
||||||
end_date=end date
|
end_date=end date
|
||||||
delete=delete
|
delete=delete
|
||||||
special_task=special task
|
special_task=special task
|
||||||
@@ -858,4 +858,6 @@ dest_ip_report=Destination Country IP Report
|
|||||||
isp_report=Isp Report
|
isp_report=Isp Report
|
||||||
#=============about report===================
|
#=============about report===================
|
||||||
show_more=Show More
|
show_more=Show More
|
||||||
ratelimit_limit=Limit Rate must between 0 and 100
|
ratelimit_limit=Limit Rate must between 0 and 100
|
||||||
|
|
||||||
|
max_shouldnot_less_than_min=The max item should not be less than the min item.
|
||||||
@@ -1048,4 +1048,5 @@ traffic_website_list=\u7F51\u7AD9\u6D41\u91CF\u7EDF\u8BA1\u5217\u8868
|
|||||||
traffic_website_type_chart=\u7F51\u7AD9\u5206\u7C7B\u6D41\u91CF\u7EDF\u8BA1\u56FE
|
traffic_website_type_chart=\u7F51\u7AD9\u5206\u7C7B\u6D41\u91CF\u7EDF\u8BA1\u56FE
|
||||||
website=\u7F51\u7AD9\u540D\u79F0
|
website=\u7F51\u7AD9\u540D\u79F0
|
||||||
#===============dashboard end===================================
|
#===============dashboard end===================================
|
||||||
ratelimit_limit=\u9650\u901F\u6BD4\u4F8B\u5FC5\u987B\u4ECB\u4E8E0\u5230100#===============dashboard end===================================
|
ratelimit_limit=\u9650\u901F\u6BD4\u4F8B\u5FC5\u987B\u4ECB\u4E8E0\u5230100\#\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=dashboard end\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=
|
||||||
|
max_shouldnot_less_than_min=\u6700\u5927\u9879\u4E0D\u80FD\u5C0F\u4E8E\u6700\u5C0F\u9879
|
||||||
@@ -51,8 +51,17 @@ $(function(){
|
|||||||
$("#cfgId").attr("aria-invalid","true");
|
$("#cfgId").attr("aria-invalid","true");
|
||||||
}
|
}
|
||||||
if(flag){
|
if(flag){
|
||||||
loading('onloading...');
|
var maxTtl=$("[name=maxTtl]").val();
|
||||||
form.submit();
|
var minTtl=$("[name=minTtl]").val();
|
||||||
|
if(minTtl>maxTtl){
|
||||||
|
message="<spring:message code='max_shouldnot_less_than_min'/>";
|
||||||
|
$("div[for=maxTtl]").html("<label for=\"maxTtl\" class=\"error\" id=\"maxTtl-error\">"+message+"</label>");
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
//loading('onloading...');
|
||||||
|
//form.submit();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
errorContainer: "#messageBox"
|
errorContainer: "#messageBox"
|
||||||
@@ -143,7 +152,7 @@ $(function(){
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="min_ttl"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="min_ttl"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control required number" placeholder="<spring:message code="ttl_unit" />" type="text" name="minTtl" value="${_cfg.minTtl}">
|
<input class="form-control required number" placeholder="<spring:message code="ttl_unit" />" type="text" name="minTtl" value="${_cfg.minTtl}" min="0">
|
||||||
</div>
|
</div>
|
||||||
<div for="minTtl"></div>
|
<div for="minTtl"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -152,7 +161,7 @@ $(function(){
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="max_ttl"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="max_ttl"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input class="form-control required number" placeholder="<spring:message code="ttl_unit" />" type="text" name="maxTtl" value="${_cfg.maxTtl}">
|
<input class="form-control required number" placeholder="<spring:message code="ttl_unit" />" type="text" name="maxTtl" value="${_cfg.maxTtl}" min="0">
|
||||||
</div>
|
</div>
|
||||||
<div for="maxTtl"></div>
|
<div for="maxTtl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -155,6 +155,16 @@ jQuery.validator.addMethod("noBlankSpace", function(value, element) {
|
|||||||
return $.trim(value) != "";
|
return $.trim(value) != "";
|
||||||
}, "不能填写空格");
|
}, "不能填写空格");
|
||||||
|
|
||||||
|
jQuery.validator.addMethod("compareDate", function(value, element, param) {
|
||||||
|
var startDate = $(param).val();
|
||||||
|
if (startDate && value) {
|
||||||
|
var date1 = new Date(startDate.replace(new RegExp(/-/gm), "/"));
|
||||||
|
var date2 = new Date(value.replace(new RegExp(/-/gm), "/"));
|
||||||
|
return date1 <= date2;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}, "结束时间不能早于开始时间");
|
||||||
|
|
||||||
//掩码校验,超过两位不得以0开头
|
//掩码校验,超过两位不得以0开头
|
||||||
jQuery.validator.addMethod("notStartZero",function(value, element) {
|
jQuery.validator.addMethod("notStartZero",function(value, element) {
|
||||||
if(value.length>1&&value.length<6){
|
if(value.length>1&&value.length<6){
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
areaIpPrefix:"Forbiden value: ",
|
areaIpPrefix:"Forbiden value: ",
|
||||||
domainCheck:"Please enter a valid domain.",
|
domainCheck:"Please enter a valid domain.",
|
||||||
checkParent:"Configuration Type must match it's parent.",
|
checkParent:"Configuration Type must match it's parent.",
|
||||||
specServiceCodeCheck:"Protocol No is repeat."
|
specServiceCodeCheck:"Protocol No is repeat.",
|
||||||
|
compareDate:"The end time should not be earlier than the start time."
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
areaIpPrefix:"Forbiden value: ",
|
areaIpPrefix:"Forbiden value: ",
|
||||||
domainCheck:"Please enter a valid domain.",
|
domainCheck:"Please enter a valid domain.",
|
||||||
checkParent:"Configuration Type must match it's parent.",
|
checkParent:"Configuration Type must match it's parent.",
|
||||||
specServiceCodeCheck:"Protocol No is repeat."
|
specServiceCodeCheck:"Protocol No is repeat.",
|
||||||
|
compareDate:"The end time should not be earlier than the start time."
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
areaIpPrefix:"禁止使用的值: ",
|
areaIpPrefix:"禁止使用的值: ",
|
||||||
domainCheck:"请输入有效的域名",
|
domainCheck:"请输入有效的域名",
|
||||||
checkParent:"配置类型必须与上级配置一致!",
|
checkParent:"配置类型必须与上级配置一致!",
|
||||||
specServiceCodeCheck:"协议号重复"
|
specServiceCodeCheck:"协议号重复",
|
||||||
|
compareDate:"结束时间不能早于开始时间"
|
||||||
});
|
});
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|||||||
@@ -347,6 +347,53 @@ $(function(){
|
|||||||
$("#serviceId").val($(this).attr("serviceId"));
|
$("#serviceId").val($(this).attr("serviceId"));
|
||||||
$("#protocolId").val($(this).attr("protocolId"));
|
$("#protocolId").val($(this).attr("protocolId"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 校验搜索条件里的时间选框,不允许起始时间晚于终止时间
|
||||||
|
$("#searchForm").validate({
|
||||||
|
rules:{
|
||||||
|
"searchFoundStartTime": {
|
||||||
|
},
|
||||||
|
"searchFoundEndTime": {
|
||||||
|
compareDate: "[name=searchFoundStartTime]"
|
||||||
|
},
|
||||||
|
"search_create_time_start": {
|
||||||
|
},
|
||||||
|
"search_create_time_end": {
|
||||||
|
compareDate: "[name=search_create_time_start]"
|
||||||
|
},
|
||||||
|
"search_edit_time_start": {
|
||||||
|
},
|
||||||
|
"search_edit_time_end": {
|
||||||
|
compareDate: "[name=search_edit_time_start]"
|
||||||
|
},
|
||||||
|
"search_audit_time_start": {
|
||||||
|
},
|
||||||
|
"search_audit_time_end": {
|
||||||
|
compareDate: "[name=search_audit_time_start]"
|
||||||
|
},
|
||||||
|
"beginDate": {
|
||||||
|
},
|
||||||
|
"endDate": {
|
||||||
|
compareDate: "[name=beginDate]"
|
||||||
|
},
|
||||||
|
"dobeginDate": {
|
||||||
|
},
|
||||||
|
"doendDate": {
|
||||||
|
compareDate: "[name=dobeginDate]"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
submitHandler: function(form){
|
||||||
|
loading('loading...');
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 动态调整日志
|
||||||
|
var igHeight = $("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").height();
|
||||||
|
$("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").bind("DOMNodeInserted",function(e) {
|
||||||
|
var newIgHeight = $("#searchForm").find(".col-md-12").eq(0).height();
|
||||||
|
$("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").find(".input-group-btn").css("padding-bottom", (newIgHeight-igHeight)+"px");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
//与表达式时,只允许为子串匹配
|
//与表达式时,只允许为子串匹配
|
||||||
var setDefaultMatchMethod=function (obj){
|
var setDefaultMatchMethod=function (obj){
|
||||||
@@ -742,7 +789,6 @@ var page=function(n,s){
|
|||||||
$("#pageNo").val(n);
|
$("#pageNo").val(n);
|
||||||
$("#pageSize").val(s);
|
$("#pageSize").val(s);
|
||||||
$("#searchForm").submit();
|
$("#searchForm").submit();
|
||||||
loading();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user