Url分组配置修改、删除和审核服务端
This commit is contained in:
@@ -42,11 +42,22 @@ var addContent = function(obj, contentClassName) {
|
||||
var index=0;
|
||||
$("."+contentClassName).each(function(){
|
||||
reSort($(this),index);
|
||||
// $(".tags").attr("id","tags_"+index+"_tagsinput");
|
||||
// $(".tags").attr("id","tags_"+index);
|
||||
$("input[name='urlCommGroupList["+index+"].cfgKeywords']").attr("id","tags_"+index);
|
||||
index++;
|
||||
});
|
||||
$(".selectpicker").selectpicker("render");
|
||||
|
||||
var aaa=0
|
||||
/* $(".tagsinput").each(function(){
|
||||
$(this).attr("id","tags_"+aaa+"_tagsinput");
|
||||
if(aaa>0 && aaa==($(".tagsinput").length-1)){
|
||||
// if(aaa==($(".tagsinput").length-1) && aaa !=0){
|
||||
$("#tags_"+aaa+"_tagsinput").remove();
|
||||
// }
|
||||
ssss();
|
||||
}
|
||||
aaa++;
|
||||
}); */
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
@@ -61,6 +72,7 @@ var delContent = function(obj,contentClassName) {
|
||||
reSort($(this),index);
|
||||
index++;
|
||||
});
|
||||
|
||||
}
|
||||
var reSort=function(obj,index){
|
||||
$(obj).find("input,select").each(function(){
|
||||
@@ -70,6 +82,7 @@ var reSort=function(obj,index){
|
||||
var namePrefix="urlCommGroupList[";
|
||||
var nameSubfix=name.substring(name.indexOf("]"));
|
||||
var nameNew=namePrefix+index+nameSubfix;
|
||||
// $(".tags").attr("id","tags_"+index);
|
||||
if(nameNew!=name){
|
||||
$(this).attr("name",nameNew);
|
||||
$(this).parents(".form-group").find("div[for='"+name+"']").attr("for",nameNew);
|
||||
@@ -80,6 +93,86 @@ var reSort=function(obj,index){
|
||||
})
|
||||
}
|
||||
|
||||
function ssss(leng){
|
||||
|
||||
var tagsInputSettings1="#tags";
|
||||
var options;
|
||||
var ccc=0;
|
||||
$("input[name$='cfgKeywords']").each(function(){
|
||||
var tagsId = $(this).attr("id");
|
||||
var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0];
|
||||
var isTags = $(this).hasClass("tags");//有tags样式的关键字输入框才需处理
|
||||
if(typeof(tagsId)!=='undefined' && tagsId.indexOf("tags_")!=-1 && isTags){
|
||||
// 表达式类型初始
|
||||
if($("input:radio[name='"+objNamePrefix+"exprType'][checked=checked]").val()==1){
|
||||
options = $("select[name='"+objNamePrefix+"matchMethod']").find("option[value!=0]");
|
||||
$("select[name='"+objNamePrefix+"matchMethod']").find("option[value!=0]").remove();
|
||||
}else{
|
||||
options = $("select[name='"+objNamePrefix+"matchMethod']").find("option[value!=0]");
|
||||
}
|
||||
//表单中如果有关键字内容可能输入多个关键字的情况,根据输入关键字个数确定表达式选中情况,不允许手动选中
|
||||
if($("select[name='"+objNamePrefix+"district']").val()!="Payload"){//如果是app 的payload特征,可选择表达式
|
||||
$("input:radio[name='"+objNamePrefix+"exprType']").attr("disabled",true);
|
||||
}
|
||||
|
||||
if(tagsId !="tags_0" && ccc>0 && ccc==($("input[name$='cfgKeywords']").length-1)){
|
||||
tagsInputSettings1 = tagsInputSettings1+",#"+tagsId;
|
||||
}
|
||||
ccc++;
|
||||
}
|
||||
|
||||
});
|
||||
$(tagsInputSettings1).tagsInput({
|
||||
width:$(tagsInputSettings1).find(".form-control").width(),
|
||||
defaultText:'please input keywords',
|
||||
'delimiter':'***and***',//特殊字符串分隔与表达式的多关键词
|
||||
maxCount:4,
|
||||
onAddTag:function(tag,size){
|
||||
var reg = new RegExp(/\t|\r|\n/);
|
||||
/* if (tag.match(reg)) {
|
||||
$(this).parent(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}","'"+tag+"'")+"</label>");
|
||||
}else{
|
||||
$(this).parent(".col-md-6").next("div").html("");
|
||||
} */
|
||||
//var keywordValue = "";
|
||||
var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0];
|
||||
/*$("span[class='tag']").each(function(){
|
||||
keywordValue = keywordValue+"***iie***"+$(this).find("span").text().trim();
|
||||
});
|
||||
$(this).prev("input[name$='cfgKeywords']").val(keywordValue);*/
|
||||
exprTypeChecked(objNamePrefix,size,options);
|
||||
/* if($(this).hasClass("urlCheck")){
|
||||
protectedListWarn($("#"+$(this).attr("id")+"_tagsinput"),$(this).val(),protectedList);
|
||||
} */
|
||||
},
|
||||
onRemoveTag:function(tag,size){
|
||||
// $(this).parent(".col-md-6").next("div").html("");
|
||||
//var keywordValue = "";
|
||||
var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0];
|
||||
/*$("span[class='tag']").each(function(){
|
||||
keywordValue = keywordValue+"***iie***"+$(this).find("span").text().trim();
|
||||
});
|
||||
$(this).prev("input[name$='cfgKeywords']").val(keywordValue);*/
|
||||
exprTypeChecked(objNamePrefix,size,options);
|
||||
/* if($(this).hasClass("urlCheck")){
|
||||
protectedListWarn($("#"+$(this).attr("id")+"_tagsinput"),$(this).val(),protectedList);
|
||||
} */
|
||||
}
|
||||
});
|
||||
$(".tagsinput").popover({
|
||||
animation:true,
|
||||
container:'body',
|
||||
placement:'right',
|
||||
html:true,
|
||||
trigger:"hover",
|
||||
title:"",
|
||||
content:function(){
|
||||
var content = $("#tagsinputTip").text();
|
||||
return content;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
@@ -187,7 +280,7 @@ var reSort=function(obj,index){
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags <c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if> <c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>" type="text" id="tags_${tabName}${status.index}"
|
||||
<input class="form-control required tags <c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if> <c:if test="${fn:containsIgnoreCase(region.configServiceType,'url') }"> urlCheck </c:if>" type="text" id="tags_${status.index}"
|
||||
name="urlCommGroupList[-1].cfgKeywords"
|
||||
>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user