1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    3
    Vote Rating
    0
    demond5 is on a distinguished road

      0  

    Question Unanswered: How to hide disclocure button on some of list items?

    Unanswered: How to hide disclocure button on some of list items?


    I really need a help to hide disclosure button for some items of a List.
    e.g. I want to hide the disclosure button for items with id = 0 (The items are from stores and each record have ID). Setting "false" for onItemDisclosure will make disclosure button on all item hidden.
    I've tried something like this:
    onItemDisclosure: function (record) {
    if (record.getId() != 0 ) {
    // do something
    // let the disclosure button show
    } else {
    return false;
    }
    }

    but it's not working. The disclosure button always shown.

    Can anyone please help me with this ?
    Thanks in advance.

  2. #2
    Sencha Premium Member
    Join Date
    May 2008
    Location
    Pasadena, California
    Posts
    172
    Answers
    27
    Vote Rating
    2
    NickT is on a distinguished road

      0  

    Default


    You would need to override the tpl that has been configured for the listed items in the initComponent method of Ext.List

    this snippet of code from Ext.List.initComponent has configured the list item tpl and if onItemDisclosure is true, it adds the class to each list item. You would need an if condition inside this tpl such that based on data perhaps, you included or excluded the x-list-disclosure class. Take a look at XTemplate for examples of adding if conditions to the tpl definition


    Code:
            this.tpl = '<tpl for="."><div class="x-list-item ' + this.itemCls + '"><div class="x-list-item-body">' + this.itemTpl + '</div>';        this.tpl += '<div class="x-list-status"></div>';
            this.tpl += '<div class="x-list-analysis"></div>';
            if (this.onItemDisclosure) {
                this.tpl += '<div class="x-list-disclosure"></div>';
            }
            this.tpl += '</div></tpl>';
            this.tpl = new Ext.XTemplate(this.tpl, memberFnsCombo);
    the other option may be to attempt to add your distinguishing logic to css3

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    18
    Vote Rating
    0
    tr1x is on a distinguished road

      0  

    Default push

    push


    /push

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi