Changeset 778 for branches/features/taskProcedureRework/grails-app/views/taskProcedureDetailed/_maintenanceActions.gsp
- Timestamp:
- Feb 4, 2011, 4:13:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/features/taskProcedureRework/grails-app/views/taskProcedureDetailed/_maintenanceActions.gsp
r777 r778 6 6 var ma_fields = ["toBeDeleted", "isNew", "description", "reasoning", "assetSubItem.id", "procedureStepNumber"]; 7 7 var ma_focusField = "procedureStepNumber"; 8 9 10 function addChild(wrapperId, cloneId, lazyList, fields, focusField, childCount){11 12 var clone = jQuery("#"+cloneId).clone();13 clone.attr('id', lazyList+childCount);14 var htmlId = lazyList+'['+childCount+'].';15 16 var fieldsMap = {};17 jQuery.each(fields, function(index, field) {18 fieldsMap[field] = clone.find('[id$="'+field+'"]');19 fieldsMap[field].attr('id',htmlId + field)20 .attr('name',htmlId + field);21 });22 23 jQuery("#"+wrapperId).append(clone);24 clone.show();25 fieldsMap[focusField].focus();26 }27 8 28 9 // Click event on add button.
Note: See TracChangeset
for help on using the changeset viewer.