[sword-svn] r224 - in trunk: . src/org/crosswire/swordweb
scribe at crosswire.org
scribe at crosswire.org
Thu Oct 13 12:43:31 MST 2005
Author: scribe
Date: 2005-10-13 12:43:30 -0700 (Thu, 13 Oct 2005)
New Revision: 224
Modified:
trunk/blues.css
trunk/bookdisplay.jsp
trunk/fetchdata.jsp
trunk/parchment.css
trunk/sandy.css
trunk/src/org/crosswire/swordweb/PerseusUtils.java
trunk/swordweb.js
trunk/wash.css
Log:
Added a "please wait..." box while doing lookups
Added hand icons when hovering over a word that can be clicked
Added IE font support for scholarly fonts
Fixed IE UTF-8 encode troubles for URLs
Modified: trunk/blues.css
===================================================================
--- trunk/blues.css 2005-10-12 18:20:42 UTC (rev 223)
+++ trunk/blues.css 2005-10-13 19:43:30 UTC (rev 224)
@@ -240,13 +240,19 @@
font-weight: bold;
}
-#content-main .verse {
+.clk {
+ cursor:pointer;
+}
+
+.verse {
+ font-family:cardo,tahoma,code2000,code2001,arial unicode ms,arial,sans serif,serif;
margin: 0px 0px 5px 0px;
padding: 0px 5px 0px 5px;
vertical-align:text-top;
}
-#content-main .currentverse {
+.currentverse {
+ font-family:cardo,tahoma,code2000,code2001,arial unicode ms,arial,sans serif,serif;
vertical-align:text-top;
margin: 0px 0px 5px 0px;
background-color: #eeeeee;
Modified: trunk/bookdisplay.jsp
===================================================================
--- trunk/bookdisplay.jsp 2005-10-12 18:20:42 UTC (rev 223)
+++ trunk/bookdisplay.jsp 2005-10-13 19:43:30 UTC (rev 224)
@@ -148,7 +148,7 @@
if (heads.length > 0) {
%>
<tr><td colspan="2"><div <%= rtol ? "dir=\"rtl\"" : "" %> class="<%= (k.equals(gbsEntry)) ? "currentverse" : "verse" %>">
- <h3> <%= heads[0] %> </h3></div></td><tr>
+ <h3><span class="verse"><%= new String(heads[0].getBytes("iso8859-1"), "UTF-8") %></span></h3></div></td><tr>
<%
}
%>
Modified: trunk/fetchdata.jsp
===================================================================
--- trunk/fetchdata.jsp 2005-10-12 18:20:42 UTC (rev 223)
+++ trunk/fetchdata.jsp 2005-10-13 19:43:30 UTC (rev 224)
@@ -31,7 +31,7 @@
else {
key = new String(key.getBytes("iso8859-1"), "UTF-8");
String ls = org.crosswire.swordweb.PerseusUtils.getLiddellScottDef(key);
- if (ls.length() > 15+key.length()) {
+ if (ls.length() > 0) {
%>
<%= ls %>
<div class="copyLine">from Liddell and Scott, <i>An Intermediate Greek-English Lexicon</i><br/>
@@ -40,7 +40,7 @@
}
else {
%>
- <%= key %>
+ <h2><span class="verse"><%= key %></span></h2>
<%
}
}
Modified: trunk/parchment.css
===================================================================
(Binary files differ)
Modified: trunk/sandy.css
===================================================================
--- trunk/sandy.css 2005-10-12 18:20:42 UTC (rev 223)
+++ trunk/sandy.css 2005-10-13 19:43:30 UTC (rev 224)
@@ -484,10 +484,18 @@
color:#ff0000;
}
-div.currentverse {
+.currentverse {
+ font-family:cardo,tahoma,code2000,code2001,arial unicode ms,arial,sans serif,serif;
background-color: #eee;
}
+.verse {
+ font-family:cardo,tahoma,code2000,code2001,arial unicode ms,arial,sans serif,serif;
+}
+.clk {
+ cursor:hand;
+}
+
#passagestudy ul {
border-top: 1px solid #808072;
border-bottom: 1px dashed #808072;
Modified: trunk/src/org/crosswire/swordweb/PerseusUtils.java
===================================================================
--- trunk/src/org/crosswire/swordweb/PerseusUtils.java 2005-10-12 18:20:42 UTC (rev 223)
+++ trunk/src/org/crosswire/swordweb/PerseusUtils.java 2005-10-13 19:43:30 UTC (rev 224)
@@ -17,7 +17,8 @@
public class PerseusUtils {
public static String getLiddellScottDef(String lemma) {
UnicodeToBetacode bc = new UnicodeToBetacode();
- String retVal = "<h2>"+lemma+"</h2>";
+ String retVal = "";
+ String lemmaUnicode = lemma;
lemma = bc.convertString(lemma).toLowerCase();
// Perseus wants final sigma to be "s"
if (lemma.endsWith("j")) lemma = lemma.substring(0, lemma.length()-1) + "s";
@@ -28,9 +29,12 @@
url = new URL("http://www.perseus.tufts.edu/hopper/xmlchunk.jsp?doc=Perseus%3Atext%3A1999.04.0058%3Aentry%3D"+URLEncoder.encode(lemma));
InputSource inputSource = new InputSource(url.openStream());
DTMNodeList nodes = (DTMNodeList)xpath.evaluate(expression, inputSource, XPathConstants.NODESET);
- for (int i = 0; i < nodes.getLength(); i++) {
- Node n = nodes.item(i);
- retVal += outputSenseNode(n);
+ if (nodes.getLength() > 0) {
+ retVal = "<h2><span class=\"verse\">"+lemmaUnicode+"</span></h2>";
+ for (int i = 0; i < nodes.getLength(); i++) {
+ Node n = nodes.item(i);
+ retVal += outputSenseNode(n);
+ }
}
} catch (Exception ex) { ex.printStackTrace(); }
return retVal;
Modified: trunk/swordweb.js
===================================================================
--- trunk/swordweb.js 2005-10-12 18:20:42 UTC (rev 223)
+++ trunk/swordweb.js 2005-10-13 19:43:30 UTC (rev 224)
@@ -120,10 +120,10 @@
if (b!=null) {
c=document.getElementById("dm");
if (c!=null) {
- xmlhttp.open("GET", "fetchdata.jsp?mod=Packard&key="+extratext,true);
+ xmlhttp.open("GET", "fetchdata.jsp?mod=Packard&key="+encodeURIComponent(extratext),true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
- c.innerHTML="<br/>"+extratext+"<br/>"+xmlhttp.responseText;
+ c.innerHTML="<div class=\"verse\"><br/>"+extratext+"<br/>"+xmlhttp.responseText+"</div>";
}
}
xmlhttp.send(null);
@@ -136,10 +136,10 @@
if (b!=null) {
c=document.getElementById("dm");
if (c!=null) {
- xmlhttp.open("GET", "fetchdata.jsp?mod=Robinson&key="+extratext,true);
+ xmlhttp.open("GET", "fetchdata.jsp?mod=Robinson&key="+encodeURIComponent(extratext),true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
- c.innerHTML="<br/>"+extratext+"<br/>"+xmlhttp.responseText;
+ c.innerHTML="<div class=\"verse\"><br/>"+extratext+"<br/>"+xmlhttp.responseText+"</div>";
}
}
xmlhttp.send(null);
@@ -167,14 +167,15 @@
showhide("onlywlayer", "hidden");
}
else {
- xmlhttp.open("GET", "fetchdata.jsp?mod="+mod+"&key="+key,true);
+ b.innerHTML="Please wait...";
+ showhide("onlywlayer", "visible");
+ xmlhttp.open("GET", "fetchdata.jsp?mod="+mod+"&key="+encodeURIComponent(key),true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
if (mod != "betacode")
- b.innerHTML=xmlhttp.responseText + "<br/>"+"<div id=\"dm\"><a href=\"#\" onclick=\"pd('"+extratext+"');return false;\">"+extratext+"</a></div>";
+ b.innerHTML="<div class=\"verse\">"+xmlhttp.responseText + "<br/>"+"<div id=\"dm\"><a href=\"#\" onclick=\"pd('"+extratext+"');return false;\">"+extratext+"</a></div></div>";
else
- b.innerHTML=xmlhttp.responseText + "<br/>"+"<div id=\"dm\"><a href=\"#\" onclick=\"pe('"+extratext+"');return false;\">"+extratext+"</a></div>";
- showhide("onlywlayer", "visible");
+ b.innerHTML="<div class=\"verse\">"+xmlhttp.responseText + "<br/>"+"<div id=\"dm\"><a href=\"#\" onclick=\"pe('"+extratext+"');return false;\">"+extratext+"</a></div></div>";
lastword = wordnum;
}
}
Modified: trunk/wash.css
===================================================================
--- trunk/wash.css 2005-10-12 18:20:42 UTC (rev 223)
+++ trunk/wash.css 2005-10-13 19:43:30 UTC (rev 224)
@@ -627,10 +627,18 @@
border-bottom: 1px solid #ccc;
}
-div.currentverse {
+.currentverse {
background-color: #eee;
+ font-family:cardo,tahoma,code2000,code2001,arial unicode ms,arial,sans serif,serif;
}
+.verse {
+ font-family:cardo,tahoma,code2000,code2001,arial unicode ms,arial,sans serif,serif;
+}
+.clk {
+ cursor:hand;
+}
+
#passagestudy ul {
background: #eee;
border-top: 1px solid #ccc;
More information about the sword-cvs
mailing list