[Koha-cvs] koha/koha-tmpl/intranet-tmpl/default/en/authori... [rel_2_2]

paul poulain paul at koha-fr.org
Wed Dec 14 14:56:39 CET 2005


CVSROOT:	/cvsroot/koha
Module name:	koha
Branch: 	rel_2_2
Changes by:	paul poulain <tipaul at savannah.gnu.org>	05/12/14 13:56:39

Modified files:
	koha-tmpl/intranet-tmpl/default/en/authorities: 
	                                                blinddetail-biblio-search.tmpl 

Log message:
	bugfix : if the last field is an authority, the authority report generates a javascript error (going after array size)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-biblio-search.tmpl.diff?only_with_tag=rel_2_2&tr1=1.6&tr2=1.6.2.1&r1=text&r2=text

Patches:
Index: koha/koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-biblio-search.tmpl
diff -u /dev/null koha/koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-biblio-search.tmpl:1.6.2.1
--- /dev/null	Wed Dec 14 13:56:39 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-biblio-search.tmpl	Wed Dec 14 13:56:39 2005
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<body>
+<script language="JavaScript" type="text/javascript">
+
+function go()
+{
+var index_start = <!-- TMPL_VAR NAME="index" -->;
+var whichfield = opener.opener.document.f.tag[index_start].value;
+i=index_start
+// go forward, until reaching the end of the field.
+while (i<opener.opener.document.f.field_value.length) {
+	if (opener.opener.document.f.tag[i].value == whichfield && opener.opener.document.f.subfield[i].value == '9') {
+		opener.opener.document.f.field_value[i].value = "<!-- TMPL_VAR NAME="authid" -->";
+	}
+	<!-- TMPL_LOOP NAME="0XX" -->
+		<!-- TMPL_LOOP NAME="subfield" -->
+			if (opener.opener.document.f.tag[i].value == whichfield && opener.opener.document.f.subfield[i].value == '<!-- TMPL_VAR NAME="marc_subfield" -->') 
+			{
+				opener.opener.document.f.field_value[i].value = "<!-- TMPL_VAR NAME="marc_value" -->";
+			}
+		<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+	if (opener.opener.document.f.tag[i].value != whichfield) {
+		i=opener.opener.document.f.field_value.length;
+	}
+	i++;
+}
+// go backward until the beginning of the field
+i=index_start
+while (i>=0) {
+	if (opener.opener.document.f.tag[i].value == whichfield && opener.opener.document.f.subfield[i].value == '9') {
+		opener.opener.document.f.field_value[i].value = "<!-- TMPL_VAR NAME="authid">";
+	}
+	<!-- TMPL_LOOP NAME="0XX" -->
+		<!-- TMPL_LOOP NAME="subfield" -->
+			if (opener.opener.document.f.tag[i].value == whichfield && opener.opener.document.f.subfield[i].value == '<!-- TMPL_VAR NAME="marc_subfield" -->') 
+			{
+				opener.opener.document.f.field_value[i].value = "<!-- TMPL_VAR NAME="marc_value" -->";
+			}
+		<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+	if (opener.opener.document.f.tag[i].value != whichfield) {
+		i=0;
+	}
+	i--;
+}
+	opener.close();
+	self.close();
+	return false;
+
+
+}
+</script>
+<script language="javascript" type="text/javascript">
+window.onload = go();
+</script>
+</body>
+</html>





More information about the Koha-cvs mailing list