gridx-rails 1.2.1 → 1.3.0.pre.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (327) hide show
  1. checksums.yaml +9 -9
  2. data/app/assets/images/gridx/resources/images/headershadow.png +0 -0
  3. data/app/assets/images/gridx/resources/images/rowback.png +0 -0
  4. data/app/assets/images/gridx/resources/images/sprite.png +0 -0
  5. data/app/assets/javascripts/gridx/Grid.js +20 -3
  6. data/app/assets/javascripts/gridx/allModules.js +18 -4
  7. data/app/assets/javascripts/gridx/core/Core.js +36 -6
  8. data/app/assets/javascripts/gridx/core/model/Model.js +6 -5
  9. data/app/assets/javascripts/gridx/core/model/cache/Async.js +9 -7
  10. data/app/assets/javascripts/gridx/core/model/cache/Sync.js +414 -12
  11. data/app/assets/javascripts/gridx/core/model/extensions/Mark.js +14 -20
  12. data/app/assets/javascripts/gridx/core/model/extensions/Modify.js +3 -10
  13. data/app/assets/javascripts/gridx/modules/AutoPagedBody.js +100 -0
  14. data/app/assets/javascripts/gridx/modules/AutoScroll.js +92 -23
  15. data/app/assets/javascripts/gridx/modules/Bar.js +14 -1
  16. data/app/assets/javascripts/gridx/modules/Body.js +64 -29
  17. data/app/assets/javascripts/gridx/modules/CellWidget.js +5 -2
  18. data/app/assets/javascripts/gridx/modules/ColumnLock.js +1 -2
  19. data/app/assets/javascripts/gridx/modules/ColumnWidth.js +4 -1
  20. data/app/assets/javascripts/gridx/modules/Dod.js +216 -12
  21. data/app/assets/javascripts/gridx/modules/Edit.js +143 -68
  22. data/app/assets/javascripts/gridx/modules/ExpandableColumn.js +292 -0
  23. data/app/assets/javascripts/gridx/modules/Filter.js +14 -0
  24. data/app/assets/javascripts/gridx/modules/Focus.js +9 -3
  25. data/app/assets/javascripts/gridx/modules/Header.js +22 -12
  26. data/app/assets/javascripts/gridx/modules/HeaderRegions.js +23 -8
  27. data/app/assets/javascripts/gridx/modules/IndirectSelect.js +6 -7
  28. data/app/assets/javascripts/gridx/modules/IndirectSelectColumn.js +1 -1
  29. data/app/assets/javascripts/gridx/modules/Layer.js +358 -0
  30. data/app/assets/javascripts/gridx/modules/NestedSort.js +8 -10
  31. data/app/assets/javascripts/gridx/modules/PagedBody.js +22 -323
  32. data/app/assets/javascripts/gridx/modules/Puller.js +113 -0
  33. data/app/assets/javascripts/gridx/modules/RowHeader.js +7 -6
  34. data/app/assets/javascripts/gridx/modules/RowLock.js +49 -19
  35. data/app/assets/javascripts/gridx/modules/SlantedHeader.js +46 -0
  36. data/app/assets/javascripts/gridx/modules/Sort.js +417 -0
  37. data/app/assets/javascripts/gridx/modules/StructureSwitch.js +143 -0
  38. data/app/assets/javascripts/gridx/modules/SummaryBar.js +6 -1
  39. data/app/assets/javascripts/gridx/modules/TouchVScroller.js +36 -13
  40. data/app/assets/javascripts/gridx/modules/Tree.js +6 -8
  41. data/app/assets/javascripts/gridx/modules/VScroller.js +1 -1
  42. data/app/assets/javascripts/gridx/modules/View.js +25 -18
  43. data/app/assets/javascripts/gridx/modules/VirtualVScroller.js +23 -11
  44. data/app/assets/javascripts/gridx/modules/_PagedBodyMixin.js +351 -0
  45. data/app/assets/javascripts/gridx/modules/dnd/Avatar.js +1 -1
  46. data/app/assets/javascripts/gridx/modules/dnd/_Dnd.js +1 -0
  47. data/app/assets/javascripts/gridx/modules/extendedSelect/Row.js +8 -5
  48. data/app/assets/javascripts/gridx/modules/filter/FilterBar.js +24 -17
  49. data/app/assets/javascripts/gridx/modules/filter/FilterConfirmDialog.js +3 -1
  50. data/app/assets/javascripts/gridx/modules/filter/FilterDialog.js +2 -2
  51. data/app/assets/javascripts/gridx/modules/filter/FilterPane.js +4 -5
  52. data/app/assets/javascripts/gridx/modules/filter/FilterTooltip.js +1 -1
  53. data/app/assets/javascripts/gridx/modules/filter/QuickFilter.js +32 -9
  54. data/app/assets/javascripts/gridx/modules/pagination/_PaginationBarBase.js +4 -1
  55. data/app/assets/javascripts/gridx/modules/select/Row.js +8 -4
  56. data/app/assets/javascripts/gridx/nls/ar/{FilterBar.js → gridx.js} +77 -5
  57. data/app/assets/javascripts/gridx/nls/bg/{FilterBar.js → gridx.js} +71 -5
  58. data/app/assets/javascripts/gridx/nls/ca/{FilterBar.js → gridx.js} +71 -5
  59. data/app/assets/javascripts/gridx/nls/cs/{FilterBar.js → gridx.js} +77 -5
  60. data/app/assets/javascripts/gridx/nls/da/{FilterBar.js → gridx.js} +77 -5
  61. data/app/assets/javascripts/gridx/nls/de/{FilterBar.js → gridx.js} +77 -5
  62. data/app/assets/javascripts/gridx/nls/el/{FilterBar.js → gridx.js} +77 -5
  63. data/app/assets/javascripts/gridx/nls/es/{FilterBar.js → gridx.js} +71 -5
  64. data/app/assets/javascripts/gridx/nls/fi/{FilterBar.js → gridx.js} +77 -5
  65. data/app/assets/javascripts/gridx/nls/fr/{FilterBar.js → gridx.js} +77 -5
  66. data/app/assets/javascripts/gridx/nls/{FilterBar.js → gridx.js} +80 -4
  67. data/app/assets/javascripts/gridx/nls/he/{FilterBar.js → gridx.js} +77 -5
  68. data/app/assets/javascripts/gridx/nls/hr/{FilterBar.js → gridx.js} +77 -5
  69. data/app/assets/javascripts/gridx/nls/hu/{FilterBar.js → gridx.js} +77 -5
  70. data/app/assets/javascripts/gridx/nls/it/{FilterBar.js → gridx.js} +77 -5
  71. data/app/assets/javascripts/gridx/nls/ja/{FilterBar.js → gridx.js} +77 -5
  72. data/app/assets/javascripts/gridx/nls/kk/{FilterBar.js → gridx.js} +76 -5
  73. data/app/assets/javascripts/gridx/nls/ko/{FilterBar.js → gridx.js} +81 -5
  74. data/app/assets/javascripts/gridx/nls/nb/{FilterBar.js → gridx.js} +77 -5
  75. data/app/assets/javascripts/gridx/nls/nl/{FilterBar.js → gridx.js} +77 -5
  76. data/app/assets/javascripts/gridx/nls/pl/{FilterBar.js → gridx.js} +77 -5
  77. data/app/assets/javascripts/gridx/nls/pt/{FilterBar.js → gridx.js} +71 -5
  78. data/app/assets/javascripts/gridx/nls/pt-pt/{FilterBar.js → gridx.js} +71 -5
  79. data/app/assets/javascripts/gridx/nls/ro/{FilterBar.js → gridx.js} +71 -5
  80. data/app/assets/javascripts/gridx/nls/ru/{FilterBar.js → gridx.js} +77 -5
  81. data/app/assets/javascripts/gridx/nls/sk/{FilterBar.js → gridx.js} +71 -5
  82. data/app/assets/javascripts/gridx/nls/sl/{FilterBar.js → gridx.js} +77 -5
  83. data/app/assets/javascripts/gridx/nls/sv/{FilterBar.js → gridx.js} +77 -5
  84. data/app/assets/javascripts/gridx/nls/th/{FilterBar.js → gridx.js} +77 -5
  85. data/app/assets/javascripts/gridx/nls/tr/{FilterBar.js → gridx.js} +77 -5
  86. data/app/assets/javascripts/gridx/nls/uk/{FilterBar.js → gridx.js} +71 -5
  87. data/app/assets/javascripts/gridx/nls/zh/{FilterBar.js → gridx.js} +77 -5
  88. data/app/assets/javascripts/gridx/nls/zh-tw/{FilterBar.js → gridx.js} +77 -5
  89. data/app/assets/javascripts/gridx/nls/zz-ZZ/gridx.js +173 -0
  90. data/app/assets/javascripts/gridx/support/DropDownPager.js +3 -5
  91. data/app/assets/javascripts/gridx/support/DropDownSizer.js +3 -5
  92. data/app/assets/javascripts/gridx/support/GotoPagePane.js +3 -5
  93. data/app/assets/javascripts/gridx/support/QuickFilter.js +3 -5
  94. data/app/assets/javascripts/gridx/support/Summary.js +32 -10
  95. data/app/assets/javascripts/gridx/support/_LinkPageBase.js +3 -5
  96. data/app/assets/javascripts/gridx/support/query.js +47 -0
  97. data/app/assets/javascripts/gridx/templates/FilterBar.html +1 -1
  98. data/app/assets/javascripts/gridx/templates/QuickFilter.html +3 -3
  99. data/app/assets/stylesheets/gridx/resources/Gridx.css +1 -10
  100. data/app/assets/stylesheets/gridx/resources/claro/Gridx.css +1 -16
  101. data/app/assets/stylesheets/gridx/resources/slantedHeader.css +90 -0
  102. data/lib/gridx-rails/version.rb +1 -1
  103. data/lib/tasks/gridx-rails_tasks.rake +1 -1
  104. data/test/dummy/log/test.log +5 -0
  105. metadata +52 -260
  106. data/app/assets/images/gridx/resources/images/checkboxpartial.png +0 -0
  107. data/app/assets/images/gridx/resources/images/checkboxpartialdisabled.png +0 -0
  108. data/app/assets/images/gridx/resources/images/dndCopy.png +0 -0
  109. data/app/assets/images/gridx/resources/images/dndMove.png +0 -0
  110. data/app/assets/images/gridx/resources/images/dndNoCopy.png +0 -0
  111. data/app/assets/images/gridx/resources/images/dndNoMove.png +0 -0
  112. data/app/assets/images/gridx/resources/images/gridxCellChanged.png +0 -0
  113. data/app/assets/images/gridx/resources/images/header.png +0 -0
  114. data/app/assets/images/gridx/resources/images/header_shadow.png +0 -0
  115. data/app/assets/images/gridx/resources/images/row_back.png +0 -0
  116. data/app/assets/images/gridx/resources/images/row_back_changed.png +0 -0
  117. data/app/assets/images/gridx/resources/images/sprite_icons.png +0 -0
  118. data/app/assets/images/gridx/resources/images/treeExpandImages.png +0 -0
  119. data/app/assets/javascripts/gridx/core/model/cache/_Cache.js +0 -403
  120. data/app/assets/javascripts/gridx/core/util.js +0 -13
  121. data/app/assets/javascripts/gridx/modules/Printer.js +0 -49
  122. data/app/assets/javascripts/gridx/modules/TitleBar.js +0 -51
  123. data/app/assets/javascripts/gridx/modules/barPlugins/DropDownPager.js +0 -16
  124. data/app/assets/javascripts/gridx/modules/barPlugins/DropDownSizer.js +0 -16
  125. data/app/assets/javascripts/gridx/modules/barPlugins/GotoPageButton.js +0 -16
  126. data/app/assets/javascripts/gridx/modules/barPlugins/LinkPager.js +0 -16
  127. data/app/assets/javascripts/gridx/modules/barPlugins/LinkSizer.js +0 -16
  128. data/app/assets/javascripts/gridx/modules/barPlugins/Summary.js +0 -16
  129. data/app/assets/javascripts/gridx/modules/exporter/CSV.js +0 -43
  130. data/app/assets/javascripts/gridx/modules/exporter/Exporter.js +0 -34
  131. data/app/assets/javascripts/gridx/modules/exporter/Table.js +0 -42
  132. data/app/assets/javascripts/gridx/modules/filter/Filter.js +0 -16
  133. data/app/assets/javascripts/gridx/modules/pagination/Pagination.js +0 -16
  134. data/app/assets/javascripts/gridx/nls/Body.js +0 -47
  135. data/app/assets/javascripts/gridx/nls/NestedSort.js +0 -45
  136. data/app/assets/javascripts/gridx/nls/PaginationBar.js +0 -68
  137. data/app/assets/javascripts/gridx/nls/QuickFilter.js +0 -40
  138. data/app/assets/javascripts/gridx/nls/SummaryBar.js +0 -38
  139. data/app/assets/javascripts/gridx/nls/ar/Body.js +0 -11
  140. data/app/assets/javascripts/gridx/nls/ar/NestedSort.js +0 -11
  141. data/app/assets/javascripts/gridx/nls/ar/PaginationBar.js +0 -34
  142. data/app/assets/javascripts/gridx/nls/ar/QuickFilter.js +0 -7
  143. data/app/assets/javascripts/gridx/nls/ar/SummaryBar.js +0 -5
  144. data/app/assets/javascripts/gridx/nls/bg/Body.js +0 -11
  145. data/app/assets/javascripts/gridx/nls/bg/NestedSort.js +0 -12
  146. data/app/assets/javascripts/gridx/nls/bg/PaginationBar.js +0 -28
  147. data/app/assets/javascripts/gridx/nls/bg/QuickFilter.js +0 -8
  148. data/app/assets/javascripts/gridx/nls/bg/SummaryBar.js +0 -6
  149. data/app/assets/javascripts/gridx/nls/ca/Body.js +0 -11
  150. data/app/assets/javascripts/gridx/nls/ca/NestedSort.js +0 -13
  151. data/app/assets/javascripts/gridx/nls/ca/PaginationBar.js +0 -30
  152. data/app/assets/javascripts/gridx/nls/ca/QuickFilter.js +0 -9
  153. data/app/assets/javascripts/gridx/nls/ca/SummaryBar.js +0 -7
  154. data/app/assets/javascripts/gridx/nls/cs/Body.js +0 -11
  155. data/app/assets/javascripts/gridx/nls/cs/NestedSort.js +0 -11
  156. data/app/assets/javascripts/gridx/nls/cs/PaginationBar.js +0 -34
  157. data/app/assets/javascripts/gridx/nls/cs/QuickFilter.js +0 -7
  158. data/app/assets/javascripts/gridx/nls/cs/SummaryBar.js +0 -5
  159. data/app/assets/javascripts/gridx/nls/da/Body.js +0 -11
  160. data/app/assets/javascripts/gridx/nls/da/NestedSort.js +0 -11
  161. data/app/assets/javascripts/gridx/nls/da/PaginationBar.js +0 -34
  162. data/app/assets/javascripts/gridx/nls/da/QuickFilter.js +0 -7
  163. data/app/assets/javascripts/gridx/nls/da/SummaryBar.js +0 -5
  164. data/app/assets/javascripts/gridx/nls/de/Body.js +0 -11
  165. data/app/assets/javascripts/gridx/nls/de/NestedSort.js +0 -11
  166. data/app/assets/javascripts/gridx/nls/de/PaginationBar.js +0 -34
  167. data/app/assets/javascripts/gridx/nls/de/QuickFilter.js +0 -7
  168. data/app/assets/javascripts/gridx/nls/de/SummaryBar.js +0 -5
  169. data/app/assets/javascripts/gridx/nls/el/Body.js +0 -11
  170. data/app/assets/javascripts/gridx/nls/el/NestedSort.js +0 -11
  171. data/app/assets/javascripts/gridx/nls/el/PaginationBar.js +0 -34
  172. data/app/assets/javascripts/gridx/nls/el/QuickFilter.js +0 -7
  173. data/app/assets/javascripts/gridx/nls/el/SummaryBar.js +0 -5
  174. data/app/assets/javascripts/gridx/nls/es/Body.js +0 -11
  175. data/app/assets/javascripts/gridx/nls/es/NestedSort.js +0 -13
  176. data/app/assets/javascripts/gridx/nls/es/PaginationBar.js +0 -30
  177. data/app/assets/javascripts/gridx/nls/es/QuickFilter.js +0 -9
  178. data/app/assets/javascripts/gridx/nls/es/SummaryBar.js +0 -7
  179. data/app/assets/javascripts/gridx/nls/fi/Body.js +0 -11
  180. data/app/assets/javascripts/gridx/nls/fi/NestedSort.js +0 -11
  181. data/app/assets/javascripts/gridx/nls/fi/PaginationBar.js +0 -34
  182. data/app/assets/javascripts/gridx/nls/fi/QuickFilter.js +0 -7
  183. data/app/assets/javascripts/gridx/nls/fi/SummaryBar.js +0 -5
  184. data/app/assets/javascripts/gridx/nls/fr/Body.js +0 -11
  185. data/app/assets/javascripts/gridx/nls/fr/NestedSort.js +0 -11
  186. data/app/assets/javascripts/gridx/nls/fr/PaginationBar.js +0 -34
  187. data/app/assets/javascripts/gridx/nls/fr/QuickFilter.js +0 -7
  188. data/app/assets/javascripts/gridx/nls/fr/SummaryBar.js +0 -5
  189. data/app/assets/javascripts/gridx/nls/he/Body.js +0 -11
  190. data/app/assets/javascripts/gridx/nls/he/NestedSort.js +0 -11
  191. data/app/assets/javascripts/gridx/nls/he/PaginationBar.js +0 -34
  192. data/app/assets/javascripts/gridx/nls/he/QuickFilter.js +0 -6
  193. data/app/assets/javascripts/gridx/nls/he/SummaryBar.js +0 -5
  194. data/app/assets/javascripts/gridx/nls/hr/Body.js +0 -11
  195. data/app/assets/javascripts/gridx/nls/hr/NestedSort.js +0 -11
  196. data/app/assets/javascripts/gridx/nls/hr/PaginationBar.js +0 -34
  197. data/app/assets/javascripts/gridx/nls/hr/QuickFilter.js +0 -7
  198. data/app/assets/javascripts/gridx/nls/hr/SummaryBar.js +0 -5
  199. data/app/assets/javascripts/gridx/nls/hu/Body.js +0 -11
  200. data/app/assets/javascripts/gridx/nls/hu/NestedSort.js +0 -11
  201. data/app/assets/javascripts/gridx/nls/hu/PaginationBar.js +0 -33
  202. data/app/assets/javascripts/gridx/nls/hu/QuickFilter.js +0 -7
  203. data/app/assets/javascripts/gridx/nls/hu/SummaryBar.js +0 -5
  204. data/app/assets/javascripts/gridx/nls/it/Body.js +0 -11
  205. data/app/assets/javascripts/gridx/nls/it/NestedSort.js +0 -11
  206. data/app/assets/javascripts/gridx/nls/it/PaginationBar.js +0 -34
  207. data/app/assets/javascripts/gridx/nls/it/QuickFilter.js +0 -7
  208. data/app/assets/javascripts/gridx/nls/it/SummaryBar.js +0 -5
  209. data/app/assets/javascripts/gridx/nls/ja/Body.js +0 -11
  210. data/app/assets/javascripts/gridx/nls/ja/NestedSort.js +0 -11
  211. data/app/assets/javascripts/gridx/nls/ja/PaginationBar.js +0 -34
  212. data/app/assets/javascripts/gridx/nls/ja/QuickFilter.js +0 -7
  213. data/app/assets/javascripts/gridx/nls/ja/SummaryBar.js +0 -5
  214. data/app/assets/javascripts/gridx/nls/kk/Body.js +0 -11
  215. data/app/assets/javascripts/gridx/nls/kk/NestedSort.js +0 -13
  216. data/app/assets/javascripts/gridx/nls/kk/PaginationBar.js +0 -30
  217. data/app/assets/javascripts/gridx/nls/kk/QuickFilter.js +0 -9
  218. data/app/assets/javascripts/gridx/nls/kk/SummaryBar.js +0 -7
  219. data/app/assets/javascripts/gridx/nls/ko/Body.js +0 -11
  220. data/app/assets/javascripts/gridx/nls/ko/NestedSort.js +0 -11
  221. data/app/assets/javascripts/gridx/nls/ko/PaginationBar.js +0 -34
  222. data/app/assets/javascripts/gridx/nls/ko/QuickFilter.js +0 -7
  223. data/app/assets/javascripts/gridx/nls/ko/SummaryBar.js +0 -5
  224. data/app/assets/javascripts/gridx/nls/nb/Body.js +0 -11
  225. data/app/assets/javascripts/gridx/nls/nb/NestedSort.js +0 -11
  226. data/app/assets/javascripts/gridx/nls/nb/PaginationBar.js +0 -34
  227. data/app/assets/javascripts/gridx/nls/nb/QuickFilter.js +0 -7
  228. data/app/assets/javascripts/gridx/nls/nb/SummaryBar.js +0 -5
  229. data/app/assets/javascripts/gridx/nls/nl/Body.js +0 -11
  230. data/app/assets/javascripts/gridx/nls/nl/NestedSort.js +0 -11
  231. data/app/assets/javascripts/gridx/nls/nl/PaginationBar.js +0 -34
  232. data/app/assets/javascripts/gridx/nls/nl/QuickFilter.js +0 -7
  233. data/app/assets/javascripts/gridx/nls/nl/SummaryBar.js +0 -5
  234. data/app/assets/javascripts/gridx/nls/pl/Body.js +0 -11
  235. data/app/assets/javascripts/gridx/nls/pl/NestedSort.js +0 -11
  236. data/app/assets/javascripts/gridx/nls/pl/PaginationBar.js +0 -34
  237. data/app/assets/javascripts/gridx/nls/pl/QuickFilter.js +0 -7
  238. data/app/assets/javascripts/gridx/nls/pl/SummaryBar.js +0 -5
  239. data/app/assets/javascripts/gridx/nls/pt/Body.js +0 -11
  240. data/app/assets/javascripts/gridx/nls/pt/NestedSort.js +0 -13
  241. data/app/assets/javascripts/gridx/nls/pt/PaginationBar.js +0 -30
  242. data/app/assets/javascripts/gridx/nls/pt/QuickFilter.js +0 -9
  243. data/app/assets/javascripts/gridx/nls/pt/SummaryBar.js +0 -7
  244. data/app/assets/javascripts/gridx/nls/pt-br/Body.js +0 -6
  245. data/app/assets/javascripts/gridx/nls/pt-br/FilterBar.js +0 -89
  246. data/app/assets/javascripts/gridx/nls/pt-br/NestedSort.js +0 -11
  247. data/app/assets/javascripts/gridx/nls/pt-br/PaginationBar.js +0 -34
  248. data/app/assets/javascripts/gridx/nls/pt-br/QuickFilter.js +0 -7
  249. data/app/assets/javascripts/gridx/nls/pt-br/SummaryBar.js +0 -5
  250. data/app/assets/javascripts/gridx/nls/pt-pt/Body.js +0 -11
  251. data/app/assets/javascripts/gridx/nls/pt-pt/NestedSort.js +0 -13
  252. data/app/assets/javascripts/gridx/nls/pt-pt/PaginationBar.js +0 -30
  253. data/app/assets/javascripts/gridx/nls/pt-pt/QuickFilter.js +0 -9
  254. data/app/assets/javascripts/gridx/nls/pt-pt/SummaryBar.js +0 -7
  255. data/app/assets/javascripts/gridx/nls/ro/Body.js +0 -11
  256. data/app/assets/javascripts/gridx/nls/ro/NestedSort.js +0 -13
  257. data/app/assets/javascripts/gridx/nls/ro/PaginationBar.js +0 -30
  258. data/app/assets/javascripts/gridx/nls/ro/QuickFilter.js +0 -9
  259. data/app/assets/javascripts/gridx/nls/ro/SummaryBar.js +0 -7
  260. data/app/assets/javascripts/gridx/nls/ru/Body.js +0 -11
  261. data/app/assets/javascripts/gridx/nls/ru/NestedSort.js +0 -11
  262. data/app/assets/javascripts/gridx/nls/ru/PaginationBar.js +0 -34
  263. data/app/assets/javascripts/gridx/nls/ru/QuickFilter.js +0 -7
  264. data/app/assets/javascripts/gridx/nls/ru/SummaryBar.js +0 -5
  265. data/app/assets/javascripts/gridx/nls/sk/Body.js +0 -11
  266. data/app/assets/javascripts/gridx/nls/sk/NestedSort.js +0 -13
  267. data/app/assets/javascripts/gridx/nls/sk/PaginationBar.js +0 -30
  268. data/app/assets/javascripts/gridx/nls/sk/QuickFilter.js +0 -9
  269. data/app/assets/javascripts/gridx/nls/sk/SummaryBar.js +0 -7
  270. data/app/assets/javascripts/gridx/nls/sl/Body.js +0 -11
  271. data/app/assets/javascripts/gridx/nls/sl/NestedSort.js +0 -11
  272. data/app/assets/javascripts/gridx/nls/sl/PaginationBar.js +0 -34
  273. data/app/assets/javascripts/gridx/nls/sl/QuickFilter.js +0 -7
  274. data/app/assets/javascripts/gridx/nls/sl/SummaryBar.js +0 -5
  275. data/app/assets/javascripts/gridx/nls/sv/Body.js +0 -11
  276. data/app/assets/javascripts/gridx/nls/sv/NestedSort.js +0 -11
  277. data/app/assets/javascripts/gridx/nls/sv/PaginationBar.js +0 -34
  278. data/app/assets/javascripts/gridx/nls/sv/QuickFilter.js +0 -7
  279. data/app/assets/javascripts/gridx/nls/sv/SummaryBar.js +0 -5
  280. data/app/assets/javascripts/gridx/nls/th/Body.js +0 -11
  281. data/app/assets/javascripts/gridx/nls/th/NestedSort.js +0 -11
  282. data/app/assets/javascripts/gridx/nls/th/PaginationBar.js +0 -34
  283. data/app/assets/javascripts/gridx/nls/th/QuickFilter.js +0 -7
  284. data/app/assets/javascripts/gridx/nls/th/SummaryBar.js +0 -5
  285. data/app/assets/javascripts/gridx/nls/tr/Body.js +0 -11
  286. data/app/assets/javascripts/gridx/nls/tr/NestedSort.js +0 -11
  287. data/app/assets/javascripts/gridx/nls/tr/PaginationBar.js +0 -34
  288. data/app/assets/javascripts/gridx/nls/tr/QuickFilter.js +0 -7
  289. data/app/assets/javascripts/gridx/nls/tr/SummaryBar.js +0 -5
  290. data/app/assets/javascripts/gridx/nls/uk/Body.js +0 -11
  291. data/app/assets/javascripts/gridx/nls/uk/NestedSort.js +0 -12
  292. data/app/assets/javascripts/gridx/nls/uk/PaginationBar.js +0 -28
  293. data/app/assets/javascripts/gridx/nls/uk/QuickFilter.js +0 -8
  294. data/app/assets/javascripts/gridx/nls/uk/SummaryBar.js +0 -6
  295. data/app/assets/javascripts/gridx/nls/zh/Body.js +0 -11
  296. data/app/assets/javascripts/gridx/nls/zh/NestedSort.js +0 -11
  297. data/app/assets/javascripts/gridx/nls/zh/PaginationBar.js +0 -34
  298. data/app/assets/javascripts/gridx/nls/zh/QuickFilter.js +0 -7
  299. data/app/assets/javascripts/gridx/nls/zh/SummaryBar.js +0 -5
  300. data/app/assets/javascripts/gridx/nls/zh-tw/Body.js +0 -11
  301. data/app/assets/javascripts/gridx/nls/zh-tw/NestedSort.js +0 -11
  302. data/app/assets/javascripts/gridx/nls/zh-tw/PaginationBar.js +0 -34
  303. data/app/assets/javascripts/gridx/nls/zh-tw/QuickFilter.js +0 -7
  304. data/app/assets/javascripts/gridx/nls/zh-tw/SummaryBar.js +0 -5
  305. data/app/assets/stylesheets/gridx/resources/Dod.css +0 -39
  306. data/app/assets/stylesheets/gridx/resources/Gridx_rtl.css +0 -5
  307. data/app/assets/stylesheets/gridx/resources/Tree.css +0 -46
  308. data/app/assets/stylesheets/gridx/resources/Tree_rtl.css +0 -4
  309. data/app/assets/stylesheets/gridx/resources/bar.css +0 -24
  310. data/app/assets/stylesheets/gridx/resources/basic.css +0 -482
  311. data/app/assets/stylesheets/gridx/resources/basic_rtl.css +0 -37
  312. data/app/assets/stylesheets/gridx/resources/claro/Gridx_rtl.css +0 -7
  313. data/app/assets/stylesheets/gridx/resources/claro/basic.css +0 -109
  314. data/app/assets/stylesheets/gridx/resources/claro/basic_rtl.css +0 -21
  315. data/app/assets/stylesheets/gridx/resources/claro/filter.css +0 -47
  316. data/app/assets/stylesheets/gridx/resources/claro/lock.css +0 -19
  317. data/app/assets/stylesheets/gridx/resources/claro/pagination.css +0 -33
  318. data/app/assets/stylesheets/gridx/resources/claro/select.css +0 -20
  319. data/app/assets/stylesheets/gridx/resources/dnd.css +0 -108
  320. data/app/assets/stylesheets/gridx/resources/filter.css +0 -321
  321. data/app/assets/stylesheets/gridx/resources/filter_rtl.css +0 -38
  322. data/app/assets/stylesheets/gridx/resources/lock.css +0 -20
  323. data/app/assets/stylesheets/gridx/resources/pagination.css +0 -142
  324. data/app/assets/stylesheets/gridx/resources/pagination_rtl.css +0 -54
  325. data/app/assets/stylesheets/gridx/resources/select.css +0 -39
  326. data/app/assets/stylesheets/gridx/resources/sort.css +0 -154
  327. data/app/assets/stylesheets/gridx/resources/sort_rtl.css +0 -51
