Changeset 778 for branches


Ignore:
Timestamp:
Feb 4, 2011, 4:13:30 AM (14 years ago)
Author:
gav
Message:

TaskProcedure javascript improvements, move addChild function to dynamicOneToMany.js

Location:
branches/features/taskProcedureRework
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/features/taskProcedureRework/grails-app/views/taskProcedureDetailed/_maintenanceActions.gsp

    r777 r778  
    66    var ma_fields = ["toBeDeleted", "isNew", "description", "reasoning", "assetSubItem.id", "procedureStepNumber"];
    77    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     }
    278
    289    // Click event on add button.
  • branches/features/taskProcedureRework/grails-app/views/taskProcedureDetailed/create.gsp

    r776 r778  
    77        <title>Create TaskProcedure</title>
    88        <nav:resources override="true"/>
     9        <g:javascript src="dynamicOneToMany.js" />
    910    </head>
    1011    <body>
  • branches/features/taskProcedureRework/grails-app/views/taskProcedureDetailed/edit.gsp

    r776 r778  
    77        <title>Edit TaskProcedure</title>
    88        <nav:resources override="true"/>
     9        <g:javascript src="dynamicOneToMany.js" />
    910    </head>
    1011    <body>
Note: See TracChangeset for help on using the changeset viewer.