Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////// controller
- Ext.define('couchtest.controller.MyController', {
- extend: 'Ext.app.Controller',
- config: {
- control: {
- ".staff-update-button": {
- tap: 'onupdatetap'
- }
- }
- },
- onupdatetap: function(button, e, eOpts) {
- // Ext.alert("got here");
- console.log("got here");
- },
- launch: function() {
- var staff_store_load = Ext.getStore("staff_store");
- // staff_store_load.load();
- staff_store_load.load({
- callback: function(records) {
- // the operation object contains all of the details of the load operation
- console.log(records);
- },
- scope: this
- });
- }
- });
- ////////// view
- Ext.define('couchtest.view.MyGrid', {
- extend: 'Ext.grid.Grid',
- requires: [
- 'Ext.grid.column.Template',
- 'Ext.XTemplate'
- ],
- config: {
- store: 'staff_store',
- title: 'Staff',
- columns: [
- {
- xtype: 'column',
- width: 200,
- dataIndex: 'fn',
- text: 'first name'
- },
- {
- xtype: 'column',
- width: 200,
- dataIndex: 'ln',
- text: 'last name'
- },
- {
- xtype: 'templatecolumn',
- tpl: [
- '<tpl>',
- '<div class="x-button-normal x-button staff-update-button" id="ext-button-1" >',
- ' <span class="x-button-icon action" id="ext-element-11" style=""></span>',
- '</div>',
- '<tpl>'
- ],
- width: 300,
- text: 'edit'
- }
- ]
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement