Changeset 1521


Ignore:
Timestamp:
2010-05-04 12:41:23 (3 years ago)
Author:
freya
Message:

add a 'add' button to the default template of a collection control

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/kauri-forms/kauri-forms-framework/src/main/kauri/static-{build}.key/kauri.forms/collection.js

    r1511 r1521  
    6262    } 
    6363    $.extend(CollectionControl.prototype.templates, { 
    64         layout: "<tr><td ><span kauri-role='label'/><span kauri-role='control'/><span kauri-role='messages'/><span kauri-role='delete'/></td></tr>", 
    65         control: "<table kauri-role='input'></table>" 
     64        layout: "<tr><td ><span kauri-role='label'/><span kauri-role='control'/><span kauri-role='messages'/><button kauri-role='delete'>Delete</button></td></tr>", 
     65        control: "<table kauri-role='input'><button kauri-role='add'>Add</button></table>" 
    6666    }); 
    6767     
     
    201201    CollectionControl.prototype.addChild = function(insertIndex) { 
    202202        var children = this.getChildren(); 
    203  
    204203        var index = children.length; 
    205204        if (insertIndex !== undefined && insertIndex > 0 && insertIndex < children.length) { 
Note: See TracChangeset for help on using the changeset viewer.