[sword-cvs] swordweb dailydevotion.jsp,1.4,1.5 fulllibrary.jsp,1.5,1.6 index.jsp,1.5,1.6 passagestudy.jsp,1.6,1.7 powersearch.jsp,1.5,1.6 wordsearchresults.jsp,1.10,1.11

sword@www.crosswire.org sword@www.crosswire.org
Sat, 30 Aug 2003 18:53:06 -0700


Update of /usr/local/cvsroot/swordweb
In directory www:/tmp/cvs-serv23499

Modified Files:
	dailydevotion.jsp fulllibrary.jsp index.jsp passagestudy.jsp 
	powersearch.jsp wordsearchresults.jsp 
Log Message:



Index: dailydevotion.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/dailydevotion.jsp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- dailydevotion.jsp	21 Aug 2003 20:31:24 -0000	1.4
+++ dailydevotion.jsp	31 Aug 2003 01:53:04 -0000	1.5
@@ -5,9 +5,9 @@
 <%
 	String resetModule = request.getParameter("mod");
 	if (resetModule != null)
-		session.setAttribute("ActiveDevo", mgr.getModuleByName(resetModule));
-	SWModule activeDevo = (SWModule) session.getAttribute("ActiveDevo");
-	if (activeDevo == null) activeDevo = mgr.getModuleByName("SME");
+		session.setAttribute("ActiveDevo", resetModule);
+	String activeDevoName = (String) session.getAttribute("ActiveDevo");
+	SWModule activeDevo = mgr.getModuleByName((activeDevoName == null) ? "SME" : activeDevoName);
 
 	SimpleDateFormat formatter;
 %>

Index: fulllibrary.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/fulllibrary.jsp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- fulllibrary.jsp	21 Aug 2003 22:14:16 -0000	1.5
+++ fulllibrary.jsp	31 Aug 2003 01:53:04 -0000	1.6
@@ -97,7 +97,7 @@
 				String type = module.getCategory();
 				String targetURL = "";
 				if ((SwordOrb.BIBLES.equals(type)) || (SwordOrb.COMMENTARIES.equals(type))) {
-					targetURL = "passagestudy.jsp?mod="+URLEncoder.encode(module.getName());
+					targetURL = "passagestudy.jsp?mod="+URLEncoder.encode(module.getName()+"#cv");
 				}
 				else if (SwordOrb.DAILYDEVOS.equals(type)) {
 					targetURL = "dailydevotion.jsp?mod="+URLEncoder.encode(module.getName());

Index: index.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/index.jsp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- index.jsp	21 Aug 2003 21:15:13 -0000	1.5
+++ index.jsp	31 Aug 2003 01:53:04 -0000	1.6
@@ -4,7 +4,7 @@
 	<tiles:put name="title" value="OSIS Bible Tool" />
 
 	<tiles:put name="sidebar_left" type="string">
-<div class="bluepanel">
+<div>
 <br/>
 <h3>Tools And Things</h3>
 <br/>
@@ -15,17 +15,8 @@
 <li><a href="http://www.bibleresourcecenter.org/research/virtuallibrary.dsp">Virtual Bible Library</a><br/><br/></li>
 </ul>
 </div>
-	</tiles:put>
-
-	<tiles:put name="sidebar_right" type="string">
-<div class="bluepanel">
-<center><h4>Library Upload Tool</h4></center><br/>
-<form><input type="submit" class="searchbutton" value="ADD YOUR TEXT HERE" /></form><br/>
-<i>Have you produced serious academic scholarship related to Biblical text?  Using our Scholar OSIS Tool, you can upload it for students or fellow scholars to review, or submit it to SBL for inclusion on OSIS Bible Tool.<br/><br>
-Only works reviewed and approved by SBL will be added for viewing by the public at large.</i>
-</div>
-<div class="bluepanel">
-<h2><a href="fulllibrary.jsp?action=closeAll">OSIS Library</a></h2>
+<div>
+<h3>OSIS Library</h3><br/>
 		<ul>
 <%
 			Vector leaves = new Vector();
@@ -34,12 +25,21 @@
 					leaves.add(modInfo[i].category);
 %>
 		
-<li><a href="fulllibrary.jsp?action=closeAll&open=<%= URLEncoder.encode(modInfo[i].category) %>"><%= modInfo[i].category %></a></td>
+<li><a href="fulllibrary.jsp?action=closeAll&open=<%= URLEncoder.encode(modInfo[i].category) %>"><%= modInfo[i].category %></a></li><br/>
 <%
 				}
 			}
 %>
 		</ul>
