mirror of https://github.com/fspc/BikeShed-1.git
Browse Source
-moved js to customers and users components, in order to use accordion. -Made the transaction form a little prettierdenney-disable-on-select
Jason Denney
12 years ago
12 changed files with 72 additions and 29 deletions
@ -0,0 +1,11 @@ |
|||
{ |
|||
initComponent: function(){ |
|||
// calling superclass's initComponent
|
|||
this.callParent(); |
|||
this.getView().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!
|
|||
console.log("user: " + record.get('id') ); |
|||
this.selectCustomer({customer_id: record.get('id'), customer_type: 'Customer'}); |
|||
}, this); |
|||
} |
|||
} |
@ -1,19 +0,0 @@ |
|||
{ |
|||
initComponent: function(){ |
|||
// calling superclass's initComponent
|
|||
this.callParent(); |
|||
|
|||
// setting the 'rowclick' event
|
|||
var user_view = this.getComponent('users').getView(); |
|||
var customer_view = this.getComponent('customers').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!
|
|||
console.log("user: " + record.get('id') ); |
|||
this.selectCustomer({customer_id: record.get('id'), customer_type: 'User'}); |
|||
}, this); |
|||
customer_view.on('itemclick', function(view, record){ |
|||
console.log("user: " + record.get('id') ); |
|||
this.selectCustomer({customer_id: record.get('id'), customer_type: 'Customer'}); |
|||
}, this); |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
{ |
|||
initComponent: function(){ |
|||
// calling superclass's initComponent
|
|||
this.callParent(); |
|||
this.getView().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!
|
|||
console.log("user: " + record.get('id') ); |
|||
this.selectCustomer({customer_id: record.get('id'), customer_type: 'User'}); |
|||
}, this); |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
class UsersAndCustomersAccordian < Netzke::Basepack::Accordion |
|||
component :customers |
|||
component :users |
|||
|
|||
def configure(c) |
|||
c.prevent_header = true |
|||
c.items = [ :customers, :users ] |
|||
super |
|||
end |
|||
end |
Loading…
Reference in new issue