Guest User

Untitled

a guest
Jan 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. window.widgets.productsGrid = Ext.create "Ext.form.Panel",
  2. id: 'grid',
  3. frame: true,
  4. title: 'Producsts List',
  5. preventHeader: true,
  6. bodyPadding: 0,
  7. layout: 'column',
  8. fieldDefaults:
  9. labelAlign: 'left'
  10. msgTarget: 'side'
  11. region: 'center',
  12. flex: 1,
  13. items: [{
  14. columnWidth: 0.2
  15. xtype: 'gridpanel',
  16. height: 400,
  17. store: productsListStore
  18. title: 'List of Products'
  19. dockedItems: [{
  20. xtype: 'toolbar',
  21. dock: 'top',
  22. items: [
  23. 'Filter'
  24. ,
  25. xtype: 'textfield',
  26. name: 'searchfield',
  27. id: 'searchfield',
  28. flex: 1,
  29. listeners:
  30. specialkey: (el, e)->
  31. alert 'Clicked'
  32. ,
  33. xtype: 'button'
  34. text: '»'
  35. tooltip: 'Filter by Catalog ID'
  36. #listeners:
  37. # click: alert 'Clicked!'
  38. ]
  39. }]
  40. columns: [
  41. {
  42. text: 'CAT No.',
  43. flex: 1,
  44. sortable: false,
  45. dataIndex: 'CAT#'
  46. }
  47. ],
  48. }, {
  49. columnWidth: 0.8,
  50. margin: '0 0 0 10',
  51. xtype: 'fieldset',
  52. title: 'Product details',
  53. defaults: {
  54. width: 400,
  55. labelWidth: 90
  56. },
  57. defaultType: 'textfield'
  58. items: [{
  59. fieldLable: 'Name',
  60. name: 'company'
  61. }, {
  62. fieldLabel: 'Price',
  63. name: 'price'
  64. }]
  65. }
  66. ]
  67. renderTo: document.body
  68.  
  69.  
  70. productsBrowseContainer = Ext.create "Ext.panel.Panel",
  71. title: 'Browser',
  72. collapsible: true,
  73. layout: 'border',
  74. defaults: {
  75. collapsible: true,
  76. split: true,
  77. bodyStyle: 'padding:0px'
  78. },
  79. items: [
  80. window.widgets.productsBrowse
  81. window.widgets.productsGrid
  82. ]
  83. retenderTo: Ext.getBody()
Add Comment
Please, Sign In to add comment