UNPKG

ucan-ext-js-kitchen-sink

Version:

my-ext-gen-app description for Ext JS app MyExtGenApp

46 lines (41 loc) 1.21 kB
Ext.define('UCAN.explorerView.src.ExplorerGridView', { extend: 'Ext.grid.Grid', xtype: 'explorerGridView', reference: 'explorerGridView', cls: 'js-ucan-explorer-grid-view ucan-explorer-grid-view', config: { routePrefix: '', routeSuffix: '', }, publishes: [ 'routePrefix', 'routeSuffix', ], plugins: { pagingtoolbar: true, gridfilters: true }, selectable: { mode: 'single', checkbox: true }, rowNumbers: false, listeners: { childdoubletap: function(component, location) { window.location.assign(this.getRoutePrefix() + location.record.data.id + this.getRouteSuffix()); }, childtouchstart: function(component, location) { if (location.event.parentEvent.button === 1) { window.open(this.getRoutePrefix() + location.record.data.id + this.getRouteSuffix(), '_blank'); } }, deselect: function(component, selection) { const explorerView = this.up('[cls~=js-ucan-explorer-view]'); explorerView.setGridSelection(null); }, select: function(component, selection) { const explorerView = this.up('[cls~=js-ucan-explorer-view]'); explorerView.setGridSelection(selection); } } });