From 8ffad9334416ad9b43449ccc53ec0a748a0c0578 Mon Sep 17 00:00:00 2001 From: chenjinsong Date: Wed, 8 Aug 2018 16:50:00 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E8=A7=81=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E6=A0=A1=E9=AA=8C=E6=94=B9=E4=B8=BA=E5=9C=A8=E5=89=8D?= =?UTF-8?q?=E7=AB=AF=E9=A1=B5=E9=9D=A2=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/nis/web/controller/BaseController.java | 3 --- .../jquery-validation/1.11.0/jquery.validate.method.js | 8 ++++++++ .../jquery-validation/1.11.0/localization/messages_en.js | 3 ++- .../jquery-validation/1.11.0/localization/messages_ru.js | 3 ++- .../jquery-validation/1.11.0/localization/messages_zh.js | 3 ++- src/main/webapp/static/global/scripts/common.js | 5 +++++ 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index ecce3c64b..ab78fb03c 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -280,9 +280,6 @@ public class BaseController { binder.registerCustomEditor(String.class, new PropertyEditorSupport() { @Override public void setAsText(String text) { - Pattern p = Pattern.compile("\t|\r|\n"); - Matcher m = p.matcher(text); - text = m.replaceAll(""); setValue(text == null ? null : StringEscapeUtils.escapeHtml4(text.trim())); } @Override diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js index 2945ce45a..4d9c161d7 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js @@ -173,6 +173,14 @@ jQuery.validator.addMethod("compareDate", function(value, element, param) { return true; }, "结束时间不能早于开始时间"); +jQuery.validator.addMethod("invisibleChar", function(value, element) { + var reg = new RegExp(/\t|\r|\n/); + if (value.match(reg)) { + return false; + } + return true; +}, "请输入可见字符"); + //掩码校验,超过两位不得以0开头 jQuery.validator.addMethod("notStartZero",function(value, element) { if(value.length>1&&value.length<6){ 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 287e8ef0e..ec09225bc 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 @@ -61,6 +61,7 @@ checkParent:"Configuration Type must match it's parent.", specServiceCodeCheck:"Protocol No is repeat.", compareDate:"The end time should not be earlier than the start time.", - hexCheck:"Please enter the HEX format chatactar" + hexCheck:"Please enter the HEX format character", + invisibleChar:"Please enter the visible character" }); }(jQuery)); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js index 64649ea22..aa2192fc3 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js @@ -59,6 +59,7 @@ checkParent:"Configuration Type must match it's parent.", specServiceCodeCheck:"Protocol No is repeat.", compareDate:"The end time should not be earlier than the start time.", - hexCheck:"Please enter the HEX format chatactar" + hexCheck:"Please enter the HEX format character", + invisibleChar:"Please enter the visible character" }); }(jQuery)); \ No newline at end of file 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 066213cc7..c68b5da79 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 @@ -63,6 +63,7 @@ checkParent:"配置类型必须与上级配置一致!", specServiceCodeCheck:"协议号重复", compareDate:"结束时间不能早于开始时间", - hexCheck:"请输入十六进制字符" + hexCheck:"请输入十六进制字符", + invisibleChar:"请输入可见字符" }); }(jQuery)); diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index ad826a9ff..f070da75a 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -407,6 +407,11 @@ $(function(){ form.submit(); } }); + $("#ipCfgFrom input, #cfgForm input").change(function(){ + var s = $(this).val(); + var ns = s.replace(/\t|\r|\n/mg, ""); + $(this).val(ns); + }); }); window.onload=function(){ //日志查询IP类型增加格式提示 From dc58b5a56e5ab1c00e095e03754c2fbe99648b0c Mon Sep 17 00:00:00 2001 From: chenjinsong Date: Wed, 8 Aug 2018 16:54:53 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E8=A1=A5=E5=85=85=E4=B8=8A=E6=AC=A1?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/static/global/scripts/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index f070da75a..1a965bf07 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -407,7 +407,7 @@ $(function(){ form.submit(); } }); - $("#ipCfgFrom input, #cfgForm input").change(function(){ + $("#ipCfgFrom input, #cfgForm input, #cfgFrom input").change(function(){ var s = $(this).val(); var ns = s.replace(/\t|\r|\n/mg, ""); $(this).val(ns); From 2ebe43e198140ee524951a604b46d1d5d4040470 Mon Sep 17 00:00:00 2001 From: chenjinsong Date: Wed, 8 Aug 2018 17:45:14 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddomain=20white=20list?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nis/web/service/configuration/DomainService.java | 2 +- .../WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/nis/web/service/configuration/DomainService.java b/src/main/java/com/nis/web/service/configuration/DomainService.java index b76607fbc..372401e20 100644 --- a/src/main/java/com/nis/web/service/configuration/DomainService.java +++ b/src/main/java/com/nis/web/service/configuration/DomainService.java @@ -104,7 +104,7 @@ public class DomainService extends CrudService { } this.saveIpBatch(cfg.getAreaCfg()); } - if(cfg instanceof HttpUrlCfg){ + if(cfg instanceof HttpUrlCfg && cfg.getCfgId() == null){ domainDao.insert((HttpUrlCfg)cfg); }else{ stringCfgDao.update(cfg); diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp index a0a9cf1e2..f5160759d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp @@ -52,7 +52,9 @@ $(function(){ } if(flag){ var maxTtl=$("[name=maxTtl]").val(); + maxTtl = parseInt(maxTtl); var minTtl=$("[name=minTtl]").val(); + minTtl = parseInt(minTtl); if(minTtl>maxTtl){ message=""; $("div[for=maxTtl]").html(""); From 9b4f6f0772e79a7f4aaa84feed101d8f72da0938 Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Wed, 8 Aug 2018 18:40:41 +0800 Subject: [PATCH 4/4] =?UTF-8?q?1.=E9=83=A8=E5=88=86=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/messages/message_en.properties | 14 +++++----- .../webapp/WEB-INF/tags/sys/treeselect.tag | 2 +- .../WEB-INF/views/basics/serviceDictInfo.jsp | 2 +- .../WEB-INF/views/basics/sysDictInfo.jsp | 2 +- .../webapp/WEB-INF/views/sys/menuForm.jsp | 7 +++-- .../webapp/WEB-INF/views/sys/roleList.jsp | 4 +-- .../webapp/WEB-INF/views/sys/userList.jsp | 28 +++++++++---------- 7 files changed, 30 insertions(+), 29 deletions(-) diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index d4191711b..c5a0b297c 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -478,7 +478,7 @@ useable=Useable click_add=Click And Add menu_name=Menu Name unicode=Unicode -link=Link +link=URL visible=Visible permission_mark=Permission Mark display=Display @@ -489,14 +489,14 @@ save_sort=Save Sort menu=Menu parent_menu=Parent Menu aim=Aim -click_menu_turn=\u70B9\u51FB\u83DC\u5355\u8DF3\u8F6C\u7684\u9875\u9762 -link_window_info=\u94FE\u63A5\u5730\u5740\u6253\u5F00\u7684\u76EE\u6807\u7A97\u53E3,\u9ED8\u8BA4\:mainFrame -is_top_menu=\u662F\u5426\u9876\u90E8\u5BFC\u822A\u83DC\u5355 +click_menu_turn=Click The Menu Will Trun To This Page +link_window_info=The Aim Window Opened By The URL,Default\:mainFrame +is_top_menu=Top Level Menu icon=Icon -is_top_menu_info=\u8BE5\u83DC\u5355\u6216\u64CD\u4F5C\u662F\u5426\u9876\u90E8\u5BFC\u822A\u83DC\u5355 +is_top_menu_info=Whether This Menu Is The Top Navigation Menu sort_info=Sort Asc -is_show_sysmenu=\u8BE5\u83DC\u5355\u6216\u64CD\u4F5C\u662F\u5426\u663E\u793A\u5230\u7CFB\u7EDF\u83DC\u5355\u4E2D -control_permission_info=\u63A7\u5236\u5668\u4E2D\u5B9A\u4E49\u7684\u6743\u9650\u6807\u8BC6,\u5982\:@RequiresPermissions("\u6743\u9650\u6807\u8BC6") +is_show_sysmenu=Whether This Menu Is Display On The System Menu +control_permission_info=Permission Identity Defined In The Controller,Such As\:@RequiresPermissions("Permission Identity") role_name=Role Name data_range=Data Scope allot=Allot diff --git a/src/main/webapp/WEB-INF/tags/sys/treeselect.tag b/src/main/webapp/WEB-INF/tags/sys/treeselect.tag index 4072e43c7..b641b49ba 100644 --- a/src/main/webapp/WEB-INF/tags/sys/treeselect.tag +++ b/src/main/webapp/WEB-INF/tags/sys/treeselect.tag @@ -28,7 +28,7 @@ <%@ attribute name="unCheckedPS" type="java.lang.String" required="false" description="复选框取消选中时是否关联父子节点,ps关联父子,p关联父,s关联子,都不关联为空"%>
-
diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictInfo.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictInfo.jsp index 2d63eb34e..9a768d55f 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictInfo.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictInfo.jsp @@ -108,7 +108,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/basics/sysDictInfo.jsp b/src/main/webapp/WEB-INF/views/basics/sysDictInfo.jsp index 581ea9ddd..de02873bb 100644 --- a/src/main/webapp/WEB-INF/views/basics/sysDictInfo.jsp +++ b/src/main/webapp/WEB-INF/views/basics/sysDictInfo.jsp @@ -112,7 +112,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/sys/menuForm.jsp b/src/main/webapp/WEB-INF/views/sys/menuForm.jsp index 561608de8..7fb886fbc 100644 --- a/src/main/webapp/WEB-INF/views/sys/menuForm.jsp +++ b/src/main/webapp/WEB-INF/views/sys/menuForm.jsp @@ -45,7 +45,8 @@
- ${not empty menu.id?'修改':'添加'}
+
+
@@ -60,8 +61,8 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/sys/roleList.jsp b/src/main/webapp/WEB-INF/views/sys/roleList.jsp index 255a4ab28..d67d657fc 100644 --- a/src/main/webapp/WEB-INF/views/sys/roleList.jsp +++ b/src/main/webapp/WEB-INF/views/sys/roleList.jsp @@ -40,7 +40,7 @@ - + @@ -49,7 +49,7 @@ diff --git a/src/main/webapp/WEB-INF/views/sys/userList.jsp b/src/main/webapp/WEB-INF/views/sys/userList.jsp index ffb3c9530..36500729d 100644 --- a/src/main/webapp/WEB-INF/views/sys/userList.jsp +++ b/src/main/webapp/WEB-INF/views/sys/userList.jsp @@ -83,32 +83,32 @@ -
+
-
-
- +
+
+
+ +
-
-
- +
+
+
+ +
- -
-
- - -
${role.name} <%-- --%> - ?', this.href)"> + ', this.href)">