StockHistoryGrid.js (1229B)
1 /** 2 * The stock history grid. It shows all stock transactions. 3 */ 4 Ext.define('PartKeepr.StockHistoryGrid', { 5 extend: 'PartKeepr.AbstractStockHistoryGrid', 6 alias: 'widget.PartStockHistoryGrid', 7 8 pageSize: 25, 9 10 defineColumns: function () 11 { 12 this.callParent(); 13 14 this.columns.splice(2, 0, { 15 header: i18n("Part"), 16 renderer: function (val, q, rec) { 17 return rec.getPart().get("name"); 18 }, 19 flex: 1, 20 minWidth: 200 21 }); 22 23 this.columns.splice(3, 0, { 24 header: i18n("Storage Location"), 25 renderer: function (val, q, rec) { 26 return rec.getPart().getStorageLocation().get("name"); 27 }, 28 flex: 1, 29 minWidth: 200 30 }); 31 }, 32 initComponent: function () 33 { 34 this.callParent(); 35 36 this.on("activate", this.onActivate, this); 37 }, 38 /** 39 * Called when the view is activated. 40 */ 41 onActivate: function () 42 { 43 this.store.load(); 44 }, 45 statics: { 46 iconCls: 'fugue-icon notebook', 47 title: i18n('Stock History'), 48 closable: true, 49 menuPath: [{text: i18n("View")}] 50 } 51 });