[sword-svn] r409 - trunk/webapp

scribe at crosswire.org scribe at crosswire.org
Sat Jul 27 01:45:58 MST 2013


Author: scribe
Date: 2013-07-27 01:45:58 -0700 (Sat, 27 Jul 2013)
New Revision: 409

Modified:
   trunk/webapp/fetchdata.jsp
   trunk/webapp/parallelstudy.jsp
   trunk/webapp/passagestudy.jsp
Log:
added render filter to display for css from filter
corrected #cv positioning to <tr> so no translation or header will be scrolled off the screen


Modified: trunk/webapp/fetchdata.jsp
===================================================================
--- trunk/webapp/fetchdata.jsp	2013-06-07 14:03:04 UTC (rev 408)
+++ trunk/webapp/fetchdata.jsp	2013-07-27 08:45:58 UTC (rev 409)
@@ -2,6 +2,7 @@
     language="java"
     contentType="text/html;charset=utf-8"
 %>
+<%@ page trimDirectiveWhitespaces="true" %>
 <%@ page import="org.crosswire.sword.orb.*" %>
 <%@ page import="org.crosswire.utils.HTTPUtils" %>
 <%@ page import="org.crosswire.xml.XMLBlock" %>
@@ -261,10 +262,18 @@
 <span class="verse_number"> <%= book.getKeyChildren()[3]%></span>
 <%
 								}
+								if ("strip".equals(format)) {
+
+%>
+<%= book.getStripText() %>
+<%
+								}
+								else {
 								// --------------------------------------------
 %>
 <%= book.getRenderText() %>
 <%
+								}
 							}
 						}
 					}
@@ -279,4 +288,22 @@
 			}
 		}
 	}
+	else {
+		response.setContentType("text/xml");
 %>
+<?xml version="1.0" encoding="utf-8"?>
+<modules>
+<%
+		ModInfo[] modInfo = mgr.getModInfoList();
+		for (int i = 0; i < modInfo.length; i++) {
+			SWModule b = mgr.getModuleByName(modInfo[i].name);
+%>
+	<module id="<%=modInfo[i].name %>" category="<%= modInfo[i].category %>"><%= HTTPUtils.canonize(b.getDescription()) %></module>
+
+<%
+		}
+%>
+</modules>
+<%
+	}
+%>

Modified: trunk/webapp/parallelstudy.jsp
===================================================================
--- trunk/webapp/parallelstudy.jsp	2013-06-07 14:03:04 UTC (rev 408)
+++ trunk/webapp/parallelstudy.jsp	2013-07-27 08:45:58 UTC (rev 409)
@@ -70,6 +70,7 @@
 	session.setAttribute("morph", (morph)?"on":"off");
 
 	boolean startList = false;
+	boolean usedCV = false;
 %>
 
 
@@ -221,9 +222,17 @@
 
 	</tiles:put>
 	<tiles:put name="content" type="string">
-
 		<div id="paralleldisplay">
 
+		<% //insert module - specific styles at the top.  This doesn't make much sense if styles overlap
+			for (int i = 0; i < parDispModules.size(); i++) {
+				SWModule mod = mgr.getModuleByName((String)parDispModules.get(i));
+		%>
+			<style><%= mod.getRenderHeader() %></style>
+		<%
+			}
+		%>
+
 		<h2><t:t>Parallel Viewing: </t:t><%= activeKey %></h2>
 		<div id="introhelp">
 		<p><t:t>Presets: [<a href="parallelstudy.jsp?del=all&amp;add=KJV&amp;add=WLC&amp;add=NASB&amp;add=LXX">OT Scholar</a>]</t:t> <t:t>[<a href="parallelstudy.jsp?del=all&amp;add=KJV&amp;add=TR&amp;add=Treg&amp;add=NASB">NT Scholar</a>]</t:t></p>
@@ -328,12 +337,14 @@
 						else myEusNum = "";
 					}
 				}
+				boolean currentVerse = keyText.equals(activeKey);
 			%>
 
 
-				<tr>
+				<tr<%=!usedCV && currentVerse?" id=\"cv\"" : ""%>>
 					<td style="padding:0;margin:0" valign="top" align="center"><div>
 <%
+					if (currentVerse) usedCV = true;
 					if (myEusNum.length() > 0) {
 %>
 					<span class="eusnum">
@@ -368,7 +379,7 @@
 						}
 %>
 								<span class="versenum">
-									<a <%= (keyText.equals(activeKey)) ? "id=\"cv\"" : "" %> href="parallelstudy.jsp?key=<%= URLEncoder.encode(keyText) %>#cv"> <%= keyText.substring(keyText.indexOf(":")+1) %></a>
+									<a href="parallelstudy.jsp?key=<%= URLEncoder.encode(keyText) %>#cv"> <%= keyText.substring(keyText.indexOf(":")+1) %></a>
 								</span>
 
 					<%
@@ -391,6 +402,7 @@
 		%>
 		<tr>
 
+			<td></td>
 		<% //insert module names at the top
 				for (int i = 0; i < parDispModules.size(); i++) {
 					SWModule mod = mgr.getModuleByName((String)parDispModules.get(i));

Modified: trunk/webapp/passagestudy.jsp
===================================================================
--- trunk/webapp/passagestudy.jsp	2013-06-07 14:03:04 UTC (rev 408)
+++ trunk/webapp/passagestudy.jsp	2013-07-27 08:45:58 UTC (rev 409)
@@ -225,6 +225,9 @@
 	<tiles:put name="content" type="string">
 
 		<div id="passagestudy">
+		<style>
+				<%= activeModule.getRenderHeader() %>
+		</style>
 		<h2><%= activeKey %></h2>
 		<h3><a href="fulllibrary.jsp?show=<%= URLEncoder.encode(activeModule.getName()) %>"><%= activeModule.getDescription().replaceAll("&", "&amp;") %></a></h3>
 




More information about the sword-cvs mailing list