+</div>
+	</tiles:put>
+
+	<tiles:put name="sidebar_right" type="string">
+<div class="bluepanel">
+<center><h4>Library Upload Tool</h4></center><br/>
+<form><input type="submit" class="searchbutton" value="ADD YOUR TEXT HERE" /></form><br/>
+<i>Have you produced serious academic scholarship related to Biblical text?  Using our Scholar OSIS Tool, you can upload it for students or fellow scholars to review, or submit it to SBL for inclusion on OSIS Bible Tool.<br/><br>
+Only works reviewed and approved by SBL will be added for viewing by the public at large.</i>
 </div>
 	</tiles:put>
 

Index: passagestudy.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/passagestudy.jsp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- passagestudy.jsp	21 Aug 2003 20:31:24 -0000	1.6
+++ passagestudy.jsp	31 Aug 2003 01:53:04 -0000	1.7
@@ -2,9 +2,9 @@
 <%
 	String resetModule = request.getParameter("mod");
 	if (resetModule != null)
-		session.setAttribute("ActiveModule", mgr.getModuleByName(resetModule));
-	SWModule activeModule = (SWModule) session.getAttribute("ActiveModule");
-	if (activeModule == null) activeModule = mgr.getModuleByName("WEB");
+		session.setAttribute("ActiveModule", resetModule);
+	String activeModuleName = (String) session.getAttribute("ActiveModule");
+	SWModule activeModule = mgr.getModuleByName((activeModuleName == null) ? "WEB" : activeModuleName);
 
 	String resetKey = request.getParameter("key");
 	if (resetKey != null)
@@ -23,7 +23,7 @@
 			for (int i = 0; i < prefBibles.size(); i++) {
 				SWModule module = mgr.getModuleByName((String)prefBibles.get(i));
 		%>
-				<li><a href="passagestudy.jsp?mod=<%= URLEncoder.encode(module.getName()) %>" title="view Romans 8:26-39 in <%= module.getDescription().replaceAll("&", "&amp;") %>"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
+				<li><a href="passagestudy.jsp?mod=<%= URLEncoder.encode(module.getName())+"#cv" %>" title="view Romans 8:26-39 in <%= module.getDescription().replaceAll("&", "&amp;") %>"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
 		<%
 			}
 		%>
@@ -35,7 +35,7 @@
 				if (modInfo[i].category.equals(SwordOrb.BIBLES)) {
 					SWModule module = mgr.getModuleByName(modInfo[i].name);
 		%>
-				<li><a href="passagestudy.jsp?mod=<%= URLEncoder.encode(modInfo[i].name) %>" title="view Romans 8:26-39 in <%= module.getDescription().replaceAll("&", "&amp;") %>"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
+				<li><a href="passagestudy.jsp?mod=<%= URLEncoder.encode(modInfo[i].name)+"#cv" %>" title="view Romans 8:26-39 in <%= module.getDescription().replaceAll("&", "&amp;") %>"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
 		<%
 				}
 			}
@@ -51,7 +51,7 @@
 			for (int i = 0; i < prefCommentaries.size(); i++) {
 				SWModule module = mgr.getModuleByName((String)prefCommentaries.get(i));
 		%>
-				<li><a href="passagestudy.jsp?mod=<%= URLEncoder.encode(module.getName()) %>" title="view Romans 8:26-39 in <%= module.getDescription().replaceAll("&", "&amp;") %>"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
+				<li><a href="passagestudy.jsp?mod=<%= URLEncoder.encode(module.getName())+"#cv" %>" title="view Romans 8:26-39 in <%= module.getDescription().replaceAll("&", "&amp;") %>"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
 		<%
 			}
 		%>
