1
0
mirror of https://github.com/fspc/BikeShed-1.git synced 2025-04-04 05:33:22 -04:00
Jason Denney cd65e34ae1 Altered Bikes view to show a bike's task list.
Need to create a default task list for all bikes.
2013-02-09 10:00:46 -05:00

20 lines
624 B
JavaScript

{
initComponent: function(){
// calling superclass's initComponent
this.callParent();
// setting the 'rowclick' event
var view = this.getComponent('bikes').getView();
view.on('itemclick', function(view, record){
// The beauty of using Ext.Direct: calling 3 endpoints in a row, which results in a single call to the server!
this.selectBike({bike_id: record.get('id')});
if( this.queryById('bike_logs') ){
this.queryById('bike_logs').getStore().load();
}
if( this.queryById('tasks') ){
this.queryById('tasks').getStore().load();
}
}, this);
}
}