koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: paul poulain
Subject: [Koha-cvs] koha/koha-tmpl/intranet-tmpl/default/en/authori... [rel_2_2]
Date: Wed, 14 Dec 2005 13:56:39 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     paul poulain <address@hidden>   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>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]