Loading template/app/controller/Classes.js +5 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,11 @@ Ext.define('Docs.controller.Classes', { this.loadClass(cls); } }, 'classgrid': { classselect: function(cls) { this.loadClass(cls); } }, 'indexcontainer': { afterrender: function(cmp) { Loading template/app/view/ClassGrid.js +25 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,21 @@ Ext.define('Docs.view.ClassGrid', { icons: {}, initComponent: function() { this.addEvents( /** * @event classselect * Fired when class in grid selected. * @param {String} name Name of the class that was selected. For example "Ext.Ajax". */ "classselect", /** * @event closeclick * Fired when close button in grid clicked. * @param {String} name Name of the class that was closed. For example "Ext.Ajax". */ "closeclick" ); this.columns = [ { width: 18, Loading @@ -32,11 +47,19 @@ Ext.define('Docs.view.ClassGrid', { xtype: 'actioncolumn', width: 18, icon: 'resources/images/x12.png', tooltip: 'Delete' tooltip: 'Delete', handler: function(view, rowIndex) { this.fireEvent("closeclick", this.getStore().getAt(rowIndex).get("cls")); }, scope: this } ]; this.callParent(arguments); this.getSelectionModel().on("select", function(sm, r) { this.fireEvent("classselect", r.get("cls")); }, this); } }); template/app/view/Viewport.js +13 −2 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ Ext.define('Docs.view.Viewport', { 'Docs.view.index.Container', 'Docs.view.tree.Tree', 'Docs.view.ClassGrid', 'Docs.Favorites', 'Docs.History' ], Loading Loading @@ -88,13 +89,23 @@ Ext.define('Docs.view.Viewport', { xtype: 'classgrid', title: 'Favorites', store: Ext.getStore('Favorites'), icons: Docs.icons icons: Docs.icons, listeners: { closeclick: function(cls) { Docs.Favorites.remove(cls); } } }, { xtype: 'classgrid', title: 'History', store: Ext.getStore('History'), icons: Docs.icons icons: Docs.icons, listeners: { closeclick: function(cls) { Docs.History.removeClass(cls); } } } ] }, Loading Loading
template/app/controller/Classes.js +5 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,11 @@ Ext.define('Docs.controller.Classes', { this.loadClass(cls); } }, 'classgrid': { classselect: function(cls) { this.loadClass(cls); } }, 'indexcontainer': { afterrender: function(cmp) { Loading
template/app/view/ClassGrid.js +25 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,21 @@ Ext.define('Docs.view.ClassGrid', { icons: {}, initComponent: function() { this.addEvents( /** * @event classselect * Fired when class in grid selected. * @param {String} name Name of the class that was selected. For example "Ext.Ajax". */ "classselect", /** * @event closeclick * Fired when close button in grid clicked. * @param {String} name Name of the class that was closed. For example "Ext.Ajax". */ "closeclick" ); this.columns = [ { width: 18, Loading @@ -32,11 +47,19 @@ Ext.define('Docs.view.ClassGrid', { xtype: 'actioncolumn', width: 18, icon: 'resources/images/x12.png', tooltip: 'Delete' tooltip: 'Delete', handler: function(view, rowIndex) { this.fireEvent("closeclick", this.getStore().getAt(rowIndex).get("cls")); }, scope: this } ]; this.callParent(arguments); this.getSelectionModel().on("select", function(sm, r) { this.fireEvent("classselect", r.get("cls")); }, this); } });
template/app/view/Viewport.js +13 −2 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ Ext.define('Docs.view.Viewport', { 'Docs.view.index.Container', 'Docs.view.tree.Tree', 'Docs.view.ClassGrid', 'Docs.Favorites', 'Docs.History' ], Loading Loading @@ -88,13 +89,23 @@ Ext.define('Docs.view.Viewport', { xtype: 'classgrid', title: 'Favorites', store: Ext.getStore('Favorites'), icons: Docs.icons icons: Docs.icons, listeners: { closeclick: function(cls) { Docs.Favorites.remove(cls); } } }, { xtype: 'classgrid', title: 'History', store: Ext.getStore('History'), icons: Docs.icons icons: Docs.icons, listeners: { closeclick: function(cls) { Docs.History.removeClass(cls); } } } ] }, Loading