Changeset 243


Ignore:
Timestamp:
Mar 8, 2010, 1:41:15 AM (13 years ago)
Author:
jahn
Message:

Fixed bug in dialog: newly added lines can now be removed too (as the should).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/eventDescription/showMyProtocolFilled.gsp

    r242 r243  
    105105        input.setAttribute('name','parameterStringValue__new'+id+'__protocol__'+rowId);
    106106        var tr=document.createElement('tr');
     107        tr.id='rowparameterStringValue__new'+id+'__protocol__'+rowId;
    107108        tr.insertCell(-1).appendChild(input);
    108109        tbody.appendChild(tr);
     
    110111        button.type='button';
    111112        button.value='delete';
    112         button.onclick=function(){jQuery(tr).remove()};
     113        button.setAttribute('onclick','removeById(\''+tr.id+'\');');
    113114        tr.insertCell(-1).appendChild(button);
    114115  }
     
    138139         input.name='parameterStringValue__'+options[i+1]+'__protocol__'+rowId;
    139140         var tr=document.createElement('tr');
     141         tr.id='rowparameterStringValue__'+options[i+1]+'__protocol__'+rowId;
    140142         tbody.appendChild(tr);
    141143         tr.insertCell(-1).appendChild(input);
     
    143145         button.type='button';
    144146         button.value='delete';
    145          button.onclick=function(){jQuery(tr).remove()};
     147         button.setAttribute('onclick','removeById(\''+tr.id+'\');');
    146148         tr.insertCell(-1).appendChild(button);
    147149     }
     
    156158   }
    157159
     160   function removeById(id) {
     161        jQuery(document.getElementById(id)).remove();
     162   }
    158163
    159164   function addSelector(row,selectedText,options){
Note: See TracChangeset for help on using the changeset viewer.