Changeset 249 for trunk/grails-app/views
- Timestamp:
- Mar 9, 2010, 12:03:22 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/views/eventDescription/showMyProtocolFilled.gsp
r247 r249 10 10 <% dbnp.studycapturing.ProtocolParameterType.list().each{ print "parametertypes.push(\'${it}\');" } %> 11 11 12 12 13 /* create a prefix for all members of a protocol */ 13 14 function setName(element,protocolId) { 14 element.name=' protocolId_'+protocolId+'_'+element.id;15 element.name='row_'+protocolId+'__'+element.id; 15 16 } 17 16 18 17 19 function addRowEmpty(id){ … … 20 22 row.setAttribute('id','new' + (newRows++) ); 21 23 22 addTextFieldToRow(row,' classification',20); addTextFieldToRow(row,'unit',6);24 addTextFieldToRow(row,'name',20); addTextFieldToRow(row,'unit',6); 23 25 var textField=addSelector(row,null,[]); addTextFieldToRow(row,'reference',10); addTextFieldToRow(row,'description',20); 24 26 addElementToRow(row,textField,'option',6); addRowButton(row); tbody.appendChild(row); … … 32 34 row.setAttribute('id',newId); 33 35 34 addTextFieldToRow(row,' classification',20).value=name;36 addTextFieldToRow(row,'name',20).value=name; 35 37 addTextFieldToRow(row,'unit',6).value=unit; 36 38 var textField=addSelector(row,type,options); … … 103 105 var input=document.createElement('input'); 104 106 var id = tbody.rows.length + 1; 105 input.setAttribute('name',' parameterStringValue__new'+id+'__protocol__'+rowId);107 input.setAttribute('name','row_'+rowId+'__parameterStringValue__new'+id); 106 108 var tr=document.createElement('tr'); 107 tr.id='row parameterStringValue__new'+id+'__protocol__'+rowId;109 tr.id='row_'+rowId+'parameterStringValue__new'+id; 108 110 tr.insertCell(-1).appendChild(input); 109 111 tbody.appendChild(tr); … … 137 139 var input=document.createElement('input'); 138 140 input.value=unescape(options[i]); 139 input.name=' parameterStringValue__'+options[i+1]+'__protocol__'+rowId;141 input.name='row_'+rowId+'__parameterStringValue__'+options[i+1]; 140 142 var tr=document.createElement('tr'); 141 tr.id='row parameterStringValue__'+options[i+1]+'__protocol__'+rowId;143 tr.id='row_'+rowId+'__parameterStringValue__'+options[i+1]; 142 144 tbody.appendChild(tr); 143 145 tr.insertCell(-1).appendChild(input);
Note: See TracChangeset
for help on using the changeset viewer.