[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/koha-tmpl/intranet-tmpl/default/en/acqui.s... [rel_2_2]
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha/koha-tmpl/intranet-tmpl/default/en/acqui.s... [rel_2_2] |
Date: |
Mon, 16 Jul 2007 15:29:48 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Henri-Damien LAURENT <hdl> 07/07/16 15:29:48
Modified files:
koha-tmpl/intranet-tmpl/default/en/acqui.simple: additem.tmpl
Log message:
additem
multiple subfield allowed.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple/additem.tmpl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.20.2.7&r2=1.20.2.8
Patches:
Index: additem.tmpl
===================================================================
RCS file:
/sources/koha/koha/koha-tmpl/intranet-tmpl/default/en/acqui.simple/Attic/additem.tmpl,v
retrieving revision 1.20.2.7
retrieving revision 1.20.2.8
diff -u -b -r1.20.2.7 -r1.20.2.8
--- additem.tmpl 20 Mar 2006 15:16:09 -0000 1.20.2.7
+++ additem.tmpl 16 Jul 2007 15:29:48 -0000 1.20.2.8
@@ -53,14 +53,24 @@
<!-- TMPL_ELSE -->
<h2 class="catalogue">Modify Item</h2>
<!-- /TMPL_IF -->
+ <input type="hidden" name="add_field" />
+ <input type="hidden" name="addfield_field" />
+ <input type="hidden" name="repeat_field" />
<!-- TMPL_LOOP NAME="item" -->
+ <div style="<!-- TMPL_VAR NAME='visibility' -->;" id="subfield<!--
TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='index' -->">
<p>
+
<label><!-- TMPL_VAR NAME="subfield"
--> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR
NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF
--></label>
<!-- TMPL_VAR NAME="marc_value" -->
<input type="hidden" name="tag"
value="<!-- TMPL_VAR NAME="tag" -->">
<input type="hidden" name="subfield"
value="<!-- TMPL_VAR NAME="subfield" -->">
<input type="hidden" name="mandatory"
value="<!-- TMPL_VAR NAME="mandatory" -->">
+ <!-- TMPL_IF NAME="repeatable" -->
+ <a style="cursor: crosshair; color: grey; font-size: 80%;"
onclick="cloneSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR
name="index" -->')">+</a>
+ <!-- /TMPL_IF -->
+
</p>
+ </div>
<!-- /tmpl_loop -->
<input type="hidden" name="itemnum" value="<!-- TMPL_VAR NAME="itemnum"
-->">
<!-- TMPL_IF name="barcode_not_unique" -->
@@ -129,6 +139,30 @@
window.location =
"additem.pl?op=delitem&bibid="+bibid+"&itemnum="+itemnum;
}
}
+function cloneSubfield(index) {
+ var original = document.getElementById(index); //original <div>
+ var clone = original.cloneNode(true);
+
+ // set the attribute for the new 'div' subfields
+ clone.setAttribute('id',index + index);//set another id.
+ var NumTabIndex;
+ NumTabIndex = parseInt(original.getAttribute('tabindex'));
+ if(isNaN(NumTabIndex)) NumTabIndex = 0;
+ clone.setAttribute('tabindex',NumTabIndex+1);
+
+ var CloneButtonPlus;
+ try{
+ CloneButtonPlus = clone.getElementsByTagName('a')[0];
+ CloneButtonPlus.setAttribute('onclick',"cloneSubfield('" + index +
index + "')");
+ }
+ catch(e){
+ // do nothig if ButtonPlus & CloneButtonPlus don't exist.
+ }
+
+ // insert this line on the page
+ original.parentNode.insertBefore(clone,original.nextSibling);
+}
+
</script>
</body>
</html>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/koha-tmpl/intranet-tmpl/default/en/acqui.s... [rel_2_2],
Henri-Damien LAURENT <=