调整协议字段取值

This commit is contained in:
wangxin
2018-10-06 23:10:54 +08:00
parent 210ba71901
commit 34d56b814e
3 changed files with 40 additions and 7 deletions

View File

@@ -325,7 +325,7 @@ var processAction=function(configType,obj){
//先清空,再添加
o.find("select[name$='protocol']").empty();
$.ipcommon.protocol.each(function(){
if($(this).attr("value")==0||$(this).attr("value")==6){
if($(this).attr("value")==6){
o.find("select[name$='protocol']").append($(this));
}
})
@@ -365,7 +365,13 @@ var processAction=function(configType,obj){
if(o.find("select[name$='protocol'] option[value='"+selectedProtocol+"']").length>0){
o.find("select[name$='protocol']").selectpicker("val",selectedProtocol);
}else{
o.find("select[name$='protocol']").selectpicker("val",0);
if(o.find("select[name$='protocol'] option[value=0]").length>0){
o.find("select[name$='protocol']").selectpicker("val",0);
}else{
o.find("select[name$='protocol']").get(0).selectedIndex=0;
o.find("select[name$='protocol']").selectpicker("refresh");
}
}
}
}