From 2b515e69d0a651a64d893432e577693e4cbde2b5 Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 4 Apr 2006 08:18:14 +0000 Subject: [PATCH] * fixing a bug with hide_marc systempref (the image don't exist anymore if hide_marc is set) * emptying the value, not the subfield code (depends on hide_marc too : the input is in [0] or [1]) --- .../npl/en/acqui.simple/addbiblio.tmpl | 84 +++++++++++++------ 1 file changed, 60 insertions(+), 24 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/npl/en/acqui.simple/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/npl/en/acqui.simple/addbiblio.tmpl index dfa96cfcbd..dcce1df389 100644 --- a/koha-tmpl/intranet-tmpl/npl/en/acqui.simple/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/npl/en/acqui.simple/addbiblio.tmpl @@ -98,27 +98,57 @@
- -

- "> - "> - " class="flat"> - - -"> - - ')">+ -

- -
" onclick="unHideSubfield('subfield','label')">
-')">+ -"/> -" size="2" maxlength="1"/> -"/> -"/> -"/> -
+ +

+ "> + + "> + " class="flat"> - + + "> + + + ')">+ +

+ +
+ + + " onclick="unHideSubfield('subfield','label')"> + + + +
+ + + + + + ')">+ + + "/> + " size="2" maxlength="1"/> + "/> + "/> + "/> +
+
@@ -520,8 +550,15 @@ function cloneSubfield(index) { var original = document.getElementById(index); var clone = original.cloneNode(true); clone.setAttribute("id", index + index); - image = clone.getElementsByTagName('img')[0]; - image.setAttribute("onclick","upSubfield('" + index + index + "')"); +// orginput : the value of the original field (in [0] if hide_marc=1, otherwise in [1] +// image : the up button. don't exist is hide_marc=1 + + var orginput = original.getElementsByTagName('input')[0]; + + var orginput = original.getElementsByTagName('input')[1]; + image = clone.getElementsByTagName('img')[0]; + image.setAttribute("onclick","upSubfield('" + index + index + "')"); + trigger = original.getElementsByTagName('a')[0]; if (trigger) { trigger.parentNode.removeChild(trigger); @@ -529,7 +566,6 @@ function cloneSubfield(index) { clonetrigger = clone.getElementsByTagName('a')[0]; clonetrigger.setAttribute("onclick","cloneSubfield('" + index + index + "')"); clone.setAttribute("tabindex","1"); - var orginput = original.getElementsByTagName('input')[0]; orginput.value = ''; original.parentNode.insertBefore( clone, original.nextSibling); } -- 2.39.5