dneustadt /
DnViewSnapshots
| 1 | Ext.define('Shopware.apps.ViewSnapshots.view.Grid', { |
||
|
0 ignored issues
–
show
|
|||
| 2 | extend:'Ext.grid.Panel', |
||
| 3 | border: false, |
||
| 4 | alias:'widget.view-snapshot-window', |
||
| 5 | region:'center', |
||
| 6 | autoScroll:true, |
||
| 7 | initComponent:function () { |
||
| 8 | var me = this; |
||
| 9 | me.columns = me.getColumns(); |
||
| 10 | me.pagingbar = me.getPagingBar(); |
||
| 11 | me.dockedItems = [ |
||
| 12 | me.pagingbar |
||
| 13 | ]; |
||
| 14 | me.callParent(arguments); |
||
| 15 | }, |
||
| 16 | getColumns:function () { |
||
| 17 | var me = this; |
||
| 18 | |||
| 19 | return [ |
||
| 20 | { |
||
| 21 | header: 'Session ID', |
||
| 22 | flex: 1, |
||
| 23 | dataIndex: 'sessionID' |
||
| 24 | }, |
||
| 25 | { |
||
| 26 | header: 'Template', |
||
| 27 | flex: 1, |
||
| 28 | dataIndex: 'template' |
||
| 29 | }, |
||
| 30 | { |
||
| 31 | header: 'Step', |
||
| 32 | dataIndex: 'step', |
||
| 33 | width: 40 |
||
| 34 | }, |
||
| 35 | { |
||
| 36 | xtype: 'actioncolumn', |
||
| 37 | width: 30, |
||
| 38 | items: me.getActionColumnItems() |
||
| 39 | } |
||
| 40 | ]; |
||
| 41 | }, |
||
| 42 | getActionColumnItems: function () { |
||
| 43 | return [ |
||
| 44 | { |
||
| 45 | iconCls: 'x-action-col-icon sprite-globe--arrow', |
||
| 46 | tooltip: 'Open', |
||
| 47 | handler: function (view, rowIndex) { |
||
| 48 | var store = view.getStore(), |
||
| 49 | record = store.getAt(rowIndex); |
||
| 50 | |||
| 51 | window.open(record.get('url'), '_blank'); |
||
| 52 | } |
||
| 53 | } |
||
| 54 | ]; |
||
| 55 | }, |
||
| 56 | getPagingBar: function () { |
||
| 57 | var me = this; |
||
| 58 | |||
| 59 | return Ext.create('Ext.toolbar.Paging', { |
||
|
0 ignored issues
–
show
The variable
Ext seems to be never declared. If this is a global, consider adding a /** global: Ext */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. Loading history...
|
|||
| 60 | store: me.store, |
||
| 61 | dock: 'bottom', |
||
| 62 | displayInfo: true |
||
| 63 | }); |
||
| 64 | } |
||
| 65 | }); |
||
| 66 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.