[jsword-svn] r1811 - trunk/incubator/jsword-www/jswordweb

Apache apache at www.crosswire.org
Wed Apr 23 08:29:01 MST 2008


Author: 
Date: 2008-04-23 08:29:01 -0700 (Wed, 23 Apr 2008)
New Revision: 1811

Modified:
   trunk/incubator/jsword-www/jswordweb/iBD.js
   trunk/incubator/jsword-www/jswordweb/index.html
Log:
clean

Modified: trunk/incubator/jsword-www/jswordweb/iBD.js
===================================================================
--- trunk/incubator/jsword-www/jswordweb/iBD.js	2008-04-23 14:11:32 UTC (rev 1810)
+++ trunk/incubator/jsword-www/jswordweb/iBD.js	2008-04-23 15:29:01 UTC (rev 1811)
@@ -46,6 +46,7 @@
   // The last argument is an asynchronous callback
   JSword.getInstalledBooks("bookCategory=Bible", loadBooks);
   JSword.getInstalledBooks("bookCategory=Dictionary", loadDictionaries);
+  JSword.getInstalledBooks("bookCategory=Commentary", loadCommentaries);
 
   // Constrain the display area to be within the boundary of the window.
   window.onresize = ibdResize;
@@ -85,6 +86,11 @@
   dwr.util.removeAllOptions("dictionaries");
   dwr.util.addOptions("dictionaries", data, "0", "0");
 }
+function loadCommentaries(data)
+{
+  dwr.util.removeAllOptions("commentaries");
+  dwr.util.addOptions("commentaries", data, "0", "0");
+}
 
 /**
  * Called when book data has been fetched
@@ -117,6 +123,10 @@
 {
   locate_dictionary() || search_dictionary();
 }
+function pick_commentary()
+{
+  locate_commentary();
+}
 
 /**
  * Locate a passage.
@@ -145,6 +155,17 @@
   }
   return false;
 }
+function locate_commentary()
+{
+  var dict= getCommentary();
+  var ref  = getPassage();
+  if (dict&& ref)
+  {
+    JSword.getOSISString(dict, ref, verseStart,verseLimit, loadDisplay);
+    return true;
+  }
+  return false;
+}
 
 function prev()
 {
@@ -275,6 +296,10 @@
 {
   return dwr.util.getValue("dictionaries");
 }
+function getCommentary()
+{
+  return dwr.util.getValue("commentaries");
+}
 
 /**
  * Set the book to search or locate against

Modified: trunk/incubator/jsword-www/jswordweb/index.html
===================================================================
--- trunk/incubator/jsword-www/jswordweb/index.html	2008-04-23 14:11:32 UTC (rev 1810)
+++ trunk/incubator/jsword-www/jswordweb/index.html	2008-04-23 15:29:01 UTC (rev 1811)
@@ -26,6 +26,10 @@
     <div id="dictionarybox">
       <select id="dictionaries" onchange="pick_dictionary();"></select>
     </div>
+Commentaries:
+    <div id="commentarybox">
+      <select id="commentaries" onchange="pick_commentary();"></select>
+    </div>
 
     <div id="locateBox" align="left">
       <input type="text" id="passageRequest" onkeypress="dwr.util.onReturn(event, locate)"/>




More information about the jsword-svn mailing list