[sword-svn] r399 - trunk/webapp
scribe at crosswire.org
scribe at crosswire.org
Thu Jul 12 11:05:58 MST 2012
Author: scribe
Date: 2012-07-12 11:05:58 -0700 (Thu, 12 Jul 2012)
New Revision: 399
Modified:
trunk/webapp/swordweb.js
Log:
fixed replace of - to \- to be global scope
Modified: trunk/webapp/swordweb.js
===================================================================
--- trunk/webapp/swordweb.js 2012-07-09 19:13:33 UTC (rev 398)
+++ trunk/webapp/swordweb.js 2012-07-12 18:05:58 UTC (rev 399)
@@ -255,12 +255,23 @@
resultBody += "</div>";
if ((fnnum == null) || (fnnum == '')) {
resultBody += "<dl>";
- resultBody += "<dt><a href=\"wordsearchresults.jsp?mod="+srcMod+"&searchTerm=lemma:"+skeyPre+encodeURIComponent(key)+"&colorKey="+encodeURIComponent(key)+"&colorMorph="+encodeURIComponent(extratext)+"\"><t:t>Search for </t:t>"+key+"<t:t> in </t:t>"+srcMod+"</a></dt>";
+ resultBody += "<dt><a href=\"wordsearchresults.jsp?mod="+srcMod+"&searchTerm=lemma:"+skeyPre+encodeURIComponent(key)+"&colorKey="+encodeURIComponent(key)+"&colorMorph="+encodeURIComponent(extratext)+"\"><t:t>Search for lemma </t:t>"+skeyPre+key+"<t:t> (any morphology) in </t:t>"+srcMod+"</a></dt>";
resultBody += "</dl>";
+ resultBody += "<dl>";
+ if (extratext && extratext.length > 0) {
+ morphkey = key+'@'+extratext.replace(/-/g, '\\-');
+ resultBody += "<dt><a href=\"wordsearchresults.jsp?mod="+srcMod+"&searchTerm=morph:"+skeyPre+encodeURIComponent(morphkey)+"&colorKey="+encodeURIComponent(key)+"&colorMorph="+encodeURIComponent(extratext)+"\"><t:t>Search for lemma </t:t>"+skeyPre+morphkey+"<t:t> (exact same morphology) in </t:t>"+srcMod+"</a></dt>";
+ resultBody += "</dl>";
+ }
if (skeyPre == 'G' && srcMod != 'LXX') {
resultBody += "<dl>";
- resultBody += "<dt><a href=\"wordsearchresults.jsp?mod=LXX&searchTerm=lemma:"+skeyPre+encodeURIComponent(key)+"&colorKey="+encodeURIComponent(key)+"&colorMorph="+encodeURIComponent(extratext)+"\"><t:t>Search for </t:t>"+key+"<t:t> in LXX</t:t></a></dt>";
+ resultBody += "<dt><a href=\"wordsearchresults.jsp?mod=LXX&searchTerm=lemma:"+skeyPre+encodeURIComponent(key)+"&colorKey="+encodeURIComponent(key)+"&colorMorph="+encodeURIComponent(extratext)+"\"><t:t>Search for lemma </t:t>"+skeyPre+key+"<t:t> (any morphology) in LXX</t:t></a></dt>";
resultBody += "</dl>";
+ if (extratext && extratext.length > 0) {
+ morphkey = key+'@'+extratext.replace(/-/g, '\\-');
+ resultBody += "<dt><a href=\"wordsearchresults.jsp?mod=LXX&searchTerm=morph:"+skeyPre+encodeURIComponent(morphkey)+"&colorKey="+encodeURIComponent(key)+"&colorMorph="+encodeURIComponent(extratext)+"\"><t:t>Search for lemma </t:t>"+skeyPre+morphkey+"<t:t> (exact same morphology) in LXX</t:t></a></dt>";
+ resultBody += "</dl>";
+ }
}
if (page != '') {
resultBody += "<dl>";
More information about the sword-cvs
mailing list