diff src/main/webapp/pages/search.jsp @ 36:eab47936591a

apply scrollbar to other tables as well
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Fri, 20 Nov 2015 11:53:29 +0100
parents 881e7591f3e4
children ed215307f426
line wrap: on
line diff
--- a/src/main/webapp/pages/search.jsp	Thu Nov 19 17:14:06 2015 +0100
+++ b/src/main/webapp/pages/search.jsp	Fri Nov 20 11:53:29 2015 +0100
@@ -11,8 +11,8 @@
 <head>
 
 	<jsp:include page="../componentes/headContent.jsp"/>	
+	
 
-	
 	<script>
 		$(function() {
 			
@@ -156,12 +156,8 @@
 </head>
 
 <body>
-
-
-
 	<jsp:include page="../componentes/template.jsp"/>
 
-
 	<div id="dialogMoreInfo" title="Section Details">
 	  <div id="dialogMoreInfoTable">XXXX</div>
 	</div>
@@ -220,301 +216,303 @@
 				<jsp:param name="formName" value="searchForm"/>
 			</jsp:include> 
 				
-	
-			<table class="pageTable">
-				<tbody>
-					<tr>
-						<th>
-							<table class="sortTable">
-								<tr>
-									<td><label class="tableTitle">Book Id</label></td>
-									<td>
-										<table>
-											<tr><td>
-												<input type="image" 
-													onclick="setAction('sortByBookIdUp', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
-											</td></tr>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByBookIdDown', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
-											</td></tr>
-										</table>
-									</td>
-								</tr>
-							</table>
-						</th>
-						<th>
-							<table class="sortTable">
-								<tr>
-									<td><label class="tableTitle">Book Name</label></td>
-									<td>
-										<table>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByBookNameUp', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
-											</td></tr>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByBookNameDown', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																	
-											</td></tr>
-										</table>
-									</td>
-								</tr>
-							</table>					
-						</th>
-						<th>
-							<table class="sortTable">
-								<tr>
-									<td><label class="tableTitle">Level 1</label></td>
-									<td>
-										<table>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByLevel1Up', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>
-											</td></tr>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByLevel1Down', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
-											</td></tr>
-										</table>
-									</td>
-								</tr>
-								<tr>
-									<td>
-										<input type="text" name="level1Filter" id="level1Filter" value="<%= sessionBean.getSearchPage().getLevel1Filter()%>"/>
-									</td>									
-									<td>
-										<input type="image"
-											onclick="setAction('filter', 'searchForm');"
-											src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/>
-									</td>							
-								</tr>								
-							</table>	
-						</th>
-						<th><label class="tableTitle">Level 2</label></th>
-						<th>
-							<table class="sortTable">
-								<tr>
-									<td><label class="tableTitle">Dynasty</label></td>
-									<td>
-										<table>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByDynastyUp', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>
-											</td></tr>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByDynastyDown', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
-											</td></tr>
-										</table>
-									</td>
-								</tr>
-								<tr>
-									<td>
-										<input type="text" name="dynastyFilter" id="dynastyFilter" value="<%= sessionBean.getSearchPage().getDynastyFilter()%>"/>
-									</td>									
-									<td>
-										<input type="image"
-											onclick="setAction('filter', 'searchForm');"
-											src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/>
-									</td>							
-								</tr>
-							</table>					
-						</th>
-						<th>
-							<table class="sortTable">
-								<tr>
-									<td><label class="tableTitle">Period</label></td>
-									<td>
-										<table>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByPeriodUp', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
-											</td></tr>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByPeriodDown', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
-											</td></tr>
-										</table>
-									</td>
-								</tr>
-							</table>						
-						</th>
-						<th>
-							<table class="sortTable">
-								<tr>
-									<td><label class="tableTitle">Admin Type</label></td>
-									<td>
-										<table>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByAdminTypeUp', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>
-											</td></tr>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByAdminTypeDown', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
-											</td></tr>
-										</table>
-									</td>
-								</tr>
-								<tr>
-									<td>
-										<input type="text" name="adminTypeFilter" id="adminTypeFilter" value="<%= sessionBean.getSearchPage().getAdminTypeFilter()%>"/>
-									</td>									
-									<td>
-										<input type="image"
-											onclick="setAction('filter', 'searchForm');"
-											src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/>
-									</td>							
-								</tr>								
-							</table>	
-						</th>
-						<!-- 
-						<th>
-							<table class="sortTable">
-								<tr>
-									<td><label class="tableTitle">Volume</label></td>
-									<td>
-										<table>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByVolumeUp', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
-											</td></tr>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByVolumeDown', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
-											</td></tr>
-										</table>
-									</td>
-								</tr>
-							</table>						
-						</th>
-						-->
-						<th>
-							<table class="sortTable">
-								<tr>
-									<td><label class="tableTitle">Section Name</label></td>
-									<td>
-										<table>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortBySectionNameUp', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
-											</td></tr>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortBySectionNameDown', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
-											</td></tr>
-										</table>
-									</td>
-								</tr>
-							</table>	
-						</th>
-						<th>
-							<table class="sortTable">
-								<tr>
-									<td><label class="tableTitle">Pages</label></td>
-									<td>
-										<table>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByStartPageUp', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
-											</td></tr>
-											<tr><td>
-												<input type="image"
-													onclick="setAction('sortByStartPageDown', 'searchForm');"
-													src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
-											</td></tr>
-										</table>
-									</td>
-								</tr>
-							</table>							
-						
-						</th>
-						<th><label class="tableTitle">View Page Text</label></th>
-						<th><label class="tableTitle">Existing Branches</label></th>
-					</tr>
+			<div class="tableDiv double-scroll">
+				<table class="pageTable">
+					<tbody>
+						<tr>
+							<th>
+								<table class="sortTable">
+									<tr>
+										<td><label class="tableTitle">Book Id</label></td>
+										<td>
+											<table>
+												<tr><td>
+													<input type="image" 
+														onclick="setAction('sortByBookIdUp', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
+												</td></tr>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByBookIdDown', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
+												</td></tr>
+											</table>
+										</td>
+									</tr>
+								</table>
+							</th>
+							<th>
+								<table class="sortTable">
+									<tr>
+										<td><label class="tableTitle">Book Name</label></td>
+										<td>
+											<table>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByBookNameUp', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
+												</td></tr>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByBookNameDown', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																	
+												</td></tr>
+											</table>
+										</td>
+									</tr>
+								</table>					
+							</th>
+							<th>
+								<table class="sortTable">
+									<tr>
+										<td><label class="tableTitle">Level 1</label></td>
+										<td>
+											<table>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByLevel1Up', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>
+												</td></tr>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByLevel1Down', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
+												</td></tr>
+											</table>
+										</td>
+									</tr>
+									<tr>
+										<td>
+											<input type="text" name="level1Filter" id="level1Filter" value="<%= sessionBean.getSearchPage().getLevel1Filter()%>"/>
+										</td>									
+										<td>
+											<input type="image"
+												onclick="setAction('filter', 'searchForm');"
+												src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/>
+										</td>							
+									</tr>								
+								</table>	
+							</th>
+							<th><label class="tableTitle">Level 2</label></th>
+							<th>
+								<table class="sortTable">
+									<tr>
+										<td><label class="tableTitle">Dynasty</label></td>
+										<td>
+											<table>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByDynastyUp', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>
+												</td></tr>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByDynastyDown', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
+												</td></tr>
+											</table>
+										</td>
+									</tr>
+									<tr>
+										<td>
+											<input type="text" name="dynastyFilter" id="dynastyFilter" value="<%= sessionBean.getSearchPage().getDynastyFilter()%>"/>
+										</td>									
+										<td>
+											<input type="image"
+												onclick="setAction('filter', 'searchForm');"
+												src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/>
+										</td>							
+									</tr>
+								</table>					
+							</th>
+							<th>
+								<table class="sortTable">
+									<tr>
+										<td><label class="tableTitle">Period</label></td>
+										<td>
+											<table>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByPeriodUp', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
+												</td></tr>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByPeriodDown', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
+												</td></tr>
+											</table>
+										</td>
+									</tr>
+								</table>						
+							</th>
+							<th>
+								<table class="sortTable">
+									<tr>
+										<td><label class="tableTitle">Admin Type</label></td>
+										<td>
+											<table>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByAdminTypeUp', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>
+												</td></tr>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByAdminTypeDown', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
+												</td></tr>
+											</table>
+										</td>
+									</tr>
+									<tr>
+										<td>
+											<input type="text" name="adminTypeFilter" id="adminTypeFilter" value="<%= sessionBean.getSearchPage().getAdminTypeFilter()%>"/>
+										</td>									
+										<td>
+											<input type="image"
+												onclick="setAction('filter', 'searchForm');"
+												src="<%=sessionBean.getApplicationBean().getFilterImage()%>"/>
+										</td>							
+									</tr>								
+								</table>	
+							</th>
+							<!-- 
+							<th>
+								<table class="sortTable">
+									<tr>
+										<td><label class="tableTitle">Volume</label></td>
+										<td>
+											<table>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByVolumeUp', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
+												</td></tr>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByVolumeDown', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
+												</td></tr>
+											</table>
+										</td>
+									</tr>
+								</table>						
+							</th>
+							-->
+							<th>
+								<table class="sortTable">
+									<tr>
+										<td><label class="tableTitle">Section Name</label></td>
+										<td>
+											<table>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortBySectionNameUp', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
+												</td></tr>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortBySectionNameDown', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
+												</td></tr>
+											</table>
+										</td>
+									</tr>
+								</table>	
+							</th>
+							<th>
+								<table class="sortTable">
+									<tr>
+										<td><label class="tableTitle">Pages</label></td>
+										<td>
+											<table>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByStartPageUp', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getUpImage()%>"/>										
+												</td></tr>
+												<tr><td>
+													<input type="image"
+														onclick="setAction('sortByStartPageDown', 'searchForm');"
+														src="<%=sessionBean.getApplicationBean().getDownImage()%>"/>																				
+												</td></tr>
+											</table>
+										</td>
+									</tr>
+								</table>							
+							
+							</th>
+							<th><label class="tableTitle">View Page Text</label></th>
+							<th><label class="tableTitle">Existing Branches</label></th>
+						</tr>
+					
+		
+						<%
+							for (DBSection section : sessionBean.getSearchPage().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">
+									<%=section.getBook().getId()%>
+								</a>	
+								<img alt="More Information" src="<%=sessionBean.getApplicationBean().getMoreInfoImage()%>" data-section-id="<%=section.getId()%>" class="moreInfo"/>
+							</td>
+							<td><%=section.getBook().getName()%></td>
+							<td><%=section.getBook().getLevel1()%></td>
+							<td><%=section.getBook().getLevel2()%></td>
+							<td><%=section.getBook().getDynasty()%></td>
+							<td><%=section.getBook().getPeriod()%></td>
+							<td><%=section.getBook().getAdmin_type() %></td>
+							<td><%=section.getName()%></td>
+							<td><%=section.getPages()%></td>
+							<td>
+								<a	href="#"
+									title="Show Section in Extraction Interface" 
+								 	onclick="sectionInExtractionInterface('<%=section.getId() %>', '<%=section.getName() %>', '<%=section.getBook().getId() %>', '<%=section.getBook().getName() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
+								 	<img alt="Show Section in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>">
+								</a>
+							</td>
+							<td>
+								<% if(section.getBranches() != null && !section.getBranches().isEmpty()) { %>
+									<table>
+										<% for(LGBranch branch : section.getBranches()) { %>
+											<tr>
+												<td>
+													<table>
+													<tr><td><%=branch.getFomattedLastChange() %></td></tr>
+													<tr><td><%=branch.getLabel() %></td></tr>
+													</table>
+												</td>
+												<td>
+													<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/pages/branchPage.jsp?branchId=<%=branch.getId() %>" >
+														<img alt="Manage Branch" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
+													</a>												
+												</td>
+											</tr>
+										<% } %>
+									</table>
+								<% } %>
+							</td>
+			
+						</tr>
+						<%
+							}
+						%>
+					</tbody>
+				</table>
+		
 				
-	
-					<%
-						for (DBSection section : sessionBean.getSearchPage().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">
-								<%=section.getBook().getId()%>
-							</a>	
-							<img alt="More Information" src="<%=sessionBean.getApplicationBean().getMoreInfoImage()%>" data-section-id="<%=section.getId()%>" class="moreInfo"/>
-						</td>
-						<td><%=section.getBook().getName()%></td>
-						<td><%=section.getBook().getLevel1()%></td>
-						<td><%=section.getBook().getLevel2()%></td>
-						<td><%=section.getBook().getDynasty()%></td>
-						<td><%=section.getBook().getPeriod()%></td>
-						<td><%=section.getBook().getAdmin_type() %></td>
-						<td><%=section.getName()%></td>
-						<td><%=section.getPages()%></td>
-						<td>
-							<a	href="#"
-								title="Show Section in Extraction Interface" 
-							 	onclick="sectionInExtractionInterface('<%=section.getId() %>', '<%=section.getName() %>', '<%=section.getBook().getId() %>', '<%=section.getBook().getName() %>', '<%=sessionBean.getUser().getId() %>', '<%=sessionBean.getApplicationBean().getExtractionInterfaceUrl()%>');">
-							 	<img alt="Show Section in Extraction Interface" src="<%=sessionBean.getApplicationBean().getShowImage()%>">
-							</a>
-						</td>
-						<td>
-							<% if(section.getBranches() != null && !section.getBranches().isEmpty()) { %>
-								<table>
-									<% for(LGBranch branch : section.getBranches()) { %>
-										<tr>
-											<td>
-												<table>
-												<tr><td><%=branch.getFomattedLastChange() %></td></tr>
-												<tr><td><%=branch.getLabel() %></td></tr>
-												</table>
-											</td>
-											<td>
-												<a href="<%=sessionBean.getApplicationBean().getRootServer() %>/pages/branchPage.jsp?branchId=<%=branch.getId() %>" >
-													<img alt="Manage Branch" src="<%=sessionBean.getApplicationBean().getEditBranchImage()%>"/>
-												</a>												
-											</td>
-										</tr>
-									<% } %>
-								</table>
-							<% } %>
-						</td>
-		
-					</tr>
-					<%
-						}
-					%>
-				</tbody>
-			</table>
-	
+			<%
+				}
+			%>
+			
+			</div>
+			
 			<jsp:include page="../componentes/paginator.jsp">
 				<jsp:param name="formName" value="searchForm"/>
 			</jsp:include> 
 			
-			<%
-				}
-			%>
-	
-	
 		</form>
 	
 		<% } %>