I am trying to add a listener to the following but it wont fire
plugins: [{
ptype: 'pullrefresh',
autoPaging: true,
listeners: {
'released': function(plugin,list){
// call the plugins processComplete method to hide the 'loading' indicator
/* your_store.on('load', plugin.processComplete, plugin, {single:true});
// do whatever needs to happen for reload
your_store.load();*/
alert('test');
}
}
}],
What I want to do is someone pulls the list when refresh event is fired we get users latitude and longitude and load the values into the store. My problem is the stores beforeload: event doesn't properly event bubble so its fires to store json call before it can get the users geolocation.
My Store{
listeners: {
beforeload: function(){
console.log( 'me1' );
//call this to write to location services on device
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
console.log( 'me2' );
Rad.stores.games.getProxy().extraParams.lat = position.coords.latitude;
Rad.stores.games.getProxy().extraParams.long = position.coords.longitude;
});
}
console.log( 'me3' );
}
}
}
If you look at the console its show me1,me3, me2.... I want it to show me1,me2,me3.
I've really looked at all forums, documentation but just need some direction on setting up the listener and event bubbling i guess. Thanks you.