@@ -14,14 +14,17 @@ define([
14
14
  "dojo/dom-geometry",
15
15
  "dojo/dom-construct",
16
16
  "dojo/keys",
17
+ "dojox/gesture/tap",
17
18
  "dijit/a11y",
18
19
  "../core/_Module",
19
20
  "dojo/date/locale",
20
21
  '../core/model/extensions/Modify',
21
22
  'dojo/_base/event',
23
+ "dijit/form/Button",
24
+ "dijit/Toolbar",
22
25
  "dijit/form/TextBox"
23
26
  // "dojo/NodeList-traverse"
24
- ], function(/*=====Column, Cell, =====*/declare, lang, query, json, Deferred, has, array, DeferredList, domClass, domStyle, domGeo, domConstruct, keys, a11y, _Module, locale, Modify, event){
27
+ ], function(/*=====Column, Cell, =====*/declare, lang, query, json, Deferred, has, array, DeferredList, domClass, domStyle, domGeo, domConstruct, keys, tap, a11y, _Module, locale, Modify, event){
25
28
 
26
29
  /*=====
27
30
  Cell.beginEdit = function(){
@@ -195,14 +198,14 @@ define([
195
198
  // so editor.set('value', ...) can do the job.
196
199
  valueField: 'value',
197
200
 
198
- toEditor: function(storeData, gridData){
201
+ toEditor: function(storeData, gridData, cell){
199
202
  // summary:
200
203
  // By default the dijit used in an editing cell will use store value.
201
204
  // If this default behavior can not meet the requirement (for example, store data is freely formatted date string,
202
205
  // while the dijit is dijit.form.DateTextBox, which requires a Date object), this function can be used.
203
206
  },
204
207
 
205
- fromEditor: function(valueInEditor){
208
+ fromEditor: function(valueInEditor, cell){
206
209
  // summary:
207
210
  // By default when applying an editing cell, the value of the editor dijit will be retreived by get('value') and
208
211
  // directly set back to the store. If this can not meet the requirement, this getEditorValue function can be used
@@ -302,7 +305,9 @@ define([
302
305
  editorArgs = cell.column.editorArgs;
303
306
  editor.set(editorArgs && editorArgs.valueField || 'value', toEditor(storeData, gridData, cell, editor));
304
307
  };
305
- }
308
+ }
309
+
310
+
306
311
 
307
312
  return declare(_Module, {
308
313
  name: 'edit',
@@ -358,28 +363,24 @@ define([
358
363
  leftToMove = node.clientWidth - cellPadding - 5,
359
364
 
360
365
  html = [
361
- "<div rowid='" + rowId + "' ",
362
- "colid='" + colId + "' ",
363
- "class='gridxCellEditedBg'><span>◥</span></div>"
366
+ "<div class='gridxCellEditedBgWrapper'>",
367
+ "<div rowid='" + rowId + "' ",
368
+ "colid='" + colId + "' ",
369
+ "class='gridxCellEditedBg'><span>◥</span>",
370
+ "</div>",
371
+ "</div>"
364
372
  ].join('');
365
373
 
366
- cellBgNode = domConstruct.toDom(html);
367
- domConstruct.place(cellBgNode, cell.node(), 'first');
374
+ wrapper= domConstruct.toDom(html);
375
+ cellBgNode = wrapper.firstChild;
376
+ domConstruct.place(wrapper, cell.node(), 'first');
368
377
 
369
- currentLeft = cellBgNode.offsetLeft;
370
- currentLeft += leftToMove;
378
+ wrapperPosition= domGeo.position(cellBgNode);
379
+ nodePosition = domGeo.position(node);
371
380
 
372
- var upperRows = query('.gridxRow[visualIndex]', g.bodyNode),
373
- top = 0;
374
- array.forEach(upperRows, function(row){
375
- var vi = parseInt(row.getAttribute('visualIndex'), 10);
376
- if(vi < visualIndex){
377
- top += row.clientHeight;
378
- }
379
- });
381
+ wrapper.style.top = nodePosition.y - wrapperPosition. y + 'px';
382
+ wrapper.style.left = cellPadding + 'px';
380
383
 
381
- domStyle.set(cellBgNode, 'left', currentLeft + 'px');
382
- domStyle.set(cellBgNode, 'top', top+ 'px');
383
384
  }
384
385
  };
385
386
 
@@ -415,33 +416,54 @@ define([
415
416
  t.connect(g.body, 'onAfterCell', _onAftercell);
416
417
  }
417
418
  g.domNode.removeAttribute('aria-readonly');
418
- t.connect(g, 'onCellDblClick', function(evt){
419
- if(!domClass.contains(evt.target, 'gridxTreeExpandoIcon') &&
420
- !domClass.contains(evt.target, 'gridxTreeExpandoInner')){
421
- t._onUIBegin(evt);
422
- }
423
- });
424
- t.connect(g.cellWidget, 'onCellWidgetCreated', '_onCellWidgetCreated');
425
- t.connect(g.cellWidget, 'initializeCellWidget', function(widget, cell){
419
+ if(g.touch){
420
+ t.connect(g.bodyNode, tap.doubletap, function(evt){
421
+ var cellNode = query(evt.target).closest('.gridxCell', g.bodyNode);
422
+ var rowNode = cellNode.closest('.gridxRow', g.bodyNode)[0];
423
+ cellNode = cellNode[0];
424
+ if(rowNode && cellNode){
425
+ t._onUIBegin({
426
+ rowId: rowNode.getAttribute('rowid'),
427
+ columnId: cellNode.getAttribute('colid')
428
+ });
429
+ }
430
+ });
431
+ t.aspect(g, 'onCellTouchEnd', function(evt){
432
+ var col = g._columnsById[evt.columnId];
433
+ query('.gridxEditFocus', g.bodyNode).removeClass('gridxEditFocus');
434
+ if(col.alwaysEditing){
435
+ t._showButtons(evt.rowId, evt.columnId);
436
+ }
437
+ });
438
+ }else{
439
+ t.aspect(g, 'onCellDblClick', function(evt){
440
+ if(!domClass.contains(evt.target, 'gridxTreeExpandoIcon') &&
441
+ !domClass.contains(evt.target, 'gridxTreeExpandoInner')){
442
+ t._onUIBegin(evt);
443
+ }
444
+ });
445
+ }
446
+ t.aspect(g.cellWidget, 'onCellWidgetCreated', '_onCellWidgetCreated');
447
+ t.aspect(g.cellWidget, 'initializeCellWidget', function(widget, cell){
426
448
  var column = cell.column;
427
449
  if(column.initializeEditor && widget.gridCellEditField){
428
450
  column.initializeEditor(widget.gridCellEditField, cell);
429
451
  }
430
452
  });
431
- t.connect(g.cellWidget, 'uninitializeCellWidget', function(widget, cell){
453
+ t.aspect(g.cellWidget, 'uninitializeCellWidget', function(widget, cell){
432
454
  var column = cell.column;
433
455
  if(column.uninitializeEditor && widget.gridCellEditField){
434
456
  column.uninitializeEditor(widget.gridCellEditField, cell);
435
457
  }
436
458
  });
437
- t.connect(g.cellWidget, 'collectCellWidgetConnects', function(widget, output){
459
+ t.aspect(g.cellWidget, 'collectCellWidgetConnects', function(widget, output){
438
460
  var column = widget.cell.column;
439
461
  if(column.getEditorConnects){
440
462
  var cnnts = column.getEditorConnects(widget, widget.cell);
441
463
  output.push.apply(output, cnnts);
442
464
  }
443
465
  });
444
- t.connect(g.body, 'onAfterRow', function(row){
466
+ t.aspect(g.body, 'onAfterRow', function(row){
445
467
  query('.gridxCell', row.node()).forEach(function(node){
446
468
  // var colid = node.getAttribute('colid');
447
469
  if(g._columnsById[node.getAttribute('colid')].editable){
@@ -450,9 +472,11 @@ define([
450
472
  });
451
473
  });
452
474
  },
453
-
475
+
454
476
  lazySave: false,
455
-
477
+
478
+ //buttons: false,
479
+
456
480
  load: function(){
457
481
  //Must init focus after navigable cell, so that "edit" focus area will be on top of the "navigablecell" focus area.
458
482
  this._initFocus();
@@ -604,6 +628,7 @@ define([
604
628
  }
605
629
  };
606
630
  try{
631
+ v = (isNaN(v) && typeof v === 'number')? '' : v;
607
632
  if(editorArgs && editorArgs.fromEditor){
608
633
  v = editorArgs.fromEditor(v, widget.cell);
609
634
  }else if(cell.column.storePattern){
@@ -768,23 +793,38 @@ define([
768
793
  var t = this,
769
794
  editor = widget.gridCellEditField;
770
795
  if(editor){
771
- if(column.alwaysEditing){
796
+ if(widget.btns){
797
+ function onOK(evt){
798
+ evt.stopPropagation();
799
+ widget.cell.applyEdit().then(function(success){
800
+ if(success){
801
+ domClass.remove(widget.btns, 'gridxEditFocus');
802
+ t.grid.body.onRender();
803
+ t._blur();
804
+ }
805
+ });
806
+ }
807
+ function onCancel(evt){
808
+ evt.stopPropagation();
809
+ widget.cell.cancelEdit().then(function(){
810
+ domClass.remove(widget.btns, 'gridxEditFocus');
811
+ t.grid.body.onRender();
812
+ t._blur();
813
+ });
814
+ }
815
+ widget.connect(widget.btnOK, 'onclick', onOK);
816
+ widget.connect(widget.btnOK, 'ontouchend', onOK);
817
+ widget.connect(widget.btnCancel, 'onclick', onCancel);
818
+ widget.connect(widget.btnCancel, 'ontouchend', onCancel);
819
+ }else if(column.alwaysEditing){
772
820
  widget.connect(editor, 'onChange', function(){
773
- var rn = widget.domNode.parentNode;
774
- while(rn && !domClass.contains(rn, 'gridxRow')){
775
- rn = rn.parentNode;
776
- }
777
- if(rn){
778
- //TODO: is 500ms okay?
779
- var delay = column.editorArgs && column.editorArgs.applyDelay || 500;
780
- clearTimeout(editor._timeoutApply);
781
- editor._timeoutApply = setTimeout(function(){
782
- var rowId = rn.getAttribute('rowid');
783
- t.apply(rowId, column.id).then(function(){
784
- t._focusEditor(rowId, column.id);
785
- });
786
- }, delay);
787
- }
821
+ var rowId = widget.cell.row.id;
822
+ //TODO: is 500ms okay?
823
+ var delay = column.editorArgs && column.editorArgs.applyDelay || 500;
824
+ clearTimeout(editor._timeoutApply);
825
+ editor._timeoutApply = setTimeout(function(){
826
+ t.apply(rowId, column.id);
827
+ }, delay);
788
828
  });
789
829
  }
790
830
  if(column.onEditorCreated){
@@ -801,6 +841,24 @@ define([
801
841
  }
802
842
  },
803
843
 
844
+ _showButtons: function(rowId, colId){
845
+ var g = this.grid;
846
+ var alwaysEditing = g._columnsById[colId].alwaysEditing;
847
+ if(alwaysEditing){
848
+ query('.gridxEditFocus', g.bodyNode).removeClass('gridxEditFocus');
849
+ var cw = g.cellWidget.getCellWidget(rowId, colId);
850
+ if(cw && cw.btns){
851
+ domClass.add(cw.btns, 'gridxEditFocus');
852
+ }
853
+ g.body.onRender();
854
+ }
855
+ },
856
+
857
+ _hideButtons: function(){
858
+ query('.gridxEditFocus', this.grid.bodyNode).removeClass('gridxEditFocus');
859
+ this.grid.body.onRender();
860
+ },
861
+
804
862
  _getDecorator: function(colId){
805
863
  var className = this._getColumnEditor(colId),
806
864
  p, properties,
@@ -824,15 +882,23 @@ define([
824
882
  }else if(props && constraints){
825
883
  props += ', ';
826
884
  }
885
+ var t = this;
827
886
  return function(){
828
- return ["<div data-dojo-type='", className, "' ",
829
- "data-dojo-attach-point='gridCellEditField' ",
830
- "class='gridxCellEditor gridxHasGridCellValue ",
831
- useGridData ? "" : "gridxUseStoreData",
832
- "' data-dojo-props='",
833
- props, constraints,
834
- "'></div>"
835
- ].join('');
887
+ return [
888
+ t.arg('buttons') ? ["<div class='gridxEditButtons ",
889
+ col.alwaysEditing ? 'gridxAlwaysEdit' : '',
890
+ "' data-dojo-attach-point='btns'>",
891
+ "<div tabindex='0' class='gridxEditOK' data-dojo-attach-point='btnOK'></div>",
892
+ "<div tabindex='0' class='gridxEditCancel' data-dojo-attach-point='btnCancel'></div>",
893
+ "</div>"].join('') : '',
894
+ "<div data-dojo-type='", className, "' ",
895
+ "data-dojo-attach-point='gridCellEditField' ",
896
+ "class='gridxCellEditor gridxHasGridCellValue ",
897
+ useGridData ? "" : "gridxUseStoreData",
898
+ "' data-dojo-props='",
899
+ props, constraints,
900
+ "'></div>"
901
+ ].join('');
836
902
  };
837
903
  },
838
904
 
@@ -883,13 +949,23 @@ define([
883
949
  onFocus: t._onFocus,
884
950
  onBlur: t._onBlur,
885
951
  connects: [
886
- t.connect(g, 'onCellKeyDown', '_onKey'),
887
- t.connect(t, '_focusEditor', '_focus')
952
+ t.aspect(g, 'onCellKeyDown', '_onKey'),
953
+ t.aspect(t, '_focusEditor', '_focus'),
954
+ t.aspect(g.focus, 'onFocusArea', function(area){
955
+ if(area == 'navigablecell'){
956
+ t._showButtons(g.navigableCell._focusRowId, g.navigableCell._focusColId);
957
+ }
958
+ }),
959
+ t.aspect(g.focus, 'onBlurArea', function(area){
960
+ if(area == 'navigablecell'){
961
+ t._hideButtons();
962
+ }
963
+ })
888
964
  ]
889
965
  });
890
966
  }else{
891
967
  //If not keyboard support, at least single clicking on other cells should apply the changes.
892
- t.connect(g, 'onCellMouseDown', function(e){
968
+ t.aspect(g, 'onCellMouseDown', function(e){
893
969
  var cells = t._editingCells;
894
970
  if(!cells[e.rowId] || !cells[e.rowId][e.columnId]){
895
971
  t._applyAll();
@@ -928,7 +1004,7 @@ define([
928
1004
  colId: t._focusCellCol
929
1005
  });
930
1006
  var elems = a11y._getTabNavigable(cellNode);
931
- if(evt && evt.target == (step < 0 ? elems.first : elems.last)){
1007
+ if(evt && ((!elems.first && !elems.last) || evt.target == (step < 0 ? elems.first : elems.last))){
932
1008
  g.focus.stopEvent(evt);
933
1009
  var rowIndex = view.getRowInfo({
934
1010
  parentId: t.model.parentId(t._focusCellRow),
@@ -987,11 +1063,11 @@ define([
987
1063
  if(e.keyCode == keys.ENTER){
988
1064
  if(editing){
989
1065
  t.apply(e.rowId, e.columnId).then(function(success){
990
- if(success){
991
- t._blur();
992
- }
993
1066
  if(col.alwaysEditing){
994
1067
  t._focusEditor(e.rowId, e.columnId);
1068
+ t._showButtons(e.rowId, e.columnId);
1069
+ }else if(success){
1070
+ t._blur();
995
1071
  }
996
1072
  });
997
1073
  }else if(g.focus.currentArea() == 'body'){
@@ -1000,7 +1076,9 @@ define([
1000
1076
  t._onUIBegin(e);
1001
1077
  }
1002
1078
  }else if(e.keyCode == keys.ESCAPE && editing){
1079
+ g.focus.stopEvent(e);
1003
1080
  t.cancel(e.rowId, e.columnId).then(lang.hitch(t, t._blur)).then(function(){
1081
+ t._hideButtons();
1004
1082
  g.focus.focusArea('body');
1005
1083
  });
1006
1084
  }else if(e.keyCode == 'Z'.charCodeAt(0) && ctrlKey){
@@ -1018,9 +1096,6 @@ define([
1018
1096
  }
1019
1097
  }
1020
1098
  }
1021
- // if(t._editing && e.keyCode !== keys.TAB){
1022
- // e.stopPropagation();
1023
- // }
1024
1099
  }
1025
1100
 
1026
1101
  });
@@ -0,0 +1,292 @@
1
+ define([
2
+ "dojo/_base/declare",
3
+ "dojo/_base/array",
4
+ "dojo/_base/lang",
5
+ "dojo/_base/event",
6
+ "dojo/keys",
7
+ "dojo/aspect",
8
+ "dojo/query",
9
+ "dojo/string",
10
+ "dojo/dom-class",
11
+ "dojo/dom-construct",
12
+ "dojo/keys",
13
+ "../core/_Module",
14
+ "./HiddenColumns"
15
+ ], function(declare, array, lang, event, keys, aspect, query, string, domClass, domConstruct, keys, _Module, HiddenColumns, Sort, nls){
16
+
17
+ return declare(HiddenColumns, {
18
+ name: 'expandedColumn',
19
+ _parentCols: null,
20
+
21
+ required: ['header'],
22
+
23
+ preload: function(){
24
+ this.inherited(arguments);
25
+ },
26
+
27
+ load: function(args, startup){
28
+ var t = this,
29
+ g = t.grid;
30
+ t._cols = g._columns.slice();
31
+ t._parentCols = {};
32
+
33
+ var toHide = [];
34
+ array.forEach(t._cols, function(col){
35
+ if(col.expanded){
36
+ toHide.push(col.id);
37
+ }else if(col._parentColumn){
38
+ t._parentCols[col._parentColumn] = 1;
39
+ var parentCol = this._colById(col._parentColumn);
40
+
41
+ if(!parentCol.expanded){
42
+ toHide.push(col.id);
43
+ parentCol.expanded = false; //Force expanded false for later use.
44
+ }else{
45
+ }
46
+ }
47
+ }, this);
48
+
49
+ this.expandoBar = domConstruct.create('div', {className: 'gridxColumnExpandoBar'});
50
+
51
+ this.connect(g.columnWidth, 'onUpdate', '_updateUI');
52
+ this.grid.vLayout.register(this, 'expandoBar', 'headerNode', 1);
53
+
54
+ this.connect(g, 'onHeaderCellMouseOver', function(evt){
55
+ domClass.add(this._expandoCellByColumnId(evt.columnId), 'gridxColumnExpandoHighlight');
56
+ }, this);
57
+
58
+ this.connect(g, 'onHeaderCellMouseOut', function(evt){
59
+ domClass.remove(this._expandoCellByColumnId(evt.columnId), 'gridxColumnExpandoHighlight');
60
+ }, this);
61
+
62
+ this.connect(this.expandoBar, 'onmouseover', function(evt){
63
+ var expandoCell = null;
64
+ if(/td/i.test(evt.target.tagName)){
65
+ expandoCell = evt.target;
66
+ }else if(domClass.contains(evt.target, 'gridxColumnExpando')){
67
+ expandoCell = evt.target.parentNode;
68
+ }
69
+ if(expandoCell){
70
+ var colId = expandoCell.getAttribute('data-column-id');
71
+ domClass.add(expandoCell, 'gridxColumnExpandoHighlight');
72
+ domClass.add(this._headerCellByColumnId(colId), 'gridxCellHighlight');
73
+ }
74
+ }, this);
75
+
76
+ this.connect(this.expandoBar, 'onmouseout', function(evt){
77
+ var expandoCell = null;
78
+ if(/td/i.test(evt.target.tagName)){
79
+ expandoCell = evt.target;
80
+ }else if(domClass.contains(evt.target, 'gridxColumnExpando')){
81
+ expandoCell = evt.target.parentNode;
82
+ }
83
+ if(expandoCell){
84
+ var colId = expandoCell.getAttribute('data-column-id');
85
+ domClass.remove(expandoCell, 'gridxColumnExpandoHighlight');
86
+ domClass.remove(this._headerCellByColumnId(colId), 'gridxCellHighlight');
87
+ }
88
+ }, this);
89
+
90
+ this.connect(this.expandBar, 'onclick', function(evt){
91
+ if(domClass.contains(evt.target, 'gridxColumnExpando')){
92
+ var colId = evt.target.parentNode.getAttribute('data-column-id');
93
+ this.expand(colId);
94
+ }
95
+ }, this);
96
+
97
+ this.connect(this.grid.header.innerNode, 'onkeyup', function(evt){
98
+ //Bind short cut key to expand/coallapse the column: shift + ctrl + e
99
+
100
+ if(evt.keyCode == 77 && evt.ctrlKey){
101
+ var node = evt.target;
102
+ if(domClass.contains(node, 'gridxGroupHeader')){
103
+ var colId = node.getAttribute('groupid').split('-').pop();
104
+ colId = this._colById(colId)._parentColumn;
105
+ this.collapse(colId);
106
+ this._focusById(colId);
107
+
108
+ }else if(domClass.contains(node, 'gridxCell')){
109
+ var colId = node.getAttribute('colid');
110
+ if(this._parentCols[colId]){
111
+ //expandable
112
+ this.expand(colId);
113
+ this._focusById(colId);
114
+ }
115
+ }
116
+ event.stop(evt);
117
+ }
118
+ }, this);
119
+
120
+ this.connect(this.grid, 'onHScroll', function(left){
121
+ this.expandoBar.scrollLeft = left;
122
+ }, this);
123
+
124
+ if(toHide.length){
125
+ startup.then(function(){
126
+ t.add.apply(t, toHide);
127
+ t._refreshHeader();
128
+ t.loaded.callback();
129
+ });
130
+ }else{
131
+ t.loaded.callback();
132
+ }
133
+ },
134
+
135
+ expand: function(colId){
136
+ var children = array.filter(this._cols, function(col){
137
+ return col._parentColumn == colId;
138
+ });
139
+
140
+ this.add(colId);
141
+ this.remove.apply(this, children);
142
+ this._colById(colId).expanded = true;
143
+ this._refreshHeader();
144
+
145
+ },
146
+
147
+ collapse: function(colId){
148
+ var children = array.filter(this._cols, function(col){
149
+ return col._parentColumn == colId;
150
+ });
151
+
152
+ this.remove(colId);
153
+ this.add.apply(this, children);
154
+ this._colById(colId).expanded = false;
155
+ this._refreshHeader();
156
+ },
157
+
158
+ _updateUI: function(){
159
+ // summary:
160
+ // Called when the header is changed, need to sync expando bar.
161
+
162
+ console.log('rebuilding column expando bar');
163
+ //Build expando bar
164
+ var sb = ['<table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr>'];
165
+ array.forEach(this.grid._columns, function(col){
166
+ sb.push('<td data-column-id="', col.id,'" aria-readonly="true" tabindex="-1" class="gridxColumnExpandoCell">');
167
+ if(this._parentCols[col.id]){
168
+ //expandable
169
+ sb.push('<span class="gridxColumnExpando"></span>');
170
+ }
171
+ sb.push('</td>');
172
+ }, this);
173
+
174
+ sb.push('</tr></table>');
175
+ this.expandoBar.innerHTML = sb.join('');
176
+ this.expandoBar.style.marginRight = this.grid.header.innerNode.style.marginRight;
177
+ this.expandoBar.style.marginLeft = this.grid.header.innerNode.style.marginLeft;
178
+ //Adjust width of the expando cells
179
+ var headerCells = query('table', this.grid.headerNode)[0].rows[0].cells
180
+ ,expandoCells = this.expandoBar.firstChild.rows[0].cells;
181
+
182
+ array.forEach(expandoCells, function(cell, i){
183
+ var colId = cell.getAttribute('data-column-id')
184
+ ,col = this.grid._columnsById[colId];
185
+ cell.style.width = col.width;
186
+ cell.style.minWidth = col.width;
187
+ cell.style.maxWidth = col.width;
188
+ }, this);
189
+ },
190
+
191
+ _createExpandNode: function(i, col){
192
+ console.log('creating expand node for:', col.id);
193
+ var div = domConstruct.create('div', {innerHTML: '', className: 'gridxColumnExpandNode'});
194
+ if(this._parentCols[col.id]){
195
+ div.innerHTML = '<span class="gridxColumnExpandNodeIcon"></span>';
196
+ var self = this;
197
+ div.onclick = function(){
198
+ self.expand(col.id);
199
+ }
200
+ }else{
201
+ console.log(col.id, ' is not expandable');
202
+ div.innerHTML = '';
203
+ }
204
+ return div;
205
+ },
206
+
207
+ _headerCellByColumnId: function(colId){
208
+ var cell = query('td[colid="' + colId + '"]', this.grid.headerNode)[0];
209
+ if(!cell){
210
+ cell = query('td[data-map-column-id="' + colId + '"]', this.grid.headerNode)[0];
211
+ }
212
+ return cell;
213
+ },
214
+
215
+ _expandoCellByColumnId: function(colId){
216
+ return query('td[data-column-id="' + colId + '"]', this.expandoBar)[0];
217
+ },
218
+
219
+ _refreshHeader: function(){
220
+ var headerGroups = [],
221
+ cols = this.grid._columns,
222
+ currentGroup = null,
223
+ c = 0;
224
+
225
+ for(var i = 0; i < cols.length; i++){
226
+ var col = cols[i];
227
+ if(col._parentColumn){
228
+ //if column has parent
229
+ if(c > 0){
230
+ headerGroups.push(c);
231
+ c = 0;
232
+ }
233
+ if(!currentGroup || currentGroup._colId != col._parentColumn){
234
+ if(currentGroup && currentGroup._colId != col._parentColumn){
235
+ headerGroups.push(currentGroup);
236
+ }
237
+
238
+ currentGroup = {
239
+ _colId: col._parentColumn,
240
+ name: this._colById(col._parentColumn).name,
241
+ children: 0
242
+ };
243
+ }
244
+ currentGroup.children++;
245
+ }else{
246
+ if(currentGroup){
247
+ headerGroups.push(currentGroup);
248
+ }
249
+ c++;
250
+ currentGroup = null;
251
+ }
252
+ }
253
+ console.log('headerGroups: ', headerGroups);
254
+ delete this.grid.header.groups;
255
+ this.grid.headerGroups = headerGroups;
256
+ this.grid.header.refresh();
257
+
258
+ //add expand arrow the the group header
259
+ var self = this;
260
+ query('.gridxGroupHeader', this.grid.headerNode).forEach(function(td){
261
+ var colId = td.getAttribute('groupid').split('-').pop();
262
+ colId = self._colById(colId)._parentColumn;
263
+ td.setAttribute('data-map-column-id', colId);
264
+
265
+ var div = domConstruct.create('div', {
266
+ innerHTML: '<span class="gridxColumnCollapseNodeIcon"></span>',
267
+ className: 'gridxColumnCollapseNode'});
268
+
269
+ div.onclick = function(){
270
+ self.collapse(colId);
271
+ }
272
+ td.firstChild.insertBefore(div, td.firstChild.firstChild);
273
+ });
274
+ },
275
+
276
+ _colById: function(id){
277
+ return this.grid._columnsById[id] || array.filter(this._cols, function(col){
278
+ return col.id == id;
279
+ })[0];
280
+ },
281
+
282
+ _focusById: function(colId){
283
+ // summary:
284
+ // Focus the column header cell by column id
285
+
286
+ var headerCell = this._headerCellByColumnId(colId);
287
+ if(headerCell){
288
+ this.grid.header._focusNode(headerCell);
289
+ }
290
+ }
291
+ });
292
+ });
@@ -384,6 +384,20 @@ define([
384
384
  }
385
385
  }, "isEmpty", [expr]);
386
386
  },
387
+
388
+ //Is not Empty check
389
+ //Currently it will only appear in serverMode of filter for string-typed column
390
+ //It has no NLS, and it is not recommended to use if you need fully nls support
391
+ isNotEmpty: function(expr, notEmptyValues){
392
+ return wrap(function(){
393
+ var v = expr.apply(0, arguments);
394
+ if(notEmptyValues){
395
+ return array.indexOf(notEmptyValues, v) >= 0;
396
+ }else{
397
+ return v !== "" && v !== null && v !== undefined;
398
+ }
399
+ }, "isNotEmpty", [expr]);
400
+ },
387
401
 
388
402
  //Logic operations
389
403
  and: function(/* filter expressions */){