From 4f4e020c308dead586a3435d22f5479be9bae3a6 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 25 Feb 2019 13:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=AA=8C=E8=AF=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/css/style.css | 10 ------- .../main/resources/static/ruoyi/css/ry-ui.css | 7 ++++- .../resources/templates/monitor/job/add.html | 23 +++++---------- .../resources/templates/monitor/job/edit.html | 13 +++++---- .../templates/system/config/add.html | 16 ++++------- .../templates/system/config/edit.html | 16 ++++------- .../resources/templates/system/dept/add.html | 14 ++++++---- .../resources/templates/system/dept/edit.html | 14 ++++++---- .../templates/system/dict/data/add.html | 16 ++++------- .../templates/system/dict/data/edit.html | 16 ++++------- .../templates/system/dict/type/add.html | 11 +++----- .../templates/system/dict/type/edit.html | 11 +++----- .../resources/templates/system/menu/add.html | 14 ++++++---- .../resources/templates/system/menu/edit.html | 14 ++++++---- .../templates/system/notice/add.html | 8 ++---- .../templates/system/notice/edit.html | 8 ++---- .../resources/templates/system/post/add.html | 12 ++++---- .../resources/templates/system/post/edit.html | 12 ++++---- .../resources/templates/system/role/add.html | 12 ++++---- .../resources/templates/system/role/edit.html | 12 ++++---- .../resources/templates/system/user/add.html | 28 ++++++++----------- .../resources/templates/system/user/edit.html | 22 ++++++--------- .../templates/system/user/profile/edit.html | 3 +- .../system/user/profile/resetPwd.html | 3 +- .../templates/system/user/resetPwd.html | 3 +- .../src/main/resources/vm/html/add.html.vm | 3 +- .../src/main/resources/vm/html/edit.html.vm | 3 +- 27 files changed, 134 insertions(+), 190 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/css/style.css b/ruoyi-admin/src/main/resources/static/css/style.css index fb8cde4a..bff2cd71 100644 --- a/ruoyi-admin/src/main/resources/static/css/style.css +++ b/ruoyi-admin/src/main/resources/static/css/style.css @@ -2318,16 +2318,6 @@ table.dataTable thead .sorting:after { .google-map { height: 300px; } -/* Validation */ -label.error { - color: #cc5965; - display: inline-block; - margin-left: 5px; -} - -.form-control.error { - border: 1px dotted #cc5965; -} /* ngGrid */ .gridStyle { border: 1px solid #d4d4d4; diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css index d7677e6a..433239c6 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css +++ b/ruoyi-admin/src/main/resources/static/ruoyi/css/ry-ui.css @@ -171,11 +171,16 @@ label.error { position: absolute; right: 18px; - top: 7px; + top: 10px; color: #ef392b; font-size: 12px } +.input-group label.error { + left: 255px; + z-index:99; +} + .Validform_error,input.error,select.error { background-color: #fbe2e2; border-color: #c66161; diff --git a/ruoyi-admin/src/main/resources/templates/monitor/job/add.html b/ruoyi-admin/src/main/resources/templates/monitor/job/add.html index fef818be..d78f6f50 100644 --- a/ruoyi-admin/src/main/resources/templates/monitor/job/add.html +++ b/ruoyi-admin/src/main/resources/templates/monitor/job/add.html @@ -8,31 +8,31 @@
- +
- +
- +
- +
- +
@@ -66,17 +66,7 @@ $("#form-job-add").validate({ rules:{ - jobName:{ - required:true, - }, - jobGroup:{ - required:true, - }, - methodName:{ - required:true, - }, cronExpression:{ - required:true, remote: { url: prefix + "/checkCronExpressionIsValid", type: "post", @@ -96,7 +86,8 @@ "cronExpression": { remote: "表达式不正确" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/monitor/job/edit.html b/ruoyi-admin/src/main/resources/templates/monitor/job/edit.html index 868f5cb6..02bc3327 100644 --- a/ruoyi-admin/src/main/resources/templates/monitor/job/edit.html +++ b/ruoyi-admin/src/main/resources/templates/monitor/job/edit.html @@ -9,31 +9,31 @@
- +
- +
- +
- +
- +
@@ -97,7 +97,8 @@ "cronExpression": { remote: "表达式不正确" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/config/add.html b/ruoyi-admin/src/main/resources/templates/system/config/add.html index 2b3a920e..646fc721 100644 --- a/ruoyi-admin/src/main/resources/templates/system/config/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/config/add.html @@ -8,19 +8,19 @@
- +
- +
- +
@@ -47,7 +47,6 @@ $("#form-config-add").validate({ rules: { configKey: { - required: true, remote: { url: prefix + "/checkConfigKeyUnique", type: "post", @@ -62,18 +61,13 @@ } } }, - configName: { - required: true - }, - configValue: { - required: true - }, }, messages: { "configKey": { remote: "参数键名已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/config/edit.html b/ruoyi-admin/src/main/resources/templates/system/config/edit.html index eab14694..0e894ae7 100644 --- a/ruoyi-admin/src/main/resources/templates/system/config/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/config/edit.html @@ -9,19 +9,19 @@
- +
- +
- +
@@ -48,7 +48,6 @@ $("#form-config-edit").validate({ rules: { configKey: { - required: true, remote: { url: prefix + "/checkConfigKeyUnique", type: "post", @@ -66,18 +65,13 @@ } } }, - configName: { - required: true - }, - configValue: { - required: true - }, }, messages: { "configKey": { remote: "参数键名已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/dept/add.html b/ruoyi-admin/src/main/resources/templates/system/dept/add.html index 4cefb040..228ee05a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dept/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/dept/add.html @@ -9,19 +9,22 @@
- +
+ + +
- +
- +
@@ -60,7 +63,6 @@ $("#form-dept-add").validate({ rules:{ deptName:{ - required:true, remote: { url: prefix + "/checkDeptNameUnique", type: "post", @@ -79,7 +81,6 @@ } }, orderNum:{ - required:true, digits:true }, email:{ @@ -93,7 +94,8 @@ "deptName": { remote: "部门已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/dept/edit.html b/ruoyi-admin/src/main/resources/templates/system/dept/edit.html index 7bb5177e..f674f278 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dept/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/dept/edit.html @@ -10,19 +10,22 @@
- +
+ + +
- +
- +
@@ -61,7 +64,6 @@ $("#form-dept-edit").validate({ rules:{ deptName:{ - required:true, remote: { url: prefix + "/checkDeptNameUnique", type: "post", @@ -83,7 +85,6 @@ } }, orderNum:{ - required:true, digits:true }, email:{ @@ -97,7 +98,8 @@ "deptName": { remote: "部门已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/dict/data/add.html b/ruoyi-admin/src/main/resources/templates/system/dict/data/add.html index 722ea38e..4c188756 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dict/data/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/dict/data/add.html @@ -8,13 +8,13 @@
- +
- +
@@ -32,7 +32,7 @@
- +
@@ -82,17 +82,11 @@ $("#form-dict-add").validate({ rules:{ - dictLabel:{ - required:true, - }, - dictValue:{ - required:true, - }, dictSort:{ - required:true, digits:true }, - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/dict/data/edit.html b/ruoyi-admin/src/main/resources/templates/system/dict/data/edit.html index 11b85d6a..49bc5607 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dict/data/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/dict/data/edit.html @@ -9,13 +9,13 @@
- +
- +
@@ -33,7 +33,7 @@
- +
@@ -83,17 +83,11 @@ $("#form-dict-edit").validate({ rules:{ - dictLabel:{ - required:true, - }, - dictValue:{ - required:true, - }, dictSort:{ - required:true, digits:true }, - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/dict/type/add.html b/ruoyi-admin/src/main/resources/templates/system/dict/type/add.html index d51790e2..eb935db5 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dict/type/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/dict/type/add.html @@ -8,13 +8,13 @@
- +
- +
@@ -40,11 +40,7 @@ $("#form-dict-add").validate({ rules:{ - dictName:{ - required:true, - }, dictType:{ - required:true, minlength: 5, remote: { url: prefix + "/checkDictTypeUnique", @@ -65,7 +61,8 @@ "dictType": { remote: "该字典类型已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/dict/type/edit.html b/ruoyi-admin/src/main/resources/templates/system/dict/type/edit.html index 17481b53..c311791b 100644 --- a/ruoyi-admin/src/main/resources/templates/system/dict/type/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/dict/type/edit.html @@ -9,13 +9,13 @@
- +
- +
@@ -41,11 +41,7 @@ $("#form-dict-edit").validate({ rules:{ - dictName:{ - required:true, - }, dictType:{ - required:true, minlength: 5, remote: { url: prefix + "/checkDictTypeUnique", @@ -69,7 +65,8 @@ "dictType": { remote: "该字典类型已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/add.html b/ruoyi-admin/src/main/resources/templates/system/menu/add.html index 7b233f2a..63e40e8d 100644 --- a/ruoyi-admin/src/main/resources/templates/system/menu/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/menu/add.html @@ -9,7 +9,10 @@
- +
+ + +
@@ -23,7 +26,7 @@
- +
@@ -41,7 +44,7 @@
- +
@@ -76,7 +79,6 @@ required:true, }, menuName:{ - required:true, remote: { url: prefix + "/checkMenuNameUnique", type: "post", @@ -95,7 +97,6 @@ } }, orderNum:{ - required:true, digits:true }, }, @@ -103,7 +104,8 @@ "menuName": { remote: "菜单已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/menu/edit.html b/ruoyi-admin/src/main/resources/templates/system/menu/edit.html index aec02648..eaf6d90b 100644 --- a/ruoyi-admin/src/main/resources/templates/system/menu/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/menu/edit.html @@ -10,7 +10,10 @@
- +
+ + +
@@ -24,7 +27,7 @@
- +
@@ -42,7 +45,7 @@
- +
@@ -82,7 +85,6 @@ required:true, }, menuName:{ - required:true, remote: { url: prefix + "/checkMenuNameUnique", type: "post", @@ -104,7 +106,6 @@ } }, orderNum:{ - required:true, digits:true }, }, @@ -112,7 +113,8 @@ "menuName": { remote: "菜单已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/notice/add.html b/ruoyi-admin/src/main/resources/templates/system/notice/add.html index fa1a233e..ef012f1c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/notice/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/notice/add.html @@ -10,7 +10,7 @@
- +
@@ -81,11 +81,7 @@ } $("#form-notice-add").validate({ - rules:{ - noticeTitle:{ - required:true, - } - } + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/notice/edit.html b/ruoyi-admin/src/main/resources/templates/system/notice/edit.html index 4ffa2e8b..8433a15e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/notice/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/notice/edit.html @@ -11,7 +11,7 @@
- +
@@ -86,11 +86,7 @@ } $("#form-notice-edit").validate({ - rules:{ - noticeTitle:{ - required:true, - } - } + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/post/add.html b/ruoyi-admin/src/main/resources/templates/system/post/add.html index a9c95bc9..e61f8e3e 100644 --- a/ruoyi-admin/src/main/resources/templates/system/post/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/post/add.html @@ -8,19 +8,19 @@
- +
- +
- +
@@ -47,7 +47,6 @@ $("#form-post-add").validate({ rules:{ postName:{ - required:true, remote: { url: ctx + "system/post/checkPostNameUnique", type: "post", @@ -63,7 +62,6 @@ } }, postCode:{ - required:true, remote: { url: ctx + "system/post/checkPostCodeUnique", type: "post", @@ -79,7 +77,6 @@ } }, postSort:{ - required:true, digits:true }, }, @@ -90,7 +87,8 @@ "postName": { remote: "岗位名称已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/post/edit.html b/ruoyi-admin/src/main/resources/templates/system/post/edit.html index 5bcba24a..8409024d 100644 --- a/ruoyi-admin/src/main/resources/templates/system/post/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/post/edit.html @@ -9,19 +9,19 @@
- +
- +
- +
@@ -48,7 +48,6 @@ $("#form-post-edit").validate({ rules:{ postName:{ - required:true, remote: { url: ctx + "system/post/checkPostNameUnique", type: "post", @@ -67,7 +66,6 @@ } }, postCode:{ - required:true, remote: { url: ctx + "system/post/checkPostCodeUnique", type: "post", @@ -86,7 +84,6 @@ } }, postSort:{ - required:true, digits:true }, }, @@ -97,7 +94,8 @@ "postName": { remote: "岗位名称已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/role/add.html b/ruoyi-admin/src/main/resources/templates/system/role/add.html index be698922..964a3ba8 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/add.html @@ -9,19 +9,19 @@
- +
- +
- +
@@ -67,7 +67,6 @@ $("#form-role-add").validate({ rules:{ roleName:{ - required:true, remote: { url: ctx + "system/role/checkRoleNameUnique", type: "post", @@ -83,7 +82,6 @@ } }, roleKey:{ - required:true, remote: { url: ctx + "system/role/checkRoleKeyUnique", type: "post", @@ -99,7 +97,6 @@ } }, roleSort:{ - required:true, digits:true }, }, @@ -110,7 +107,8 @@ "roleKey": { remote: "角色权限已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/role/edit.html b/ruoyi-admin/src/main/resources/templates/system/role/edit.html index 446c146a..b1e99b2a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/role/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/role/edit.html @@ -10,19 +10,19 @@
- +
- +
- +
@@ -68,7 +68,6 @@ $("#form-role-edit").validate({ rules:{ roleName:{ - required:true, remote: { url: ctx + "system/role/checkRoleNameUnique", type: "post", @@ -87,7 +86,6 @@ } }, roleKey:{ - required:true, remote: { url: ctx + "system/role/checkRoleKeyUnique", type: "post", @@ -106,7 +104,6 @@ } }, roleSort:{ - required:true, digits:true }, }, @@ -117,7 +114,8 @@ "roleKey": { remote: "角色权限已经存在" } - } + }, + focusCleanup: true }); function edit() { diff --git a/ruoyi-admin/src/main/resources/templates/system/user/add.html b/ruoyi-admin/src/main/resources/templates/system/user/add.html index 4422d253..cc8155c6 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/add.html @@ -12,7 +12,7 @@
- +
@@ -20,7 +20,10 @@
- +
+ + +
@@ -30,7 +33,7 @@
- +
@@ -38,7 +41,7 @@
- +
@@ -48,7 +51,7 @@
- +
@@ -56,7 +59,7 @@
- +
@@ -140,7 +143,6 @@ $("#form-user-add").validate({ rules:{ loginName:{ - required:true, minlength: 2, maxlength: 20, remote: { @@ -157,19 +159,11 @@ } } }, - userName:{ - required:true, - }, - deptName:{ - required:true, - }, password:{ - required:true, minlength: 5, maxlength: 20 }, email:{ - required:true, email:true, remote: { url: prefix + "/checkEmailUnique", @@ -186,7 +180,6 @@ } }, phonenumber:{ - required:true, isPhone:true, remote: { url: prefix + "/checkPhoneUnique", @@ -213,7 +206,8 @@ "phonenumber":{ remote: "手机号码已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/user/edit.html b/ruoyi-admin/src/main/resources/templates/system/user/edit.html index 52a80a43..bbe1445f 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/edit.html @@ -13,7 +13,7 @@
- +
@@ -21,7 +21,10 @@
- +
+ + +
@@ -31,7 +34,7 @@
- +
@@ -39,7 +42,7 @@
- +
@@ -130,14 +133,7 @@ $("#form-user-edit").validate({ rules:{ - userName:{ - required:true, - }, - deptName:{ - required:true, - }, email:{ - required:true, email:true, remote: { url: prefix + "/checkEmailUnique", @@ -157,7 +153,6 @@ } }, phonenumber:{ - required:true, isPhone:true, remote: { url: prefix + "/checkPhoneUnique", @@ -184,7 +179,8 @@ "phonenumber":{ remote: "手机号码已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/user/profile/edit.html b/ruoyi-admin/src/main/resources/templates/system/user/profile/edit.html index d15fc700..36a9974a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/profile/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/profile/edit.html @@ -107,7 +107,8 @@ "phonenumber":{ remote: "手机号码已经存在" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/user/profile/resetPwd.html b/ruoyi-admin/src/main/resources/templates/system/user/profile/resetPwd.html index 692e5ec9..ee338541 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/profile/resetPwd.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/profile/resetPwd.html @@ -76,7 +76,8 @@ equalTo: "两次密码输入不一致" } - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-admin/src/main/resources/templates/system/user/resetPwd.html b/ruoyi-admin/src/main/resources/templates/system/user/resetPwd.html index 77c4e644..81d974de 100644 --- a/ruoyi-admin/src/main/resources/templates/system/user/resetPwd.html +++ b/ruoyi-admin/src/main/resources/templates/system/user/resetPwd.html @@ -29,7 +29,8 @@ minlength: 5, maxlength: 20 }, - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-generator/src/main/resources/vm/html/add.html.vm b/ruoyi-generator/src/main/resources/vm/html/add.html.vm index 19e0d138..1000e994 100644 --- a/ruoyi-generator/src/main/resources/vm/html/add.html.vm +++ b/ruoyi-generator/src/main/resources/vm/html/add.html.vm @@ -46,7 +46,8 @@ xxxx:{ required:true, }, - } + }, + focusCleanup: true }); function submitHandler() { diff --git a/ruoyi-generator/src/main/resources/vm/html/edit.html.vm b/ruoyi-generator/src/main/resources/vm/html/edit.html.vm index 6ac7137c..be5976aa 100644 --- a/ruoyi-generator/src/main/resources/vm/html/edit.html.vm +++ b/ruoyi-generator/src/main/resources/vm/html/edit.html.vm @@ -47,7 +47,8 @@ xxxx:{ required:true, }, - } + }, + focusCleanup: true }); function submitHandler() {