lpmp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (636) hide show
  1. data/LICENSE +3 -0
  2. data/README +3 -0
  3. data/Rakefile +45 -0
  4. data/bin/lpmp +107 -0
  5. data/config/help.yaml +1 -0
  6. data/config/hosts.yaml +2 -0
  7. data/config/log.yaml +1 -0
  8. data/config/memcache.yaml +5 -0
  9. data/erb/index.erb +62 -0
  10. data/lib/bg_pull/caichen.rb +199 -0
  11. data/lib/bg_pull/lpmp.rb +45 -0
  12. data/lib/exception.rb +8 -0
  13. data/lib/lpmp.rb +53 -0
  14. data/lib/pull/lpmp.rb +355 -0
  15. data/lib/remote_lmp.rb +129 -0
  16. data/lib/utils.rb +14 -0
  17. data/lib/xq_push/caichen.rb +174 -0
  18. data/lib/xq_push/lpmp.rb +96 -0
  19. data/log/lpmp1st.log +1 -0
  20. data/public/css/ext-portal.css +40 -0
  21. data/public/css/lpmp.css +6 -0
  22. data/public/designer/caichen.epj +1 -0
  23. data/public/designer/hostmonitor.epj +1 -0
  24. data/public/ext-3.0.0/INCLUDE_ORDER.txt +35 -0
  25. data/public/ext-3.0.0/adapter/ext/ext-base-debug.js +3589 -0
  26. data/public/ext-3.0.0/adapter/ext/ext-base.js +7 -0
  27. data/public/ext-3.0.0/adapter/jquery/ext-jquery-adapter-debug.js +2292 -0
  28. data/public/ext-3.0.0/adapter/jquery/ext-jquery-adapter.js +7 -0
  29. data/public/ext-3.0.0/adapter/prototype/ext-prototype-adapter-debug.js +2346 -0
  30. data/public/ext-3.0.0/adapter/prototype/ext-prototype-adapter.js +7 -0
  31. data/public/ext-3.0.0/adapter/yui/ext-yui-adapter-debug.js +2136 -0
  32. data/public/ext-3.0.0/adapter/yui/ext-yui-adapter.js +7 -0
  33. data/public/ext-3.0.0/ext-all-debug.js +65610 -0
  34. data/public/ext-3.0.0/ext-all.js +11 -0
  35. data/public/ext-3.0.0/license.txt +42 -0
  36. data/public/ext-3.0.0/pkgs/cmp-foundation-debug.js +11287 -0
  37. data/public/ext-3.0.0/pkgs/cmp-foundation.js +7 -0
  38. data/public/ext-3.0.0/pkgs/data-foundation-debug.js +3853 -0
  39. data/public/ext-3.0.0/pkgs/data-foundation.js +7 -0
  40. data/public/ext-3.0.0/pkgs/data-grouping-debug.js +139 -0
  41. data/public/ext-3.0.0/pkgs/data-grouping.js +7 -0
  42. data/public/ext-3.0.0/pkgs/data-json-debug.js +582 -0
  43. data/public/ext-3.0.0/pkgs/data-json.js +7 -0
  44. data/public/ext-3.0.0/pkgs/data-list-views-debug.js +1278 -0
  45. data/public/ext-3.0.0/pkgs/data-list-views.js +7 -0
  46. data/public/ext-3.0.0/pkgs/data-xml-debug.js +234 -0
  47. data/public/ext-3.0.0/pkgs/data-xml.js +7 -0
  48. data/public/ext-3.0.0/pkgs/direct-debug.js +1121 -0
  49. data/public/ext-3.0.0/pkgs/direct.js +7 -0
  50. data/public/ext-3.0.0/pkgs/ext-dd-debug.js +4567 -0
  51. data/public/ext-3.0.0/pkgs/ext-dd.js +7 -0
  52. data/public/ext-3.0.0/pkgs/ext-foundation-debug.js +13417 -0
  53. data/public/ext-3.0.0/pkgs/ext-foundation.js +7 -0
  54. data/public/ext-3.0.0/pkgs/pkg-buttons-debug.js +1060 -0
  55. data/public/ext-3.0.0/pkgs/pkg-buttons.js +7 -0
  56. data/public/ext-3.0.0/pkgs/pkg-charts-debug.js +1621 -0
  57. data/public/ext-3.0.0/pkgs/pkg-charts.js +10 -0
  58. data/public/ext-3.0.0/pkgs/pkg-forms-debug.js +7661 -0
  59. data/public/ext-3.0.0/pkgs/pkg-forms.js +7 -0
  60. data/public/ext-3.0.0/pkgs/pkg-grid-editor-debug.js +560 -0
  61. data/public/ext-3.0.0/pkgs/pkg-grid-editor.js +7 -0
  62. data/public/ext-3.0.0/pkgs/pkg-grid-foundation-debug.js +4765 -0
  63. data/public/ext-3.0.0/pkgs/pkg-grid-foundation.js +7 -0
  64. data/public/ext-3.0.0/pkgs/pkg-grid-grouping-debug.js +517 -0
  65. data/public/ext-3.0.0/pkgs/pkg-grid-grouping.js +7 -0
  66. data/public/ext-3.0.0/pkgs/pkg-grid-property-debug.js +370 -0
  67. data/public/ext-3.0.0/pkgs/pkg-grid-property.js +7 -0
  68. data/public/ext-3.0.0/pkgs/pkg-history-debug.js +203 -0
  69. data/public/ext-3.0.0/pkgs/pkg-history.js +7 -0
  70. data/public/ext-3.0.0/pkgs/pkg-menu-debug.js +1628 -0
  71. data/public/ext-3.0.0/pkgs/pkg-menu.js +7 -0
  72. data/public/ext-3.0.0/pkgs/pkg-tabs-debug.js +1100 -0
  73. data/public/ext-3.0.0/pkgs/pkg-tabs.js +7 -0
  74. data/public/ext-3.0.0/pkgs/pkg-tips-debug.js +994 -0
  75. data/public/ext-3.0.0/pkgs/pkg-tips.js +7 -0
  76. data/public/ext-3.0.0/pkgs/pkg-toolbars-debug.js +1374 -0
  77. data/public/ext-3.0.0/pkgs/pkg-toolbars.js +7 -0
  78. data/public/ext-3.0.0/pkgs/pkg-tree-debug.js +4522 -0
  79. data/public/ext-3.0.0/pkgs/pkg-tree.js +7 -0
  80. data/public/ext-3.0.0/pkgs/resizable-debug.js +760 -0
  81. data/public/ext-3.0.0/pkgs/resizable.js +7 -0
  82. data/public/ext-3.0.0/pkgs/state-debug.js +274 -0
  83. data/public/ext-3.0.0/pkgs/state.js +7 -0
  84. data/public/ext-3.0.0/pkgs/window-debug.js +1888 -0
  85. data/public/ext-3.0.0/pkgs/window.js +7 -0
  86. data/public/ext-3.0.0/resources/charts.swf +0 -0
  87. data/public/ext-3.0.0/resources/css/README.txt +3 -0
  88. data/public/ext-3.0.0/resources/css/ext-all-notheme.css +5345 -0
  89. data/public/ext-3.0.0/resources/css/ext-all.css +6990 -0
  90. data/public/ext-3.0.0/resources/css/reset-min.css +7 -0
  91. data/public/ext-3.0.0/resources/css/structure/borders.css +54 -0
  92. data/public/ext-3.0.0/resources/css/structure/box.css +80 -0
  93. data/public/ext-3.0.0/resources/css/structure/button.css +440 -0
  94. data/public/ext-3.0.0/resources/css/structure/combo.css +45 -0
  95. data/public/ext-3.0.0/resources/css/structure/core.css +326 -0
  96. data/public/ext-3.0.0/resources/css/structure/date-picker.css +265 -0
  97. data/public/ext-3.0.0/resources/css/structure/dd.css +61 -0
  98. data/public/ext-3.0.0/resources/css/structure/debug.css +26 -0
  99. data/public/ext-3.0.0/resources/css/structure/dialog.css +62 -0
  100. data/public/ext-3.0.0/resources/css/structure/editor.css +92 -0
  101. data/public/ext-3.0.0/resources/css/structure/form.css +562 -0
  102. data/public/ext-3.0.0/resources/css/structure/grid.css +552 -0
  103. data/public/ext-3.0.0/resources/css/structure/layout.css +296 -0
  104. data/public/ext-3.0.0/resources/css/structure/list-view.css +85 -0
  105. data/public/ext-3.0.0/resources/css/structure/menu.css +205 -0
  106. data/public/ext-3.0.0/resources/css/structure/panel-reset.css +130 -0
  107. data/public/ext-3.0.0/resources/css/structure/panel.css +468 -0
  108. data/public/ext-3.0.0/resources/css/structure/progress.css +42 -0
  109. data/public/ext-3.0.0/resources/css/structure/qtips.css +153 -0
  110. data/public/ext-3.0.0/resources/css/structure/reset.css +7 -0
  111. data/public/ext-3.0.0/resources/css/structure/resizable.css +149 -0
  112. data/public/ext-3.0.0/resources/css/structure/slider.css +103 -0
  113. data/public/ext-3.0.0/resources/css/structure/tabs.css +372 -0
  114. data/public/ext-3.0.0/resources/css/structure/toolbar.css +259 -0
  115. data/public/ext-3.0.0/resources/css/structure/tree.css +203 -0
  116. data/public/ext-3.0.0/resources/css/structure/window.css +222 -0
  117. data/public/ext-3.0.0/resources/css/visual/borders.css +25 -0
  118. data/public/ext-3.0.0/resources/css/visual/box.css +74 -0
  119. data/public/ext-3.0.0/resources/css/visual/button.css +94 -0
  120. data/public/ext-3.0.0/resources/css/visual/combo.css +43 -0
  121. data/public/ext-3.0.0/resources/css/visual/core.css +76 -0
  122. data/public/ext-3.0.0/resources/css/visual/date-picker.css +143 -0
  123. data/public/ext-3.0.0/resources/css/visual/dd.css +29 -0
  124. data/public/ext-3.0.0/resources/css/visual/debug.css +24 -0
  125. data/public/ext-3.0.0/resources/css/visual/dialog.css +34 -0
  126. data/public/ext-3.0.0/resources/css/visual/editor.css +13 -0
  127. data/public/ext-3.0.0/resources/css/visual/form.css +117 -0
  128. data/public/ext-3.0.0/resources/css/visual/grid.css +272 -0
  129. data/public/ext-3.0.0/resources/css/visual/layout.css +53 -0
  130. data/public/ext-3.0.0/resources/css/visual/list-view.css +37 -0
  131. data/public/ext-3.0.0/resources/css/visual/menu.css +82 -0
  132. data/public/ext-3.0.0/resources/css/visual/panel.css +87 -0
  133. data/public/ext-3.0.0/resources/css/visual/progress.css +32 -0
  134. data/public/ext-3.0.0/resources/css/visual/qtips.css +44 -0
  135. data/public/ext-3.0.0/resources/css/visual/resizable.css +43 -0
  136. data/public/ext-3.0.0/resources/css/visual/slider.css +21 -0
  137. data/public/ext-3.0.0/resources/css/visual/tabs.css +119 -0
  138. data/public/ext-3.0.0/resources/css/visual/toolbar.css +103 -0
  139. data/public/ext-3.0.0/resources/css/visual/tree.css +157 -0
  140. data/public/ext-3.0.0/resources/css/visual/window.css +86 -0
  141. data/public/ext-3.0.0/resources/css/xtheme-blue.css +1652 -0
  142. data/public/ext-3.0.0/resources/expressinstall.swf +0 -0
  143. data/public/ext-3.0.0/resources/images/default/box/corners-blue.gif +0 -0
  144. data/public/ext-3.0.0/resources/images/default/box/corners.gif +0 -0
  145. data/public/ext-3.0.0/resources/images/default/box/l-blue.gif +0 -0
  146. data/public/ext-3.0.0/resources/images/default/box/l.gif +0 -0
  147. data/public/ext-3.0.0/resources/images/default/box/r-blue.gif +0 -0
  148. data/public/ext-3.0.0/resources/images/default/box/r.gif +0 -0
  149. data/public/ext-3.0.0/resources/images/default/box/tb-blue.gif +0 -0
  150. data/public/ext-3.0.0/resources/images/default/box/tb.gif +0 -0
  151. data/public/ext-3.0.0/resources/images/default/button/arrow.gif +0 -0
  152. data/public/ext-3.0.0/resources/images/default/button/btn.gif +0 -0
  153. data/public/ext-3.0.0/resources/images/default/button/group-cs.gif +0 -0
  154. data/public/ext-3.0.0/resources/images/default/button/group-lr.gif +0 -0
  155. data/public/ext-3.0.0/resources/images/default/button/group-tb.gif +0 -0
  156. data/public/ext-3.0.0/resources/images/default/button/s-arrow-b-noline.gif +0 -0
  157. data/public/ext-3.0.0/resources/images/default/button/s-arrow-b.gif +0 -0
  158. data/public/ext-3.0.0/resources/images/default/button/s-arrow-bo.gif +0 -0
  159. data/public/ext-3.0.0/resources/images/default/button/s-arrow-noline.gif +0 -0
  160. data/public/ext-3.0.0/resources/images/default/button/s-arrow-o.gif +0 -0
  161. data/public/ext-3.0.0/resources/images/default/button/s-arrow.gif +0 -0
  162. data/public/ext-3.0.0/resources/images/default/dd/drop-add.gif +0 -0
  163. data/public/ext-3.0.0/resources/images/default/dd/drop-no.gif +0 -0
  164. data/public/ext-3.0.0/resources/images/default/dd/drop-yes.gif +0 -0
  165. data/public/ext-3.0.0/resources/images/default/editor/tb-sprite.gif +0 -0
  166. data/public/ext-3.0.0/resources/images/default/form/checkbox.gif +0 -0
  167. data/public/ext-3.0.0/resources/images/default/form/clear-trigger.gif +0 -0
  168. data/public/ext-3.0.0/resources/images/default/form/clear-trigger.psd +0 -0
  169. data/public/ext-3.0.0/resources/images/default/form/date-trigger.gif +0 -0
  170. data/public/ext-3.0.0/resources/images/default/form/date-trigger.psd +0 -0
  171. data/public/ext-3.0.0/resources/images/default/form/error-tip-corners.gif +0 -0
  172. data/public/ext-3.0.0/resources/images/default/form/exclamation.gif +0 -0
  173. data/public/ext-3.0.0/resources/images/default/form/radio.gif +0 -0
  174. data/public/ext-3.0.0/resources/images/default/form/search-trigger.gif +0 -0
  175. data/public/ext-3.0.0/resources/images/default/form/search-trigger.psd +0 -0
  176. data/public/ext-3.0.0/resources/images/default/form/text-bg.gif +0 -0
  177. data/public/ext-3.0.0/resources/images/default/form/trigger-tpl.gif +0 -0
  178. data/public/ext-3.0.0/resources/images/default/form/trigger.gif +0 -0
  179. data/public/ext-3.0.0/resources/images/default/form/trigger.psd +0 -0
  180. data/public/ext-3.0.0/resources/images/default/gradient-bg.gif +0 -0
  181. data/public/ext-3.0.0/resources/images/default/grid/arrow-left-white.gif +0 -0
  182. data/public/ext-3.0.0/resources/images/default/grid/arrow-right-white.gif +0 -0
  183. data/public/ext-3.0.0/resources/images/default/grid/col-move-bottom.gif +0 -0
  184. data/public/ext-3.0.0/resources/images/default/grid/col-move-top.gif +0 -0
  185. data/public/ext-3.0.0/resources/images/default/grid/columns.gif +0 -0
  186. data/public/ext-3.0.0/resources/images/default/grid/dirty.gif +0 -0
  187. data/public/ext-3.0.0/resources/images/default/grid/done.gif +0 -0
  188. data/public/ext-3.0.0/resources/images/default/grid/drop-no.gif +0 -0
  189. data/public/ext-3.0.0/resources/images/default/grid/drop-yes.gif +0 -0
  190. data/public/ext-3.0.0/resources/images/default/grid/footer-bg.gif +0 -0
  191. data/public/ext-3.0.0/resources/images/default/grid/grid-blue-hd.gif +0 -0
  192. data/public/ext-3.0.0/resources/images/default/grid/grid-blue-split.gif +0 -0
  193. data/public/ext-3.0.0/resources/images/default/grid/grid-hrow.gif +0 -0
  194. data/public/ext-3.0.0/resources/images/default/grid/grid-loading.gif +0 -0
  195. data/public/ext-3.0.0/resources/images/default/grid/grid-split.gif +0 -0
  196. data/public/ext-3.0.0/resources/images/default/grid/grid-vista-hd.gif +0 -0
  197. data/public/ext-3.0.0/resources/images/default/grid/grid3-hd-btn.gif +0 -0
  198. data/public/ext-3.0.0/resources/images/default/grid/grid3-hrow-over.gif +0 -0
  199. data/public/ext-3.0.0/resources/images/default/grid/grid3-hrow.gif +0 -0
  200. data/public/ext-3.0.0/resources/images/default/grid/grid3-special-col-bg.gif +0 -0
  201. data/public/ext-3.0.0/resources/images/default/grid/grid3-special-col-sel-bg.gif +0 -0
  202. data/public/ext-3.0.0/resources/images/default/grid/group-by.gif +0 -0
  203. data/public/ext-3.0.0/resources/images/default/grid/group-collapse.gif +0 -0
  204. data/public/ext-3.0.0/resources/images/default/grid/group-expand-sprite.gif +0 -0
  205. data/public/ext-3.0.0/resources/images/default/grid/group-expand.gif +0 -0
  206. data/public/ext-3.0.0/resources/images/default/grid/hd-pop.gif +0 -0
  207. data/public/ext-3.0.0/resources/images/default/grid/hmenu-asc.gif +0 -0
  208. data/public/ext-3.0.0/resources/images/default/grid/hmenu-desc.gif +0 -0
  209. data/public/ext-3.0.0/resources/images/default/grid/hmenu-lock.gif +0 -0
  210. data/public/ext-3.0.0/resources/images/default/grid/hmenu-lock.png +0 -0
  211. data/public/ext-3.0.0/resources/images/default/grid/hmenu-unlock.gif +0 -0
  212. data/public/ext-3.0.0/resources/images/default/grid/hmenu-unlock.png +0 -0
  213. data/public/ext-3.0.0/resources/images/default/grid/invalid_line.gif +0 -0
  214. data/public/ext-3.0.0/resources/images/default/grid/loading.gif +0 -0
  215. data/public/ext-3.0.0/resources/images/default/grid/mso-hd.gif +0 -0
  216. data/public/ext-3.0.0/resources/images/default/grid/nowait.gif +0 -0
  217. data/public/ext-3.0.0/resources/images/default/grid/page-first-disabled.gif +0 -0
  218. data/public/ext-3.0.0/resources/images/default/grid/page-first.gif +0 -0
  219. data/public/ext-3.0.0/resources/images/default/grid/page-last-disabled.gif +0 -0
  220. data/public/ext-3.0.0/resources/images/default/grid/page-last.gif +0 -0
  221. data/public/ext-3.0.0/resources/images/default/grid/page-next-disabled.gif +0 -0
  222. data/public/ext-3.0.0/resources/images/default/grid/page-next.gif +0 -0
  223. data/public/ext-3.0.0/resources/images/default/grid/page-prev-disabled.gif +0 -0
  224. data/public/ext-3.0.0/resources/images/default/grid/page-prev.gif +0 -0
  225. data/public/ext-3.0.0/resources/images/default/grid/pick-button.gif +0 -0
  226. data/public/ext-3.0.0/resources/images/default/grid/refresh.gif +0 -0
  227. data/public/ext-3.0.0/resources/images/default/grid/row-check-sprite.gif +0 -0
  228. data/public/ext-3.0.0/resources/images/default/grid/row-expand-sprite.gif +0 -0
  229. data/public/ext-3.0.0/resources/images/default/grid/row-over.gif +0 -0
  230. data/public/ext-3.0.0/resources/images/default/grid/row-sel.gif +0 -0
  231. data/public/ext-3.0.0/resources/images/default/grid/sort-hd.gif +0 -0
  232. data/public/ext-3.0.0/resources/images/default/grid/sort_asc.gif +0 -0
  233. data/public/ext-3.0.0/resources/images/default/grid/sort_desc.gif +0 -0
  234. data/public/ext-3.0.0/resources/images/default/grid/wait.gif +0 -0
  235. data/public/ext-3.0.0/resources/images/default/layout/collapse.gif +0 -0
  236. data/public/ext-3.0.0/resources/images/default/layout/expand.gif +0 -0
  237. data/public/ext-3.0.0/resources/images/default/layout/gradient-bg.gif +0 -0
  238. data/public/ext-3.0.0/resources/images/default/layout/mini-bottom.gif +0 -0
  239. data/public/ext-3.0.0/resources/images/default/layout/mini-left.gif +0 -0
  240. data/public/ext-3.0.0/resources/images/default/layout/mini-right.gif +0 -0
  241. data/public/ext-3.0.0/resources/images/default/layout/mini-top.gif +0 -0
  242. data/public/ext-3.0.0/resources/images/default/layout/ns-collapse.gif +0 -0
  243. data/public/ext-3.0.0/resources/images/default/layout/ns-expand.gif +0 -0
  244. data/public/ext-3.0.0/resources/images/default/layout/panel-close.gif +0 -0
  245. data/public/ext-3.0.0/resources/images/default/layout/panel-title-bg.gif +0 -0
  246. data/public/ext-3.0.0/resources/images/default/layout/panel-title-light-bg.gif +0 -0
  247. data/public/ext-3.0.0/resources/images/default/layout/stick.gif +0 -0
  248. data/public/ext-3.0.0/resources/images/default/layout/stuck.gif +0 -0
  249. data/public/ext-3.0.0/resources/images/default/layout/tab-close-on.gif +0 -0
  250. data/public/ext-3.0.0/resources/images/default/layout/tab-close.gif +0 -0
  251. data/public/ext-3.0.0/resources/images/default/menu/checked.gif +0 -0
  252. data/public/ext-3.0.0/resources/images/default/menu/group-checked.gif +0 -0
  253. data/public/ext-3.0.0/resources/images/default/menu/item-over.gif +0 -0
  254. data/public/ext-3.0.0/resources/images/default/menu/menu-parent.gif +0 -0
  255. data/public/ext-3.0.0/resources/images/default/menu/menu.gif +0 -0
  256. data/public/ext-3.0.0/resources/images/default/menu/unchecked.gif +0 -0
  257. data/public/ext-3.0.0/resources/images/default/panel/corners-sprite.gif +0 -0
  258. data/public/ext-3.0.0/resources/images/default/panel/left-right.gif +0 -0
  259. data/public/ext-3.0.0/resources/images/default/panel/light-hd.gif +0 -0
  260. data/public/ext-3.0.0/resources/images/default/panel/tool-sprite-tpl.gif +0 -0
  261. data/public/ext-3.0.0/resources/images/default/panel/tool-sprites.gif +0 -0
  262. data/public/ext-3.0.0/resources/images/default/panel/tools-sprites-trans.gif +0 -0
  263. data/public/ext-3.0.0/resources/images/default/panel/top-bottom.gif +0 -0
  264. data/public/ext-3.0.0/resources/images/default/panel/top-bottom.png +0 -0
  265. data/public/ext-3.0.0/resources/images/default/panel/white-corners-sprite.gif +0 -0
  266. data/public/ext-3.0.0/resources/images/default/panel/white-left-right.gif +0 -0
  267. data/public/ext-3.0.0/resources/images/default/panel/white-top-bottom.gif +0 -0
  268. data/public/ext-3.0.0/resources/images/default/progress/progress-bg.gif +0 -0
  269. data/public/ext-3.0.0/resources/images/default/qtip/bg.gif +0 -0
  270. data/public/ext-3.0.0/resources/images/default/qtip/close.gif +0 -0
  271. data/public/ext-3.0.0/resources/images/default/qtip/tip-anchor-sprite.gif +0 -0
  272. data/public/ext-3.0.0/resources/images/default/qtip/tip-sprite.gif +0 -0
  273. data/public/ext-3.0.0/resources/images/default/s.gif +0 -0
  274. data/public/ext-3.0.0/resources/images/default/shadow-c.png +0 -0
  275. data/public/ext-3.0.0/resources/images/default/shadow-lr.png +0 -0
  276. data/public/ext-3.0.0/resources/images/default/shadow.png +0 -0
  277. data/public/ext-3.0.0/resources/images/default/shared/blue-loading.gif +0 -0
  278. data/public/ext-3.0.0/resources/images/default/shared/calendar.gif +0 -0
  279. data/public/ext-3.0.0/resources/images/default/shared/glass-bg.gif +0 -0
  280. data/public/ext-3.0.0/resources/images/default/shared/hd-sprite.gif +0 -0
  281. data/public/ext-3.0.0/resources/images/default/shared/large-loading.gif +0 -0
  282. data/public/ext-3.0.0/resources/images/default/shared/left-btn.gif +0 -0
  283. data/public/ext-3.0.0/resources/images/default/shared/loading-balls.gif +0 -0
  284. data/public/ext-3.0.0/resources/images/default/shared/right-btn.gif +0 -0
  285. data/public/ext-3.0.0/resources/images/default/shared/warning.gif +0 -0
  286. data/public/ext-3.0.0/resources/images/default/sizer/e-handle-dark.gif +0 -0
  287. data/public/ext-3.0.0/resources/images/default/sizer/e-handle.gif +0 -0
  288. data/public/ext-3.0.0/resources/images/default/sizer/ne-handle-dark.gif +0 -0
  289. data/public/ext-3.0.0/resources/images/default/sizer/ne-handle.gif +0 -0
  290. data/public/ext-3.0.0/resources/images/default/sizer/nw-handle-dark.gif +0 -0
  291. data/public/ext-3.0.0/resources/images/default/sizer/nw-handle.gif +0 -0
  292. data/public/ext-3.0.0/resources/images/default/sizer/s-handle-dark.gif +0 -0
  293. data/public/ext-3.0.0/resources/images/default/sizer/s-handle.gif +0 -0
  294. data/public/ext-3.0.0/resources/images/default/sizer/se-handle-dark.gif +0 -0
  295. data/public/ext-3.0.0/resources/images/default/sizer/se-handle.gif +0 -0
  296. data/public/ext-3.0.0/resources/images/default/sizer/square.gif +0 -0
  297. data/public/ext-3.0.0/resources/images/default/sizer/sw-handle-dark.gif +0 -0
  298. data/public/ext-3.0.0/resources/images/default/sizer/sw-handle.gif +0 -0
  299. data/public/ext-3.0.0/resources/images/default/slider/slider-bg.png +0 -0
  300. data/public/ext-3.0.0/resources/images/default/slider/slider-thumb.png +0 -0
  301. data/public/ext-3.0.0/resources/images/default/slider/slider-v-bg.png +0 -0
  302. data/public/ext-3.0.0/resources/images/default/slider/slider-v-thumb.png +0 -0
  303. data/public/ext-3.0.0/resources/images/default/tabs/scroll-left.gif +0 -0
  304. data/public/ext-3.0.0/resources/images/default/tabs/scroll-right.gif +0 -0
  305. data/public/ext-3.0.0/resources/images/default/tabs/scroller-bg.gif +0 -0
  306. data/public/ext-3.0.0/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
  307. data/public/ext-3.0.0/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
  308. data/public/ext-3.0.0/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
  309. data/public/ext-3.0.0/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
  310. data/public/ext-3.0.0/resources/images/default/tabs/tab-close.gif +0 -0
  311. data/public/ext-3.0.0/resources/images/default/tabs/tab-strip-bg.gif +0 -0
  312. data/public/ext-3.0.0/resources/images/default/tabs/tab-strip-bg.png +0 -0
  313. data/public/ext-3.0.0/resources/images/default/tabs/tab-strip-btm-bg.gif +0 -0
  314. data/public/ext-3.0.0/resources/images/default/tabs/tabs-sprite.gif +0 -0
  315. data/public/ext-3.0.0/resources/images/default/toolbar/bg.gif +0 -0
  316. data/public/ext-3.0.0/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
  317. data/public/ext-3.0.0/resources/images/default/toolbar/btn-arrow.gif +0 -0
  318. data/public/ext-3.0.0/resources/images/default/toolbar/btn-over-bg.gif +0 -0
  319. data/public/ext-3.0.0/resources/images/default/toolbar/gray-bg.gif +0 -0
  320. data/public/ext-3.0.0/resources/images/default/toolbar/more.gif +0 -0
  321. data/public/ext-3.0.0/resources/images/default/toolbar/tb-bg.gif +0 -0
  322. data/public/ext-3.0.0/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
  323. data/public/ext-3.0.0/resources/images/default/toolbar/tb-xl-btn-sprite.gif +0 -0
  324. data/public/ext-3.0.0/resources/images/default/toolbar/tb-xl-sep.gif +0 -0
  325. data/public/ext-3.0.0/resources/images/default/tree/arrows.gif +0 -0
  326. data/public/ext-3.0.0/resources/images/default/tree/drop-add.gif +0 -0
  327. data/public/ext-3.0.0/resources/images/default/tree/drop-between.gif +0 -0
  328. data/public/ext-3.0.0/resources/images/default/tree/drop-no.gif +0 -0
  329. data/public/ext-3.0.0/resources/images/default/tree/drop-over.gif +0 -0
  330. data/public/ext-3.0.0/resources/images/default/tree/drop-under.gif +0 -0
  331. data/public/ext-3.0.0/resources/images/default/tree/drop-yes.gif +0 -0
  332. data/public/ext-3.0.0/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
  333. data/public/ext-3.0.0/resources/images/default/tree/elbow-end-minus.gif +0 -0
  334. data/public/ext-3.0.0/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
  335. data/public/ext-3.0.0/resources/images/default/tree/elbow-end-plus.gif +0 -0
  336. data/public/ext-3.0.0/resources/images/default/tree/elbow-end.gif +0 -0
  337. data/public/ext-3.0.0/resources/images/default/tree/elbow-line.gif +0 -0
  338. data/public/ext-3.0.0/resources/images/default/tree/elbow-minus-nl.gif +0 -0
  339. data/public/ext-3.0.0/resources/images/default/tree/elbow-minus.gif +0 -0
  340. data/public/ext-3.0.0/resources/images/default/tree/elbow-plus-nl.gif +0 -0
  341. data/public/ext-3.0.0/resources/images/default/tree/elbow-plus.gif +0 -0
  342. data/public/ext-3.0.0/resources/images/default/tree/elbow.gif +0 -0
  343. data/public/ext-3.0.0/resources/images/default/tree/folder-open.gif +0 -0
  344. data/public/ext-3.0.0/resources/images/default/tree/folder.gif +0 -0
  345. data/public/ext-3.0.0/resources/images/default/tree/leaf.gif +0 -0
  346. data/public/ext-3.0.0/resources/images/default/tree/loading.gif +0 -0
  347. data/public/ext-3.0.0/resources/images/default/tree/s.gif +0 -0
  348. data/public/ext-3.0.0/resources/images/default/window/icon-error.gif +0 -0
  349. data/public/ext-3.0.0/resources/images/default/window/icon-info.gif +0 -0
  350. data/public/ext-3.0.0/resources/images/default/window/icon-question.gif +0 -0
  351. data/public/ext-3.0.0/resources/images/default/window/icon-warning.gif +0 -0
  352. data/public/ext-3.0.0/resources/images/default/window/left-corners.png +0 -0
  353. data/public/ext-3.0.0/resources/images/default/window/left-corners.psd +0 -0
  354. data/public/ext-3.0.0/resources/images/default/window/left-right.png +0 -0
  355. data/public/ext-3.0.0/resources/images/default/window/left-right.psd +0 -0
  356. data/public/ext-3.0.0/resources/images/default/window/right-corners.png +0 -0
  357. data/public/ext-3.0.0/resources/images/default/window/right-corners.psd +0 -0
  358. data/public/ext-3.0.0/resources/images/default/window/top-bottom.png +0 -0
  359. data/public/ext-3.0.0/resources/images/default/window/top-bottom.psd +0 -0
  360. data/public/ext-3.0.0/resources/images/icon/chart.gif +0 -0
  361. data/public/ext-3.0.0/src/adapter/core/ext-base-ajax.js +371 -0
  362. data/public/ext-3.0.0/src/adapter/core/ext-base-anim-extra.js +301 -0
  363. data/public/ext-3.0.0/src/adapter/core/ext-base-anim.js +477 -0
  364. data/public/ext-3.0.0/src/adapter/core/ext-base-begin.js +18 -0
  365. data/public/ext-3.0.0/src/adapter/core/ext-base-dom.js +157 -0
  366. data/public/ext-3.0.0/src/adapter/core/ext-base-end.js +21 -0
  367. data/public/ext-3.0.0/src/adapter/core/ext-base-event.js +453 -0
  368. data/public/ext-3.0.0/src/adapter/core/ext-base-point.js +17 -0
  369. data/public/ext-3.0.0/src/adapter/core/ext-base-region.js +81 -0
  370. data/public/ext-3.0.0/src/adapter/ext-base-dom-more.js +9 -0
  371. data/public/ext-3.0.0/src/adapter/jquery-bridge.js +546 -0
  372. data/public/ext-3.0.0/src/adapter/prototype-bridge.js +600 -0
  373. data/public/ext-3.0.0/src/adapter/yui-bridge.js +390 -0
  374. data/public/ext-3.0.0/src/core/CompositeElement.js +136 -0
  375. data/public/ext-3.0.0/src/core/CompositeElementLite-more.js +102 -0
  376. data/public/ext-3.0.0/src/core/DomHelper-more.js +179 -0
  377. data/public/ext-3.0.0/src/core/Element-more.js +192 -0
  378. data/public/ext-3.0.0/src/core/Element.alignment.js +370 -0
  379. data/public/ext-3.0.0/src/core/Element.dd.js +46 -0
  380. data/public/ext-3.0.0/src/core/Element.fx-more.js +152 -0
  381. data/public/ext-3.0.0/src/core/Element.insertion-more.js +52 -0
  382. data/public/ext-3.0.0/src/core/Element.keys.js +48 -0
  383. data/public/ext-3.0.0/src/core/Element.legacy.js +42 -0
  384. data/public/ext-3.0.0/src/core/Element.position-more.js +165 -0
  385. data/public/ext-3.0.0/src/core/Element.scroll-more.js +110 -0
  386. data/public/ext-3.0.0/src/core/Element.style-more.js +318 -0
  387. data/public/ext-3.0.0/src/core/Error.js +81 -0
  388. data/public/ext-3.0.0/src/core/EventManager-more.js +334 -0
  389. data/public/ext-3.0.0/src/core/Ext-more.js +669 -0
  390. data/public/ext-3.0.0/src/core/Template-more.js +115 -0
  391. data/public/ext-3.0.0/src/core/core/CompositeElementLite.js +197 -0
  392. data/public/ext-3.0.0/src/core/core/DomHelper.js +378 -0
  393. data/public/ext-3.0.0/src/core/core/DomQuery.js +826 -0
  394. data/public/ext-3.0.0/src/core/core/Element.fx.js +324 -0
  395. data/public/ext-3.0.0/src/core/core/Element.insertion.js +147 -0
  396. data/public/ext-3.0.0/src/core/core/Element.js +945 -0
  397. data/public/ext-3.0.0/src/core/core/Element.position.js +303 -0
  398. data/public/ext-3.0.0/src/core/core/Element.scroll.js +58 -0
  399. data/public/ext-3.0.0/src/core/core/Element.style.js +439 -0
  400. data/public/ext-3.0.0/src/core/core/Element.traversal.js +176 -0
  401. data/public/ext-3.0.0/src/core/core/EventManager.js +623 -0
  402. data/public/ext-3.0.0/src/core/core/Ext.js +922 -0
  403. data/public/ext-3.0.0/src/core/core/Fx.js +1115 -0
  404. data/public/ext-3.0.0/src/core/core/Template.js +185 -0
  405. data/public/ext-3.0.0/src/data/Api.js +210 -0
  406. data/public/ext-3.0.0/src/data/ArrayReader.js +102 -0
  407. data/public/ext-3.0.0/src/data/ArrayStore.js +70 -0
  408. data/public/ext-3.0.0/src/data/DataField.js +249 -0
  409. data/public/ext-3.0.0/src/data/DataProxy.js +427 -0
  410. data/public/ext-3.0.0/src/data/DataReader.js +160 -0
  411. data/public/ext-3.0.0/src/data/DataWriter.js +201 -0
  412. data/public/ext-3.0.0/src/data/DirectProxy.js +141 -0
  413. data/public/ext-3.0.0/src/data/DirectStore.js +52 -0
  414. data/public/ext-3.0.0/src/data/GroupingStore.js +139 -0
  415. data/public/ext-3.0.0/src/data/HttpProxy.js +276 -0
  416. data/public/ext-3.0.0/src/data/JsonReader.js +311 -0
  417. data/public/ext-3.0.0/src/data/JsonStore.js +49 -0
  418. data/public/ext-3.0.0/src/data/JsonWriter.js +77 -0
  419. data/public/ext-3.0.0/src/data/MemoryProxy.js +69 -0
  420. data/public/ext-3.0.0/src/data/Record.js +400 -0
  421. data/public/ext-3.0.0/src/data/ScriptTagProxy.js +279 -0
  422. data/public/ext-3.0.0/src/data/SortTypes.js +91 -0
  423. data/public/ext-3.0.0/src/data/Store.js +1492 -0
  424. data/public/ext-3.0.0/src/data/StoreMgr.js +72 -0
  425. data/public/ext-3.0.0/src/data/Tree.js +785 -0
  426. data/public/ext-3.0.0/src/data/XmlReader.js +128 -0
  427. data/public/ext-3.0.0/src/data/XmlStore.js +75 -0
  428. data/public/ext-3.0.0/src/data/XmlWriter.js +45 -0
  429. data/public/ext-3.0.0/src/data/core/Connection.js +575 -0
  430. data/public/ext-3.0.0/src/dd/DDCore.js +2992 -0
  431. data/public/ext-3.0.0/src/dd/DragSource.js +365 -0
  432. data/public/ext-3.0.0/src/dd/DragTracker.js +217 -0
  433. data/public/ext-3.0.0/src/dd/DragZone.js +133 -0
  434. data/public/ext-3.0.0/src/dd/DropTarget.js +115 -0
  435. data/public/ext-3.0.0/src/dd/DropZone.js +262 -0
  436. data/public/ext-3.0.0/src/dd/Registry.js +127 -0
  437. data/public/ext-3.0.0/src/dd/ScrollManager.js +201 -0
  438. data/public/ext-3.0.0/src/dd/StatusProxy.js +171 -0
  439. data/public/ext-3.0.0/src/debug.js +906 -0
  440. data/public/ext-3.0.0/src/direct/Direct.js +235 -0
  441. data/public/ext-3.0.0/src/direct/Event.js +34 -0
  442. data/public/ext-3.0.0/src/direct/JsonProvider.js +45 -0
  443. data/public/ext-3.0.0/src/direct/PollingProvider.js +151 -0
  444. data/public/ext-3.0.0/src/direct/Provider.js +110 -0
  445. data/public/ext-3.0.0/src/direct/RemotingProvider.js +373 -0
  446. data/public/ext-3.0.0/src/direct/Transaction.js +32 -0
  447. data/public/ext-3.0.0/src/locale/ext-lang-af.js +184 -0
  448. data/public/ext-3.0.0/src/locale/ext-lang-bg.js +278 -0
  449. data/public/ext-3.0.0/src/locale/ext-lang-ca.js +315 -0
  450. data/public/ext-3.0.0/src/locale/ext-lang-cs.js +293 -0
  451. data/public/ext-3.0.0/src/locale/ext-lang-da.js +296 -0
  452. data/public/ext-3.0.0/src/locale/ext-lang-de.js +326 -0
  453. data/public/ext-3.0.0/src/locale/ext-lang-el_GR.js +309 -0
  454. data/public/ext-3.0.0/src/locale/ext-lang-en.js +335 -0
  455. data/public/ext-3.0.0/src/locale/ext-lang-en_GB.js +315 -0
  456. data/public/ext-3.0.0/src/locale/ext-lang-es.js +318 -0
  457. data/public/ext-3.0.0/src/locale/ext-lang-fa.js +272 -0
  458. data/public/ext-3.0.0/src/locale/ext-lang-fi.js +302 -0
  459. data/public/ext-3.0.0/src/locale/ext-lang-fr.js +335 -0
  460. data/public/ext-3.0.0/src/locale/ext-lang-fr_CA.js +218 -0
  461. data/public/ext-3.0.0/src/locale/ext-lang-gr.js +175 -0
  462. data/public/ext-3.0.0/src/locale/ext-lang-he.js +292 -0
  463. data/public/ext-3.0.0/src/locale/ext-lang-hr.js +295 -0
  464. data/public/ext-3.0.0/src/locale/ext-lang-hu.js +296 -0
  465. data/public/ext-3.0.0/src/locale/ext-lang-id.js +302 -0
  466. data/public/ext-3.0.0/src/locale/ext-lang-it.js +295 -0
  467. data/public/ext-3.0.0/src/locale/ext-lang-ja.js +318 -0
  468. data/public/ext-3.0.0/src/locale/ext-lang-ko.js +267 -0
  469. data/public/ext-3.0.0/src/locale/ext-lang-lt.js +333 -0
  470. data/public/ext-3.0.0/src/locale/ext-lang-lv.js +176 -0
  471. data/public/ext-3.0.0/src/locale/ext-lang-mk.js +176 -0
  472. data/public/ext-3.0.0/src/locale/ext-lang-nl.js +323 -0
  473. data/public/ext-3.0.0/src/locale/ext-lang-no_NB.js +294 -0
  474. data/public/ext-3.0.0/src/locale/ext-lang-no_NN.js +294 -0
  475. data/public/ext-3.0.0/src/locale/ext-lang-pl.js +304 -0
  476. data/public/ext-3.0.0/src/locale/ext-lang-pt.js +260 -0
  477. data/public/ext-3.0.0/src/locale/ext-lang-pt_BR.js +302 -0
  478. data/public/ext-3.0.0/src/locale/ext-lang-pt_PT.js +298 -0
  479. data/public/ext-3.0.0/src/locale/ext-lang-ro.js +295 -0
  480. data/public/ext-3.0.0/src/locale/ext-lang-ru.js +319 -0
  481. data/public/ext-3.0.0/src/locale/ext-lang-sk.js +182 -0
  482. data/public/ext-3.0.0/src/locale/ext-lang-sl.js +176 -0
  483. data/public/ext-3.0.0/src/locale/ext-lang-sr.js +179 -0
  484. data/public/ext-3.0.0/src/locale/ext-lang-sr_RS.js +178 -0
  485. data/public/ext-3.0.0/src/locale/ext-lang-sv_SE.js +178 -0
  486. data/public/ext-3.0.0/src/locale/ext-lang-th.js +294 -0
  487. data/public/ext-3.0.0/src/locale/ext-lang-tr.js +306 -0
  488. data/public/ext-3.0.0/src/locale/ext-lang-ukr.js +258 -0
  489. data/public/ext-3.0.0/src/locale/ext-lang-vn.js +181 -0
  490. data/public/ext-3.0.0/src/locale/ext-lang-zh_CN.js +174 -0
  491. data/public/ext-3.0.0/src/locale/ext-lang-zh_TW.js +178 -0
  492. data/public/ext-3.0.0/src/state/CookieProvider.js +91 -0
  493. data/public/ext-3.0.0/src/state/Provider.js +127 -0
  494. data/public/ext-3.0.0/src/state/StateManager.js +69 -0
  495. data/public/ext-3.0.0/src/util/CSS.js +161 -0
  496. data/public/ext-3.0.0/src/util/ClickRepeater.js +200 -0
  497. data/public/ext-3.0.0/src/util/Cookies.js +96 -0
  498. data/public/ext-3.0.0/src/util/Date.js +1317 -0
  499. data/public/ext-3.0.0/src/util/Format.js +356 -0
  500. data/public/ext-3.0.0/src/util/History.js +203 -0
  501. data/public/ext-3.0.0/src/util/KeyMap.js +242 -0
  502. data/public/ext-3.0.0/src/util/KeyNav.js +161 -0
  503. data/public/ext-3.0.0/src/util/MixedCollection.js +576 -0
  504. data/public/ext-3.0.0/src/util/Observable-more.js +178 -0
  505. data/public/ext-3.0.0/src/util/TextMetrics.js +131 -0
  506. data/public/ext-3.0.0/src/util/UpdateManager.js +536 -0
  507. data/public/ext-3.0.0/src/util/XTemplate.js +379 -0
  508. data/public/ext-3.0.0/src/util/core/DelayedTask.js +68 -0
  509. data/public/ext-3.0.0/src/util/core/JSON.js +174 -0
  510. data/public/ext-3.0.0/src/util/core/Observable.js +483 -0
  511. data/public/ext-3.0.0/src/util/core/TaskMgr.js +174 -0
  512. data/public/ext-3.0.0/src/widgets/Action.js +252 -0
  513. data/public/ext-3.0.0/src/widgets/BoxComponent.js +519 -0
  514. data/public/ext-3.0.0/src/widgets/Button.js +762 -0
  515. data/public/ext-3.0.0/src/widgets/ButtonGroup.js +103 -0
  516. data/public/ext-3.0.0/src/widgets/ColorPalette.js +148 -0
  517. data/public/ext-3.0.0/src/widgets/Component.js +1540 -0
  518. data/public/ext-3.0.0/src/widgets/ComponentMgr.js +159 -0
  519. data/public/ext-3.0.0/src/widgets/Container.js +894 -0
  520. data/public/ext-3.0.0/src/widgets/CycleButton.js +188 -0
  521. data/public/ext-3.0.0/src/widgets/DataView.js +749 -0
  522. data/public/ext-3.0.0/src/widgets/DatePicker.js +771 -0
  523. data/public/ext-3.0.0/src/widgets/Editor.js +385 -0
  524. data/public/ext-3.0.0/src/widgets/Layer.js +466 -0
  525. data/public/ext-3.0.0/src/widgets/LoadMask.js +123 -0
  526. data/public/ext-3.0.0/src/widgets/MessageBox.js +626 -0
  527. data/public/ext-3.0.0/src/widgets/PagingToolbar.js +502 -0
  528. data/public/ext-3.0.0/src/widgets/Panel.js +1772 -0
  529. data/public/ext-3.0.0/src/widgets/PanelDD.js +154 -0
  530. data/public/ext-3.0.0/src/widgets/ProgressBar.js +289 -0
  531. data/public/ext-3.0.0/src/widgets/Resizable.js +760 -0
  532. data/public/ext-3.0.0/src/widgets/Shadow.js +192 -0
  533. data/public/ext-3.0.0/src/widgets/Slider.js +426 -0
  534. data/public/ext-3.0.0/src/widgets/SplitBar.js +436 -0
  535. data/public/ext-3.0.0/src/widgets/SplitButton.js +124 -0
  536. data/public/ext-3.0.0/src/widgets/TabPanel.js +1100 -0
  537. data/public/ext-3.0.0/src/widgets/Toolbar.js +781 -0
  538. data/public/ext-3.0.0/src/widgets/Viewport.js +124 -0
  539. data/public/ext-3.0.0/src/widgets/Window.js +941 -0
  540. data/public/ext-3.0.0/src/widgets/WindowManager.js +187 -0
  541. data/public/ext-3.0.0/src/widgets/chart/Chart.js +721 -0
  542. data/public/ext-3.0.0/src/widgets/chart/EventProxy.js +20 -0
  543. data/public/ext-3.0.0/src/widgets/chart/FlashComponent.js +117 -0
  544. data/public/ext-3.0.0/src/widgets/chart/swfobject.js +783 -0
  545. data/public/ext-3.0.0/src/widgets/form/Action.js +626 -0
  546. data/public/ext-3.0.0/src/widgets/form/BasicForm.js +735 -0
  547. data/public/ext-3.0.0/src/widgets/form/Checkbox.js +177 -0
  548. data/public/ext-3.0.0/src/widgets/form/CheckboxGroup.js +419 -0
  549. data/public/ext-3.0.0/src/widgets/form/Combo.js +1232 -0
  550. data/public/ext-3.0.0/src/widgets/form/DateField.js +389 -0
  551. data/public/ext-3.0.0/src/widgets/form/DisplayField.js +98 -0
  552. data/public/ext-3.0.0/src/widgets/form/Field.js +640 -0
  553. data/public/ext-3.0.0/src/widgets/form/FieldSet.js +305 -0
  554. data/public/ext-3.0.0/src/widgets/form/Form.js +335 -0
  555. data/public/ext-3.0.0/src/widgets/form/Hidden.js +39 -0
  556. data/public/ext-3.0.0/src/widgets/form/HtmlEditor.js +1179 -0
  557. data/public/ext-3.0.0/src/widgets/form/Label.js +64 -0
  558. data/public/ext-3.0.0/src/widgets/form/NumberField.js +139 -0
  559. data/public/ext-3.0.0/src/widgets/form/Radio.js +81 -0
  560. data/public/ext-3.0.0/src/widgets/form/RadioGroup.js +116 -0
  561. data/public/ext-3.0.0/src/widgets/form/TextArea.js +117 -0
  562. data/public/ext-3.0.0/src/widgets/form/TextField.js +491 -0
  563. data/public/ext-3.0.0/src/widgets/form/TimeField.js +146 -0
  564. data/public/ext-3.0.0/src/widgets/form/TriggerField.js +328 -0
  565. data/public/ext-3.0.0/src/widgets/form/VTypes.js +135 -0
  566. data/public/ext-3.0.0/src/widgets/grid/AbstractSelectionModel.js +57 -0
  567. data/public/ext-3.0.0/src/widgets/grid/CellSelectionModel.js +262 -0
  568. data/public/ext-3.0.0/src/widgets/grid/CheckboxSelectionModel.js +103 -0
  569. data/public/ext-3.0.0/src/widgets/grid/Column.js +406 -0
  570. data/public/ext-3.0.0/src/widgets/grid/ColumnDD.js +199 -0
  571. data/public/ext-3.0.0/src/widgets/grid/ColumnModel.js +592 -0
  572. data/public/ext-3.0.0/src/widgets/grid/ColumnSplitDD.js +62 -0
  573. data/public/ext-3.0.0/src/widgets/grid/EditorGrid.js +291 -0
  574. data/public/ext-3.0.0/src/widgets/grid/GridDD.js +95 -0
  575. data/public/ext-3.0.0/src/widgets/grid/GridEditor.js +21 -0
  576. data/public/ext-3.0.0/src/widgets/grid/GridPanel.js +952 -0
  577. data/public/ext-3.0.0/src/widgets/grid/GridView.js +1776 -0
  578. data/public/ext-3.0.0/src/widgets/grid/GroupingView.js +517 -0
  579. data/public/ext-3.0.0/src/widgets/grid/PropertyGrid.js +370 -0
  580. data/public/ext-3.0.0/src/widgets/grid/RowNumberer.js +61 -0
  581. data/public/ext-3.0.0/src/widgets/grid/RowSelectionModel.js +530 -0
  582. data/public/ext-3.0.0/src/widgets/layout/AbsoluteLayout.js +82 -0
  583. data/public/ext-3.0.0/src/widgets/layout/AccordionLayout.js +177 -0
  584. data/public/ext-3.0.0/src/widgets/layout/AnchorLayout.js +200 -0
  585. data/public/ext-3.0.0/src/widgets/layout/BorderLayout.js +1108 -0
  586. data/public/ext-3.0.0/src/widgets/layout/BoxLayout.js +417 -0
  587. data/public/ext-3.0.0/src/widgets/layout/CardLayout.js +127 -0
  588. data/public/ext-3.0.0/src/widgets/layout/ColumnLayout.js +130 -0
  589. data/public/ext-3.0.0/src/widgets/layout/ContainerLayout.js +215 -0
  590. data/public/ext-3.0.0/src/widgets/layout/FitLayout.js +48 -0
  591. data/public/ext-3.0.0/src/widgets/layout/FormLayout.js +266 -0
  592. data/public/ext-3.0.0/src/widgets/layout/TableLayout.js +194 -0
  593. data/public/ext-3.0.0/src/widgets/list/ColumnResizer.js +123 -0
  594. data/public/ext-3.0.0/src/widgets/list/ListView.js +357 -0
  595. data/public/ext-3.0.0/src/widgets/list/Sorter.js +70 -0
  596. data/public/ext-3.0.0/src/widgets/menu/BaseItem.js +160 -0
  597. data/public/ext-3.0.0/src/widgets/menu/CheckItem.js +114 -0
  598. data/public/ext-3.0.0/src/widgets/menu/ColorMenu.js +72 -0
  599. data/public/ext-3.0.0/src/widgets/menu/DateMenu.js +90 -0
  600. data/public/ext-3.0.0/src/widgets/menu/Item.js +211 -0
  601. data/public/ext-3.0.0/src/widgets/menu/Menu.js +733 -0
  602. data/public/ext-3.0.0/src/widgets/menu/MenuMgr.js +211 -0
  603. data/public/ext-3.0.0/src/widgets/menu/Separator.js +46 -0
  604. data/public/ext-3.0.0/src/widgets/menu/TextItem.js +46 -0
  605. data/public/ext-3.0.0/src/widgets/tips/QuickTip.js +207 -0
  606. data/public/ext-3.0.0/src/widgets/tips/QuickTips.js +159 -0
  607. data/public/ext-3.0.0/src/widgets/tips/Tip.js +157 -0
  608. data/public/ext-3.0.0/src/widgets/tips/ToolTip.js +492 -0
  609. data/public/ext-3.0.0/src/widgets/tree/AsyncTreeNode.js +114 -0
  610. data/public/ext-3.0.0/src/widgets/tree/TreeDragZone.js +82 -0
  611. data/public/ext-3.0.0/src/widgets/tree/TreeDropZone.js +321 -0
  612. data/public/ext-3.0.0/src/widgets/tree/TreeEditor.js +160 -0
  613. data/public/ext-3.0.0/src/widgets/tree/TreeEventModel.js +169 -0
  614. data/public/ext-3.0.0/src/widgets/tree/TreeFilter.js +114 -0
  615. data/public/ext-3.0.0/src/widgets/tree/TreeLoader.js +342 -0
  616. data/public/ext-3.0.0/src/widgets/tree/TreeNode.js +546 -0
  617. data/public/ext-3.0.0/src/widgets/tree/TreeNodeUI.js +633 -0
  618. data/public/ext-3.0.0/src/widgets/tree/TreePanel.js +918 -0
  619. data/public/ext-3.0.0/src/widgets/tree/TreeSelectionModel.js +315 -0
  620. data/public/ext-3.0.0/src/widgets/tree/TreeSorter.js +106 -0
  621. data/public/js/ext-portal.js +235 -0
  622. data/public/js/global.js +7 -0
  623. data/public/js/outerframe.js +47 -0
  624. data/public/js/portal.js +713 -0
  625. data/public/js/test_chart.js +152 -0
  626. data/test/config.rb +62 -0
  627. data/test/config/hosts.yaml +5 -0
  628. data/test/config/log.yaml +1 -0
  629. data/test/config/memcache.yaml +5 -0
  630. data/test/exception.rb +39 -0
  631. data/test/method_missing.rb +14 -0
  632. data/test/module.rb +39 -0
  633. data/test/remote_lmp.rb +126 -0
  634. data/test/sinatra.rb +29 -0
  635. data/test/sinatra_base.rb +16 -0
  636. metadata +690 -0