@@ -63,7 +63,7 @@
 				if (modInfo[i].category.equals(SwordOrb.COMMENTARIES)) {
 					SWModule module = mgr.getModuleByName(modInfo[i].name);
 		%>
-				<li><a href="passagestudy.jsp?mod=<%= URLEncoder.encode(modInfo[i].name) %>" title="view Romans 8:26-39 in <%= module.getDescription().replaceAll("&", "&amp;") %>"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
+				<li><a href="passagestudy.jsp?mod=<%= URLEncoder.encode(modInfo[i].name)+"#cv" %>" title="view Romans 8:26-39 in <%= module.getDescription().replaceAll("&", "&amp;") %>"><%= module.getDescription().replaceAll("&", "&amp;") %></a></li>
 		<%
 				}
 			}
@@ -93,7 +93,7 @@
 					boolean rtol = ("RtoL".equalsIgnoreCase(activeModule.getConfigEntry("Direction")));
 			%>
 				<div dir="<%= rtol ? "rtl" : "ltr" %>" class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
-					<span class="versenum"><a href="passagestudy.jsp?key=<%= URLEncoder.encode(keyText) %>">
+					<span class="versenum"><a <%= (keyText.equals(activeKey))?"name=\"cv\"":"" %> href="passagestudy.jsp?key=<%= URLEncoder.encode(keyText)+"#cv" %>">
 						<%= keyText.substring(keyText.indexOf(":")+1) %></a>
 					</span>
 

Index: powersearch.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/powersearch.jsp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- powersearch.jsp	21 Aug 2003 20:31:24 -0000	1.5
+++ powersearch.jsp	31 Aug 2003 01:53:04 -0000	1.6
@@ -4,8 +4,8 @@
 	String resetModule = request.getParameter("mod");
 	if (resetModule != null)
 		session.setAttribute("ActiveModule", mgr.getModuleByName(resetModule));
-	SWModule activeModule = (SWModule) session.getAttribute("ActiveModule");
-	if (activeModule == null) activeModule = mgr.getModuleByName("WEB");
+	String activeModuleName = (String) session.getAttribute("ActiveModule");
+	SWModule activeModule = mgr.getModuleByName((activeModuleName == null) ? "WEB" : activeModuleName);
 %>
 
 <tiles:insert beanName="basic" flush="true" >

Index: wordsearchresults.jsp
===================================================================
RCS file: /usr/local/cvsroot/swordweb/wordsearchresults.jsp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- wordsearchresults.jsp	21 Aug 2003 20:31:24 -0000	1.10
+++ wordsearchresults.jsp	31 Aug 2003 01:53:04 -0000	1.11
@@ -4,8 +4,8 @@
 	String resetModule = request.getParameter("mod");
 	if (resetModule != null)
 		session.setAttribute("ActiveModule", mgr.getModuleByName(resetModule));
-	SWModule activeModule = (SWModule) session.getAttribute("ActiveModule");
-	if (activeModule == null) activeModule = mgr.getModuleByName("WEB");
+	String activeModuleName = (String) session.getAttribute("ActiveModule");
+	SWModule activeModule = mgr.getModuleByName((activeModuleName == null) ? "WEB" : activeModuleName);
 
 	String resetSearchTerm = request.getParameter("searchTerm");
 	if (resetSearchTerm != null)
@@ -74,9 +74,10 @@
 	</tiles:put>
 
 	<tiles:put name="content" type="string">
+	<div class="verse">
 		<h2>Results for "<em><%= new String(activeSearchTerm.getBytes("iso8859-1"), "UTF-8") %></em>"</h2>
 		<%
