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 74774771d..1699c4bcf 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpForm.jsp @@ -41,14 +41,20 @@ $("#cfgFrom").validate( { errorPlacement : function(error, element) { - $(element).parents(".form-group").find( - "div[for='" - + element.attr("name") - + "']").append(error); + if($(element).parents().hasClass("tagsinput")){ + $(element).parents(".col-md-6").next("div").append(error); + }else{ + $(element).parents(".form-group").find( + "div[for='" + + element.attr("name") + + "']").append(error); + } }, submitHandler : function(form) { //loading('onloading...'); //代表所有业务都隐藏了,提示必须增加一种业务数据 + var flag = true; + //代表所有业务都隐藏了,提示必须增加一种业务数据 if($(".boxSolid").length ==$(".boxSolid.hidden").length){ top.$.jBox.tip("", ""); return; @@ -60,12 +66,25 @@ top.$.jBox.tip("", ""); return; } - //将disable属性的元素删除 - $(".disabled").each(function(){ - $(this).remove(); - }); - $("input[name$='exprType']").attr("disabled",false); - form.submit(); + $(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){ + if($(this).val()==''){ + $(this).parents(".form-group").find( + "div[for='" + + $(this).attr("name") + + "']").html(""); + flag = false; + return; + } + }) + if(flag){ + //将disable属性的元素删除 + $(".disabled").each(function(){ + $(this).remove(); + }); + $("input[name$='exprType']").attr("disabled",false); + form.submit(); + } + }, errorContainer : "#messageBox", }); @@ -97,6 +116,7 @@ +
@@ -151,7 +171,7 @@
-
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp index d4268ce16..7363e130e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslForm.jsp @@ -32,6 +32,7 @@ }, submitHandler : function(form) { //loading('onloading...'); + var flag = true; //代表所有业务都隐藏了,提示必须增加一种业务数据 if($(".boxSolid").length ==$(".boxSolid.hidden").length){ top.$.jBox.tip("", ""); @@ -44,12 +45,25 @@ top.$.jBox.tip("", ""); return; } - //将disable属性的元素删除 - $(".disabled").each(function(){ - $(this).remove(); - }); - $("input[name$='exprType']").attr("disabled",false); - form.submit(); + $(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){ + if($(this).val()==''){ + $(this).parents(".form-group").find( + "div[for='" + + $(this).attr("name") + + "']").html(""); + flag = false; + return; + } + }) + if(flag){ + //将disable属性的元素删除 + $(".disabled").each(function(){ + $(this).remove(); + }); + $("input[name$='exprType']").attr("disabled",false); + form.submit(); + } + }, errorContainer : "#messageBox", }); @@ -82,6 +96,7 @@ +
diff --git a/src/main/webapp/static/global/scripts/jquery.tagsinput.js b/src/main/webapp/static/global/scripts/jquery.tagsinput.js index af3319997..6b9f47cd1 100644 --- a/src/main/webapp/static/global/scripts/jquery.tagsinput.js +++ b/src/main/webapp/static/global/scripts/jquery.tagsinput.js @@ -223,7 +223,7 @@ if (settings.interactive) { - markup = markup + ''; + markup = markup + ''; } markup = markup + '
';