[Koha-cvs] koha/koha-tmpl/opac-tmpl/npl/en opac-dictionary... [rel_2_2]

Owen Leonard oleonard at athenscounty.lib.oh.us
Tue Apr 11 23:22:24 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	Owen Leonard <oleonard at savannah.gnu.org>	06/04/11 21:22:24

Modified files:
	koha-tmpl/opac-tmpl/npl/en: opac-dictionary.tmpl 
	                            opac-search.tmpl 

Log message:
	opac-dictionary.tmpl: Modifications to dictionary pop up javascript to allow for a different ordering of input fields. Script now references input ids rather than index numbers. Downside is that it may cause difficulties with translation?  Comments would be welcomed.
	
	opac-search.tmpl: Some markup cleanup and removal of unecessary script blocks.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/opac-tmpl/npl/en/opac-dictionary.tmpl.diff?only_with_tag=rel_2_2&tr1=1.1.2.4&tr2=1.1.2.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/opac-tmpl/npl/en/opac-search.tmpl.diff?only_with_tag=rel_2_2&tr1=1.1.2.11&tr2=1.1.2.12&r1=text&r2=text

Patches:
Index: koha/koha-tmpl/opac-tmpl/npl/en/opac-dictionary.tmpl
diff -u koha/koha-tmpl/opac-tmpl/npl/en/opac-dictionary.tmpl:1.1.2.4 koha/koha-tmpl/opac-tmpl/npl/en/opac-dictionary.tmpl:1.1.2.5
--- koha/koha-tmpl/opac-tmpl/npl/en/opac-dictionary.tmpl:1.1.2.4	Mon Apr 10 18:17:28 2006
+++ koha/koha-tmpl/opac-tmpl/npl/en/opac-dictionary.tmpl	Tue Apr 11 21:22:24 2006
@@ -16,17 +16,17 @@
 <!-- TMPL_IF Name=search -->
 		<div class="pages">
 			<!-- TMPL_IF NAME="displayprev" --> 
-					<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">&lt;&lt;Previous</a>
+					<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">&lt;&lt;Previous</a>
 				<!-- /TMPL_IF -->
 				<!-- TMPL_LOOP NAME="numbers" -->
 					<!-- TMPL_IF NAME="highlight" -->
 						<span class="current"><!-- TMPL_VAR NAME="number" --></span>
 					<!-- TMPL_ELSE --> 
-						<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
+						<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
 					<!-- /TMPL_IF -->
 				<!-- /TMPL_LOOP --> 
 				<!-- TMPL_IF NAME="displaynext" -->
-					<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">Next&gt;&gt;</a>
+					<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">Next&gt;&gt;</a>
 				<!-- /TMPL_IF -->
 </div>
 
@@ -53,8 +53,8 @@
 							<!-- TMPL_VAR NAME="used" --> record(s)
 						</td>
 							<td>
-							<a  href="javascript:SelectEntry('<!-- TMPL_VAR NAME="summary" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->,0)" class="button catalogue">Select</a> | 
-							<a  href="javascript:SelectEntry('<!-- TMPL_VAR NAME="summary" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->,1)" class="button catalogue">Sel &amp; close</a>
+							<a  href="#" onclick="SelectEntry('<!-- TMPL_VAR NAME="summary" -->','<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->',0); return false;">Select</a> | 
+							<a  href="#" onclick="SelectEntry('<!-- TMPL_VAR NAME="summary" -->','<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->',1); return false;">Sel &amp; close</a>
 						</td>
 					</tr>
 				<!-- /TMPL_LOOP -->
@@ -89,8 +89,8 @@
 						<!-- TMPL_VAR NAME="count" --> record(s)
 					</td>
 					<td>
-							<a  href="javascript:SelectEntry('<!-- TMPL_VAR NAME="value" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->,0)" class="button catalogue">Select</a> | 
-							<a  href="javascript:SelectEntry('<!-- TMPL_VAR NAME="value" ESCAPE="URL" -->',<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->,1)" class="button catalogue">Sel &amp; close</a>
+							<a href="#" onclick="SelectEntry('<!-- TMPL_VAR NAME="value" -->','<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->',0); return false;">Select</a> | 
+							<a href="#" onclick="SelectEntry('<!-- TMPL_VAR NAME="value" -->','<!-- TMPL_VAR NAME="anindex" ESCAPE="URL"  -->',1); return false;">Sel &amp; close</a>
 					</td>
 				</tr>
 				<!-- /TMPL_LOOP -->
