1. #1
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    Cave
    Posts
    178
    Answers
    2
    Vote Rating
    2
    29er is on a distinguished road

      0  

    Default Unanswered: Intercepting a list select/tap event before CSS 'selected' class gets applied

    Unanswered: Intercepting a list select/tap event before CSS 'selected' class gets applied


    HI,
    I have a Ext.dataview.List in which i would like to intercept the tap/select/touchstart event, so that i can stop the item from being selected, or more precisely, stop the 'x-item-selected' class from being added to that list item.

    I have tried every trick in the book to get this done , ie: 'stopEvent' and return false, with no luck. the css class still gets applied. my test class is below

    Code:
     Ext.define("Por.view.AccountList", {
        xtype: "accountlist",
        extend: "Ext.List",
       config: {
            itemTpl: true,
        store: 'Accounts',
            itemTplGeneric: Ext.create("Ext.XTemplate", '<div class="flex-horiz">', '<div class="flex1">{title}</div>', '<div class="sc-favicon ', '<tpl if="values.favorite">scheduled</tpl>', '<tpl if="! values.favorite">unscheduled</tpl>', '">&nbsp;</div>', "</div>"),
        itemTplNew : Ext.create("Ext.XTemplate", '<div class="flex-horiz">','<div class="checkitem">&nbsp;</div>','<div class="flex1">','<div class="list-font-header font-bold">{name}</div>','<div class="list-font-normal">', '<span class="font-bold"> Type: </span>','{type}</div><div class="list-font-normal">', '<span class="font-bold"> Account:</span> {referenceableFor}</div><div></div>')
        },
        applyItemTpl: function () {
            return this.inCart ?  this.getItemTplGeneric() : this.getItemTplNew() ;
        },
        listeners : {
        select : function(evt){
            evt.stopEvent();
            return false;
        }
        }
    ,
        onItemTouchStart: function (evt) {    
          evt.stopEvent();
          return false;
        },
        onItemTap: function (evt, el, index) {
          evt.stopEvent();
         return false;       
        }
    });
    Is this even possible or do i need to override this behavior by deleting the default css class, and creating a custom css class that I will control via javascript.
    Thanks so much for any guidance.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Simply returning false is canceling it for me.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    Cave
    Posts
    178
    Answers
    2
    Vote Rating
    2
    29er is on a distinguished road

      0  

    Default


    hmmm weird. let me check my code again...

Thread Participants: 1

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