[Koha-cvs] koha/koha-tmpl/intranet-tmpl/prog/en/search.mar... [rel_3_0]

Antoine Farnault antoine at koha-fr.org
Thu Sep 28 11:44:43 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Antoine Farnault <toins>	06/09/28 09:44:43

Modified files:
	koha-tmpl/intranet-tmpl/prog/en/search.marc: search.tmpl 

Log message:
	fix a bug in function doPop

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/search.marc/search.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.2.2.2&r2=1.2.2.3

Patches:
Index: search.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/search.marc/Attic/search.tmpl,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -b -r1.2.2.2 -r1.2.2.3
--- search.tmpl	26 Sep 2006 16:16:08 -0000	1.2.2.2
+++ search.tmpl	28 Sep 2006 09:44:43 -0000	1.2.2.3
@@ -3,7 +3,7 @@
 <!-- TMPL_INCLUDE NAME="menus.inc" -->
 <!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
 <h1>Catalog Search</h1>
-<form name="f" method="post" action="search.pl">
+<form name="forms" method="post" action="search.pl">
 <input type="hidden" name="op" value="do_search" />
 <input type="hidden" name="type" value="intranet" />
 <input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
@@ -24,7 +24,7 @@
 			<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" onchange="sql_update()" size="35" accesskey="t" />			<a href="javascript:Dopop('dictionary.pl?marclist=biblio.title&amp;type=intranet&amp;index=1',1)">
+			<input type="text" id="title" name="value" onchange="sql_update()" size="35" accesskey="t" />	<a href="javascript:Dopop('dictionary.pl?marclist=biblio.title&amp;type=intranet&amp;index=1','title')">
 				...
 			</a></td>
 		</tr>
@@ -34,7 +34,7 @@
 			<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" onchange="sql_update()" size="35" accesskey="a" />			<a href="javascript:Dopop('dictionary.pl?marclist=biblio.author&amp;type=intranet&amp;index=2',2)">
+			<input type="text" id="author" name="value" onchange="sql_update()" size="35" accesskey="a" />			<a href="javascript:Dopop('dictionary.pl?marclist=biblio.author&amp;type=intranet&amp;index=2','author')">
 				...
 			</a></td>
 		</tr>
@@ -44,7 +44,7 @@
 			<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" onchange="sql_update()" size="35" accesskey="s" />			<a href="javascript:Dopop('dictionary.pl?marclist=bibliosubject.subject&amp;type=intranet&amp;index=3',3)">
+			<input type="text" id="subject" name="value" onchange="sql_update()" size="35" accesskey="s" />			<a href="javascript:Dopop('dictionary.pl?marclist=bibliosubject.subject&amp;type=intranet&amp;index=3','subject')">
 				...
 			</a></td>
 		</tr>
@@ -112,15 +112,15 @@
 
 <script language="javascript" 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 + '\') ';
+document.forms.sql.value="";
+	for (i=0 ; i<document.forms.marclist.length ; i++) {
+		if (document.forms.value[i].value.length>0) {
+			document.forms.sql.value = document.forms.sql.value+
+										document.forms.and_or[i].value + ' (' +
+										document.forms.excluding[i].value + ' ' +
+										document.forms.marclist[i].value + ' ' +
+										document.forms.operator[i].value + ' ' +
+										'\''+document.forms.value[i].value + '\') ';
 		}
 	}
 }
@@ -128,11 +128,11 @@
 function AddStatement() {
 
 	document.forms[0].op.value="AddStatement";
-	document.f.submit();
+	document.forms.submit();
 }
 
 function Dopop(link,i) {
-	var searchstring=document.forms[4].value[i].value;
+	var searchstring=document.getElementById(i).value;
 	newin=window.open(link+'&amp;search='+searchstring,"popup",'width=700,height=550,toolbar=false,scrollbars=yes');
 }
 





More information about the Koha-cvs mailing list