[sword-svn] r412 - trunk/webapp

scribe at crosswire.org scribe at crosswire.org
Sat Nov 2 15:07:20 MST 2013


Author: scribe
Date: 2013-11-02 15:07:20 -0700 (Sat, 02 Nov 2013)
New Revision: 412

Modified:
   trunk/webapp/common.css
   trunk/webapp/fetchdata.jsp
   trunk/webapp/passagestudy.jsp
   trunk/webapp/wordsearchresults.jsp
Log:
fixed TEI </div> bug when crossing books
added special coptic font


Modified: trunk/webapp/common.css
===================================================================
--- trunk/webapp/common.css	2013-09-24 11:13:45 UTC (rev 411)
+++ trunk/webapp/common.css	2013-11-02 22:07:20 UTC (rev 412)
@@ -1,3 +1,13 @@
+ at font-face {
+    font-family: 'AntinoouWeb';
+    src: url('fonts/antinoou-webfont.eot');
+    src: url('fonts/antinoou-webfont.eot?#iefix') format('embedded-opentype'),
+         url('fonts/antinoou-webfont.woff') format('woff'),
+         url('fonts/antinoou-webfont.ttf') format('truetype');
+    font-weight: normal;
+    font-style: normal;
+}
+
 /* define height and width of scrollable area. Add 16px to width for scrollbar          */
 div.tableContainer {
 	clear: both;

Modified: trunk/webapp/fetchdata.jsp
===================================================================
--- trunk/webapp/fetchdata.jsp	2013-09-24 11:13:45 UTC (rev 411)
+++ trunk/webapp/fetchdata.jsp	2013-11-02 22:07:20 UTC (rev 412)
@@ -18,7 +18,10 @@
 	mgr.setGlobalOption("Footnotes", "Off");
 	mgr.setGlobalOption("Cross-references", "Off");
 
-	String mods[] = modName.split("\\|");
+	String mods[] = new String[0];
+	if (modName != null) {
+		mods = modName.split("\\|");
+	}
 
 	if (ks != null) {
 		String parts[] = ks.split("\\|");
@@ -174,8 +177,6 @@
 				}
 				if ((key != null) && (book != null)) {
 					String keyList[] = SwordOrb.BIBLES.equals(book.getCategory())?book.parseKeyList(key) : new String[] { key };
-					boolean startBookTag = false;
-					boolean startChapterTag = false;
 					
 					if ("tei".equals(format) && keyList.length > 0) {
 						book.setKeyText(keyList[0]);
@@ -227,12 +228,10 @@
 %>
 <div type="book" n="B<%= String.format("%02d", Integer.parseInt(book.getKeyChildren()[1])) %>">
 <%
-											startBookTag = true;
 										}
 %>
 <div type="chapter" n="B<%= String.format("%02d", Integer.parseInt(book.getKeyChildren()[1])) %>K<%= book.getKeyChildren()[2] %>">
 <%
-											startChapterTag = true;
 									}
 %>
 <ab n="B<%= String.format("%02d", Integer.parseInt(book.getKeyChildren()[1])) %>K<%= book.getKeyChildren()[2] %>V<%= book.getKeyChildren()[3] %>">
@@ -249,16 +248,16 @@
 <%
 									// if last verse of chapter
 									if (k < keyList.length-1 && book.getKeyChildren()[5].equals(book.getKeyChildren()[3])) {
+System.out.println("ending chapter");
 %>
 </div>
 <%
-										startChapterTag = false;
 										// if last chapter of book
-										if (k < keyList.length-1 && book.getKeyChildren()[4].equals(book.getKeyChildren()[2]) && startBookTag) {
+										if (k < keyList.length-1 && book.getKeyChildren()[4].equals(book.getKeyChildren()[2])) {
+System.out.println("ending book");
 %>
 </div>
 <%
-											startBookTag = false;
 										}
 									}
 								}

Modified: trunk/webapp/passagestudy.jsp
===================================================================
--- trunk/webapp/passagestudy.jsp	2013-09-24 11:13:45 UTC (rev 411)
+++ trunk/webapp/passagestudy.jsp	2013-11-02 22:07:20 UTC (rev 412)
@@ -17,7 +17,13 @@
 	if (promoLine.equalsIgnoreCase("<swnull>")) {
 		promoLine = "";
 	}
+	String specialFont = activeModule.getConfigEntry("Font");
+	if (specialFont.equalsIgnoreCase("<swnull>")) {
+		specialFont = null;
+	}
 
+	boolean rtol = ("RtoL".equalsIgnoreCase(activeModule.getConfigEntry("Direction")));
+
 	String resetKey = request.getParameter("key");
 	if (resetKey != null) {
 		resetKey = new String(resetKey.getBytes("iso8859-1"), "UTF-8");
@@ -257,7 +263,6 @@
 				int anchorVerse = (activeVerse > 2)?activeVerse - 2: -1;
 				boolean first = true;
 				String lang = activeModule.getConfigEntry("Lang");
-				boolean rtol = ("RtoL".equalsIgnoreCase(activeModule.getConfigEntry("Direction")));
 				
 				String lastEusNum = "";
 				String myEusNum = "";
@@ -340,7 +345,7 @@
 					}
 			%>
 
-					<td><div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= (keyText.equals(activeKey)) ? "currentverse" : (intro) ? "intro" : "verse" %>">
+					<td><div <%= rtol ? "dir=\"rtl\"" : "" %> style="<%= specialFont != null ? "font-family:"+specialFont : "" %>" class="<%= (keyText.equals(activeKey)) ? "currentverse" : (intro) ? "intro" : "verse" %>">
 
 					<%
 					
@@ -418,6 +423,7 @@
 			else {
 			%>
 				<div class="verse">
+				<div <%= rtol ? "dir=\"rtl\"" : "" %> style="<%= specialFont != null ? "font-family:"+specialFont : "" %>" class="verse">
 				<span class="versenum"><%= activeKey %></span>
 					<%= activeModule.getRenderText() %>
 				</div>

Modified: trunk/webapp/wordsearchresults.jsp
===================================================================
--- trunk/webapp/wordsearchresults.jsp	2013-09-24 11:13:45 UTC (rev 411)
+++ trunk/webapp/wordsearchresults.jsp	2013-11-02 22:07:20 UTC (rev 412)
@@ -156,6 +156,10 @@
 			Integer resultStart = new Integer(request.getParameter("start") != null ? request.getParameter("start") : "0");
 			Integer resultLimit = new Integer(30);
 			boolean rtol = ("RtoL".equalsIgnoreCase(activeModule.getConfigEntry("Direction")));
+			String specialFont = activeModule.getConfigEntry("Font");
+			if (specialFont.equalsIgnoreCase("<swnull>")) {
+				specialFont = null;
+			}
 
 			for (int i = resultStart.intValue(); i < results.length && i < resultStart.intValue() + resultLimit.intValue(); i++)
 			{
@@ -167,7 +171,7 @@
 				
 				</dt>
 				
-				<dd dir="<%= rtol ? "rtl" : "" %>">
+				<dd dir="<%= rtol ? "rtl" : "" %>" style="<%= specialFont != null ? "font-family:"+specialFont : "" %>">
 					<%= activeModule.getRenderText() %>
 				</dd>
 




More information about the sword-cvs mailing list