diff --git a/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp
index 910b722c3..83c7f4dba 100644
--- a/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp
+++ b/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp
@@ -115,12 +115,28 @@
}
}
});
+ var hasInvisibleCharTags=[];
+ var reg = new RegExp(/\t|\r|\n/);
+ console.log($(".tagsinput").find(".tag").length);
+ $(".tagsinput").find(".tag").each(function(){
+ var text=$(this).children("span").text();
+ if (text.match(reg)) {
+ hasInvisibleCharTags.push("'"+text+"'");
+ flag = false;
+ }
+ });
+ if(hasInvisibleCharTags.length==1){
+ $(".tagsinput").parents(".col-md-6").next("div").html("");
+ }else if(hasInvisibleCharTags.length>=1){
+ $(".tagsinput").parents(".col-md-6").next("div").html("");
+ }
if(flag){
//将disable属性的元素删除
$(".disabled").each(function(){
$(this).remove();
});
$("input[name$='exprType']").attr("disabled",false);
+ console.log(7777);
loading('onloading...');
form.submit();
}else{
diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js
index 2034936b6..5cf046daf 100644
--- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js
+++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js
@@ -62,6 +62,8 @@
specServiceCodeCheck:"Protocol No is repeat.",
compareDate:"The end time should not be earlier than the start time.",
hexCheck:"Please enter the HEX format character",
- invisibleChar:"Please enter the visible character"
+ invisibleChar:"Please enter the visible character",
+ hasInvisibleChar:"The tag {0} has invisible character",
+ haveInvisibleChar:"The tags {0} have invisible character"
});
}(jQuery));
diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js
index 175cb8bf0..5bfc41c8a 100644
--- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js
+++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js
@@ -62,6 +62,8 @@
specServiceCodeCheck:"协议号重复",
compareDate:"结束时间不能早于开始时间",
hexCheck:"请输入十六进制字符",
- invisibleChar:"请输入可见字符"
+ invisibleChar:"请输入可见字符",
+ hasInvisibleChar:"标签{0}包含不可见字符",
+ haveInvisibleChar:"标签{0}包含不可见字符"
});
}(jQuery));
diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js
index 3e556904a..86837b7ad 100644
--- a/src/main/webapp/static/global/scripts/common.js
+++ b/src/main/webapp/static/global/scripts/common.js
@@ -261,15 +261,22 @@ $(function(){
'delimiter':'***and***',//特殊字符串分隔与表达式的多关键词
maxCount:4,
onAddTag:function(tag,size){
- //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);*/
+ var reg = new RegExp(/\t|\r|\n/);
+ if (tag.match(reg)) {
+ $(this).parents(".col-md-6").next("div").html("");
+ }else{
+ $(this).parents(".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);
},
onRemoveTag:function(tag,size){
+ $(this).parents(".col-md-6").next("div").html("");
//var keywordValue = "";
var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0];
/*$("span[class='tag']").each(function(){