changeset 44:89d1076df1c3

minor bug fixed
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Mon, 28 Dec 2015 11:48:38 +0100
parents 9dbbbfd474f4
children d3ac905f0277
files src/main/java/de/mpiwg/web/jsp/SearchPage.java src/main/java/de/mpiwg/web/jsp/TopicPage.java src/main/webapp/pages/search.jsp src/main/webapp/pages/topicPage.jsp
diffstat 4 files changed, 19 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/web/jsp/SearchPage.java	Wed Dec 23 16:03:32 2015 +0100
+++ b/src/main/java/de/mpiwg/web/jsp/SearchPage.java	Mon Dec 28 11:48:38 2015 +0100
@@ -13,7 +13,6 @@
 import org.apache.log4j.Logger;
 
 import de.mpiwg.gazetteer.bo.LGBranch;
-import de.mpiwg.gazetteer.bo.LGTopic;
 import de.mpiwg.gazetteer.bo.LGTopicSectionRelation;
 import de.mpiwg.gazetteer.db.DBSection;
 import de.mpiwg.gazetteer.utils.DBService;
--- a/src/main/java/de/mpiwg/web/jsp/TopicPage.java	Wed Dec 23 16:03:32 2015 +0100
+++ b/src/main/java/de/mpiwg/web/jsp/TopicPage.java	Mon Dec 28 11:48:38 2015 +0100
@@ -320,8 +320,7 @@
 		}
 		*/
 		
-		//for(DBSection section : this.displaySectionList){
-		for(DBSection section : this.completeSectionList){	// we don't paginate now
+		for(DBSection section : this.displaySectionList){// we don't paginate now
 			section.setBranches(this.branchesMap.get(section.getId()));		
 		}
 		
--- a/src/main/webapp/pages/search.jsp	Wed Dec 23 16:03:32 2015 +0100
+++ b/src/main/webapp/pages/search.jsp	Mon Dec 28 11:48:38 2015 +0100
@@ -19,7 +19,8 @@
 		
 			$("#addAllSectionsToTopic").click(function() {
 				
-				var r = confirm("Add "+ '<%= sessionBean.getSearchPage().getFilteredSectionList().size() %>' + " sections to a topic?");
+					
+				var r = confirm("Add all sections to a topic?");
 				if (r == true) {
 				    console.log("addAllSectionsToTopic");
 			
--- a/src/main/webapp/pages/topicPage.jsp	Wed Dec 23 16:03:32 2015 +0100
+++ b/src/main/webapp/pages/topicPage.jsp	Mon Dec 28 11:48:38 2015 +0100
@@ -163,23 +163,18 @@
 								<table>
 									<tr>
 										<td>
-											<form name="contributorForm"
-												action="<%=sessionBean.getApplicationBean().getRootServer()%>/proxy.jsp"
-												method="post">
-												<input name="bean" type="hidden" value="topicBean" />
-												<table style="width: 300px;" class="pageTable">
-													<% for(VDCUser contr : sessionBean.getTopicPage().getContributors()) { %>
-														<tr>
-															<td><label><%=contr.getUserName() %></label></td>
-															<td>
-																<input type="image" 
-																	onclick="<%=sessionBean.getApplicationBean().getJSConfirmationDelete() %> setAction0('removeContributor', 'contributorForm', 'userId',  <%=contr.getId() %>);" 
-																	src="<%=sessionBean.getApplicationBean().getDeleteImage()%>"/>																	
-															</td>
-														</tr>
-													<% } %>
-												</table>
-											</form>
+											<table style="width: 300px;" class="pageTable">
+												<% for(VDCUser contr : sessionBean.getTopicPage().getContributors()) { %>
+													<tr>
+														<td><label><%=contr.getUserName() %></label></td>
+														<td>
+															<input type="image" 
+																onclick="<%=sessionBean.getApplicationBean().getJSConfirmationDelete() %> setAction0('removeContributor', 'topicForm', 'userId',  <%=contr.getId() %>);" 
+																src="<%=sessionBean.getApplicationBean().getDeleteImage()%>"/>																	
+														</td>
+													</tr>
+												<% } %>
+											</table>
 										</td>
 										<td>
 											<button id="addContributors" type="button" class="lgButton">Add Contributors</button>
@@ -249,12 +244,14 @@
 							</div>
 						</div>	
 						
-						<label class="subTitel"> <%=sessionBean.getTopicPage().getCompleteSectionList().size()%> section(s) in the topic
+						<label class="subTitel"> <%=sessionBean.getTopicPage().getCompleteSectionList().size() %> section(s) in the topic
 							<input type="image"
 								onclick="setAction('forceLoadTopicSectionRelation', 'topicSectionRelationForm');"
 								src="<%=sessionBean.getApplicationBean().getRefreshImage()%>" width="20" height="20"/>
 						</label>
 						
+						<label class="label"><%= (StringUtils.isNotEmpty(sessionBean.getTopicPage().getFilteringMessage())) ? sessionBean.getTopicPage().getFilteringMessage() : ""%></label>
+						
 						<!-- Sections in Topic -->
 						<% if(sessionBean.getTopicPage().getCompleteSectionList().isEmpty()) { %>
 							<label>(No section in the topic...)</label>
@@ -544,7 +541,7 @@
 									<th><label class="tableTitle">Remove</label></th>
 								</tr>	
 								
-								<% for(DBSection section : sessionBean.getTopicPage().getCompleteSectionList() ) { %>
+								<% for(DBSection section : sessionBean.getTopicPage().getDisplaySectionList() ) { %>
 								<tr>
 									<td>
 										<a href="<%=sessionBean.getApplicationBean().getTocInterfaceUrl()%>/check_sections_details.php?book_id=<%=section.getBook().getId() %>&amp;count=100&amp;sessionId=<%= session.getId()%>" target="blank">