[sword-svn] r386 - in trunk/webapp: . layouts tiles
scribe at crosswire.org
scribe at crosswire.org
Thu Aug 11 08:22:11 MST 2011
Author: scribe
Date: 2011-08-11 08:22:11 -0700 (Thu, 11 Aug 2011)
New Revision: 386
Added:
trunk/webapp/common.css
Modified:
trunk/webapp/fetchdata.jsp
trunk/webapp/layouts/base-layout.jsp
trunk/webapp/parallelstudy.jsp
trunk/webapp/passagestudy.jsp
trunk/webapp/tiles/footer.jsp
Log:
Added Textual Evidence Lookup from INTF
Added: trunk/webapp/common.css
===================================================================
--- trunk/webapp/common.css (rev 0)
+++ trunk/webapp/common.css 2011-08-11 15:22:11 UTC (rev 386)
@@ -0,0 +1,152 @@
+/* define height and width of scrollable area. Add 16px to width for scrollbar */
+div.tableContainer {
+ clear: both;
+ border: 1px solid #963;
+ height: 285px;
+ overflow: auto;
+ width: 300px
+}
+
+/* Reset overflow value to hidden for all non-IE browsers. */
+html>body div.tableContainer {
+ overflow: hidden;
+ width: 300px
+}
+
+/* define width of table. IE browsers only */
+div.tableContainer table {
+ float: left;
+ width: 284px
+}
+
+/* define width of table. Add 16px to width for scrollbar. */
+/* All other non-IE browsers. */
+html>body div.tableContainer table {
+ width: 300px
+}
+
+/* set table header to a fixed position. WinIE 6.x only */
+/* In WinIE 6.x, any element with a position property set to relative and is a child of */
+/* an element that has an overflow property set, the relative value translates into fixed. */
+/* Ex: parent element DIV with a class of tableContainer has an overflow property set to auto */
+thead.fixedHeader tr {
+ position: relative
+}
+
+/* set THEAD element to have block level attributes. All other non-IE browsers */
+/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
+html>body thead.fixedHeader tr {
+ display: block
+}
+
+/* make the TH elements pretty */
+/*
+thead.fixedHeader th {
+ background: #C96;
+ border-left: 1px solid #EB8;
+ border-right: 1px solid #B74;
+ border-top: 1px solid #EB8;
+ font-weight: normal;
+ padding: 4px 3px;
+ text-align: left
+}
+*/
+
+/* make the A elements pretty. makes for nice clickable headers */
+/*
+thead.fixedHeader a, thead.fixedHeader a:link, thead.fixedHeader a:visited {
+ color: #FFF;
+ display: block;
+ text-decoration: none;
+ width: 100%
+}
+*/
+
+/* make the A elements pretty. makes for nice clickable headers */
+/* WARNING: swapping the background on hover may cause problems in WinIE 6.x */
+/*
+thead.fixedHeader a:hover {
+ color: #FFF;
+ display: block;
+ text-decoration: underline;
+ width: 100%
+}
+*/
+
+/* define the table content to be scrollable */
+/* set TBODY element to have block level attributes. All other non-IE browsers */
+/* this enables overflow to work on TBODY element. All other non-IE, non-Mozilla browsers */
+/* induced side effect is that child TDs no longer accept width: auto */
+html>body tbody.scrollContent {
+ display: block;
+ height: 272px;
+ overflow: auto;
+ width: 100%
+}
+
+/* make TD elements pretty. Provide alternating classes for striping the table */
+/* http://www.alistapart.com/articles/zebratables/ */
+tbody.scrollContent td, tbody.scrollContent tr.normalRow td {
+ background: #FFF;
+ border-bottom: none;
+ border-left: none;
+ border-right: 1px solid #CCC;
+ border-top: 1px solid #DDD;
+ padding: 2px 3px 3px 4px
+}
+
+tbody.scrollContent tr.alternateRow td {
+ background: #EEE;
+ border-bottom: none;
+ border-left: none;
+ border-right: 1px solid #CCC;
+ border-top: 1px solid #DDD;
+ padding: 2px 3px 3px 4px
+}
+
+/* define width of TH elements: 1st, 2nd, and 3rd respectively. */
+/* Add 16px to last TH for scrollbar padding. All other non-IE browsers. */
+/* http://www.w3.org/TR/REC-CSS2/selector.html#adjacent-selectors */
+html>body thead.fixedHeader th {
+ width: 56px
+}
+
+html>body thead.fixedHeader th + th {
+ width: 56px
+}
+
+html>body thead.fixedHeader th + th + th {
+ width: 56px
+}
+
+html>body thead.fixedHeader th + th + th + th {
+ width: 56px
+}
+
+html>body thead.fixedHeader th + th + th + th + th {
+ width: 70px
+}
+
+/* define width of TD elements: 1st, 2nd, and 3rd respectively. */
+/* All other non-IE browsers. */
+/* http://www.w3.org/TR/REC-CSS2/selector.html#adjacent-selectors */
+html>body tbody.scrollContent td {
+ width: 57px
+}
+
+html>body tbody.scrollContent td + td {
+ width: 57px
+}
+
+html>body tbody.scrollContent td + td + td {
+ width: 56px
+}
+
+html>body tbody.scrollContent td + td + td + td {
+ width: 56px
+}
+
+html>body tbody.scrollContent td + td + td + td + td {
+ width: 56px
+}
+
Modified: trunk/webapp/fetchdata.jsp
===================================================================
--- trunk/webapp/fetchdata.jsp 2011-01-21 05:38:04 UTC (rev 385)
+++ trunk/webapp/fetchdata.jsp 2011-08-11 15:22:11 UTC (rev 386)
@@ -3,6 +3,8 @@
contentType="text/html;charset=utf-8"
%>
<%@ page import="org.crosswire.sword.orb.*" %>
+<%@ page import="org.crosswire.utils.HTTPUtils" %>
+<%@ page import="org.crosswire.xml.XMLBlock" %>
<%@ page import="java.net.URLEncoder" %>
<%
@@ -27,8 +29,140 @@
}
// end of LXXM Packard hack ----------------
+ // ------ betacode lookup from perseus ------------------------------------------------
+ if ("betacode".equals(modName)) {
+ key = new String(key.getBytes("iso8859-1"), "UTF-8");
+ String ls = org.crosswire.swordweb.PerseusUtils.getLiddellScottDef(key);
+ if (ls.length() > 0) {
+%>
+ <%= ls %>
+ <div class="copyLine">from Liddell and Scott, <i>An Intermediate Greek-English Lexicon</i><br/>
+ Courtesy of <a href="http://www.perseus.tufts.edu">Perseus Digital Library</a></div>
+<%
+ }
+ else {
+%>
+ <h2><span class="verse"><%= key %></span></h2>
+<%
+ }
+ }
+
+ // ------ Textual Evidence Lookup from INTF ---------------------------------------------
+
+ else if ("TC".equals(modName)) {
+ String srcMod = request.getParameter("srcMod");
+ String activeKey = (String)session.getAttribute("ActiveKey");
+ if (srcMod != null) {
+ book = mgr.getModuleByName(srcMod);
+ }
+ if ((key != null) && (book != null) && activeKey != null) {
+ String activeChapter = activeKey.substring(0, activeKey.indexOf(":"));
+ activeKey = activeChapter+"."+key;
+ String vk[] = book.parseKeyList(activeKey);
+ StringBuffer vmrResponse = HTTPUtils.postURL("http://vmr-dev.uni-muenster.de/community/vmr/api/metadata/liste/search/", "biblicalcontent="+vk[0]+"&detail=page&limit=20");
+ XMLBlock manuscripts = new XMLBlock(vmrResponse.toString());
+%>
+ <p><b>Some Manuscript Witnesses for <%=vk[0]%></b></p>
+ <div id="tableContainer" class="tableContainer">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" class="scrollTable">
+ <thead class="fixedHeader">
+ <tr><th>Manuscript</th><th>Century</th><th>Folio</th><th>Content</th><th>Image</th></tr>
+ </thead>
+ <tbody class="scrollContent">
+<%
+ int formCount = 0;
+ for (XMLBlock m : manuscripts.getBlocks("manuscript")) {
+ for (XMLBlock p : m.getBlock("pages").getBlocks("page")) {
+ ++formCount;
+ String thumbURL = null;
+ String imageURL = null;
+ String transURL = null;
+ XMLBlock block = p.getBlock("images");
+ if (block != null) {
+ block = block.getBlock("image");
+ if (block != null) {
+ thumbURL = block.getAttribute("thumburi");
+ imageURL = block.getAttribute("uri");
+ }
+ }
+ block = p.getBlock("transcriptions");
+ if (block != null) {
+ block = block.getBlock("transcription");
+ if (block != null) {
+ transURL = block.getAttribute("uri");
+ }
+ }
+ String mssURL = "http://intf.uni-muenster.de/vmr/NTVMR/ListeHandschriften.php?ObjID=" + m.getAttribute("docid");
+%>
+ <tr>
+ <td><a href="#" onclick="window.open('<%=mssURL%>','ViewManuscript','width=800,height=600,resizable=1,scrollbars=1');return false;">
+ <%=m.getAttribute("ganum")%>
+ </a></td>
+ <td><%=m.getValue("originyeardescription")%></td>
+ <td><%=p.getAttribute("folio")%></td>
+ <td>
+<%
+ if (transURL != null) {
+%>
+ <a href="#" onclick="window.open('<%=transURL%>','ViewTranscription','width=500,height=600,resizable=1,scrollbars=1');return false;">
+<%
+ }
+%>
+ <%=p.getAttribute("biblicalcontent")%>
+<%
+ if (transURL != null) {
+%>
+ </a>
+<%
+ }
+%>
+ <td>
+<%
+ if (imageURL != null) {
+ String siteURL = imageURL.substring(0,imageURL.lastIndexOf("/")+1);
+ String pageImage = imageURL.substring(imageURL.lastIndexOf("/")+1);
+ imageURL = "http://community.crosswire.org/modules/papyri/?site="+siteURL+"&image="+pageImage;
+%>
+<!--
+ <a href="#" onclick="window.open('<%=imageURL%>','ViewImage','width=800,height=600');return false;">
+-->
+ <form name="form<%=formCount%>" target="_blank" action="http://intf.uni-muenster.de/vmr/NTVMR/viewer/viewerWolkenkratzer01.php" method="post">
+ <input name="msNr" value="<%=m.getAttribute("docid")%>" type="hidden"/>
+ <input name="folio" value="<%=m.getAttribute("folio")%>" type="hidden"/>
+ <input name="load_ms" value="go" type="hidden"/>
+ <input name="load_folio" value="go" type="hidden"/>
+ <a href="#" onclick="javascript:document.form<%=formCount%>.submit();">
+<%
+ }
+ if (thumbURL != null) {
+%>
+ <img width="50px" src="<%=thumbURL%>"/>
+<%
+ }
+ if (imageURL != null) {
+%>
+<!--
+ </a>
+-->
+ </form>
+<%
+ }
+%>
+ </td></tr>
+<%
+ }
+ }
+%>
+ </tbody>
+ </table>
+ </div>
+ <div class="copyLine"><br/>This dataset is by no means exhaustive and is growing rapidly. Check back soon for more results.<br/><br/>Courtesy of <a href="http://egora.uni-muenster.de/intf/index_en.shtml">Institut für Neutestamentliche Textforschung</a></div>
+<%
+ }
+ }
+
// normal SWORD mod lookup
- if (!"betacode".equals(modName)) {
+ else {
if (modName != null) {
book = mgr.getModuleByName(modName);
}
@@ -65,35 +199,18 @@
}
else {
if ("raw".equals(format)) {
- %>
+%>
<%= book.getRawEntry() %>
- <%
+<%
}
else {
- %>
+%>
<%= book.getRenderText() %>
- <%
+<%
}
}
}
}
- // betacode lookup from perseus
- else {
- key = new String(key.getBytes("iso8859-1"), "UTF-8");
- String ls = org.crosswire.swordweb.PerseusUtils.getLiddellScottDef(key);
- if (ls.length() > 0) {
- %>
- <%= ls %>
- <div class="copyLine">from Liddell and Scott, <i>An Intermediate Greek-English Lexicon</i><br/>
- Courtesy of <a href="http://www.perseus.tufts.edu">Perseus Digital Library</a></div>
- <%
- }
- else {
- %>
- <h2><span class="verse"><%= key %></span></h2>
- <%
- }
- }
}
}
%>
Modified: trunk/webapp/layouts/base-layout.jsp
===================================================================
--- trunk/webapp/layouts/base-layout.jsp 2011-01-21 05:38:04 UTC (rev 385)
+++ trunk/webapp/layouts/base-layout.jsp 2011-08-11 15:22:11 UTC (rev 386)
@@ -32,6 +32,7 @@
<title><t:t>OSIS Web: </t:t><tiles:getAsString name="title"/></title>
+<link rel="stylesheet" type="text/css" media="all" href="common.css" />
<link rel="stylesheet" type="text/css" media="all" title="<%= styleName %>" href="<%= styleFile %>" />
<% for (int i = 0; i < styleNames.size(); i++) { %>
Modified: trunk/webapp/parallelstudy.jsp
===================================================================
--- trunk/webapp/parallelstudy.jsp 2011-01-21 05:38:04 UTC (rev 385)
+++ trunk/webapp/parallelstudy.jsp 2011-08-11 15:22:11 UTC (rev 386)
@@ -40,12 +40,13 @@
String resetKey = request.getParameter("key");
if (resetKey != null) {
resetKey = new String(resetKey.getBytes("iso8859-1"), "UTF-8");
- session.setAttribute("ActiveKey", resetKey);
+ activeModule.setKeyText(resetKey);
+ session.setAttribute("ActiveKey", activeModule.getKeyText());
}
-
String activeKey = (String) session.getAttribute("ActiveKey");
if (activeKey == null) {
- activeKey = "jas 1:19"; // our fallback key
+ activeKey = "jas 1:19";
+ session.setAttribute("ActiveKey", activeKey);
}
// be sure it's formatted nicely
Modified: trunk/webapp/passagestudy.jsp
===================================================================
--- trunk/webapp/passagestudy.jsp 2011-01-21 05:38:04 UTC (rev 385)
+++ trunk/webapp/passagestudy.jsp 2011-08-11 15:22:11 UTC (rev 386)
@@ -17,11 +17,13 @@
String resetKey = request.getParameter("key");
if (resetKey != null) {
resetKey = new String(resetKey.getBytes("iso8859-1"), "UTF-8");
- session.setAttribute("ActiveKey", resetKey);
+ activeModule.setKeyText(resetKey);
+ session.setAttribute("ActiveKey", activeModule.getKeyText());
}
String activeKey = (String) session.getAttribute("ActiveKey");
if (activeKey == null) {
activeKey = "jas 1:19";
+ session.setAttribute("ActiveKey", activeKey);
}
if (toolsTreeOpen == null) {
Modified: trunk/webapp/tiles/footer.jsp
===================================================================
--- trunk/webapp/tiles/footer.jsp 2011-01-21 05:38:04 UTC (rev 385)
+++ trunk/webapp/tiles/footer.jsp 2011-08-11 15:22:11 UTC (rev 386)
@@ -5,8 +5,10 @@
<a href="http://sbl-site.org/" title="Society of Biblical Literature"><img src="./images/logo_fbl.gif" width="86" height="64" alt="Society of Biblical Literature" /></a>
</p>
-<p>Copyright © 2003-2008 <a href="http://www.crosswire.org/">CrossWire Bible Society</a></p>
+<p>Copyright © 2003-2011 <a href="http://www.crosswire.org/">CrossWire Bible Society</a></p>
+<!--
<p><a href="http://validator.w3.org/check/referer" title="valid xhtml">xhtml</a></p>
+-->
<div id="pageBorderBottom"><br /></div>
</div>
</div>
More information about the sword-cvs
mailing list