@@ -0,0 +1,91 @@
1
+ /*!
2
+ * Ext JS Library 3.0.0
3
+ * Copyright(c) 2006-2009 Ext JS, LLC
4
+ * licensing@extjs.com
5
+ * http://www.extjs.com/license
6
+ */
7
+
8
+ /**
9
+ * @class Ext.data.SortTypes
10
+ * @singleton
11
+ * Defines the default sorting (casting?) comparison functions used when sorting data.
12
+ */
13
+ Ext.data.SortTypes = {
14
+ /**
15
+ * Default sort that does nothing
16
+ * @param {Mixed} s The value being converted
17
+ * @return {Mixed} The comparison value
18
+ */
19
+ none : function(s){
20
+ return s;
21
+ },
22
+
23
+ /**
24
+ * The regular expression used to strip tags
25
+ * @type {RegExp}
26
+ * @property
27
+ */
28
+ stripTagsRE : /<\/?[^>]+>/gi,
29
+
30
+ /**
31
+ * Strips all HTML tags to sort on text only
32
+ * @param {Mixed} s The value being converted
33
+ * @return {String} The comparison value
34
+ */
35
+ asText : function(s){
36
+ return String(s).replace(this.stripTagsRE, "");
37
+ },
38
+
39
+ /**
40
+ * Strips all HTML tags to sort on text only - Case insensitive
41
+ * @param {Mixed} s The value being converted
42
+ * @return {String} The comparison value
43
+ */
44
+ asUCText : function(s){
45
+ return String(s).toUpperCase().replace(this.stripTagsRE, "");
46
+ },
47
+
48
+ /**
49
+ * Case insensitive string
50
+ * @param {Mixed} s The value being converted
51
+ * @return {String} The comparison value
52
+ */
53
+ asUCString : function(s) {
54
+ return String(s).toUpperCase();
55
+ },
56
+
57
+ /**
58
+ * Date sorting
59
+ * @param {Mixed} s The value being converted
60
+ * @return {Number} The comparison value
61
+ */
62
+ asDate : function(s) {
63
+ if(!s){
64
+ return 0;
65
+ }
66
+ if(Ext.isDate(s)){
67
+ return s.getTime();
68
+ }
69
+ return Date.parse(String(s));
70
+ },
71
+
72
+ /**
73
+ * Float sorting
74
+ * @param {Mixed} s The value being converted
75
+ * @return {Float} The comparison value
76
+ */
77
+ asFloat : function(s) {
78
+ var val = parseFloat(String(s).replace(/,/g, ""));
79
+ return isNaN(val) ? 0 : val;
80
+ },
81
+
82
+ /**
83
+ * Integer sorting
84
+ * @param {Mixed} s The value being converted
85
+ * @return {Number} The comparison value
86
+ */
87
+ asInt : function(s) {
88
+ var val = parseInt(String(s).replace(/,/g, ""), 10);
89
+ return isNaN(val) ? 0 : val;
90
+ }
91
+ };
@@ -0,0 +1,1492 @@
1
+ /*!
2
+ * Ext JS Library 3.0.0
3
+ * Copyright(c) 2006-2009 Ext JS, LLC
4
+ * licensing@extjs.com
5
+ * http://www.extjs.com/license
6
+ */
7
+ /**
8
+ * @class Ext.data.Store
9
+ * @extends Ext.util.Observable
10
+ * <p>The Store class encapsulates a client side cache of {@link Ext.data.Record Record}
11
+ * objects which provide input data for Components such as the {@link Ext.grid.GridPanel GridPanel},
12
+ * the {@link Ext.form.ComboBox ComboBox}, or the {@link Ext.DataView DataView}.</p>
13
+ * <p><u>Retrieving Data</u></p>
14
+ * <p>A Store object may access a data object using:<div class="mdetail-params"><ul>
15
+ * <li>{@link #proxy configured implementation} of {@link Ext.data.DataProxy DataProxy}</li>
16
+ * <li>{@link #data} to automatically pass in data</li>
17
+ * <li>{@link #loadData} to manually pass in data</li>
18
+ * </ul></div></p>
19
+ * <p><u>Reading Data</u></p>
20
+ * <p>A Store object has no inherent knowledge of the format of the data object (it could be
21
+ * an Array, XML, or JSON). A Store object uses an appropriate {@link #reader configured implementation}
22
+ * of a {@link Ext.data.DataReader DataReader} to create {@link Ext.data.Record Record} instances from the data
23
+ * object.</p>
24
+ * <p><u>Store Types</u></p>
25
+ * <p>There are several implementations of Store available which are customized for use with
26
+ * a specific DataReader implementation. Here is an example using an ArrayStore which implicitly
27
+ * creates a reader commensurate to an Array data object.</p>
28
+ * <pre><code>
29
+ var myStore = new Ext.data.ArrayStore({
30
+ fields: ['fullname', 'first'],
31
+ idIndex: 0 // id for each record will be the first element
32
+ });
33
+ * </code></pre>
34
+ * <p>For custom implementations create a basic {@link Ext.data.Store} configured as needed:</p>
35
+ * <pre><code>
36
+ // create a {@link Ext.data.Record Record} constructor:
37
+ var rt = Ext.data.Record.create([
38
+ {name: 'fullname'},
39
+ {name: 'first'}
40
+ ]);
41
+ var myStore = new Ext.data.Store({
42
+ // explicitly create reader
43
+ reader: new Ext.data.ArrayReader(
44
+ {
45
+ idIndex: 0 // id for each record will be the first element
46
+ },
47
+ rt // recordType
48
+ )
49
+ });
50
+ * </code></pre>
51
+ * <p>Load some data into store (note the data object is an array which corresponds to the reader):</p>
52
+ * <pre><code>
53
+ var myData = [
54
+ [1, 'Fred Flintstone', 'Fred'], // note that id for the record is the first element
55
+ [2, 'Barney Rubble', 'Barney']
56
+ ];
57
+ myStore.loadData(myData);
58
+ * </code></pre>
59
+ * <p>Records are cached and made available through accessor functions. An example of adding
60
+ * a record to the store:</p>
61
+ * <pre><code>
62
+ var defaultData = {
63
+ fullname: 'Full Name',
64
+ first: 'First Name'
65
+ };
66
+ var recId = 100; // provide unique id for the record
67
+ var r = new myStore.recordType(defaultData, ++recId); // create new record
68
+ myStore.{@link #insert}(0, r); // insert a new record into the store (also see {@link #add})
69
+ * </code></pre>
70
+ * @constructor
71
+ * Creates a new Store.
72
+ * @param {Object} config A config object containing the objects needed for the Store to access data,
73
+ * and read the data into Records.
74
+ * @xtype store
75
+ */
76
+ Ext.data.Store = function(config){
77
+ this.data = new Ext.util.MixedCollection(false);
78
+ this.data.getKey = function(o){
79
+ return o.id;
80
+ };
81
+ /**
82
+ * See the <code>{@link #baseParams corresponding configuration option}</code>
83
+ * for a description of this property.
84
+ * To modify this property see <code>{@link #setBaseParam}</code>.
85
+ * @property
86
+ */
87
+ this.baseParams = {};
88
+
89
+ // temporary removed-records cache
90
+ this.removed = [];
91
+
92
+ if(config && config.data){
93
+ this.inlineData = config.data;
94
+ delete config.data;
95
+ }
96
+
97
+ Ext.apply(this, config);
98
+
99
+ this.paramNames = Ext.applyIf(this.paramNames || {}, this.defaultParamNames);
100
+
101
+ if(this.url && !this.proxy){
102
+ this.proxy = new Ext.data.HttpProxy({url: this.url});
103
+ }
104
+ // If Store is RESTful, so too is the DataProxy
105
+ if (this.restful === true && this.proxy) {
106
+ // When operating RESTfully, a unique transaction is generated for each record.
107
+ this.batch = false;
108
+ Ext.data.Api.restify(this.proxy);
109
+ }
110
+
111
+ if(this.reader){ // reader passed
112
+ if(!this.recordType){
113
+ this.recordType = this.reader.recordType;
114
+ }
115
+ if(this.reader.onMetaChange){
116
+ this.reader.onMetaChange = this.onMetaChange.createDelegate(this);
117
+ }
118
+ if (this.writer) { // writer passed
119
+ this.writer.meta = this.reader.meta;
120
+ this.pruneModifiedRecords = true;
121
+ }
122
+ }
123
+
124
+ /**
125
+ * The {@link Ext.data.Record Record} constructor as supplied to (or created by) the
126
+ * {@link Ext.data.DataReader Reader}. Read-only.
127
+ * <p>If the Reader was constructed by passing in an Array of {@link Ext.data.Field} definition objects,
128
+ * instead of a Record constructor, it will implicitly create a Record constructor from that Array (see
129
+ * {@link Ext.data.Record}.{@link Ext.data.Record#create create} for additional details).</p>
130
+ * <p>This property may be used to create new Records of the type held in this Store, for example:</p><pre><code>
131
+ // create the data store
132
+ var store = new Ext.data.ArrayStore({
133
+ autoDestroy: true,
134
+ fields: [
135
+ {name: 'company'},
136
+ {name: 'price', type: 'float'},
137
+ {name: 'change', type: 'float'},
138
+ {name: 'pctChange', type: 'float'},
139
+ {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
140
+ ]
141
+ });
142
+ store.loadData(myData);
143
+
144
+ // create the Grid
145
+ var grid = new Ext.grid.EditorGridPanel({
146
+ store: store,
147
+ colModel: new Ext.grid.ColumnModel({
148
+ columns: [
149
+ {id:'company', header: 'Company', width: 160, dataIndex: 'company'},
150
+ {header: 'Price', renderer: 'usMoney', dataIndex: 'price'},
151
+ {header: 'Change', renderer: change, dataIndex: 'change'},
152
+ {header: '% Change', renderer: pctChange, dataIndex: 'pctChange'},
153
+ {header: 'Last Updated', width: 85,
154
+ renderer: Ext.util.Format.dateRenderer('m/d/Y'),
155
+ dataIndex: 'lastChange'}
156
+ ],
157
+ defaults: {
158
+ sortable: true,
159
+ width: 75
160
+ }
161
+ }),
162
+ autoExpandColumn: 'company', // match the id specified in the column model
163
+ height:350,
164
+ width:600,
165
+ title:'Array Grid',
166
+ tbar: [{
167
+ text: 'Add Record',
168
+ handler : function(){
169
+ var defaultData = {
170
+ change: 0,
171
+ company: 'New Company',
172
+ lastChange: (new Date()).clearTime(),
173
+ pctChange: 0,
174
+ price: 10
175
+ };
176
+ var recId = 3; // provide unique id
177
+ var p = new store.recordType(defaultData, recId); // create new record
178
+ grid.stopEditing();
179
+ store.{@link #insert}(0, p); // insert a new record into the store (also see {@link #add})
180
+ grid.startEditing(0, 0);
181
+ }
182
+ }]
183
+ });
184
+ * </code></pre>
185
+ * @property recordType
186
+ * @type Function
187
+ */
188
+
189
+ if(this.recordType){
190
+ /**
191
+ * A {@link Ext.util.MixedCollection MixedCollection} containing the defined {@link Ext.data.Field Field}s
192
+ * for the {@link Ext.data.Record Records} stored in this Store. Read-only.
193
+ * @property fields
194
+ * @type Ext.util.MixedCollection
195
+ */
196
+ this.fields = this.recordType.prototype.fields;
197
+ }
198
+ this.modified = [];
199
+
200
+ this.addEvents(
201
+ /**
202
+ * @event datachanged
203
+ * Fires when the data cache has changed in a bulk manner (e.g., it has been sorted, filtered, etc.) and a
204
+ * widget that is using this Store as a Record cache should refresh its view.
205
+ * @param {Store} this
206
+ */
207
+ 'datachanged',
208
+ /**
209
+ * @event metachange
210
+ * Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders.
211
+ * @param {Store} this
212
+ * @param {Object} meta The JSON metadata
213
+ */
214
+ 'metachange',
215
+ /**
216
+ * @event add
217
+ * Fires when Records have been {@link #add}ed to the Store
218
+ * @param {Store} this
219
+ * @param {Ext.data.Record[]} records The array of Records added
220
+ * @param {Number} index The index at which the record(s) were added
221
+ */
222
+ 'add',
223
+ /**
224
+ * @event remove
225
+ * Fires when a Record has been {@link #remove}d from the Store
226
+ * @param {Store} this
227
+ * @param {Ext.data.Record} record The Record that was removed
228
+ * @param {Number} index The index at which the record was removed
229
+ */
230
+ 'remove',
231
+ /**
232
+ * @event update
233
+ * Fires when a Record has been updated
234
+ * @param {Store} this
235
+ * @param {Ext.data.Record} record The Record that was updated
236
+ * @param {String} operation The update operation being performed. Value may be one of:
237
+ * <pre><code>
238
+ Ext.data.Record.EDIT
239
+ Ext.data.Record.REJECT
240
+ Ext.data.Record.COMMIT
241
+ * </code></pre>
242
+ */
243
+ 'update',
244
+ /**
245
+ * @event clear
246
+ * Fires when the data cache has been cleared.
247
+ * @param {Store} this
248
+ */
249
+ 'clear',
250
+ /**
251
+ * @event exception
252
+ * <p>Fires if an exception occurs in the Proxy during a remote request.
253
+ * This event is relayed through the corresponding {@link Ext.data.DataProxy}.
254
+ * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
255
+ * for additional details.
256
+ * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#exception exception}
257
+ * for description.
258
+ */
259
+ 'exception',
260
+ /**
261
+ * @event beforeload
262
+ * Fires before a request is made for a new data object. If the beforeload handler returns
263
+ * <tt>false</tt> the {@link #load} action will be canceled.
264
+ * @param {Store} this
265
+ * @param {Object} options The loading options that were specified (see {@link #load} for details)
266
+ */
267
+ 'beforeload',
268
+ /**
269
+ * @event load
270
+ * Fires after a new set of Records has been loaded.
271
+ * @param {Store} this
272
+ * @param {Ext.data.Record[]} records The Records that were loaded
273
+ * @param {Object} options The loading options that were specified (see {@link #load} for details)
274
+ */
275
+ 'load',
276
+ /**
277
+ * @event loadexception
278
+ * <p>This event is <b>deprecated</b> in favor of the catch-all <b><code>{@link #exception}</code></b>
279
+ * event instead.</p>
280
+ * <p>This event is relayed through the corresponding {@link Ext.data.DataProxy}.
281
+ * See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception}
282
+ * for additional details.
283
+ * @param {misc} misc See {@link Ext.data.DataProxy}.{@link Ext.data.DataProxy#loadexception loadexception}
284
+ * for description.
285
+ */
286
+ 'loadexception',
287
+ /**
288
+ * @event beforewrite
289
+ * @param {DataProxy} this
290
+ * @param {String} action [Ext.data.Api.actions.create|update|destroy]
291
+ * @param {Record/Array[Record]} rs
292
+ * @param {Object} options The loading options that were specified. Edit <code>options.params</code> to add Http parameters to the request. (see {@link #save} for details)
293
+ * @param {Object} arg The callback's arg object passed to the {@link #request} function
294
+ */
295
+ 'beforewrite',
296
+ /**
297
+ * @event write
298
+ * Fires if the server returns 200 after an Ext.data.Api.actions CRUD action.
299
+ * Success or failure of the action is available in the <code>result['successProperty']</code> property.
300
+ * The server-code might set the <code>successProperty</code> to <tt>false</tt> if a database validation
301
+ * failed, for example.
302
+ * @param {Ext.data.Store} store
303
+ * @param {String} action [Ext.data.Api.actions.create|update|destroy]
304
+ * @param {Object} result The 'data' picked-out out of the response for convenience.
305
+ * @param {Ext.Direct.Transaction} res
306
+ * @param {Record/Record[]} rs Store's records, the subject(s) of the write-action
307
+ */
308
+ 'write'
309
+ );
310
+
311
+ if(this.proxy){
312
+ this.relayEvents(this.proxy, ['loadexception', 'exception']);
313
+ }
314
+ // With a writer set for the Store, we want to listen to add/remove events to remotely create/destroy records.
315
+ if (this.writer) {
316
+ this.on({
317
+ scope: this,
318
+ add: this.createRecords,
319
+ remove: this.destroyRecord,
320
+ update: this.updateRecord
321
+ });
322
+ }
323
+
324
+ this.sortToggle = {};
325
+ if(this.sortField){
326
+ this.setDefaultSort(this.sortField, this.sortDir);
327
+ }else if(this.sortInfo){
328
+ this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction);
329
+ }
330
+
331
+ Ext.data.Store.superclass.constructor.call(this);
332
+
333
+ if(this.id){
334
+ this.storeId = this.id;
335
+ delete this.id;
336
+ }
337
+ if(this.storeId){
338
+ Ext.StoreMgr.register(this);
339
+ }
340
+ if(this.inlineData){
341
+ this.loadData(this.inlineData);
342
+ delete this.inlineData;
343
+ }else if(this.autoLoad){
344
+ this.load.defer(10, this, [
345
+ typeof this.autoLoad == 'object' ?
346
+ this.autoLoad : undefined]);
347
+ }
348
+ };
349
+ Ext.extend(Ext.data.Store, Ext.util.Observable, {
350
+ /**
351
+ * @cfg {String} storeId If passed, the id to use to register with the <b>{@link Ext.StoreMgr StoreMgr}</b>.
352
+ * <p><b>Note</b>: if a (deprecated) <tt>{@link #id}</tt> is specified it will supersede the <tt>storeId</tt>
353
+ * assignment.</p>
354
+ */
355
+ /**
356
+ * @cfg {String} url If a <tt>{@link #proxy}</tt> is not specified the <tt>url</tt> will be used to
357
+ * implicitly configure a {@link Ext.data.HttpProxy HttpProxy} if an <tt>url</tt> is specified.
358
+ * Typically this option, or the <code>{@link #data}</code> option will be specified.
359
+ */
360
+ /**
361
+ * @cfg {Boolean/Object} autoLoad If <tt>{@link #data}</tt> is not specified, and if <tt>autoLoad</tt>
362
+ * is <tt>true</tt> or an <tt>Object</tt>, this store's {@link #load} method is automatically called
363
+ * after creation. If the value of <tt>autoLoad</tt> is an <tt>Object</tt>, this <tt>Object</tt> will
364
+ * be passed to the store's {@link #load} method.
365
+ */
366
+ /**
367
+ * @cfg {Ext.data.DataProxy} proxy The {@link Ext.data.DataProxy DataProxy} object which provides
368
+ * access to a data object. See <code>{@link #url}</code>.
369
+ */
370
+ /**
371
+ * @cfg {Array} data An inline data object readable by the <code>{@link #reader}</code>.
372
+ * Typically this option, or the <code>{@link #url}</code> option will be specified.
373
+ */
374
+ /**
375
+ * @cfg {Ext.data.DataReader} reader The {@link Ext.data.DataReader Reader} object which processes the
376
+ * data object and returns an Array of {@link Ext.data.Record} objects which are cached keyed by their
377
+ * <b><tt>{@link Ext.data.Record#id id}</tt></b> property.
378
+ */
379
+ /**
380
+ * @cfg {Ext.data.DataWriter} writer
381
+ * <p>The {@link Ext.data.DataWriter Writer} object which processes a record object for being written
382
+ * to the server-side database.</p>
383
+ * <br><p>When a writer is installed into a Store the {@link #add}, {@link #remove}, and {@link #update}
384
+ * events on the store are monitored in order to remotely {@link #createRecords create records},
385
+ * {@link #destroyRecord destroy records}, or {@link #updateRecord update records}.</p>
386
+ * <br><p>The proxy for this store will relay any {@link #writexception} events to this store.</p>
387
+ * <br><p>Sample implementation:
388
+ * <pre><code>
389
+ var writer = new {@link Ext.data.JsonWriter}({
390
+ encode: true,
391
+ writeAllFields: true // write all fields, not just those that changed
392
+ });
393
+
394
+ // Typical Store collecting the Proxy, Reader and Writer together.
395
+ var store = new Ext.data.Store({
396
+ storeId: 'user',
397
+ root: 'records',
398
+ proxy: proxy,
399
+ reader: reader,
400
+ writer: writer, // <-- plug a DataWriter into the store just as you would a Reader
401
+ paramsAsHash: true,
402
+ autoSave: false // <-- false to delay executing create, update, destroy requests
403
+ // until specifically told to do so.
404
+ });
405
+ * </code></pre></p>
406
+ */
407
+ writer : undefined,
408
+ /**
409
+ * @cfg {Object} baseParams
410
+ * <p>An object containing properties which are to be sent as parameters
411
+ * for <i>every</i> HTTP request.</p>
412
+ * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p>
413
+ * <p><b>Note</b>: <code>baseParams</code> may be superseded by any <code>params</code>
414
+ * specified in a <code>{@link #load}</code> request, see <code>{@link #load}</code>
415
+ * for more details.</p>
416
+ * This property may be modified after creation using the <code>{@link #setBaseParam}</code>
417
+ * method.
418
+ * @property
419
+ */
420
+ /**
421
+ * @cfg {Object} sortInfo A config object to specify the sort order in the request of a Store's
422
+ * {@link #load} operation. Note that for local sorting, the <tt>direction</tt> property is
423
+ * case-sensitive. See also {@link #remoteSort} and {@link #paramNames}.
424
+ * For example:<pre><code>
425
+ sortInfo: {
426
+ field: 'fieldName',
427
+ direction: 'ASC' // or 'DESC' (case sensitive for local sorting)
428
+ }
429
+ </code></pre>
430
+ */
431
+ /**
432
+ * @cfg {boolean} remoteSort <tt>true</tt> if sorting is to be handled by requesting the <tt>{@link #proxy Proxy}</tt>
433
+ * to provide a refreshed version of the data object in sorted order, as opposed to sorting the Record cache
434
+ * in place (defaults to <tt>false</tt>).
435
+ * <p>If <tt>remoteSort</tt> is <tt>true</tt>, then clicking on a {@link Ext.grid.Column Grid Column}'s
436
+ * {@link Ext.grid.Column#header header} causes the current page to be requested from the server appending
437
+ * the following two parameters to the <b><tt>{@link #load params}</tt></b>:<div class="mdetail-params"><ul>
438
+ * <li><b><tt>sort</tt></b> : String<p class="sub-desc">The <tt>name</tt> (as specified in the Record's
439
+ * {@link Ext.data.Field Field definition}) of the field to sort on.</p></li>
440
+ * <li><b><tt>dir</tt></b> : String<p class="sub-desc">The direction of the sort, 'ASC' or 'DESC' (case-sensitive).</p></li>
441
+ * </ul></div></p>
442
+ */
443
+ remoteSort : false,
444
+
445
+ /**
446
+ * @cfg {Boolean} autoDestroy <tt>true</tt> to destroy the store when the component the store is bound
447
+ * to is destroyed (defaults to <tt>false</tt>).
448
+ * <p><b>Note</b>: this should be set to true when using stores that are bound to only 1 component.</p>
449
+ */
450
+ autoDestroy : false,
451
+
452
+ /**
453
+ * @cfg {Boolean} pruneModifiedRecords <tt>true</tt> to clear all modified record information each time
454
+ * the store is loaded or when a record is removed (defaults to <tt>false</tt>). See {@link #getModifiedRecords}
455
+ * for the accessor method to retrieve the modified records.
456
+ */
457
+ pruneModifiedRecords : false,
458
+
459
+ /**
460
+ * Contains the last options object used as the parameter to the {@link #load} method. See {@link #load}
461
+ * for the details of what this may contain. This may be useful for accessing any params which were used
462
+ * to load the current Record cache.
463
+ * @property
464
+ */
465
+ lastOptions : null,
466
+
467
+ /**
468
+ * @cfg {Boolean} autoSave
469
+ * <p>Defaults to <tt>true</tt> causing the store to automatically {@link #save} records to
470
+ * the server when a record is modified (ie: becomes 'dirty'). Specify <tt>false</tt> to manually call {@link #save}
471
+ * to send all modifiedRecords to the server.</p>
472
+ * <br><p><b>Note</b>: each CRUD action will be sent as a separate request.</p>
473
+ */
474
+ autoSave : true,
475
+
476
+ /**
477
+ * @cfg {Boolean} batch
478
+ * <p>Defaults to <tt>true</tt> (unless <code>{@link #restful}:true</code>). Multiple
479
+ * requests for each CRUD action (CREATE, READ, UPDATE and DESTROY) will be combined
480
+ * and sent as one transaction. Only applies when <code>{@link #autoSave}</code> is set
481
+ * to <tt>false</tt>.</p>
482
+ * <br><p>If Store is RESTful, the DataProxy is also RESTful, and a unique transaction is
483
+ * generated for each record.</p>
484
+ */
485
+ batch : true,
486
+
487
+ /**
488
+ * @cfg {Boolean} restful
489
+ * Defaults to <tt>false</tt>. Set to <tt>true</tt> to have the Store and the set
490
+ * Proxy operate in a RESTful manner. The store will automatically generate GET, POST,
491
+ * PUT and DELETE requests to the server. The HTTP method used for any given CRUD
492
+ * action is described in {@link Ext.data.Api#restActions}. For additional information
493
+ * see {@link Ext.data.DataProxy#restful}.
494
+ * <p><b>Note</b>: if <code>{@link #restful}:true</code> <code>batch</code> will
495
+ * internally be set to <tt>false</tt>.</p>
496
+ */
497
+ restful: false,
498
+
499
+ /**
500
+ * @cfg {Object} paramNames
501
+ * <p>An object containing properties which specify the names of the paging and
502
+ * sorting parameters passed to remote servers when loading blocks of data. By default, this
503
+ * object takes the following form:</p><pre><code>
504
+ {
505
+ start : 'start', // The parameter name which specifies the start row
506
+ limit : 'limit', // The parameter name which specifies number of rows to return
507
+ sort : 'sort', // The parameter name which specifies the column to sort on
508
+ dir : 'dir' // The parameter name which specifies the sort direction
509
+ }
510
+ </code></pre>
511
+ * <p>The server must produce the requested data block upon receipt of these parameter names.
512
+ * If different parameter names are required, this property can be overriden using a configuration
513
+ * property.</p>
514
+ * <p>A {@link Ext.PagingToolbar PagingToolbar} bound to this Store uses this property to determine
515
+ * the parameter names to use in its {@link #load requests}.
516
+ */
517
+ paramNames : undefined,
518
+
519
+ /**
520
+ * @cfg {Object} defaultParamNames
521
+ * Provides the default values for the {@link #paramNames} property. To globally modify the parameters
522
+ * for all stores, this object should be changed on the store prototype.
523
+ */
524
+ defaultParamNames : {
525
+ start : 'start',
526
+ limit : 'limit',
527
+ sort : 'sort',
528
+ dir : 'dir'
529
+ },
530
+
531
+ /**
532
+ * Destroys the store.
533
+ */
534
+ destroy : function(){
535
+ if(this.storeId){
536
+ Ext.StoreMgr.unregister(this);
537
+ }
538
+ this.data = null;
539
+ Ext.destroy(this.proxy);
540
+ this.reader = this.writer = null;
541
+ this.purgeListeners();
542
+ },
543
+
544
+ /**
545
+ * Add Records to the Store and fires the {@link #add} event. To add Records
546
+ * to the store from a remote source use <code>{@link #load}({add:true})</code>.
547
+ * See also <code>{@link #recordType}</code> and <code>{@link #insert}</code>.
548
+ * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects
549
+ * to add to the cache. See {@link #recordType}.
550
+ */
551
+ add : function(records){
552
+ records = [].concat(records);
553
+ if(records.length < 1){
554
+ return;
555
+ }
556
+ for(var i = 0, len = records.length; i < len; i++){
557
+ records[i].join(this);
558
+ }
559
+ var index = this.data.length;
560
+ this.data.addAll(records);
561
+ if(this.snapshot){
562
+ this.snapshot.addAll(records);
563
+ }
564
+ this.fireEvent('add', this, records, index);
565
+ },
566
+
567
+ /**
568
+ * (Local sort only) Inserts the passed Record into the Store at the index where it
569
+ * should go based on the current sort information.
570
+ * @param {Ext.data.Record} record
571
+ */
572
+ addSorted : function(record){
573
+ var index = this.findInsertIndex(record);
574
+ this.insert(index, record);
575
+ },
576
+
577
+ /**
578
+ * Remove a Record from the Store and fires the {@link #remove} event.
579
+ * @param {Ext.data.Record} record The Ext.data.Record object to remove from the cache.
580
+ */
581
+ remove : function(record){
582
+ var index = this.data.indexOf(record);
583
+ if(index > -1){
584
+ this.data.removeAt(index);
585
+ if(this.pruneModifiedRecords){
586
+ this.modified.remove(record);
587
+ }
588
+ if(this.snapshot){
589
+ this.snapshot.remove(record);
590
+ }
591
+ this.fireEvent('remove', this, record, index);
592
+ }
593
+ },
594
+
595
+ /**
596
+ * Remove a Record from the Store at the specified index. Fires the {@link #remove} event.
597
+ * @param {Number} index The index of the record to remove.
598
+ */
599
+ removeAt : function(index){
600
+ this.remove(this.getAt(index));
601
+ },
602
+
603
+ /**
604
+ * Remove all Records from the Store and fires the {@link #clear} event.
605
+ */
606
+ removeAll : function(){
607
+ this.data.clear();
608
+ if(this.snapshot){
609
+ this.snapshot.clear();
610
+ }
611
+ if(this.pruneModifiedRecords){
612
+ this.modified = [];
613
+ }
614
+ this.fireEvent('clear', this);
615
+ },
616
+
617
+ /**
618
+ * Inserts Records into the Store at the given index and fires the {@link #add} event.
619
+ * See also <code>{@link #add}</code> and <code>{@link #addSorted}</code>.
620
+ * @param {Number} index The start index at which to insert the passed Records.
621
+ * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects to add to the cache.
622
+ */
623
+ insert : function(index, records){
624
+ records = [].concat(records);
625
+ for(var i = 0, len = records.length; i < len; i++){
626
+ this.data.insert(index, records[i]);
627
+ records[i].join(this);
628
+ }
629
+ this.fireEvent('add', this, records, index);
630
+ },
631
+
632
+ /**
633
+ * Get the index within the cache of the passed Record.
634
+ * @param {Ext.data.Record} record The Ext.data.Record object to find.
635
+ * @return {Number} The index of the passed Record. Returns -1 if not found.
636
+ */
637
+ indexOf : function(record){
638
+ return this.data.indexOf(record);
639
+ },
640
+
641
+ /**
642
+ * Get the index within the cache of the Record with the passed id.
643
+ * @param {String} id The id of the Record to find.
644
+ * @return {Number} The index of the Record. Returns -1 if not found.
645
+ */
646
+ indexOfId : function(id){
647
+ return this.data.indexOfKey(id);
648
+ },
649
+
650
+ /**
651
+ * Get the Record with the specified id.
652
+ * @param {String} id The id of the Record to find.
653
+ * @return {Ext.data.Record} The Record with the passed id. Returns undefined if not found.
654
+ */
655
+ getById : function(id){
656
+ return this.data.key(id);
657
+ },
658
+
659
+ /**
660
+ * Get the Record at the specified index.
661
+ * @param {Number} index The index of the Record to find.
662
+ * @return {Ext.data.Record} The Record at the passed index. Returns undefined if not found.
663
+ */
664
+ getAt : function(index){
665
+ return this.data.itemAt(index);
666
+ },
667
+
668
+ /**
669
+ * Returns a range of Records between specified indices.
670
+ * @param {Number} startIndex (optional) The starting index (defaults to 0)
671
+ * @param {Number} endIndex (optional) The ending index (defaults to the last Record in the Store)
672
+ * @return {Ext.data.Record[]} An array of Records
673
+ */
674
+ getRange : function(start, end){
675
+ return this.data.getRange(start, end);
676
+ },
677
+
678
+ // private
679
+ storeOptions : function(o){
680
+ o = Ext.apply({}, o);
681
+ delete o.callback;
682
+ delete o.scope;
683
+ this.lastOptions = o;
684
+ },
685
+
686
+ /**
687
+ * <p>Loads the Record cache from the configured <tt>{@link #proxy}</tt> using the configured <tt>{@link #reader}</tt>.</p>
688
+ * <br><p>Notes:</p><div class="mdetail-params"><ul>
689
+ * <li><b><u>Important</u></b>: loading is asynchronous! This call will return before the new data has been
690
+ * loaded. To perform any post-processing where information from the load call is required, specify
691
+ * the <tt>callback</tt> function to be called, or use a {@link Ext.util.Observable#listeners a 'load' event handler}.</li>
692
+ * <li>If using {@link Ext.PagingToolbar remote paging}, the first load call must specify the <tt>start</tt> and <tt>limit</tt>
693
+ * properties in the <code>options.params</code> property to establish the initial position within the
694
+ * dataset, and the number of Records to cache on each read from the Proxy.</li>
695
+ * <li>If using {@link #remoteSort remote sorting}, the configured <code>{@link #sortInfo}</code>
696
+ * will be automatically included with the posted parameters according to the specified
697
+ * <code>{@link #paramNames}</code>.</li>
698
+ * </ul></div>
699
+ * @param {Object} options An object containing properties which control loading options:<ul>
700
+ * <li><b><tt>params</tt></b> :Object<div class="sub-desc"><p>An object containing properties to pass as HTTP
701
+ * parameters to a remote data source. <b>Note</b>: <code>params</code> will override any
702
+ * <code>{@link #baseParams}</code> of the same name.</p>
703
+ * <p>Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode}.</p></div></li>
704
+ * <li><b><tt>callback</tt></b> : Function<div class="sub-desc"><p>A function to be called after the Records
705
+ * have been loaded. The <tt>callback</tt> is called after the load event and is passed the following arguments:<ul>
706
+ * <li><tt>r</tt> : Ext.data.Record[]</li>
707
+ * <li><tt>options</tt>: Options object from the load call</li>
708
+ * <li><tt>success</tt>: Boolean success indicator</li></ul></p></div></li>
709
+ * <li><b><tt>scope</tt></b> : Object<div class="sub-desc"><p>Scope with which to call the callback (defaults
710
+ * to the Store object)</p></div></li>
711
+ * <li><b><tt>add</tt></b> : Boolean<div class="sub-desc"><p>Indicator to append loaded records rather than
712
+ * replace the current cache. <b>Note</b>: see note for <tt>{@link #loadData}</tt></p></div></li>
713
+ * </ul>
714
+ * @return {Boolean} If the <i>developer</i> provided <tt>{@link #beforeload}</tt> event handler returns
715
+ * <tt>false</tt>, the load call will abort and will return <tt>false</tt>; otherwise will return <tt>true</tt>.
716
+ */
717
+ load : function(options) {
718
+ options = options || {};
719
+ this.storeOptions(options);
720
+ if(this.sortInfo && this.remoteSort){
721
+ var pn = this.paramNames;
722
+ options.params = options.params || {};
723
+ options.params[pn.sort] = this.sortInfo.field;
724
+ options.params[pn.dir] = this.sortInfo.direction;
725
+ }
726
+ try {
727
+ return this.execute('read', null, options); // <-- null represents rs. No rs for load actions.
728
+ } catch(e) {
729
+ this.handleException(e);
730
+ return false;
731
+ }
732
+ },
733
+
734
+ /**
735
+ * updateRecord Should not be used directly. This method will be called automatically if a Writer is set.
736
+ * Listens to 'update' event.
737
+ * @param {Object} store
738
+ * @param {Object} record
739
+ * @param {Object} action
740
+ * @private
741
+ */
742
+ updateRecord : function(store, record, action) {
743
+ if (action == Ext.data.Record.EDIT && this.autoSave === true && (!record.phantom || (record.phantom && record.isValid))) {
744
+ this.save();
745
+ }
746
+ },
747
+
748
+ /**
749
+ * Should not be used directly. Store#add will call this automatically if a Writer is set
750
+ * @param {Object} store
751
+ * @param {Object} rs
752
+ * @param {Object} index
753
+ * @private
754
+ */
755
+ createRecords : function(store, rs, index) {
756
+ for (var i = 0, len = rs.length; i < len; i++) {
757
+ if (rs[i].phantom && rs[i].isValid()) {
758
+ rs[i].markDirty(); // <-- Mark new records dirty
759
+ this.modified.push(rs[i]); // <-- add to modified
760
+ }
761
+ }
762
+ if (this.autoSave === true) {
763
+ this.save();
764
+ }
765
+ },
766
+
767
+ /**
768
+ * Destroys a record or records. Should not be used directly. It's called by Store#remove if a Writer is set.
769
+ * @param {Store} this
770
+ * @param {Ext.data.Record/Ext.data.Record[]}
771
+ * @param {Number} index
772
+ * @private
773
+ */
774
+ destroyRecord : function(store, record, index) {
775
+ if (this.modified.indexOf(record) != -1) { // <-- handled already if @cfg pruneModifiedRecords == true
776
+ this.modified.remove(record);
777
+ }
778
+ if (!record.phantom) {
779
+ this.removed.push(record);
780
+
781
+ // since the record has already been removed from the store but the server request has not yet been executed,
782
+ // must keep track of the last known index this record existed. If a server error occurs, the record can be
783
+ // put back into the store. @see Store#createCallback where the record is returned when response status === false
784
+ record.lastIndex = index;
785
+
786
+ if (this.autoSave === true) {
787
+ this.save();
788
+ }
789
+ }
790
+ },
791
+
792
+ /**
793
+ * This method should generally not be used directly. This method is called internally
794
+ * by {@link #load}, or if a Writer is set will be called automatically when {@link #add},
795
+ * {@link #remove}, or {@link #update} events fire.
796
+ * @param {String} action Action name ('read', 'create', 'update', or 'destroy')
797
+ * @param {Record/Record[]} rs
798
+ * @param {Object} options
799
+ * @throws Error
800
+ * @private
801
+ */
802
+ execute : function(action, rs, options) {
803
+ // blow up if action not Ext.data.CREATE, READ, UPDATE, DESTROY
804
+ if (!Ext.data.Api.isAction(action)) {
805
+ throw new Ext.data.Api.Error('execute', action);
806
+ }
807
+ // make sure options has a params key
808
+ options = Ext.applyIf(options||{}, {
809
+ params: {}
810
+ });
811
+
812
+ // have to separate before-events since load has a different signature than create,destroy and save events since load does not
813
+ // include the rs (record resultset) parameter. Capture return values from the beforeaction into doRequest flag.
814
+ var doRequest = true;
815
+
816
+ if (action === 'read') {
817
+ doRequest = this.fireEvent('beforeload', this, options);
818
+ }
819
+ else {
820
+ // if Writer is configured as listful, force single-recoord rs to be [{}} instead of {}
821
+ if (this.writer.listful === true && this.restful !== true) {
822
+ rs = (Ext.isArray(rs)) ? rs : [rs];
823
+ }
824
+ // if rs has just a single record, shift it off so that Writer writes data as '{}' rather than '[{}]'
825
+ else if (Ext.isArray(rs) && rs.length == 1) {
826
+ rs = rs.shift();
827
+ }
828
+ // Write the action to options.params
829
+ if ((doRequest = this.fireEvent('beforewrite', this, action, rs, options)) !== false) {
830
+ this.writer.write(action, options.params, rs);
831
+ }
832
+ }
833
+ if (doRequest !== false) {
834
+ // Send request to proxy.
835
+ var params = Ext.apply({}, options.params, this.baseParams);
836
+ if (this.writer && this.proxy.url && !this.proxy.restful && !Ext.data.Api.hasUniqueUrl(this.proxy, action)) {
837
+ params.xaction = action;
838
+ }
839
+ // Note: Up until this point we've been dealing with 'action' as a key from Ext.data.Api.actions. We'll flip it now
840
+ // and send the value into DataProxy#request, since it's the value which maps to the DataProxy#api
841
+ this.proxy.request(Ext.data.Api.actions[action], rs, params, this.reader, this.createCallback(action, rs), this, options);
842
+ }
843
+ return doRequest;
844
+ },
845
+
846
+ /**
847
+ * Saves all pending changes to the store. If the commensurate Ext.data.Api.actions action is not configured, then
848
+ * the configured <code>{@link #url}</code> will be used.
849
+ * <pre>
850
+ * change url
851
+ * --------------- --------------------
852
+ * removed records Ext.data.Api.actions.destroy
853
+ * phantom records Ext.data.Api.actions.create
854
+ * {@link #getModifiedRecords modified records} Ext.data.Api.actions.update
855
+ * </pre>
856
+ * @TODO: Create extensions of Error class and send associated Record with thrown exceptions.
857
+ * e.g.: Ext.data.DataReader.Error or Ext.data.Error or Ext.data.DataProxy.Error, etc.
858
+ */
859
+ save : function() {
860
+ if (!this.writer) {
861
+ throw new Ext.data.Store.Error('writer-undefined');
862
+ }
863
+
864
+ // DESTROY: First check for removed records. Records in this.removed are guaranteed non-phantoms. @see Store#remove
865
+ if (this.removed.length) {
866
+ this.doTransaction('destroy', this.removed);
867
+ }
868
+
869
+ // Check for modified records. Use a copy so Store#rejectChanges will work if server returns error.
870
+ var rs = [].concat(this.getModifiedRecords());
871
+ if (!rs.length) { // Bail-out if empty...
872
+ return true;
873
+ }
874
+
875
+ // CREATE: Next check for phantoms within rs. splice-off and execute create.
876
+ var phantoms = [];
877
+ for (var i = rs.length-1; i >= 0; i--) {
878
+ if (rs[i].phantom === true) {
879
+ var rec = rs.splice(i, 1).shift();
880
+ if (rec.isValid()) {
881
+ phantoms.push(rec);
882
+ }
883
+ } else if (!rs[i].isValid()) { // <-- while we're here, splice-off any !isValid real records
884
+ rs.splice(i,1);
885
+ }
886
+ }
887
+ // If we have valid phantoms, create them...
888
+ if (phantoms.length) {
889
+ this.doTransaction('create', phantoms);
890
+ }
891
+
892
+ // UPDATE: And finally, if we're still here after splicing-off phantoms and !isValid real records, update the rest...
893
+ if (rs.length) {
894
+ this.doTransaction('update', rs);
895
+ }
896
+ return true;
897
+ },
898
+
899
+ // private. Simply wraps call to Store#execute in try/catch. Defers to Store#handleException on error. Loops if batch: false
900
+ doTransaction : function(action, rs) {
901
+ function transaction(records) {
902
+ try {
903
+ this.execute(action, records);
904
+ } catch (e) {
905
+ this.handleException(e);
906
+ }
907
+ }
908
+ if (this.batch === false) {
909
+ for (var i = 0, len = rs.length; i < len; i++) {
910
+ transaction.call(this, rs[i]);
911
+ }
912
+ } else {
913
+ transaction.call(this, rs);
914
+ }
915
+ },
916
+
917
+ // @private callback-handler for remote CRUD actions
918
+ // Do not override -- override loadRecords, onCreateRecords, onDestroyRecords and onUpdateRecords instead.
919
+ createCallback : function(action, rs) {
920
+ var actions = Ext.data.Api.actions;
921
+ return (action == 'read') ? this.loadRecords : function(data, response, success) {
922
+ // calls: onCreateRecords | onUpdateRecords | onDestroyRecords
923
+ this['on' + Ext.util.Format.capitalize(action) + 'Records'](success, rs, data);
924
+ // If success === false here, exception will have been called in DataProxy
925
+ if (success === true) {
926
+ this.fireEvent('write', this, action, data, response, rs);
927
+ }
928
+ };
929
+ },
930
+
931
+ // Clears records from modified array after an exception event.
932
+ // NOTE: records are left marked dirty. Do we want to commit them even though they were not updated/realized?
933
+ clearModified : function(rs) {
934
+ if (Ext.isArray(rs)) {
935
+ for (var n=rs.length-1;n>=0;n--) {
936
+ this.modified.splice(this.modified.indexOf(rs[n]), 1);
937
+ }
938
+ } else {
939
+ this.modified.splice(this.modified.indexOf(rs), 1);
940
+ }
941
+ },
942
+
943
+ // remap record ids in MixedCollection after records have been realized. @see Store#onCreateRecords, @see DataReader#realize
944
+ reMap : function(record) {
945
+ if (Ext.isArray(record)) {
946
+ for (var i = 0, len = record.length; i < len; i++) {
947
+ this.reMap(record[i]);
948
+ }
949
+ } else {
950
+ delete this.data.map[record._phid];
951
+ this.data.map[record.id] = record;
952
+ var index = this.data.keys.indexOf(record._phid);
953
+ this.data.keys.splice(index, 1, record.id);
954
+ delete record._phid;
955
+ }
956
+ },
957
+
958
+ // @protected onCreateRecord proxy callback for create action
959
+ onCreateRecords : function(success, rs, data) {
960
+ if (success === true) {
961
+ try {
962
+ this.reader.realize(rs, data);
963
+ this.reMap(rs);
964
+ }
965
+ catch (e) {
966
+ this.handleException(e);
967
+ if (Ext.isArray(rs)) {
968
+ // Recurse to run back into the try {}. DataReader#realize splices-off the rs until empty.
969
+ this.onCreateRecords(success, rs, data);
970
+ }
971
+ }
972
+ }
973
+ },
974
+
975
+ // @protected, onUpdateRecords proxy callback for update action
976
+ onUpdateRecords : function(success, rs, data) {
977
+ if (success === true) {
978
+ try {
979
+ this.reader.update(rs, data);
980
+ } catch (e) {
981
+ this.handleException(e);
982
+ if (Ext.isArray(rs)) {
983
+ // Recurse to run back into the try {}. DataReader#update splices-off the rs until empty.
984
+ this.onUpdateRecords(success, rs, data);
985
+ }
986
+ }
987
+ }
988
+ },
989
+
990
+ // @protected onDestroyRecords proxy callback for destroy action
991
+ onDestroyRecords : function(success, rs, data) {
992
+ // splice each rec out of this.removed
993
+ rs = (rs instanceof Ext.data.Record) ? [rs] : rs;
994
+ for (var i=0,len=rs.length;i<len;i++) {
995
+ this.removed.splice(this.removed.indexOf(rs[i]), 1);
996
+ }
997
+ if (success === false) {
998
+ // put records back into store if remote destroy fails.
999
+ // @TODO: Might want to let developer decide.
1000
+ for (i=rs.length-1;i>=0;i--) {
1001
+ this.insert(rs[i].lastIndex, rs[i]); // <-- lastIndex set in Store#destroyRecord
1002
+ }
1003
+ }
1004
+ },
1005
+
1006
+ // protected handleException. Possibly temporary until Ext framework has an exception-handler.
1007
+ handleException : function(e) {
1008
+ // @see core/Error.js
1009
+ Ext.handleError(e);
1010
+ },
1011
+
1012
+ /**
1013
+ * <p>Reloads the Record cache from the configured Proxy using the configured {@link Ext.data.Reader Reader} and
1014
+ * the options from the last load operation performed.</p>
1015
+ * <p><b>Note</b>: see the Important note in {@link #load}.</p>
1016
+ * @param {Object} options (optional) An <tt>Object</tt> containing {@link #load loading options} which may
1017
+ * override the options used in the last {@link #load} operation. See {@link #load} for details (defaults to
1018
+ * <tt>null</tt>, in which case the {@link #lastOptions} are used).
1019
+ */
1020
+ reload : function(options){
1021
+ this.load(Ext.applyIf(options||{}, this.lastOptions));
1022
+ },
1023
+
1024
+ // private
1025
+ // Called as a callback by the Reader during a load operation.
1026
+ loadRecords : function(o, options, success){
1027
+ if(!o || success === false){
1028
+ if(success !== false){
1029
+ this.fireEvent('load', this, [], options);
1030
+ }
1031
+ if(options.callback){
1032
+ options.callback.call(options.scope || this, [], options, false, o);
1033
+ }
1034
+ return;
1035
+ }
1036
+ var r = o.records, t = o.totalRecords || r.length;
1037
+ if(!options || options.add !== true){
1038
+ if(this.pruneModifiedRecords){
1039
+ this.modified = [];
1040
+ }
1041
+ for(var i = 0, len = r.length; i < len; i++){
1042
+ r[i].join(this);
1043
+ }
1044
+ if(this.snapshot){
1045
+ this.data = this.snapshot;
1046
+ delete this.snapshot;
1047
+ }
1048
+ this.data.clear();
1049
+ this.data.addAll(r);
1050
+ this.totalLength = t;
1051
+ this.applySort();
1052
+ this.fireEvent('datachanged', this);
1053
+ }else{
1054
+ this.totalLength = Math.max(t, this.data.length+r.length);
1055
+ this.add(r);
1056
+ }
1057
+ this.fireEvent('load', this, r, options);
1058
+ if(options.callback){
1059
+ options.callback.call(options.scope || this, r, options, true);
1060
+ }
1061
+ },
1062
+
1063
+ /**
1064
+ * Loads data from a passed data block and fires the {@link #load} event. A {@link Ext.data.Reader Reader}
1065
+ * which understands the format of the data must have been configured in the constructor.
1066
+ * @param {Object} data The data block from which to read the Records. The format of the data expected
1067
+ * is dependent on the type of {@link Ext.data.Reader Reader} that is configured and should correspond to
1068
+ * that {@link Ext.data.Reader Reader}'s <tt>{@link Ext.data.Reader#readRecords}</tt> parameter.
1069
+ * @param {Boolean} append (Optional) <tt>true</tt> to append the new Records rather the default to replace
1070
+ * the existing cache.
1071
+ * <b>Note</b>: that Records in a Store are keyed by their {@link Ext.data.Record#id id}, so added Records
1072
+ * with ids which are already present in the Store will <i>replace</i> existing Records. Only Records with
1073
+ * new, unique ids will be added.
1074
+ */
1075
+ loadData : function(o, append){
1076
+ var r = this.reader.readRecords(o);
1077
+ this.loadRecords(r, {add: append}, true);
1078
+ },
1079
+
1080
+ /**
1081
+ * Gets the number of cached records.
1082
+ * <p>If using paging, this may not be the total size of the dataset. If the data object
1083
+ * used by the Reader contains the dataset size, then the {@link #getTotalCount} function returns
1084
+ * the dataset size. <b>Note</b>: see the Important note in {@link #load}.</p>
1085
+ * @return {Number} The number of Records in the Store's cache.
1086
+ */
1087
+ getCount : function(){
1088
+ return this.data.length || 0;
1089
+ },
1090
+
1091
+ /**
1092
+ * Gets the total number of records in the dataset as returned by the server.
1093
+ * <p>If using paging, for this to be accurate, the data object used by the {@link #reader Reader}
1094
+ * must contain the dataset size. For remote data sources, the value for this property
1095
+ * (<tt>totalProperty</tt> for {@link Ext.data.JsonReader JsonReader},
1096
+ * <tt>totalRecords</tt> for {@link Ext.data.XmlReader XmlReader}) shall be returned by a query on the server.
1097
+ * <b>Note</b>: see the Important note in {@link #load}.</p>
1098
+ * @return {Number} The number of Records as specified in the data object passed to the Reader
1099
+ * by the Proxy.
1100
+ * <p><b>Note</b>: this value is not updated when changing the contents of the Store locally.</p>
1101
+ */
1102
+ getTotalCount : function(){
1103
+ return this.totalLength || 0;
1104
+ },
1105
+
1106
+ /**
1107
+ * Returns an object describing the current sort state of this Store.
1108
+ * @return {Object} The sort state of the Store. An object with two properties:<ul>
1109
+ * <li><b>field : String<p class="sub-desc">The name of the field by which the Records are sorted.</p></li>
1110
+ * <li><b>direction : String<p class="sub-desc">The sort order, 'ASC' or 'DESC' (case-sensitive).</p></li>
1111
+ * </ul>
1112
+ * See <tt>{@link #sortInfo}</tt> for additional details.
1113
+ */
1114
+ getSortState : function(){
1115
+ return this.sortInfo;
1116
+ },
1117
+
1118
+ // private
1119
+ applySort : function(){
1120
+ if(this.sortInfo && !this.remoteSort){
1121
+ var s = this.sortInfo, f = s.field;
1122
+ this.sortData(f, s.direction);
1123
+ }
1124
+ },
1125
+
1126
+ // private
1127
+ sortData : function(f, direction){
1128
+ direction = direction || 'ASC';
1129
+ var st = this.fields.get(f).sortType;
1130
+ var fn = function(r1, r2){
1131
+ var v1 = st(r1.data[f]), v2 = st(r2.data[f]);
1132
+ return v1 > v2 ? 1 : (v1 < v2 ? -1 : 0);
1133
+ };
1134
+ this.data.sort(direction, fn);
1135
+ if(this.snapshot && this.snapshot != this.data){
1136
+ this.snapshot.sort(direction, fn);
1137
+ }
1138
+ },
1139
+
1140
+ /**
1141
+ * Sets the default sort column and order to be used by the next {@link #load} operation.
1142
+ * @param {String} fieldName The name of the field to sort by.
1143
+ * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to <tt>'ASC'</tt>)
1144
+ */
1145
+ setDefaultSort : function(field, dir){
1146
+ dir = dir ? dir.toUpperCase() : 'ASC';
1147
+ this.sortInfo = {field: field, direction: dir};
1148
+ this.sortToggle[field] = dir;
1149
+ },
1150
+
1151
+ /**
1152
+ * Sort the Records.
1153
+ * If remote sorting is used, the sort is performed on the server, and the cache is reloaded. If local
1154
+ * sorting is used, the cache is sorted internally. See also {@link #remoteSort} and {@link #paramNames}.
1155
+ * @param {String} fieldName The name of the field to sort by.
1156
+ * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to <tt>'ASC'</tt>)
1157
+ */
1158
+ sort : function(fieldName, dir){
1159
+ var f = this.fields.get(fieldName);
1160
+ if(!f){
1161
+ return false;
1162
+ }
1163
+ if(!dir){
1164
+ if(this.sortInfo && this.sortInfo.field == f.name){ // toggle sort dir
1165
+ dir = (this.sortToggle[f.name] || 'ASC').toggle('ASC', 'DESC');
1166
+ }else{
1167
+ dir = f.sortDir;
1168
+ }
1169
+ }
1170
+ var st = (this.sortToggle) ? this.sortToggle[f.name] : null;
1171
+ var si = (this.sortInfo) ? this.sortInfo : null;
1172
+
1173
+ this.sortToggle[f.name] = dir;
1174
+ this.sortInfo = {field: f.name, direction: dir};
1175
+ if(!this.remoteSort){
1176
+ this.applySort();
1177
+ this.fireEvent('datachanged', this);
1178
+ }else{
1179
+ if (!this.load(this.lastOptions)) {
1180
+ if (st) {
1181
+ this.sortToggle[f.name] = st;
1182
+ }
1183
+ if (si) {
1184
+ this.sortInfo = si;
1185
+ }
1186
+ }
1187
+ }
1188
+ },
1189
+
1190
+ /**
1191
+ * Calls the specified function for each of the {@link Ext.data.Record Records} in the cache.
1192
+ * @param {Function} fn The function to call. The {@link Ext.data.Record Record} is passed as the first parameter.
1193
+ * Returning <tt>false</tt> aborts and exits the iteration.
1194
+ * @param {Object} scope (optional) The scope in which to call the function (defaults to the {@link Ext.data.Record Record}).
1195
+ */
1196
+ each : function(fn, scope){
1197
+ this.data.each(fn, scope);
1198
+ },
1199
+
1200
+ /**
1201
+ * Gets all {@link Ext.data.Record records} modified since the last commit. Modified records are
1202
+ * persisted across load operations (e.g., during paging). <b>Note</b>: deleted records are not
1203
+ * included. See also <tt>{@link #pruneModifiedRecords}</tt> and
1204
+ * {@link Ext.data.Record}<tt>{@link Ext.data.Record#markDirty markDirty}.</tt>.
1205
+ * @return {Ext.data.Record[]} An array of {@link Ext.data.Record Records} containing outstanding
1206
+ * modifications. To obtain modified fields within a modified record see
1207
+ *{@link Ext.data.Record}<tt>{@link Ext.data.Record#modified modified}.</tt>.
1208
+ */
1209
+ getModifiedRecords : function(){
1210
+ return this.modified;
1211
+ },
1212
+
1213
+ // private
1214
+ createFilterFn : function(property, value, anyMatch, caseSensitive){
1215
+ if(Ext.isEmpty(value, false)){
1216
+ return false;
1217
+ }
1218
+ value = this.data.createValueMatcher(value, anyMatch, caseSensitive);
1219
+ return function(r){
1220
+ return value.test(r.data[property]);
1221
+ };
1222
+ },
1223
+
1224
+ /**
1225
+ * Sums the value of <tt>property</tt> for each {@link Ext.data.Record record} between <tt>start</tt>
1226
+ * and <tt>end</tt> and returns the result.
1227
+ * @param {String} property A field in each record
1228
+ * @param {Number} start (optional) The record index to start at (defaults to <tt>0</tt>)
1229
+ * @param {Number} end (optional) The last record index to include (defaults to length - 1)
1230
+ * @return {Number} The sum
1231
+ */
1232
+ sum : function(property, start, end){
1233
+ var rs = this.data.items, v = 0;
1234
+ start = start || 0;
1235
+ end = (end || end === 0) ? end : rs.length-1;
1236
+
1237
+ for(var i = start; i <= end; i++){
1238
+ v += (rs[i].data[property] || 0);
1239
+ }
1240
+ return v;
1241
+ },
1242
+
1243
+ /**
1244
+ * Filter the {@link Ext.data.Record records} by a specified property.
1245
+ * @param {String} field A field on your records
1246
+ * @param {String/RegExp} value Either a string that the field should begin with, or a RegExp to test
1247
+ * against the field.
1248
+ * @param {Boolean} anyMatch (optional) <tt>true</tt> to match any part not just the beginning
1249
+ * @param {Boolean} caseSensitive (optional) <tt>true</tt> for case sensitive comparison
1250
+ */
1251
+ filter : function(property, value, anyMatch, caseSensitive){
1252
+ var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
1253
+ return fn ? this.filterBy(fn) : this.clearFilter();
1254
+ },
1255
+
1256
+ /**
1257
+ * Filter by a function. The specified function will be called for each
1258
+ * Record in this Store. If the function returns <tt>true</tt> the Record is included,
1259
+ * otherwise it is filtered out.
1260
+ * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
1261
+ * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
1262
+ * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
1263
+ * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
1264
+ * </ul>
1265
+ * @param {Object} scope (optional) The scope of the function (defaults to this)
1266
+ */
1267
+ filterBy : function(fn, scope){
1268
+ this.snapshot = this.snapshot || this.data;
1269
+ this.data = this.queryBy(fn, scope||this);
1270
+ this.fireEvent('datachanged', this);
1271
+ },
1272
+
1273
+ /**
1274
+ * Query the records by a specified property.
1275
+ * @param {String} field A field on your records
1276
+ * @param {String/RegExp} value Either a string that the field
1277
+ * should begin with, or a RegExp to test against the field.
1278
+ * @param {Boolean} anyMatch (optional) True to match any part not just the beginning
1279
+ * @param {Boolean} caseSensitive (optional) True for case sensitive comparison
1280
+ * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records
1281
+ */
1282
+ query : function(property, value, anyMatch, caseSensitive){
1283
+ var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
1284
+ return fn ? this.queryBy(fn) : this.data.clone();
1285
+ },
1286
+
1287
+ /**
1288
+ * Query the cached records in this Store using a filtering function. The specified function
1289
+ * will be called with each record in this Store. If the function returns <tt>true</tt> the record is
1290
+ * included in the results.
1291
+ * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
1292
+ * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
1293
+ * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
1294
+ * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
1295
+ * </ul>
1296
+ * @param {Object} scope (optional) The scope of the function (defaults to this)
1297
+ * @return {MixedCollection} Returns an Ext.util.MixedCollection of the matched records
1298
+ **/
1299
+ queryBy : function(fn, scope){
1300
+ var data = this.snapshot || this.data;
1301
+ return data.filterBy(fn, scope||this);
1302
+ },
1303
+
1304
+ /**
1305
+ * Finds the index of the first matching record in this store by a specific property/value.
1306
+ * @param {String} property A property on your objects
1307
+ * @param {String/RegExp} value Either a string that the property value
1308
+ * should begin with, or a RegExp to test against the property.
1309
+ * @param {Number} startIndex (optional) The index to start searching at
1310
+ * @param {Boolean} anyMatch (optional) True to match any part of the string, not just the beginning
1311
+ * @param {Boolean} caseSensitive (optional) True for case sensitive comparison
1312
+ * @return {Number} The matched index or -1
1313
+ */
1314
+ find : function(property, value, start, anyMatch, caseSensitive){
1315
+ var fn = this.createFilterFn(property, value, anyMatch, caseSensitive);
1316
+ return fn ? this.data.findIndexBy(fn, null, start) : -1;
1317
+ },
1318
+
1319
+ /**
1320
+ * Finds the index of the first matching record in this store by a specific property/value.
1321
+ * @param {String} property A property on your objects
1322
+ * @param {String/RegExp} value The value to match against
1323
+ * @param {Number} startIndex (optional) The index to start searching at
1324
+ * @return {Number} The matched index or -1
1325
+ */
1326
+ findExact: function(property, value, start){
1327
+ return this.data.findIndexBy(function(rec){
1328
+ return rec.get(property) === value;
1329
+ }, this, start);
1330
+ },
1331
+
1332
+ /**
1333
+ * Find the index of the first matching Record in this Store by a function.
1334
+ * If the function returns <tt>true</tt> it is considered a match.
1335
+ * @param {Function} fn The function to be called. It will be passed the following parameters:<ul>
1336
+ * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record}
1337
+ * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li>
1338
+ * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
1339
+ * </ul>
1340
+ * @param {Object} scope (optional) The scope of the function (defaults to this)
1341
+ * @param {Number} startIndex (optional) The index to start searching at
1342
+ * @return {Number} The matched index or -1
1343
+ */
1344
+ findBy : function(fn, scope, start){
1345
+ return this.data.findIndexBy(fn, scope, start);
1346
+ },
1347
+
1348
+ /**
1349
+ * Collects unique values for a particular dataIndex from this store.
1350
+ * @param {String} dataIndex The property to collect
1351
+ * @param {Boolean} allowNull (optional) Pass true to allow null, undefined or empty string values
1352
+ * @param {Boolean} bypassFilter (optional) Pass true to collect from all records, even ones which are filtered
1353
+ * @return {Array} An array of the unique values
1354
+ **/
1355
+ collect : function(dataIndex, allowNull, bypassFilter){
1356
+ var d = (bypassFilter === true && this.snapshot) ?
1357
+ this.snapshot.items : this.data.items;
1358
+ var v, sv, r = [], l = {};
1359
+ for(var i = 0, len = d.length; i < len; i++){
1360
+ v = d[i].data[dataIndex];
1361
+ sv = String(v);
1362
+ if((allowNull || !Ext.isEmpty(v)) && !l[sv]){
1363
+ l[sv] = true;
1364
+ r[r.length] = v;
1365
+ }
1366
+ }
1367
+ return r;
1368
+ },
1369
+
1370
+ /**
1371
+ * Revert to a view of the Record cache with no filtering applied.
1372
+ * @param {Boolean} suppressEvent If <tt>true</tt> the filter is cleared silently without firing the
1373
+ * {@link #datachanged} event.
1374
+ */
1375
+ clearFilter : function(suppressEvent){
1376
+ if(this.isFiltered()){
1377
+ this.data = this.snapshot;
1378
+ delete this.snapshot;
1379
+ if(suppressEvent !== true){
1380
+ this.fireEvent('datachanged', this);
1381
+ }
1382
+ }
1383
+ },
1384
+
1385
+ /**
1386
+ * Returns true if this store is currently filtered
1387
+ * @return {Boolean}
1388
+ */
1389
+ isFiltered : function(){
1390
+ return this.snapshot && this.snapshot != this.data;
1391
+ },
1392
+
1393
+ // private
1394
+ afterEdit : function(record){
1395
+ if(this.modified.indexOf(record) == -1){
1396
+ this.modified.push(record);
1397
+ }
1398
+ this.fireEvent('update', this, record, Ext.data.Record.EDIT);
1399
+ },
1400
+
1401
+ // private
1402
+ afterReject : function(record){
1403
+ this.modified.remove(record);
1404
+ this.fireEvent('update', this, record, Ext.data.Record.REJECT);
1405
+ },
1406
+
1407
+ // private
1408
+ afterCommit : function(record){
1409
+ this.modified.remove(record);
1410
+ this.fireEvent('update', this, record, Ext.data.Record.COMMIT);
1411
+ },
1412
+
1413
+ /**
1414
+ * Commit all Records with {@link #getModifiedRecords outstanding changes}. To handle updates for changes,
1415
+ * subscribe to the Store's {@link #update update event}, and perform updating when the third parameter is
1416
+ * Ext.data.Record.COMMIT.
1417
+ */
1418
+ commitChanges : function(){
1419
+ var m = this.modified.slice(0);
1420
+ this.modified = [];
1421
+ for(var i = 0, len = m.length; i < len; i++){
1422
+ m[i].commit();
1423
+ }
1424
+ },
1425
+
1426
+ /**
1427
+ * {@link Ext.data.Record#reject Reject} outstanding changes on all {@link #getModifiedRecords modified records}.
1428
+ */
1429
+ rejectChanges : function(){
1430
+ var m = this.modified.slice(0);
1431
+ this.modified = [];
1432
+ for(var i = 0, len = m.length; i < len; i++){
1433
+ m[i].reject();
1434
+ }
1435
+ },
1436
+
1437
+ // private
1438
+ onMetaChange : function(meta, rtype, o){
1439
+ this.recordType = rtype;
1440
+ this.fields = rtype.prototype.fields;
1441
+ delete this.snapshot;
1442
+ if(meta.sortInfo){
1443
+ this.sortInfo = meta.sortInfo;
1444
+ }else if(this.sortInfo && !this.fields.get(this.sortInfo.field)){
1445
+ delete this.sortInfo;
1446
+ }
1447
+ this.modified = [];
1448
+ this.fireEvent('metachange', this, this.reader.meta);
1449
+ },
1450
+
1451
+ // private
1452
+ findInsertIndex : function(record){
1453
+ this.suspendEvents();
1454
+ var data = this.data.clone();
1455
+ this.data.add(record);
1456
+ this.applySort();
1457
+ var index = this.data.indexOf(record);
1458
+ this.data = data;
1459
+ this.resumeEvents();
1460
+ return index;
1461
+ },
1462
+
1463
+ /**
1464
+ * Set the value for a property name in this store's {@link #baseParams}. Usage:</p><pre><code>
1465
+ myStore.setBaseParam('foo', {bar:3});
1466
+ </code></pre>
1467
+ * @param {String} name Name of the property to assign
1468
+ * @param {Mixed} value Value to assign the <tt>name</tt>d property
1469
+ **/
1470
+ setBaseParam : function (name, value){
1471
+ this.baseParams = this.baseParams || {};
1472
+ this.baseParams[name] = value;
1473
+ }
1474
+ });
1475
+
1476
+ Ext.reg('store', Ext.data.Store);
1477
+
1478
+ /**
1479
+ * @class Ext.data.Store.Error
1480
+ * @extends Ext.Error
1481
+ * Store Error extension.
1482
+ * @param {String} name
1483
+ */
1484
+ Ext.data.Store.Error = Ext.extend(Ext.Error, {
1485
+ name: 'Ext.data.Store'
1486
+ });
1487
+ Ext.apply(Ext.data.Store.Error.prototype, {
1488
+ lang: {
1489
+ 'writer-undefined' : 'Attempted to execute a write-action without a DataWriter installed.'
1490
+ }
1491
+ });
1492
+