From 696517dc21bab1a5d9db1b606cf15a6234ef0c8d Mon Sep 17 00:00:00 2001 From: koda Date: Sun, 1 Feb 2015 20:25:34 +0900 Subject: [PATCH] =?UTF-8?q?0.4.1=20=E3=83=AA=E3=83=AA=E3=83=BC=E3=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 +- .../control/open/KnowledgeControl.java | 1 + .../searcher/impl/LuceneSearcher.java | 14 ++++- src/main/resources/appresource.properties | 2 +- src/main/resources/appresource_ja.properties | 2 +- .../WEB-INF/views/admin/mail/config.jsp | 14 ++--- .../WEB-INF/views/admin/users/accept_list.jsp | 4 +- .../webapp/WEB-INF/views/admin/users/list.jsp | 16 +++--- .../WEB-INF/views/admin/users/view_add.jsp | 17 +++--- .../WEB-INF/views/admin/users/view_edit.jsp | 18 +++--- src/main/webapp/WEB-INF/views/auth/form.jsp | 6 +- .../WEB-INF/views/open/knowledge/list.jsp | 56 ++++++++++--------- .../WEB-INF/views/open/knowledge/search.jsp | 2 +- .../WEB-INF/views/open/knowledge/view.jsp | 47 ++++++++-------- .../WEB-INF/views/open/signup/signup.jsp | 8 +-- .../webapp/WEB-INF/views/open/tag/list.jsp | 14 ++--- .../WEB-INF/views/protect/account/index.jsp | 8 +-- .../WEB-INF/views/protect/group/add_group.jsp | 4 +- .../views/protect/group/edit_group.jsp | 10 ++-- .../WEB-INF/views/protect/group/groups.jsp | 19 +++---- .../WEB-INF/views/protect/group/mygroups.jsp | 17 +++--- .../views/protect/group/view_group.jsp | 31 +++++----- .../views/protect/knowledge/view_add.jsp | 30 +++++----- .../views/protect/knowledge/view_edit.jsp | 40 ++++++------- 24 files changed, 198 insertions(+), 186 deletions(-) diff --git a/pom.xml b/pom.xml index 99f0de6f6..96f0f094a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.support-project knowledge war - 0.4.0 + 0.4.1 webapp for knowledge https://support-project.org/ @@ -17,7 +17,7 @@ org.support-project web - 0.4.0 + 0.4.1 diff --git a/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java b/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java index 87c3a62ba..86a3477c8 100644 --- a/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java +++ b/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java @@ -231,6 +231,7 @@ public Boundary like() throws InvalidParamException { * @return */ public Boundary escape(KnowledgesEntity entity) { + super.setSendEscapeHtml(false); return super.send(entity); } diff --git a/src/main/java/org/support/project/knowledge/searcher/impl/LuceneSearcher.java b/src/main/java/org/support/project/knowledge/searcher/impl/LuceneSearcher.java index 0cf7c6807..cdd14513b 100644 --- a/src/main/java/org/support/project/knowledge/searcher/impl/LuceneSearcher.java +++ b/src/main/java/org/support/project/knowledge/searcher/impl/LuceneSearcher.java @@ -36,6 +36,7 @@ import org.support.project.common.config.ConfigLoader; import org.support.project.common.log.Log; import org.support.project.common.log.LogFactory; +import org.support.project.common.util.HtmlUtils; import org.support.project.common.util.StringUtils; import org.support.project.knowledge.config.AppConfig; import org.support.project.knowledge.config.IndexType; @@ -156,12 +157,21 @@ private Query structQuery(final SearchingValue value) throws ParseException { QueryParser queryParser = new QueryParser(Version.LUCENE_4_10_2, FIELD_LABEL_TITLE, analyzer); queryParser.setDefaultOperator(Operator.OR); - Query query = queryParser.parse(value.getKeyword()); + Query query; + try { + query = queryParser.parse(value.getKeyword()); + } catch (org.apache.lucene.queryparser.classic.ParseException e) { + query = queryParser.parse(value.getKeyword().replaceAll("/", "")); + } miniContainer.add(query, BooleanClause.Occur.SHOULD); queryParser = new QueryParser(Version.LUCENE_4_10_2, FIELD_LABEL_CONTENTS, analyzer); queryParser.setDefaultOperator(Operator.OR); - query = queryParser.parse(value.getKeyword()); + try { + query = queryParser.parse(value.getKeyword()); + } catch (org.apache.lucene.queryparser.classic.ParseException e) { + query = queryParser.parse(value.getKeyword().replaceAll("/", "")); + } miniContainer.add(query, BooleanClause.Occur.SHOULD); container.add(miniContainer, BooleanClause.Occur.MUST); diff --git a/src/main/resources/appresource.properties b/src/main/resources/appresource.properties index a119597d8..bfa3bb1cb 100644 --- a/src/main/resources/appresource.properties +++ b/src/main/resources/appresource.properties @@ -50,7 +50,7 @@ message.success.save.target={1} was Saved. message.allready.updated=Allready updated. # Common Label -label.version=0.4.0 +label.version=0.4.1 label.login=Sign in label.previous = Previous label.next=Next diff --git a/src/main/resources/appresource_ja.properties b/src/main/resources/appresource_ja.properties index 26ceb182c..9d568056d 100644 --- a/src/main/resources/appresource_ja.properties +++ b/src/main/resources/appresource_ja.properties @@ -50,7 +50,7 @@ message.success.save.target={1} \u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002 message.allready.updated=\u3059\u3067\u306b\u66f4\u65b0\u3055\u308c\u3066\u3044\u307e\u3059 # Common Label -label.version=0.4.0 +label.version=0.4.1 label.login=\u30b5\u30a4\u30f3\u30a4\u30f3 label.previous = \u524d\u3078 label.next = \u6b21\u3078 diff --git a/src/main/webapp/WEB-INF/views/admin/mail/config.jsp b/src/main/webapp/WEB-INF/views/admin/mail/config.jsp index d2f55a254..ae7b5e0dd 100644 --- a/src/main/webapp/WEB-INF/views/admin/mail/config.jsp +++ b/src/main/webapp/WEB-INF/views/admin/mail/config.jsp @@ -36,11 +36,11 @@ function deleteMail() {
- + " />
- + " />