@@ -98,17 +98,17 @@
 
 		<div class="pages">
 			<!-- TMPL_IF NAME="displayprev" --> 
-					<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">&lt;&lt;Previous</a>
+					<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL-->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL-->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">&lt;&lt;Previous</a>
 				<!-- /TMPL_IF -->
 				<!-- TMPL_LOOP NAME="numbers" -->
 					<!-- TMPL_IF NAME="highlight" -->
 						<span class="current"><!-- TMPL_VAR NAME="number" --></span>
 					<!-- TMPL_ELSE --> 
-						<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
+						<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" ESCAPE=URL -->&amp;search=<!-- TMPL_VAR NAME="search" ESCAPE=URL -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->"><!-- TMPL_VAR NAME="number" --></a>
 					<!-- /TMPL_IF -->
 				<!-- /TMPL_LOOP --> 
 				<!-- TMPL_IF NAME="displaynext" -->
-					<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">Next&gt;&gt;</a>
+					<a class="nav" href="opac-dictionary.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;marclist=<!-- TMPL_VAR NAME="marclist" -->&amp;search=<!-- TMPL_VAR NAME="search" -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=opac&amp;op=do_search&amp;index=<!-- TMPL_VAR Name="anindex" -->">Next&gt;&gt;</a>
 				<!-- /TMPL_IF -->
 
 			<div id="results">
