[sword-svn] r252 - trunk/webapp

scribe at crosswire.org scribe at crosswire.org
Sun May 21 19:12:14 MST 2006


Author: scribe
Date: 2006-05-21 19:12:13 -0700 (Sun, 21 May 2006)
New Revision: 252

Modified:
   trunk/webapp/parallelstudy.jsp
   trunk/webapp/passagestudy.jsp
Log:
Added support for headings in parallel view.  Doesn't look the best, but works.
Fixed bug in headings in passagestudy


Modified: trunk/webapp/parallelstudy.jsp
===================================================================
--- trunk/webapp/parallelstudy.jsp	2006-05-22 00:59:10 UTC (rev 251)
+++ trunk/webapp/parallelstudy.jsp	2006-05-22 02:12:13 UTC (rev 252)
@@ -303,10 +303,22 @@
 						SWModule mod = mgr.getModuleByName((String)parDispModules.get(i));
 						boolean rtol = ("RtoL".equalsIgnoreCase(mod.getConfigEntry("Direction")));
 
-						if (mod != activeModule)
-							mod.setKeyText( keyText );
-		%>
+						if (mod != activeModule) {
+							mod.setKeyText(keyText);
+						}
+
+%>
 							<td <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
+<%
+						String[] heads = mod.getEntryAttribute("Heading", "Preverse", "0", true);
+						if (heads.length > 0) {
+%>
+							<h3>
+							<%= new String(heads[0].getBytes("iso8859-1"), "UTF-8") %>
+							</h3>
+<%
+						}
+%>
 								<span class="versenum">
 									<a <%= (keyText.equals(activeKey)) ? "id=\"cv\"" : "" %> href="parallelstudy.jsp?key=<%= URLEncoder.encode(keyText) %>#cv"> <%= keyText.substring(keyText.indexOf(":")+1) %></a>
 								</span>

Modified: trunk/webapp/passagestudy.jsp
===================================================================
--- trunk/webapp/passagestudy.jsp	2006-05-22 00:59:10 UTC (rev 251)
+++ trunk/webapp/passagestudy.jsp	2006-05-22 02:12:13 UTC (rev 252)
@@ -250,7 +250,7 @@
 					<tr><td colspan="2"><div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= (keyText.equals(activeKey)) ? "currentverse" : "verse" %>">
 				<h3>
 					<%= new String(heads[0].getBytes("iso8859-1"), "UTF-8") %>
-				 </h3></div></td><tr>
+				 </h3></div></td></tr>
 			<%
 					}
 			%>



More information about the sword-cvs mailing list