-			String[] results = null;
+			SearchHit[] results = null;
 			if ((activeSearchTerm != null) && (activeSearchTerm.trim().length() > 0)) {
 				results = activeModule.search(activeSearchTerm, stype, soptions, range);
 
@@ -84,11 +85,11 @@
 				session.setAttribute("SearchResults", results);
 			}
 			else if ( activeSearchTerm == null ) { //no search term given, try to see if we have a valid search result saved
-				results = (String[]) session.getAttribute("SearchResults");
+				results = (SearchHit[]) session.getAttribute("SearchResults");
 			}
 
 			if ( results == null )
-				results = new String[0];
+				results = new SearchHit[0];
 		%>
 
 		<p class="textname">&raquo; <%= results.length %> result<%= (results.length == 1)?"s":""%> in the text of <%= activeModule.getDescription() %></p>
@@ -99,9 +100,19 @@
 			Integer resultLimit = new Integer(30);
 
 			for (int i = resultStart.intValue(); i < results.length && i < resultStart.intValue() + resultLimit.intValue(); i++) {
-				activeModule.setKeyText(results[i]);
+				activeModule.setKeyText(results[i].key);
 		%>
-			<dt><a href="passagestudy.jsp?key=<%= URLEncoder.encode(results[i]) %>" title="<%= results[i] %>"><%= results[i] %></a></dt>
+			<dt>
+<div class="bluepanel">
+<% // I know, A TABLE!!!  Please fix me!!! %>
+<table width="100%">
+<tr><td>
+<a href="passagestudy.jsp?key=<%= URLEncoder.encode(results[i].key)+"#cv" %>" title="<%= results[i].key %>"><%= results[i].key %></a>
+</td><td align="right"><%= (results[i].score > 0)?("<i>score: "+results[i].score)+"</i>" : "" %>
+</td></tr></table>
+
+</div>
+</dt>
 
 			<% boolean rtol = ("RtoL".equalsIgnoreCase(activeModule.getConfigEntry("Direction"))); %>
 			<dd dir="<%= rtol ? "rtl" : "ltr" %>">
@@ -129,7 +140,7 @@
 		<%
 			if ( navStart > 0 ) {
 		%>
-				<li><a href="wordsearchresults.jsp?start=0" title="First page (<%= results[0] %>) of search results">1</a>&nbsp;[...]</li>
+				<li><a href="wordsearchresults.jsp?start=0" title="First page (<%= results[0].key %>) of search results">1</a>&nbsp;[...]</li>
 		<%
 			}
 			else {
@@ -146,7 +157,7 @@
 		<%	}
 				else {
 		%>
-					<li><a href="wordsearchresults.jsp?start=<%= i * resultLimit.intValue() %>" title="page <%= i+1 %> (<%= results[i * resultLimit.intValue()] %>) of search results"><%= i+1 %></a></li>
+					<li><a href="wordsearchresults.jsp?start=<%= i * resultLimit.intValue() %>" title="page <%= i+1 %> (<%= results[i * resultLimit.intValue()].key %>) of search results"><%= i+1 %></a></li>
 		<%
 				}
 			}
@@ -156,11 +167,12 @@
 				int lastPage = (results.length / resultLimit.intValue()) + ((results.length % resultLimit.intValue()) > 0 ? 1 : 0) -1;
 			if (navEnd < lastPage) {
 		%>
-				<li>&nbsp;[...] <a href="wordsearchresults.jsp?start=<%= lastPage*resultLimit.intValue() %>" title="Last page (<%= results[lastPage] %>) of search results"><%= lastPage+1 %></a></li>
+				<li>&nbsp;[...] <a href="wordsearchresults.jsp?start=<%= lastPage*resultLimit.intValue() %>" title="Last page (<%= results[lastPage].key %>) of search results"><%= lastPage+1 %></a></li>
 		<%
 			}
 		%>
 		</ul>
+	</div>
 
 	</tiles:put>
 </tiles:insert>