修复app关键字配置长度限制bug;
lastPage增加set方法; 修复不可见字符提示BUG;
This commit is contained in:
@@ -1521,18 +1521,15 @@ var validateTagInputKeyword=function(){
|
||||
}
|
||||
var validCharLength=function(){
|
||||
var flag=true;
|
||||
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
|
||||
var value=$(this).val()
|
||||
if(value!=''){
|
||||
value=value.replace("***and***","");
|
||||
if(value.length < 4 || value.length > 1024){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
if(flag){
|
||||
flag=false;
|
||||
}
|
||||
$(".tagsinput:visible").each(function(){
|
||||
var text='';
|
||||
$(this).find(".tag").each(function(){
|
||||
text+=$(this).children("span").text().trim();
|
||||
});
|
||||
if(text.length < 4 || text.length > 1024){
|
||||
$(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
if(flag){
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -1540,23 +1537,32 @@ var validCharLength=function(){
|
||||
|
||||
}
|
||||
var validateInvisibleCharTag=function(){
|
||||
var hasInvisibleCharTags=[];
|
||||
var flag=true;
|
||||
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()+"'");
|
||||
$(".tagsinput:visible").each(function(){
|
||||
var hasInvisibleCharTags=[];
|
||||
$(this).find(".tag").each(function(){
|
||||
var text=$(this).children("span").text().trim();
|
||||
if (text.match(reg)) {
|
||||
hasInvisibleCharTags.push("'"+text+"'");
|
||||
}
|
||||
});
|
||||
if(hasInvisibleCharTags.length==1){
|
||||
$(this).parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||
if(flag){
|
||||
flag= false;
|
||||
}
|
||||
}else if(hasInvisibleCharTags.length>=1){
|
||||
$(this).parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.haveInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>");
|
||||
if(flag){
|
||||
flag= false;
|
||||
}
|
||||
}
|
||||
});
|
||||
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;
|
||||
if(flag){
|
||||
flag=validCharLength();
|
||||
}
|
||||
var charLengthValid=validCharLength();
|
||||
return charLengthValid;
|
||||
return flag;
|
||||
}
|
||||
var setHexCaseSenstive=function(){
|
||||
$("input[name$='configHex']").each(function(){
|
||||
|
||||
Reference in New Issue
Block a user