Merge branch 'demostration_08' into 'develop'
Demostration 08 See merge request !33
This commit is contained in:
@@ -270,15 +270,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("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}","'"+tag+"'")+"</label>");
|
||||
}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(){
|
||||
@@ -1139,4 +1146,22 @@ var importCfg=function(){
|
||||
}
|
||||
$("#import_modal").modal('hide');//导入文件隐藏
|
||||
$("#importForm1").submit();
|
||||
}
|
||||
}
|
||||
var validateInvisibleCharTag=function(){
|
||||
var hasInvisibleCharTags=[];
|
||||
var reg = new RegExp(/\t|\r|\n/);
|
||||
$(".tagsinput").find(".tag").each(function(){
|
||||
var text=$(this).children("span").text();
|
||||
if (text.match(reg)) {
|
||||
hasInvisibleCharTags.push("'"+text.trim()+"'");
|
||||
}
|
||||
});
|
||||
if(hasInvisibleCharTags.length==1){
|
||||
$(".tagsinput").parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||
return false;
|
||||
}else if(hasInvisibleCharTags.length>=1){
|
||||
$(".tagsinput").parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.haveInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user