Changeset 1449


Ignore:
Timestamp:
2010-03-12 13:29:32 (2 years ago)
Author:
freya
Message:

remove filter function that prevents controls inside a kauri-layout to be indexed

Location:
trunk
Files:
2 edited

Legend:

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

    r1447 r1449  
    218218        if (space.is(kauriSelector) )  
    219219            space.each(indexor); 
    220             // then go through matching children, but only once (even if they match multiple times) 
    221         var matching = $($.unique($(kauriSelector, space))).filter(function(){ 
    222             // TODO should we do this this way or should be traverse the tree ourselves (performance?) 
    223             var $this = $(this); 
    224             var revParents = $this.parents("[" + ControlElements.ATTR_LAYOUT + "]"); 
    225  
    226             return (revParents == null || revParents.length==0); 
    227         });       
    228         matching.each(indexor); 
     220 
     221        $.unique($(kauriSelector, space)).each(indexor); 
    229222         
    230223         
     
    957950         
    958951        // allow control-specific initialization of containment elements 
    959         this.initContainerElements(this.getParent() ? this.getParent().getElement() : this.getElement()); 
     952        this.initContainerElements(); 
    960953         
    961954        //initialize options 
     
    20132006     * @private 
    20142007     */ 
    2015     AbstractContainerControl.prototype.initContainerElements = function(container, create){ 
     2008    AbstractContainerControl.prototype.initContainerElements = function(create){ 
    20162009         var id = this.getAbsoluteId(); 
    20172010 
     
    21642157     */ 
    21652158    AbstractContainerControl.prototype.createChildControl = function(id, type, position){ 
    2166      
     2159         if (type == undefined)  
     2160             throw "[AbstractContainerControl.createChildControl] Unknown type for member: " + id + " of control " + 
     2161             this.getAbsoluteId(); 
     2162          
     2163          
    21672164        var controlType = type.control; 
    21682165        var extender = {}; 
  • trunk/samples/kauri-forms-sample/src/main/kauri/pages/collection-control.html.xml

    r1446 r1449  
    8686        <label kauri-role="label" kauri-idref="countries">Countries</label> 
    8787 
    88         <table kauri-idref="countries" kauri-type="collection" kauri-item="country"> 
     88        <table kauri-idref="countries" kauri-type="collection" > 
    8989          <thead> 
    9090            <tr> 
     
    9999 
    100100          <tbody kauri-role="container"> 
    101             <tr kauri-layout="country"> 
     101            <tr kauri-layout="/countries"> 
    102102             
    103103              <td > 
Note: See TracChangeset for help on using the changeset viewer.