@@ -120,10 +120,10 @@
 	<!-- /TMPL_IF -->
 	<script language="JavaScript" type="text/javascript">
 	function SelectEntry(myentry, myindex, wclose){
-		if (opener.document.f.value[myindex].value!=""){ 
-			opener.document.f.value[myindex].value=opener.document.f.value[myindex].value+" "+myentry
+		if (window.opener.document.getElementById(myindex).value!=""){ 
+			window.opener.document.getElementById(myindex).value = window.opener.document.getElementById(myindex).value+" "+myentry
 		} else {
-			opener.document.f.value[myindex].value=myentry
+			window.opener.document.getElementById(myindex).value = myentry
 		}
 		if (wclose == 1) {
 	// 	alert("closing")
Index: koha/koha-tmpl/opac-tmpl/npl/en/opac-search.tmpl
diff -u koha/koha-tmpl/opac-tmpl/npl/en/opac-search.tmpl:1.1.2.11 koha/koha-tmpl/opac-tmpl/npl/en/opac-search.tmpl:1.1.2.12
--- koha/koha-tmpl/opac-tmpl/npl/en/opac-search.tmpl:1.1.2.11	Wed Mar  8 20:01:21 2006
+++ koha/koha-tmpl/opac-tmpl/npl/en/opac-search.tmpl	Tue Apr 11 21:22:24 2006
@@ -50,18 +50,18 @@
 			<input type="hidden" name="and_or" value="and" />
 			<input type="hidden" name="excluding" value="" />
 			<input type="hidden" name="operator" value="contains" />
-			<input type="text" id="title" name="value" /><!-- TMPL_UNLESS NAME="Disable_Dictionary" --><a href="javascript:Dopop('opac-dictionary.pl?marclist=biblio.title&amp;type=intranet&amp;index=1',1)"><strong>...</strong></a><!-- /TMPL_UNLESS --></td></tr>
+			<input type="text" id="title" name="value" /><!-- TMPL_UNLESS NAME="Disable_Dictionary" --><a href="#" onclick="Dopop('opac-dictionary.pl?marclist=biblio.title&amp;type=opac&amp;index=title',1); return false;"><strong>...</strong></a><!-- /TMPL_UNLESS --></td></tr>
 <tr><th><label for="author">Author</label></th><td><input type="hidden" name="marclist" value="biblio.author" />
 			<input type="hidden" name="and_or" value="and" />
 			<input type="hidden" name="excluding" value="" />
 			<input type="hidden" name="operator" value="contains" />
-			<input type="text" id="author" name="value" /><!-- TMPL_UNLESS NAME="Disable_Dictionary" --><a href="javascript:Dopop('opac-dictionary.pl?marclist=biblio.author&amp;type=intranet&amp;index=2',2)"><strong>...</strong></a><!-- /TMPL_UNLESS --></td></tr>
+			<input type="text" id="author" name="value" /><!-- TMPL_UNLESS NAME="Disable_Dictionary" --><a href="#" onclick="Dopop('opac-dictionary.pl?marclist=biblio.author&amp;type=opac&amp;index=author',2); return false;"><strong>...</strong></a><!-- /TMPL_UNLESS --></td></tr>
 <tr><th><label for="subject">Subject</label></th><td>			
 			<input type="hidden" name="marclist" value="bibliosubject.subject" />
 			<input type="hidden" name="and_or" value="and" />
 			<input type="hidden" name="excluding" value="" />
 			<input type="hidden" name="operator" value="contains" />  
-			<input type="text" id="subject" name="value" size="35" /><!-- TMPL_UNLESS NAME="Disable_Dictionary" --><a href="javascript:Dopop('opac-dictionary.pl?marclist=bibliosubject.subject&amp;type=intranet&amp;index=3',3)"><strong>...</strong></a><!-- /TMPL_UNLESS --></td></tr>
+			<input type="text" id="subject" name="value" size="35" /><!-- TMPL_UNLESS NAME="Disable_Dictionary" --><a href="#" onclick="Dopop('opac-dictionary.pl?marclist=bibliosubject.subject&amp;type=opac&amp;index=subject',3); return false;"><strong>...</strong></a><!-- /TMPL_UNLESS --></td></tr>
 <tr><th><label for="seriestitle">Series title</label></th><td>			
 			<input type="hidden" name="marclist" value="biblio.seriestitle" />
 			<input type="hidden" name="and_or" value="and" />
@@ -136,51 +136,15 @@
 			<input type="hidden" name="operator" value="=" />
 			<input type="hidden" name="op" value="do_search" />
 			<input type="hidden" name="type" value="opac" />
-                        <select name="value">
-                                <option value="">Any Branch</option>
-                        <!-- TMPL_LOOP name="branchloop" -->
-                                <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name
-="branchname" --></option>
-                        <!-- /TMPL_LOOP -->
-                        </select>
-			<br>over the last <input type="text" name="desc_or_asc" size="3" /> days
+		<select name="value"><option value="">Any Branch</option>
+			<!-- TMPL_LOOP name="branchloop" --><option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name
+="branchname" --></option><!-- /TMPL_LOOP -->
+       </select>
+			<br />over the last <input type="text" name="desc_or_asc" size="3" /> days
 			<input type="hidden" name="orderby" value="biblio.timestamp" />
 			<input type="submit" value="Search" class="submit" />
 </form>
 </div>
-<script type="text/javascript">
-function sql_update() {
-document.f.sql.value="";
-	for (i=0 ; i<document.f.marclist.length ; i++) {
-		if (document.f.value[i].value.length>0) {
-			document.f.sql.value = document.f.sql.value+
-										document.f.and_or[i].value + ' (' +
-										document.f.excluding[i].value + ' ' +
-										document.f.marclist[i].value + ' ' +
-										document.f.operator[i].value + ' ' +
-										'\''+document.f.value[i].value + '\') ';
-		}
-	}
-}
-
-function AddStatement() {
-
-	document.forms[0].op.value="AddStatement";
-	document.f.submit();
-}
-
-function PopupSuggestion() {
-    var strQuery="";
-	for (i=0 ; i<document.f.marclist.length ; i++) {
-		if (document.f.value[i].value.length>0) {
-		    strQuery += " "+document.f.value[i].value;
-		}
-	}
-	newin=window.open("suggest.pl?Q="+strQuery,"Suggestions",'width=500,height=400,toolbar=false,scrollbars=yes');
-}
-
-</script>
-
 
 </div>
 <!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->





More information about the Koha-cvs mailing list