修复app关键字配置长度限制bug;

lastPage增加set方法;
修复不可见字符提示BUG;
This commit is contained in:
intraUser
2019-01-04 20:26:56 +06:00
parent a96590e460
commit 7c85d78ad7
7 changed files with 63 additions and 25 deletions

View File

@@ -614,6 +614,9 @@ public class Page<T> {
public boolean isLastPage() { public boolean isLastPage() {
return lastPage; return lastPage;
} }
public void setLastPage(boolean lastPage) {
this.lastPage = lastPage;
}
/** /**

View File

@@ -42,6 +42,12 @@ $(function(){
} }
} }
}); });
//不可见字符校验[内含字符大小校验]
if(flag){
flag=validateInvisibleCharTag();
}
if(flag){ if(flag){
$("input[name$='exprType']").attr("disabled",false); $("input[name$='exprType']").attr("disabled",false);
$("#appCode").val($("#specServiceIdId").val()); $("#appCode").val($("#specServiceIdId").val());

View File

@@ -42,6 +42,11 @@ $(function(){
} }
} }
}); });
//不可见字符校验[内含字符大小校验]
if(flag){
flag=validateInvisibleCharTag();
}
if(flag){ if(flag){
$("input[name$='exprType']").attr("disabled",false); $("input[name$='exprType']").attr("disabled",false);
$("#appCode").val($("#specServiceIdId").val()); $("#appCode").val($("#specServiceIdId").val());

View File

@@ -128,6 +128,12 @@ $(function(){
$("div[for=upBoundary]").html("<label for=\"upBoundary\" class=\"error\" id=\"upBoundary-error\">"+message+"</label>"); $("div[for=upBoundary]").html("<label for=\"upBoundary\" class=\"error\" id=\"upBoundary-error\">"+message+"</label>");
flag=false; flag=false;
} }
//不可见字符校验[内含字符大小校验]
if(flag){
flag=validateInvisibleCharTag();
}
if(flag){ if(flag){
//将disable属性的元素删除 //将disable属性的元素删除
$(".disabled").each(function(){ $(".disabled").each(function(){

View File

@@ -80,6 +80,12 @@ $(function(){
} }
} }
}); });
//不可见字符校验[内含字符大小校验]
if(flag){
flag=validateInvisibleCharTag();
}
if(flag){ if(flag){
//将disable属性的元素删除 //将disable属性的元素删除
$(".disabled").each(function(){ $(".disabled").each(function(){

View File

@@ -42,6 +42,12 @@ $(function(){
} }
} }
}); });
//不可见字符校验[内含字符大小校验]
if(flag){
flag=validateInvisibleCharTag();
}
if(flag){ if(flag){
$("input[name$='exprType']").attr("disabled",false); $("input[name$='exprType']").attr("disabled",false);
$("#appCode").val($("#specServiceIdId").val()); $("#appCode").val($("#specServiceIdId").val());

View File

@@ -1521,18 +1521,15 @@ var validateTagInputKeyword=function(){
} }
var validCharLength=function(){ var validCharLength=function(){
var flag=true; var flag=true;
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){ $(".tagsinput:visible").each(function(){
var value=$(this).val() var text='';
if(value!=''){ $(this).find(".tag").each(function(){
value=value.replace("***and***",""); text+=$(this).children("span").text().trim();
if(value.length < 4 || value.length > 1024){ });
$(this).parents(".form-group").find( if(text.length < 4 || text.length > 1024){
"div[for='" $(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
+ $(this).attr("name") if(flag){
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>"); flag=false;
if(flag){
flag=false;
}
} }
} }
}); });
@@ -1540,23 +1537,32 @@ var validCharLength=function(){
} }
var validateInvisibleCharTag=function(){ var validateInvisibleCharTag=function(){
var hasInvisibleCharTags=[]; var flag=true;
var reg = new RegExp(/\t|\r|\n/); var reg = new RegExp(/\t|\r|\n/);
$(".tagsinput").find(".tag").each(function(){ $(".tagsinput:visible").each(function(){
var text=$(this).children("span").text(); var hasInvisibleCharTags=[];
if (text.match(reg)) { $(this).find(".tag").each(function(){
hasInvisibleCharTags.push("'"+text.trim()+"'"); 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){ if(flag){
$(".tagsinput").parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}",hasInvisibleCharTags.join(","))+"</label>"); flag=validCharLength();
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;
} }
var charLengthValid=validCharLength(); return flag;
return charLengthValid;
} }
var setHexCaseSenstive=function(){ var setHexCaseSenstive=function(){
$("input[name$='configHex']").each(function(){ $("input[name$='configHex']").each(function(){