DNS reject增加策略分组功能
This commit is contained in:
@@ -23,6 +23,12 @@ $(function(){
|
||||
$("select[name$='portPattern']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
switchAction($("input[name='action']:checked").val());
|
||||
//DNS REJECT 时选择dnsStrategyId
|
||||
$("input[name='action']").on('change',function(){
|
||||
var action=$(this).val();
|
||||
switchAction(action);
|
||||
});
|
||||
$(".glyphicon-plus").on("click",function(){
|
||||
var obj=$(this).parents(".form-section").next(".container-fluid").clone();
|
||||
var len=$(this).parents("div").find(".container-fluid:visible").size();
|
||||
@@ -344,6 +350,20 @@ var switchIpType=function(obj){
|
||||
}
|
||||
}
|
||||
}
|
||||
var switchAction=function(action){
|
||||
if(action == 16){ //reject
|
||||
$(".policy").find("input,select,div,button").each(function(){
|
||||
$(this).removeAttr("disabled");
|
||||
$(this).removeClass("hidden");
|
||||
$(this).removeClass("disabled");
|
||||
})
|
||||
}else{
|
||||
$(".policy").find("input,select,div,button").each(function(){
|
||||
$(this).attr("disabled","disabled");
|
||||
$(this).addClass("hidden");
|
||||
})
|
||||
}
|
||||
}
|
||||
//ipType、ipPattern、portPattern选项变化时调用此方法,添加默认值
|
||||
var switchIpInfo=function(obj){
|
||||
var ipType="";
|
||||
|
||||
Reference in New Issue
Block a user