Threaded View

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    51
    Answers
    7
    Vote Rating
    0
    noromamai is on a distinguished road

      0  

    Default Answered: confirm() callback function not passing button variable

    Answered: confirm() callback function not passing button variable


    I have a list with items and want to delete on swipe. The way i have it now is that when you swipe, it will prompt you whether you want to delete or not. after clicking yes or no the callback function is called. But i can't find out which button is clicked. i pass the index and the button clicked to a new function, but the value of button is always undefined, i do get the index right.

    this is in app.views.CustomerList.js:

    Code:
    itemswipe: function(list, index) {
                    Ext.dispatch({
                       controller: app.controllers.customer,
                       action: 'confirmremove',
                       index: index,
                       scope: this
                    });
            }
    this is in customer.js:

    Code:
    confirmremove: function(params) {
            var customer = app.stores.customer.getAt(params.index);
            // android quirk? doesn't display "message", only title
            confirm('Delete?\n' + 
                    customer.data.first + ' ' + customer.data.last + '\n' +
                    customer.data.address + '\n' +
                    customer.data.zipcode + ' ' + customer.data.city, this.remove(this.button, params.index));
        },
        remove: function(btn, index) {
            if (btn == 'yes') {
                Ext.Msg.alert('yes was clicked on ' + index);
            }
        }

  2. Why not use Ext.Msg.confirm instead of a regular javascript confirm popup?

Thread Participants: 1

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