@@ -57,22 +57,22 @@ function deleteMail() {
- + " />
- + " />
- + " />
- + " />
- + " /> diff --git a/src/main/webapp/WEB-INF/views/admin/users/accept_list.jsp b/src/main/webapp/WEB-INF/views/admin/users/accept_list.jsp index c623c5bbe..1f1d7a382 100644 --- a/src/main/webapp/WEB-INF/views/admin/users/accept_list.jsp +++ b/src/main/webapp/WEB-INF/views/admin/users/accept_list.jsp @@ -24,10 +24,10 @@
- + " class="btn btn-primary">  <%= jspUtil.label("knowledge.accept.label.accept") %> -

${entry.userName} (${entry.userKey})

+

<%= jspUtil.out("entry.userName") %> (<%= jspUtil.out("entry.userKey") %>)

<%= jspUtil.label("label.regist.datetime") %>  <%= jspUtil.date("user.insertDatetime")%> / diff --git a/src/main/webapp/WEB-INF/views/admin/users/list.jsp b/src/main/webapp/WEB-INF/views/admin/users/list.jsp index eb88a5e17..3b93579f2 100644 --- a/src/main/webapp/WEB-INF/views/admin/users/list.jsp +++ b/src/main/webapp/WEB-INF/views/admin/users/list.jsp @@ -19,15 +19,15 @@

- - + " /> + " /> - " class="btn btn-success" role="button"> <%= jspUtil.label("label.backlist") %> diff --git a/src/main/webapp/WEB-INF/views/auth/form.jsp b/src/main/webapp/WEB-INF/views/auth/form.jsp index a55acdbcf..98b0b8e0d 100644 --- a/src/main/webapp/WEB-INF/views/auth/form.jsp +++ b/src/main/webapp/WEB-INF/views/auth/form.jsp @@ -48,7 +48,7 @@
" placeholder="Email address" autofocus>
@@ -56,11 +56,11 @@
" placeholder="Password">
- + " id="page">
diff --git a/src/main/webapp/WEB-INF/views/open/knowledge/list.jsp b/src/main/webapp/WEB-INF/views/open/knowledge/list.jsp index da51c1ae4..1b11da30b 100644 --- a/src/main/webapp/WEB-INF/views/open/knowledge/list.jsp +++ b/src/main/webapp/WEB-INF/views/open/knowledge/list.jsp @@ -21,14 +21,14 @@ -

<%= jspUtil.label("knowledge.list.title") %>

+

<%= jspUtil.label("knowledge.list.title") %> page[<%= jspUtil.getValue("offset", Integer.class) + 1 %>]

-  ${selectedTag.tagName} + href="<%= request.getContextPath() %>/open.knowledge/list?tag=<%=jspUtil.out("selectedTag.tagId") %>" > +  <%=jspUtil.out("selectedTag.tagName") %> @@ -42,8 +42,8 @@
-  ${selectedUser.userName} + href="<%= request.getContextPath() %>/open.knowledge/list?user=<%= jspUtil.out("selectedUser.userId") %>" > +  <%= jspUtil.out("selectedUser.userName") %> @@ -59,17 +59,17 @@
diff --git a/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp b/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp index 4267c10e6..fa73cc79d 100644 --- a/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp +++ b/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp @@ -9,6 +9,8 @@ <% JspUtil jspUtil = new JspUtil(request, pageContext); %> +<% String params = "offset=" + jspUtil.out("offset") + "&keyword=" + jspUtil.out("keyword") + "&tag=" + jspUtil.out("tag") + "&user=" + jspUtil.out("user"); %> + @@ -38,27 +40,28 @@ var LABEL_LIKE = '<%= jspUtil.label("knowledge.view.like") %>';

- [${knowledgeId}] ${title} + [<%= jspUtil.out("knowledgeId") %>] <%= jspUtil.out("title") %>

- + " disabled="disabled"/>

-

" alt="icon" width="36" height="36" style="float:left" /> - -  ${insertUserName} + "> +  <%= jspUtil.out("insertUserName") %>     <%= jspUtil.is(String.valueOf(KnowledgeLogic.PUBLIC_FLAG_PUBLIC), "publicFlag", @@ -73,9 +76,9 @@ var LABEL_LIKE = '<%= jspUtil.label("knowledge.view.like") %>';

- - - + " /> + "> + <%= jspUtil.out("file.name") %>

@@ -91,19 +94,19 @@ var LABEL_LIKE = '<%= jspUtil.label("knowledge.view.like") %>'; <% if (request.getRemoteUser() != null) { if (request.isUserInRole("admin") || jspUtil.out("insertUser").equals(request.getRemoteUser())) { %> - ?<%= params %>" class="btn btn-primary" role="button">  <%= jspUtil.label("label.edit") %> <% } %> <% } else { %> - ?<%= params %>" class="btn btn-primary" role="button">  <%= jspUtil.label("knowledge.view.edit.with.login") %> <% } %> - ?<%= params %>" class="btn btn-success" role="button"> <%= jspUtil.label("knowledge.view.back.list") %>
@@ -116,51 +119,51 @@ var LABEL_LIKE = '<%= jspUtil.label("knowledge.view.like") %>'; %>
- <%= jspUtil.date("comment.updateDatetime")%> [${comment.updateUserName}] + <%= jspUtil.date("comment.updateDatetime")%> [<%= jspUtil.out("comment.updateUserName") %>]
" alt="icon" width="64" height="64"/>
- ${comment.comment} + <%= jspUtil.out("comment.comment") %>
<% } else { %>
- <%= jspUtil.date("comment.updateDatetime")%> [${comment.updateUserName}] + <%= jspUtil.date("comment.updateDatetime")%> [<%= jspUtil.out("comment.updateUserName") %>]
" alt="icon" width="64" height="64"/>
- ${comment.comment} + <%= jspUtil.out("comment.comment") %>
<% } %> <% if (request.getRemoteUser() != null) { %> -
+ " method="post" role="form">
<% } else { %> -
+ " method="get" role="form">
<% } %> diff --git a/src/main/webapp/WEB-INF/views/open/signup/signup.jsp b/src/main/webapp/WEB-INF/views/open/signup/signup.jsp index 52a1b16f3..af9612b17 100644 --- a/src/main/webapp/WEB-INF/views/open/signup/signup.jsp +++ b/src/main/webapp/WEB-INF/views/open/signup/signup.jsp @@ -25,20 +25,20 @@
- + " />
- + " />
- + " />
- + " />
diff --git a/src/main/webapp/WEB-INF/views/open/tag/list.jsp b/src/main/webapp/WEB-INF/views/open/tag/list.jsp index f653136e6..b88d15eff 100644 --- a/src/main/webapp/WEB-INF/views/open/tag/list.jsp +++ b/src/main/webapp/WEB-INF/views/open/tag/list.jsp @@ -21,12 +21,12 @@