From dc2c68352ffa5dfc7817d62c50091f18ed7d71e1 Mon Sep 17 00:00:00 2001 From: Calvin Date: Fri, 31 Aug 2012 15:11:56 +0800 Subject: [PATCH] =?UTF-8?q?#35=20=E8=A7=A3=E5=86=B3bootstrap=20+=20JQuery?= =?UTF-8?q?=20Validation=E6=97=B6=E5=87=BA=E9=94=99=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=A2=AB=E5=BC=BA=E5=88=B6=E6=8D=A2=E8=A1=8C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/WEB-INF/views/account/adminUserForm.jsp | 4 ++-- .../main/webapp/WEB-INF/views/account/login.jsp | 6 ++++-- .../webapp/WEB-INF/views/account/profileForm.jsp | 4 ++-- .../webapp/WEB-INF/views/account/registerForm.jsp | 1 + .../main/webapp/WEB-INF/views/task/taskForm.jsp | 14 ++++++++------ .../static/jquery-validation/1.9.0/validate.css | 2 +- .../quickstart/functional/gui/TaskGuiFT.java | 6 +++--- .../main/webapp/WEB-INF/views/account/userForm.jsp | 7 ++++--- .../src/main/webapp/WEB-INF/views/login.jsp | 2 +- .../main/webapp/WEB-INF/views/story/webservice.jsp | 2 +- .../static/jquery-validation/1.9.0/validate.css | 2 +- 11 files changed, 28 insertions(+), 22 deletions(-) diff --git a/examples/quickstart/src/main/webapp/WEB-INF/views/account/adminUserForm.jsp b/examples/quickstart/src/main/webapp/WEB-INF/views/account/adminUserForm.jsp index 3214327c..363dea90 100644 --- a/examples/quickstart/src/main/webapp/WEB-INF/views/account/adminUserForm.jsp +++ b/examples/quickstart/src/main/webapp/WEB-INF/views/account/adminUserForm.jsp @@ -3,7 +3,7 @@ - 用户注册 + 用户管理 diff --git a/examples/quickstart/src/main/webapp/WEB-INF/views/account/login.jsp b/examples/quickstart/src/main/webapp/WEB-INF/views/account/login.jsp index 9c8db32a..b2012712 100644 --- a/examples/quickstart/src/main/webapp/WEB-INF/views/account/login.jsp +++ b/examples/quickstart/src/main/webapp/WEB-INF/views/account/login.jsp @@ -10,7 +10,9 @@ 登录页 @@ -49,7 +51,7 @@
注册 - (登录帐号:admin/admin,user/user) + (管理员: admin/admin, 普通用户: user/user)
diff --git a/examples/quickstart/src/main/webapp/WEB-INF/views/account/profileForm.jsp b/examples/quickstart/src/main/webapp/WEB-INF/views/account/profileForm.jsp index 6b6d3ec6..dca991fb 100644 --- a/examples/quickstart/src/main/webapp/WEB-INF/views/account/profileForm.jsp +++ b/examples/quickstart/src/main/webapp/WEB-INF/views/account/profileForm.jsp @@ -3,7 +3,7 @@ - 用户注册 + 资料修改 diff --git a/examples/quickstart/src/main/webapp/WEB-INF/views/account/registerForm.jsp b/examples/quickstart/src/main/webapp/WEB-INF/views/account/registerForm.jsp index 45c5356a..f17db1ee 100644 --- a/examples/quickstart/src/main/webapp/WEB-INF/views/account/registerForm.jsp +++ b/examples/quickstart/src/main/webapp/WEB-INF/views/account/registerForm.jsp @@ -11,6 +11,7 @@ $("#loginName").focus(); //为inputForm注册validate函数 $("#inputForm").validate({ + errorElement: "span", rules: { loginName: { remote: "${ctx}/register/checkLoginName" diff --git a/examples/quickstart/src/main/webapp/WEB-INF/views/task/taskForm.jsp b/examples/quickstart/src/main/webapp/WEB-INF/views/task/taskForm.jsp index e0803c29..348c9b02 100644 --- a/examples/quickstart/src/main/webapp/WEB-INF/views/task/taskForm.jsp +++ b/examples/quickstart/src/main/webapp/WEB-INF/views/task/taskForm.jsp @@ -9,9 +9,11 @@ @@ -22,15 +24,15 @@
管理任务
- +
- +
- +
- +
diff --git a/examples/quickstart/src/main/webapp/static/jquery-validation/1.9.0/validate.css b/examples/quickstart/src/main/webapp/static/jquery-validation/1.9.0/validate.css index d8a5d28e..fd4d7978 100644 --- a/examples/quickstart/src/main/webapp/static/jquery-validation/1.9.0/validate.css +++ b/examples/quickstart/src/main/webapp/static/jquery-validation/1.9.0/validate.css @@ -1,4 +1,4 @@ -label.error { +span.error { background:url("images/unchecked.gif") no-repeat 0px 0px; padding-left: 16px; padding-bottom: 2px; diff --git a/examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/gui/TaskGuiFT.java b/examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/gui/TaskGuiFT.java index 27df6e2c..f92c8a86 100644 --- a/examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/gui/TaskGuiFT.java +++ b/examples/quickstart/src/test/functional/org/springside/examples/quickstart/functional/gui/TaskGuiFT.java @@ -41,17 +41,17 @@ public class TaskGuiFT extends BaseSeleniumTestCase { s.click(By.linkText("创建任务")); Task task = TaskData.randomTask(); - s.type(By.id("task.title"), task.getTitle()); + s.type(By.id("task_title"), task.getTitle()); s.click(By.id("submit_btn")); assertTrue(s.isTextPresent("创建任务成功")); //update s.click(By.linkText(task.getTitle())); - assertEquals(task.getTitle(), s.getValue(By.id("task.title"))); + assertEquals(task.getTitle(), s.getValue(By.id("task_title"))); String newTitle = TaskData.randomTitle(); - s.type(By.id("task.title"), newTitle); + s.type(By.id("task_title"), newTitle); s.click(By.id("submit_btn")); assertTrue(s.isTextPresent("更新任务成功")); } diff --git a/examples/showcase/src/main/webapp/WEB-INF/views/account/userForm.jsp b/examples/showcase/src/main/webapp/WEB-INF/views/account/userForm.jsp index f10d8b33..0f174082 100644 --- a/examples/showcase/src/main/webapp/WEB-INF/views/account/userForm.jsp +++ b/examples/showcase/src/main/webapp/WEB-INF/views/account/userForm.jsp @@ -14,6 +14,7 @@ //为inputForm注册validate函数 $("#inputForm").validate({ + errorElement: "span", rules: { loginName: { remote: "${ctx}/account/user/checkLoginName?oldLoginName=" + encodeURIComponent('${user.loginName}') @@ -40,19 +41,19 @@
- +
- +
- +
diff --git a/examples/showcase/src/main/webapp/WEB-INF/views/login.jsp b/examples/showcase/src/main/webapp/WEB-INF/views/login.jsp index 78d8654a..dcc475de 100644 --- a/examples/showcase/src/main/webapp/WEB-INF/views/login.jsp +++ b/examples/showcase/src/main/webapp/WEB-INF/views/login.jsp @@ -61,7 +61,7 @@
-

(管理员admin/admin, 普通用户user/user)

+

(管理员:admin/admin, 普通用户:user/user)

diff --git a/examples/showcase/src/main/webapp/WEB-INF/views/story/webservice.jsp b/examples/showcase/src/main/webapp/WEB-INF/views/story/webservice.jsp index da84eece..6a9adfcf 100644 --- a/examples/showcase/src/main/webapp/WEB-INF/views/story/webservice.jsp +++ b/examples/showcase/src/main/webapp/WEB-INF/views/story/webservice.jsp @@ -12,7 +12,7 @@ -

Web Service 演示

+

Web Service 演示

传统SOAP Web Service演示

    diff --git a/examples/showcase/src/main/webapp/static/jquery-validation/1.9.0/validate.css b/examples/showcase/src/main/webapp/static/jquery-validation/1.9.0/validate.css index 3ddb950c..ffce4bd4 100644 --- a/examples/showcase/src/main/webapp/static/jquery-validation/1.9.0/validate.css +++ b/examples/showcase/src/main/webapp/static/jquery-validation/1.9.0/validate.css @@ -1,4 +1,4 @@ -label.error,span.error{ +span.error{ background:url("images/unchecked.gif") no-repeat 0px 0px; padding-left: 16px; padding-bottom: 2px;