Defaults.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. const labelWidth = 80
  2. export const windows = {
  3. modal: true,
  4. width: 900,
  5. height: 600,
  6. maximizable: true,
  7. constrain: true,
  8. shadow: false,
  9. // manageHeight: true,
  10. // draggable: true,
  11. // scrollable: true,
  12. }
  13. export const date = {
  14. labelAlign: 'right',
  15. labelWidth,
  16. }
  17. export const combo = {
  18. labelAlign: 'right',
  19. labelWidth,
  20. valueField: 'id',
  21. displayField: 'text',
  22. autoLoad: true,
  23. mode: 'local',
  24. forceSelection: true,
  25. triggerAction: 'all',
  26. enableKeyEvents: true,
  27. }
  28. export const comboGrid = {
  29. selectOnTab: true,
  30. pickerHeight: 500,
  31. pickerWidth: 850,
  32. editEnable: null,
  33. }
  34. export const comboGridPicker = {
  35. xtype: 'yvgrid',
  36. layout: 'fit',
  37. selModel: {
  38. selType: 'rowmodel',
  39. mode: 'SINGLE'
  40. },
  41. }
  42. export const comboGridMulti = {
  43. selectOnTab: true,
  44. pickerHeight: 500,
  45. pickerWidth: 850,
  46. editEnable: null,
  47. splitChar: ',',
  48. displayField: 'text',
  49. valueField: 'id',
  50. autoLoad: true,
  51. }
  52. export const comboGridMultiPicker = {
  53. selType: 'checkboxmodel',
  54. selModel: {
  55. type: 'checkboxmodel',
  56. checkOnly: false
  57. },
  58. }
  59. export const numberfield = {
  60. labelAlign: 'right',
  61. labelWidth,
  62. }
  63. export const checkbox = {
  64. labelAlign: 'right',
  65. labelWidth,
  66. checkedValue: true,
  67. uncheckedValue: false,
  68. }
  69. export const checkboxgroup = {
  70. labelAlign: 'right',
  71. labelWidth,
  72. }
  73. export const radio = {
  74. labelAlign: 'right',
  75. labelWidth,
  76. }
  77. export const radiogroup = {
  78. labelAlign: 'right',
  79. labelWidth,
  80. simpleValue: true,
  81. layout: 'hbox',
  82. defaults: {
  83. xtype: 'radio',
  84. name: 'type',
  85. margin: '0 15 0 0'
  86. },
  87. }
  88. export const form = {
  89. margin: '5 5 0 0',
  90. border: false,
  91. defaults: {
  92. margin: '0 0 5 0',
  93. border: false,
  94. },
  95. }
  96. export const column = {
  97. filter: {type: 'string'},
  98. }
  99. export const grid = {
  100. border: true,
  101. columnLines: true,
  102. rowLines: true,
  103. plugins: {
  104. cellediting: {
  105. clicksToEdit: 1
  106. },
  107. gridfilters: true
  108. },
  109. multiColumnSort: true,
  110. viewConfig: {
  111. enableTextSelection: true,
  112. sortOnClick: false,
  113. },
  114. selModel: {
  115. type: 'checkboxmodel',
  116. checkOnly: false
  117. },
  118. pagination: true,
  119. pageSize: 50,
  120. pageSizeOption: ['20', '50', '100', '200', '300'],
  121. hideFootbar: false,
  122. hideRefresh: false,
  123. hideExport: false,
  124. hideAutoSize: false,
  125. hideClearFilter: false,
  126. autoLoad: true,
  127. remoteSort: false,
  128. remoteFilter: false,
  129. enableLocking: true,
  130. enableColumnMove: true,
  131. enableColumnHide: true,
  132. enableColumnResize: true,
  133. hidden: false,
  134. disabled: false,
  135. }
  136. export const fieldContainer = {
  137. labelAlign: 'right',
  138. labelWidth,
  139. layout: 'hbox',
  140. defaults: {
  141. flex: 1,
  142. }
  143. }
  144. export const tree = {
  145. autoLoad: true,
  146. hideFilter: false,
  147. hideToolbar: false,
  148. }
  149. export const search = {
  150. labelAlign: 'right',
  151. labelWidth,
  152. }
  153. export const text = {
  154. labelAlign: 'right',
  155. labelWidth,
  156. msgTarget: 'qtip',
  157. }
  158. export const toolbar = {
  159. overflowHandler: 'menu',
  160. }
  161. export const tbfill = {}
  162. export const tbseparator = {}
  163. export const button = {}
  164. export const fieldSet = {
  165. margin: '5 5 0 0',
  166. border: false,
  167. defaults: {
  168. margin: '0 0 5 0',
  169. border: false,
  170. },
  171. }
  172. export const panel = {}
  173. export const splitter = {}
  174. export const maintab = {}
  175. export const rows = {}
  176. export const cols = {
  177. defaults: {
  178. flex: 1
  179. },
  180. }