[sword-svn] r394 - trunk/webapp

scribe at crosswire.org scribe at crosswire.org
Thu Nov 17 18:22:14 MST 2011


Author: scribe
Date: 2011-11-17 18:22:14 -0700 (Thu, 17 Nov 2011)
New Revision: 394

Modified:
   trunk/webapp/fetchdata.jsp
   trunk/webapp/simplegadget.jsp
Log:
Switched api calls over to ntvmr


Modified: trunk/webapp/fetchdata.jsp
===================================================================
--- trunk/webapp/fetchdata.jsp	2011-10-28 20:35:48 UTC (rev 393)
+++ trunk/webapp/fetchdata.jsp	2011-11-18 01:22:14 UTC (rev 394)
@@ -64,7 +64,7 @@
 					catch (Exception e) { activeKey = key; } // not an error, just hopefully have entire versekey already
 					String vk[] = book.parseKeyList(activeKey);
 					activeKey=vk[0];
-					StringBuffer vmrResponse = HTTPUtils.postURL("http://vmr-dev.uni-muenster.de/community/vmr/api/metadata/liste/search/", "biblicalContent="+activeKey+"&detail=page&limit=40");
+					StringBuffer vmrResponse = HTTPUtils.postURL("http://ntvmr.uni-muenster.de/community/vmr/api/metadata/liste/search/", "biblicalContent="+activeKey+"&detail=page&limit=40");
 					XMLBlock manuscripts = new XMLBlock(vmrResponse.toString());
 %>
 					<p><b>Some Manuscript Witnesses for <%=vk[0]%></b></p>
@@ -97,7 +97,7 @@
 									transURL = block.getAttribute("uri");
 								}
 							}
-							String mssURL = "http://intf.uni-muenster.de/vmr/NTVMR/ListeHandschriften.php?ObjID=" + m.getAttribute("docid");
+							String mssURL = "http://ntvmr.uni-muenster.de/manuscript-workspace?docid=" + m.getAttribute("docid"); //+"&pageid="+p.getAttribute("pageid");
 %>
 							<tr>
 								<td><a href="#" onclick="window.open('<%=mssURL%>','ViewManuscript','width=800,height=600,resizable=1,scrollbars=1');return false;">
@@ -121,22 +121,14 @@
 <%
 							}
 %>
-								<td>
+								</td><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;
+								imageURL = "http://ntvmr.uni-muenster.de/community/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) {
@@ -147,10 +139,6 @@
 							if (imageURL != null) {
 %>
 										</a>
-									</form>
-<!--
-									</a>
--->
 <%
 							}
 %>

Modified: trunk/webapp/simplegadget.jsp
===================================================================
--- trunk/webapp/simplegadget.jsp	2011-10-28 20:35:48 UTC (rev 393)
+++ trunk/webapp/simplegadget.jsp	2011-11-18 01:22:14 UTC (rev 394)
@@ -77,7 +77,7 @@
 
 	<div id="tabs-1">
 		<div>
-			Quick Lookup: <input name="verseRef" style="width:100%" id="verseRef" onKeyPress="return lookup(this.value);"/><span id="currentVerse" style="float:right;display:inline-block;"></span>
+			Quick Lookup: <input name="verseRef" style="width:100%" id="verseRef" onKeyPress="return keyPress('verseRef', event);"/><span id="currentVerse" style="float:right;display:inline-block;"></span>
 			<div style="clear:both;"></div>
 		</div>
 		<div id="chapterContent">
@@ -86,7 +86,7 @@
 
 	<div id="tabs-2">
 		<div>
-			Search Text: <input name="searchText" style="width:100%" id="searchText" onKeyPress="return search(this.value);"/><span id="searchResultsCount" style="float:right;display:inline-block;"></span>
+			Search Text: <input name="searchText" style="width:100%" id="searchText" onKeyPress="return keyPress('searchText', event);"/><span id="searchResultsCount" style="float:right;display:inline-block;"></span>
 			<div style="clear:both;"></div>
 		</div>
 		<div id="searchContent">
@@ -99,6 +99,21 @@
 
 var swordModule = "WHNU";
 
+function keyPress(field, event) {
+	var i = document.getElementById(field);
+	var keycode;
+	if (window.event) keycode = window.event.keyCode;
+	else if (event) keycode = event.which;
+	else return true;
+
+	if (keycode == 13) {
+		if (field == 'verseRef') lookup(i.value);
+	   	else search(i.value);
+		return false;
+	}
+	else return true;
+}
+
 function search_callback(o) {
 	var results = o.text.split('%%%');
 	content = document.getElementById('searchResultsCount');




More information about the sword-cvs mailing list