mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Nested isn't working, another approach, add trans validations
User a transactions border, select the customer from a view of users and customers
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
{
|
||||
initComponent: function(){
|
||||
// calling superclass's initComponent
|
||||
this.callParent();
|
||||
|
||||
// setting the 'rowclick' event
|
||||
var user_view = this.getComponent('users').getView();
|
||||
var customer_view = this.getComponent('users').getView();
|
||||
user_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.selectCustomer({customer_id: record.get('id'), customer_type: 'User'});
|
||||
}, this);
|
||||
customer_view.on('itemclick', function(view, record){
|
||||
this.selectCustomer({customer_id: record.get('id'), customer_type: 'Customer'});
|
||||
}, this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user