Panel.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. Ext.define('uas.view.grid.basic.Panel', {
  2. extend: 'Ext.grid.Panel',
  3. xtype: 'basic-grid',
  4. controller: 'basicgrid',
  5. store: 'Companies',
  6. stateful: true,
  7. multiSelect: true,
  8. stateId: 'stateGrid',
  9. headerBorders: false,
  10. viewConfig: {
  11. enableTextSelection: true
  12. },
  13. columns: [{
  14. text: 'Company',
  15. flex: 1,
  16. dataIndex: 'name'
  17. }, {
  18. text: 'Price',
  19. width: 95,
  20. formatter: 'usMoney',
  21. dataIndex: 'price'
  22. }, {
  23. text: 'Change',
  24. width: 80,
  25. renderer: 'renderChange',
  26. dataIndex: 'priceChange'
  27. }, {
  28. text: '% Change',
  29. width: 100,
  30. renderer: 'renderPercent',
  31. dataIndex: 'priceChangePct'
  32. }, {
  33. text: 'Last Updated',
  34. width: 115,
  35. formatter: 'date("m/d/Y")',
  36. dataIndex: 'priceLastChange'
  37. }, {
  38. xtype: 'actioncolumn',
  39. width: 50,
  40. menuDisabled: true,
  41. sortable: false,
  42. items: [{
  43. iconCls: 'x-fa fa-check green',
  44. handler: 'onApprove'
  45. }, {
  46. iconCls: 'x-fa fa-ban red',
  47. handler: 'onDecline'
  48. }]
  49. }],
  50. signTpl: '<span style="' +
  51. 'color:{value:sign(\'"#cf4c35"\',\'"#73b51e"\')}"' +
  52. '>{text}</span>'
  53. });