'+' don't be deleted when cloning a subfield.

This commit is contained in:
toins 2006-10-11 14:47:40 +00:00
parent ce555d5c02
commit f935f6ef18
1 changed files with 1 additions and 5 deletions

View File

@ -317,13 +317,9 @@ function cloneSubfield(index) {
NumTabIndex = parseInt(original.getAttribute('tabindex'));
if(isNaN(NumTabIndex)) NumTabIndex = 0;
clone.setAttribute('tabindex',NumTabIndex+1);
var ButtonPlus;
var CloneButtonPlus;
try{
ButtonPlus = original.getElementsByTagName('a')[0]; // getting the '<a href=...>+</a>
ButtonPlus.parentNode.removeChild(ButtonPlus); // removing the '+' button
CloneButtonPlus = clone.getElementsByTagName('a')[0];
CloneButtonPlus.setAttribute('onclick',"cloneSubfield('" + index + index + "')");
}