lpmp 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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,7 @@
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
+ Ext.DataView=Ext.extend(Ext.BoxComponent,{selectedClass:"x-view-selected",emptyText:"",deferEmptyText:true,trackOver:false,last:false,initComponent:function(){Ext.DataView.superclass.initComponent.call(this);if(Ext.isString(this.tpl)||Ext.isArray(this.tpl)){this.tpl=new Ext.XTemplate(this.tpl)}this.addEvents("beforeclick","click","mouseenter","mouseleave","containerclick","dblclick","contextmenu","containercontextmenu","selectionchange","beforeselect");this.store=Ext.StoreMgr.lookup(this.store);this.all=new Ext.CompositeElementLite();this.selected=new Ext.CompositeElementLite()},afterRender:function(){Ext.DataView.superclass.afterRender.call(this);this.mon(this.getTemplateTarget(),{click:this.onClick,dblclick:this.onDblClick,contextmenu:this.onContextMenu,scope:this});if(this.overClass||this.trackOver){this.mon(this.getTemplateTarget(),{mouseover:this.onMouseOver,mouseout:this.onMouseOut,scope:this})}if(this.store){this.bindStore(this.store,true)}},refresh:function(){this.clearSelections(false,true);var b=this.getTemplateTarget();b.update("");var a=this.store.getRange();if(a.length<1){if(!this.deferEmptyText||this.hasSkippedEmptyText){b.update(this.emptyText)}this.all.clear()}else{this.tpl.overwrite(b,this.collectData(a,0));this.all.fill(Ext.query(this.itemSelector,b.dom));this.updateIndexes(0)}this.hasSkippedEmptyText=true},getTemplateTarget:function(){return this.el},prepareData:function(a){return a},collectData:function(b,e){var d=[];for(var c=0,a=b.length;c<a;c++){d[d.length]=this.prepareData(b[c].data,e+c,b[c])}return d},bufferRender:function(a){var b=document.createElement("div");this.tpl.overwrite(b,this.collectData(a));return Ext.query(this.itemSelector,b)},onUpdate:function(f,a){var b=this.store.indexOf(a);var e=this.isSelected(b);var c=this.all.elements[b];var d=this.bufferRender([a],b)[0];this.all.replaceElement(b,d,true);if(e){this.selected.replaceElement(c,d);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)},onAdd:function(f,d,e){if(this.all.getCount()===0){this.refresh();return}var c=this.bufferRender(d,e),g,b=this.all.elements;if(e<this.all.getCount()){g=this.all.item(e).insertSibling(c,"before",true);b.splice.apply(b,[e,0].concat(c))}else{g=this.all.last().insertSibling(c,"after",true);b.push.apply(b,c)}this.updateIndexes(e)},onRemove:function(c,a,b){this.deselect(b);this.all.removeElement(b,true);this.updateIndexes(b);if(this.store.getCount()===0){this.refresh()}},refreshNode:function(a){this.onUpdate(this.store,this.store.getAt(a))},updateIndexes:function(d,c){var b=this.all.elements;d=d||0;c=c||((c===0)?0:(b.length-1));for(var a=d;a<=c;a++){b[a].viewIndex=a}},getStore:function(){return this.store},bindStore:function(a,b){if(!b&&this.store){this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("datachanged",this.refresh,this);this.store.un("add",this.onAdd,this);this.store.un("remove",this.onRemove,this);this.store.un("update",this.onUpdate,this);this.store.un("clear",this.refresh,this);if(a!==this.store&&this.store.autoDestroy){this.store.destroy()}}if(a){a=Ext.StoreMgr.lookup(a);a.on({scope:this,beforeload:this.onBeforeLoad,datachanged:this.refresh,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.refresh})}this.store=a;if(a){this.refresh()}},findItemFromChild:function(a){return Ext.fly(a).findParent(this.itemSelector,this.getTemplateTarget())},onClick:function(c){var b=c.getTarget(this.itemSelector,this.getTemplateTarget());if(b){var a=this.indexOf(b);if(this.onItemClick(b,a,c)!==false){this.fireEvent("click",this,a,b,c)}}else{if(this.fireEvent("containerclick",this,c)!==false){this.onContainerClick(c)}}},onContainerClick:function(a){this.clearSelections()},onContextMenu:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a){this.fireEvent("contextmenu",this,this.indexOf(a),a,b)}else{this.fireEvent("containercontextmenu",this,b)}},onDblClick:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a){this.fireEvent("dblclick",this,this.indexOf(a),a,b)}},onMouseOver:function(b){var a=b.getTarget(this.itemSelector,this.getTemplateTarget());if(a&&a!==this.lastItem){this.lastItem=a;Ext.fly(a).addClass(this.overClass);this.fireEvent("mouseenter",this,this.indexOf(a),a,b)}},onMouseOut:function(a){if(this.lastItem){if(!a.within(this.lastItem,true,true)){Ext.fly(this.lastItem).removeClass(this.overClass);this.fireEvent("mouseleave",this,this.indexOf(this.lastItem),this.lastItem,a);delete this.lastItem}}},onItemClick:function(b,a,c){if(this.fireEvent("beforeclick",this,a,b,c)===false){return false}if(this.multiSelect){this.doMultiSelection(b,a,c);c.preventDefault()}else{if(this.singleSelect){this.doSingleSelection(b,a,c);c.preventDefault()}}return true},doSingleSelection:function(b,a,c){if(c.ctrlKey&&this.isSelected(a)){this.deselect(a)}else{this.select(a,false)}},doMultiSelection:function(c,a,d){if(d.shiftKey&&this.last!==false){var b=this.last;this.selectRange(b,a,d.ctrlKey);this.last=b}else{if((d.ctrlKey||this.simpleSelect)&&this.isSelected(a)){this.deselect(a)}else{this.select(a,d.ctrlKey||d.shiftKey||this.simpleSelect)}}},getSelectionCount:function(){return this.selected.getCount()},getSelectedNodes:function(){return this.selected.elements},getSelectedIndexes:function(){var b=[],d=this.selected.elements;for(var c=0,a=d.length;c<a;c++){b.push(d[c].viewIndex)}return b},getSelectedRecords:function(){var d=[],c=this.selected.elements;for(var b=0,a=c.length;b<a;b++){d[d.length]=this.store.getAt(c[b].viewIndex)}return d},getRecords:function(b){var e=[],d=b;for(var c=0,a=d.length;c<a;c++){e[e.length]=this.store.getAt(d[c].viewIndex)}return e},getRecord:function(a){return this.store.getAt(a.viewIndex)},clearSelections:function(a,b){if((this.multiSelect||this.singleSelect)&&this.selected.getCount()>0){if(!b){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!a){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(a){return this.selected.contains(this.getNode(a))},deselect:function(a){if(this.isSelected(a)){a=this.getNode(a);this.selected.removeElement(a);if(this.last==a.viewIndex){this.last=false}Ext.fly(a).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(d,f,b){if(Ext.isArray(d)){if(!f){this.clearSelections(true)}for(var c=0,a=d.length;c<a;c++){this.select(d[c],true,true)}if(!b){this.fireEvent("selectionchange",this,this.selected.elements)}}else{var e=this.getNode(d);if(!f){this.clearSelections(true)}if(e&&!this.isSelected(e)){if(this.fireEvent("beforeselect",this,e,this.selected.elements)!==false){Ext.fly(e).addClass(this.selectedClass);this.selected.add(e);this.last=e.viewIndex;if(!b){this.fireEvent("selectionchange",this,this.selected.elements)}}}}},selectRange:function(c,a,b){if(!b){this.clearSelections(true)}this.select(this.getNodes(c,a),true)},getNode:function(a){if(Ext.isString(a)){return document.getElementById(a)}else{if(Ext.isNumber(a)){return this.all.elements[a]}}return a},getNodes:function(e,a){var d=this.all.elements;e=e||0;a=!Ext.isDefined(a)?Math.max(d.length-1,0):a;var b=[],c;if(e<=a){for(c=e;c<=a&&d[c];c++){b.push(d[c])}}else{for(c=e;c>=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.getTemplateTarget().update('<div class="loading-indicator">'+this.loadingText+"</div>");this.all.clear()}},onDestroy:function(){Ext.DataView.superclass.onDestroy.call(this);this.bindStore(null)}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;Ext.reg("dataview",Ext.DataView);Ext.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:19,columnResize:true,columnSort:true,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.ListView.ColumnResizer(this.colResizer);this.colResizer.init(this)}if(this.columnSort){this.colSorter=new Ext.ListView.Sorter(this.columnSort);this.colSorter.init(this)}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('<div class="x-list-header"><div class="x-list-header-inner">','<tpl for="columns">','<div style="width:{width}%;text-align:{align};"><em unselectable="on" id="',this.id,'-xlhd-{#}">',"{header}","</em></div>","</tpl>",'<div class="x-clear"></div>',"</div></div>",'<div class="x-list-body"><div class="x-list-body-inner">',"</div></div>")}if(!this.tpl){this.tpl=new Ext.XTemplate('<tpl for="rows">',"<dl>",'<tpl for="parent.columns">','<dt style="width:{width}%;text-align:{align};"><em unselectable="on">',"{[values.tpl.apply(parent)]}","</em></dt>","</tpl>",'<div class="x-clear"></div>',"</dl>","</tpl>")}var h=this.columns,f=0,g=0,k=h.length;for(var e=0;e<k;e++){var l=h[e];if(!l.tpl){l.tpl=new Ext.XTemplate("{"+l.dataIndex+"}")}else{if(Ext.isString(l.tpl)){l.tpl=new Ext.XTemplate(l.tpl)}}l.align=l.align||"left";if(Ext.isNumber(l.width)){l.width*=100;f+=l.width;g++}}if(g<k){var b=k-g;if(f<100){var a=((100-f)/b);for(var d=0;d<k;d++){var l=h[d];if(!Ext.isNumber(l.width)){l.width=a}}}}Ext.ListView.superclass.initComponent.call(this)},onRender:function(){Ext.ListView.superclass.onRender.apply(this,arguments);this.internalTpl.overwrite(this.el,{columns:this.columns});this.innerBody=Ext.get(this.el.dom.childNodes[1].firstChild);this.innerHd=Ext.get(this.el.dom.firstChild.firstChild);if(this.hideHeaders){this.el.dom.firstChild.style.display="none"}},getTemplateTarget:function(){return this.innerBody},collectData:function(){var a=Ext.ListView.superclass.collectData.apply(this,arguments);return{columns:this.columns,rows:a}},verifyInternalSize:function(){if(this.lastSize){this.onResize(this.lastSize.width,this.lastSize.height)}},onResize:function(b,d){var e=this.innerBody.dom;var f=this.innerHd.dom;if(!e){return}var c=e.parentNode;if(Ext.isNumber(b)){var a=b-this.scrollOffset;if(this.reserveScrollOffset||((c.offsetWidth-c.clientWidth)>10)){e.style.width=a+"px";f.style.width=a+"px"}else{e.style.width=b+"px";f.style.width=b+"px";setTimeout(function(){if((c.offsetWidth-c.clientWidth)>10){e.style.width=a+"px";f.style.width=a+"px"}},10)}}if(Ext.isNumber(d=="number")){c.style.height=(d-f.parentNode.offsetHeight)+"px"}},updateIndexes:function(){Ext.ListView.superclass.updateIndexes.apply(this,arguments);this.verifyInternalSize()},findHeaderIndex:function(e){e=e.dom||e;var a=e.parentNode,d=a.parentNode.childNodes;for(var b=0,f;f=d[b];b++){if(f==a){return b}}return -1},setHdWidths:function(){var c=this.innerHd.dom.getElementsByTagName("div");for(var b=0,d=this.columns,a=d.length;b<a;b++){c[b].style.width=d[b].width+"%"}}});Ext.reg("listview",Ext.ListView);Ext.ListView.ColumnResizer=Ext.extend(Ext.util.Observable,{minPct:0.05,constructor:function(a){Ext.apply(this,a);Ext.ListView.ColumnResizer.superclass.constructor.call(this)},init:function(a){this.view=a;a.on("render",this.initEvents,this)},initEvents:function(a){a.mon(a.innerHd,"mousemove",this.handleHdMove,this);this.tracker=new Ext.dd.DragTracker({onBeforeStart:this.onBeforeStart.createDelegate(this),onStart:this.onStart.createDelegate(this),onDrag:this.onDrag.createDelegate(this),onEnd:this.onEnd.createDelegate(this),tolerance:3,autoStart:300});this.tracker.initEl(a.innerHd);a.on("beforedestroy",this.tracker.destroy,this.tracker)},handleHdMove:function(i,f){var b=5;var a=i.getPageX();var h=i.getTarget("em",3,true);if(h){var g=h.getRegion();var d=h.dom.style;var c=h.dom.parentNode;if(a-g.left<=b&&c!=c.parentNode.firstChild){this.activeHd=Ext.get(c.previousSibling.firstChild);d.cursor=Ext.isWebKit?"e-resize":"col-resize"}else{if(g.right-a<=b&&c!=c.parentNode.lastChild.previousSibling){this.activeHd=h;d.cursor=Ext.isWebKit?"w-resize":"col-resize"}else{delete this.activeHd;d.cursor=""}}}},onBeforeStart:function(a){this.dragHd=this.activeHd;return !!this.dragHd},onStart:function(c){this.view.disableHeaders=true;this.proxy=this.view.el.createChild({cls:"x-list-resizer"});this.proxy.setHeight(this.view.el.getHeight());var a=this.tracker.getXY()[0];var b=this.view.innerHd.getWidth();this.hdX=this.dragHd.getX();this.hdIndex=this.view.findHeaderIndex(this.dragHd);this.proxy.setX(this.hdX);this.proxy.setWidth(a-this.hdX);this.minWidth=b*this.minPct;this.maxWidth=b-(this.minWidth*(this.view.columns.length-1-this.hdIndex))},onDrag:function(b){var a=this.tracker.getXY()[0];this.proxy.setWidth((a-this.hdX).constrain(this.minWidth,this.maxWidth))},onEnd:function(k){var h=this.proxy.getWidth();this.proxy.remove();var g=this.hdIndex;var n=this.view,f=n.columns,j=f.length;var p=this.view.innerHd.getWidth(),d=this.minPct*100;var q=Math.ceil((h*100)/p);var o=f[g].width-q;var m=Math.floor(o/(j-1-g));var l=o-(m*(j-1-g));for(var c=g+1;c<j;c++){var b=f[c].width+m;var a=Math.max(d,b);if(b!=a){l+=b-a}f[c].width=a}f[g].width=q;f[g+1].width+=l;delete this.dragHd;this.view.setHdWidths();this.view.refresh();setTimeout(function(){n.disableHeaders=false},100)}});Ext.ListView.Sorter=Ext.extend(Ext.util.Observable,{sortClasses:["sort-asc","sort-desc"],constructor:function(a){Ext.apply(this,a);Ext.ListView.Sorter.superclass.constructor.call(this)},init:function(a){this.view=a;a.on("render",this.initEvents,this)},initEvents:function(a){a.mon(a.innerHd,"click",this.onHdClick,this);a.innerHd.setStyle("cursor","pointer");a.mon(a.store,"datachanged",this.updateSortState,this);this.updateSortState.defer(10,this,[a.store])},updateSortState:function(c){var f=c.getSortState();if(!f){return}this.sortState=f;var e=this.view.columns,g=-1;for(var d=0,a=e.length;d<a;d++){if(e[d].dataIndex==f.field){g=d;break}}if(g!=-1){var b=f.direction;this.updateSortIcon(g,b)}},updateSortIcon:function(b,a){var d=this.sortClasses;var c=this.view.innerHd.select("em").removeClass(d);c.item(b).addClass(d[a=="DESC"?1:0])},onHdClick:function(c){var b=c.getTarget("em",3);if(b&&!this.view.disableHeaders){var a=this.view.findHeaderIndex(b);this.view.store.sort(this.view.columns[a].dataIndex)}}});
@@ -0,0 +1,234 @@
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.XmlWriter
9
+ * @extends Ext.data.DataWriter
10
+ * DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action via XML.
11
+ */
12
+ Ext.data.XmlWriter = Ext.extend(Ext.data.DataWriter, {
13
+ /**
14
+ * Final action of a write event. Apply the written data-object to params.
15
+ * @param {String} action [Ext.data.Api.create|read|update|destroy]
16
+ * @param {Record[]} rs
17
+ * @param {Object} http params
18
+ * @param {Object} data object populated according to DataReader meta-data "root" and "idProperty"
19
+ */
20
+ render : function(action, rs, params, data) {
21
+ // no impl.
22
+ },
23
+ /**
24
+ * createRecord
25
+ * @param {Ext.data.Record} rec
26
+ */
27
+ createRecord : function(rec) {
28
+ // no impl
29
+ },
30
+ /**
31
+ * updateRecord
32
+ * @param {Ext.data.Record} rec
33
+ */
34
+ updateRecord : function(rec) {
35
+ // no impl.
36
+
37
+ },
38
+ /**
39
+ * destroyRecord
40
+ * @param {Ext.data.Record} rec
41
+ */
42
+ destroyRecord : function(rec) {
43
+ // no impl
44
+ }
45
+ });/**
46
+ * @class Ext.data.XmlReader
47
+ * @extends Ext.data.DataReader
48
+ * <p>Data reader class to create an Array of {@link Ext.data.Record} objects from an XML document
49
+ * based on mappings in a provided {@link Ext.data.Record} constructor.</p>
50
+ * <p><b>Note</b>: that in order for the browser to parse a returned XML document, the Content-Type
51
+ * header in the HTTP response must be set to "text/xml" or "application/xml".</p>
52
+ * <p>Example code:</p>
53
+ * <pre><code>
54
+ var Employee = Ext.data.Record.create([
55
+ {name: 'name', mapping: 'name'}, // "mapping" property not needed if it is the same as "name"
56
+ {name: 'occupation'} // This field will use "occupation" as the mapping.
57
+ ]);
58
+ var myReader = new Ext.data.XmlReader({
59
+ totalRecords: "results", // The element which contains the total dataset size (optional)
60
+ record: "row", // The repeated element which contains row information
61
+ id: "id" // The element within the row that provides an ID for the record (optional)
62
+ }, Employee);
63
+ </code></pre>
64
+ * <p>
65
+ * This would consume an XML file like this:
66
+ * <pre><code>
67
+ &lt;?xml version="1.0" encoding="UTF-8"?>
68
+ &lt;dataset>
69
+ &lt;results>2&lt;/results>
70
+ &lt;row>
71
+ &lt;id>1&lt;/id>
72
+ &lt;name>Bill&lt;/name>
73
+ &lt;occupation>Gardener&lt;/occupation>
74
+ &lt;/row>
75
+ &lt;row>
76
+ &lt;id>2&lt;/id>
77
+ &lt;name>Ben&lt;/name>
78
+ &lt;occupation>Horticulturalist&lt;/occupation>
79
+ &lt;/row>
80
+ &lt;/dataset>
81
+ </code></pre>
82
+ * @cfg {String} totalRecords The DomQuery path from which to retrieve the total number of records
83
+ * in the dataset. This is only needed if the whole dataset is not passed in one go, but is being
84
+ * paged from the remote server.
85
+ * @cfg {String} record The DomQuery path to the repeated element which contains record information.
86
+ * @cfg {String} success The DomQuery path to the success attribute used by forms.
87
+ * @cfg {String} idPath The DomQuery path relative from the record element to the element that contains
88
+ * a record identifier value.
89
+ * @constructor
90
+ * Create a new XmlReader.
91
+ * @param {Object} meta Metadata configuration options
92
+ * @param {Object} recordType Either an Array of field definition objects as passed to
93
+ * {@link Ext.data.Record#create}, or a Record constructor object created using {@link Ext.data.Record#create}.
94
+ */
95
+ Ext.data.XmlReader = function(meta, recordType){
96
+ meta = meta || {};
97
+ Ext.data.XmlReader.superclass.constructor.call(this, meta, recordType || meta.fields);
98
+ };
99
+ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, {
100
+ /**
101
+ * This method is only used by a DataProxy which has retrieved data from a remote server.
102
+ * @param {Object} response The XHR object which contains the parsed XML document. The response is expected
103
+ * to contain a property called <tt>responseXML</tt> which refers to an XML document object.
104
+ * @return {Object} records A data block which is used by an {@link Ext.data.Store} as
105
+ * a cache of Ext.data.Records.
106
+ */
107
+ read : function(response){
108
+ var doc = response.responseXML;
109
+ if(!doc) {
110
+ throw {message: "XmlReader.read: XML Document not available"};
111
+ }
112
+ return this.readRecords(doc);
113
+ },
114
+
115
+ /**
116
+ * Create a data block containing Ext.data.Records from an XML document.
117
+ * @param {Object} doc A parsed XML document.
118
+ * @return {Object} records A data block which is used by an {@link Ext.data.Store} as
119
+ * a cache of Ext.data.Records.
120
+ */
121
+ readRecords : function(doc){
122
+ /**
123
+ * After any data loads/reads, the raw XML Document is available for further custom processing.
124
+ * @type XMLDocument
125
+ */
126
+ this.xmlData = doc;
127
+ var root = doc.documentElement || doc;
128
+ var q = Ext.DomQuery;
129
+ var recordType = this.recordType, fields = recordType.prototype.fields;
130
+ var sid = this.meta.idPath || this.meta.id;
131
+ var totalRecords = 0, success = true;
132
+ if(this.meta.totalRecords){
133
+ totalRecords = q.selectNumber(this.meta.totalRecords, root, 0);
134
+ }
135
+
136
+ if(this.meta.success){
137
+ var sv = q.selectValue(this.meta.success, root, true);
138
+ success = sv !== false && sv !== 'false';
139
+ }
140
+ var records = [];
141
+ var ns = q.select(this.meta.record, root);
142
+ for(var i = 0, len = ns.length; i < len; i++) {
143
+ var n = ns[i];
144
+ var values = {};
145
+ var id = sid ? q.selectValue(sid, n) : undefined;
146
+ for(var j = 0, jlen = fields.length; j < jlen; j++){
147
+ var f = fields.items[j];
148
+ var v = q.selectValue(Ext.value(f.mapping, f.name, true), n, f.defaultValue);
149
+ v = f.convert(v, n);
150
+ values[f.name] = v;
151
+ }
152
+ var record = new recordType(values, id);
153
+ record.node = n;
154
+ records[records.length] = record;
155
+ }
156
+
157
+ return {
158
+ success : success,
159
+ records : records,
160
+ totalRecords : totalRecords || records.length
161
+ };
162
+ },
163
+
164
+ // TODO: implement readResponse for XmlReader
165
+ readResponse : Ext.emptyFn
166
+ });/**
167
+ * @class Ext.data.XmlStore
168
+ * @extends Ext.data.Store
169
+ * <p>Small helper class to make creating {@link Ext.data.Store}s from XML data easier.
170
+ * A XmlStore will be automatically configured with a {@link Ext.data.XmlReader}.</p>
171
+ * <p>A store configuration would be something like:<pre><code>
172
+ var store = new Ext.data.XmlStore({
173
+ // store configs
174
+ autoDestroy: true,
175
+ storeId: 'myStore',
176
+ url: 'sheldon.xml', // automatically configures a HttpProxy
177
+ // reader configs
178
+ record: 'Item', // records will have an "Item" tag
179
+ idPath: 'ASIN',
180
+ totalRecords: '@TotalResults'
181
+ fields: [
182
+ // set up the fields mapping into the xml doc
183
+ // The first needs mapping, the others are very basic
184
+ {name: 'Author', mapping: 'ItemAttributes > Author'},
185
+ 'Title', 'Manufacturer', 'ProductGroup'
186
+ ]
187
+ });
188
+ * </code></pre></p>
189
+ * <p>This store is configured to consume a returned object of the form:<pre><code>
190
+ &#60?xml version="1.0" encoding="UTF-8"?>
191
+ &#60ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-05-15">
192
+ &#60Items>
193
+ &#60Request>
194
+ &#60IsValid>True&#60/IsValid>
195
+ &#60ItemSearchRequest>
196
+ &#60Author>Sidney Sheldon&#60/Author>
197
+ &#60SearchIndex>Books&#60/SearchIndex>
198
+ &#60/ItemSearchRequest>
199
+ &#60/Request>
200
+ &#60TotalResults>203&#60/TotalResults>
201
+ &#60TotalPages>21&#60/TotalPages>
202
+ &#60Item>
203
+ &#60ASIN>0446355453&#60/ASIN>
204
+ &#60DetailPageURL>
205
+ http://www.amazon.com/
206
+ &#60/DetailPageURL>
207
+ &#60ItemAttributes>
208
+ &#60Author>Sidney Sheldon&#60/Author>
209
+ &#60Manufacturer>Warner Books&#60/Manufacturer>
210
+ &#60ProductGroup>Book&#60/ProductGroup>
211
+ &#60Title>Master of the Game&#60/Title>
212
+ &#60/ItemAttributes>
213
+ &#60/Item>
214
+ &#60/Items>
215
+ &#60/ItemSearchResponse>
216
+ * </code></pre>
217
+ * An object literal of this form could also be used as the {@link #data} config option.</p>
218
+ * <p><b>Note:</b> Although not listed here, this class accepts all of the configuration options of
219
+ * <b>{@link Ext.data.XmlReader XmlReader}</b>.</p>
220
+ * @constructor
221
+ * @param {Object} config
222
+ * @xtype xmlstore
223
+ */
224
+ Ext.data.XmlStore = Ext.extend(Ext.data.Store, {
225
+ /**
226
+ * @cfg {Ext.data.DataReader} reader @hide
227
+ */
228
+ constructor: function(config){
229
+ Ext.data.XmlStore.superclass.constructor.call(this, Ext.apply(config, {
230
+ reader: new Ext.data.XmlReader(config)
231
+ }));
232
+ }
233
+ });
234
+ Ext.reg('xmlstore', Ext.data.XmlStore);
@@ -0,0 +1,7 @@
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
+ Ext.data.XmlWriter=Ext.extend(Ext.data.DataWriter,{render:function(c,a,d,b){},createRecord:function(a){},updateRecord:function(a){},destroyRecord:function(a){}});Ext.data.XmlReader=function(a,b){a=a||{};Ext.data.XmlReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b){throw {message:"XmlReader.read: XML Document not available"}}return this.readRecords(b)},readRecords:function(z){this.xmlData=z;var s=z.documentElement||z;var l=Ext.DomQuery;var b=this.recordType,p=b.prototype.fields;var d=this.meta.idPath||this.meta.id;var h=0,e=true;if(this.meta.totalRecords){h=l.selectNumber(this.meta.totalRecords,s,0)}if(this.meta.success){var o=l.selectValue(this.meta.success,s,true);e=o!==false&&o!=="false"}var w=[];var A=l.select(this.meta.record,s);for(var u=0,x=A.length;u<x;u++){var r=A[u];var a={};var m=d?l.selectValue(d,r):undefined;for(var t=0,k=p.length;t<k;t++){var y=p.items[t];var g=l.selectValue(Ext.value(y.mapping,y.name,true),r,y.defaultValue);g=y.convert(g,r);a[y.name]=g}var c=new b(a,m);c.node=r;w[w.length]=c}return{success:e,records:w,totalRecords:h||w.length}},readResponse:Ext.emptyFn});Ext.data.XmlStore=Ext.extend(Ext.data.Store,{constructor:function(a){Ext.data.XmlStore.superclass.constructor.call(this,Ext.apply(a,{reader:new Ext.data.XmlReader(a)}))}});Ext.reg("xmlstore",Ext.data.XmlStore);
@@ -0,0 +1,1121 @@
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.DirectProxy
9
+ * @extends Ext.data.DataProxy
10
+ */
11
+ Ext.data.DirectProxy = function(config){
12
+ Ext.apply(this, config);
13
+ if(typeof this.paramOrder == 'string'){
14
+ this.paramOrder = this.paramOrder.split(/[\s,|]/);
15
+ }
16
+ Ext.data.DirectProxy.superclass.constructor.call(this, config);
17
+ };
18
+
19
+ Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, {
20
+ /**
21
+ * @cfg {Array/String} paramOrder Defaults to <tt>undefined</tt>. A list of params to be executed
22
+ * server side. Specify the params in the order in which they must be executed on the server-side
23
+ * as either (1) an Array of String values, or (2) a String of params delimited by either whitespace,
24
+ * comma, or pipe. For example,
25
+ * any of the following would be acceptable:<pre><code>
26
+ paramOrder: ['param1','param2','param3']
27
+ paramOrder: 'param1 param2 param3'
28
+ paramOrder: 'param1,param2,param3'
29
+ paramOrder: 'param1|param2|param'
30
+ </code></pre>
31
+ */
32
+ paramOrder: undefined,
33
+
34
+ /**
35
+ * @cfg {Boolean} paramsAsHash
36
+ * Send parameters as a collection of named arguments (defaults to <tt>true</tt>). Providing a
37
+ * <tt>{@link #paramOrder}</tt> nullifies this configuration.
38
+ */
39
+ paramsAsHash: true,
40
+
41
+ /**
42
+ * @cfg {Function} directFn
43
+ * Function to call when executing a request. directFn is a simple alternative to defining the api configuration-parameter
44
+ * for Store's which will not implement a full CRUD api.
45
+ */
46
+ directFn : undefined,
47
+
48
+ // protected
49
+ doRequest : function(action, rs, params, reader, callback, scope, options) {
50
+ var args = [];
51
+ var directFn = this.api[action] || this.directFn;
52
+
53
+ switch (action) {
54
+ case Ext.data.Api.actions.create:
55
+ args.push(params[reader.meta.root]); // <-- create(Hash)
56
+ break;
57
+ case Ext.data.Api.actions.read:
58
+ if(this.paramOrder){
59
+ for(var i = 0, len = this.paramOrder.length; i < len; i++){
60
+ args.push(params[this.paramOrder[i]]);
61
+ }
62
+ }else if(this.paramsAsHash){
63
+ args.push(params);
64
+ }
65
+ break;
66
+ case Ext.data.Api.actions.update:
67
+ args.push(params[reader.meta.idProperty]); // <-- save(Integer/Integer[], Hash/Hash[])
68
+ args.push(params[reader.meta.root]);
69
+ break;
70
+ case Ext.data.Api.actions.destroy:
71
+ args.push(params[reader.meta.root]); // <-- destroy(Int/Int[])
72
+ break;
73
+ }
74
+
75
+ var trans = {
76
+ params : params || {},
77
+ callback : callback,
78
+ scope : scope,
79
+ arg : options,
80
+ reader: reader
81
+ };
82
+
83
+ args.push(this.createCallback(action, rs, trans), this);
84
+ directFn.apply(window, args);
85
+ },
86
+
87
+ // private
88
+ createCallback : function(action, rs, trans) {
89
+ return function(result, res) {
90
+ if (!res.status) {
91
+ // @deprecated fire loadexception
92
+ if (action === Ext.data.Api.actions.read) {
93
+ this.fireEvent("loadexception", this, trans, res, null);
94
+ }
95
+ this.fireEvent('exception', this, 'remote', action, trans, res, null);
96
+ trans.callback.call(trans.scope, null, trans.arg, false);
97
+ return;
98
+ }
99
+ if (action === Ext.data.Api.actions.read) {
100
+ this.onRead(action, trans, result, res);
101
+ } else {
102
+ this.onWrite(action, trans, result, res, rs);
103
+ }
104
+ };
105
+ },
106
+ /**
107
+ * Callback for read actions
108
+ * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
109
+ * @param {Object} trans The request transaction object
110
+ * @param {Object} res The server response
111
+ * @private
112
+ */
113
+ onRead : function(action, trans, result, res) {
114
+ var records;
115
+ try {
116
+ records = trans.reader.readRecords(result);
117
+ }
118
+ catch (ex) {
119
+ // @deprecated: Fire old loadexception for backwards-compat.
120
+ this.fireEvent("loadexception", this, trans, res, ex);
121
+
122
+ this.fireEvent('exception', this, 'response', action, trans, res, ex);
123
+ trans.callback.call(trans.scope, null, trans.arg, false);
124
+ return;
125
+ }
126
+ this.fireEvent("load", this, res, trans.arg);
127
+ trans.callback.call(trans.scope, records, trans.arg, true);
128
+ },
129
+ /**
130
+ * Callback for write actions
131
+ * @param {String} action [Ext.data.Api.actions.create|read|update|destroy]
132
+ * @param {Object} trans The request transaction object
133
+ * @param {Object} res The server response
134
+ * @private
135
+ */
136
+ onWrite : function(action, trans, result, res, rs) {
137
+ this.fireEvent("write", this, action, result, res, rs, trans.arg);
138
+ trans.callback.call(trans.scope, result, res, true);
139
+ }
140
+ });
141
+
142
+ /**
143
+ * @class Ext.data.DirectStore
144
+ * @extends Ext.data.Store
145
+ * <p>Small helper class to create an {@link Ext.data.Store} configured with an
146
+ * {@link Ext.data.DirectProxy} and {@link Ext.data.JsonReader} to make interacting
147
+ * with an {@link Ext.Direct} Server-side {@link Ext.direct.Provider Provider} easier.
148
+ * To create a different proxy/reader combination create a basic {@link Ext.data.Store}
149
+ * configured as needed.</p>
150
+ *
151
+ * <p><b>*Note:</b> Although they are not listed, this class inherits all of the config options of:</p>
152
+ * <div><ul class="mdetail-params">
153
+ * <li><b>{@link Ext.data.Store Store}</b></li>
154
+ * <div class="sub-desc"><ul class="mdetail-params">
155
+ *
156
+ * </ul></div>
157
+ * <li><b>{@link Ext.data.JsonReader JsonReader}</b></li>
158
+ * <div class="sub-desc"><ul class="mdetail-params">
159
+ * <li><tt><b>{@link Ext.data.JsonReader#root root}</b></tt></li>
160
+ * <li><tt><b>{@link Ext.data.JsonReader#idProperty idProperty}</b></tt></li>
161
+ * <li><tt><b>{@link Ext.data.JsonReader#totalProperty totalProperty}</b></tt></li>
162
+ * </ul></div>
163
+ *
164
+ * <li><b>{@link Ext.data.DirectProxy DirectProxy}</b></li>
165
+ * <div class="sub-desc"><ul class="mdetail-params">
166
+ * <li><tt><b>{@link Ext.data.DirectProxy#directFn directFn}</b></tt></li>
167
+ * <li><tt><b>{@link Ext.data.DirectProxy#paramOrder paramOrder}</b></tt></li>
168
+ * <li><tt><b>{@link Ext.data.DirectProxy#paramsAsHash paramsAsHash}</b></tt></li>
169
+ * </ul></div>
170
+ * </ul></div>
171
+ *
172
+ * @xtype directstore
173
+ *
174
+ * @constructor
175
+ * @param {Object} config
176
+ */
177
+ Ext.data.DirectStore = function(c){
178
+ // each transaction upon a singe record will generatie a distinct Direct transaction since Direct queues them into one Ajax request.
179
+ c.batchTransactions = false;
180
+
181
+ Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, {
182
+ proxy: (typeof(c.proxy) == 'undefined') ? new Ext.data.DirectProxy(Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn,api')) : c.proxy,
183
+ reader: (typeof(c.reader) == 'undefined' && typeof(c.fields) == 'object') ? new Ext.data.JsonReader(Ext.copyTo({}, c, 'totalProperty,root,idProperty'), c.fields) : c.reader
184
+ }));
185
+ };
186
+ Ext.extend(Ext.data.DirectStore, Ext.data.Store, {});
187
+ Ext.reg('directstore', Ext.data.DirectStore);
188
+ /**
189
+ * @class Ext.Direct
190
+ * @extends Ext.util.Observable
191
+ * <p><b><u>Overview</u></b></p>
192
+ *
193
+ * <p>Ext.Direct aims to streamline communication between the client and server
194
+ * by providing a single interface that reduces the amount of common code
195
+ * typically required to validate data and handle returned data packets
196
+ * (reading data, error conditions, etc).</p>
197
+ *
198
+ * <p>The Ext.direct namespace includes several classes for a closer integration
199
+ * with the server-side. The Ext.data namespace also includes classes for working
200
+ * with Ext.data.Stores which are backed by data from an Ext.Direct method.</p>
201
+ *
202
+ * <p><b><u>Specification</u></b></p>
203
+ *
204
+ * <p>For additional information consult the
205
+ * <a href="http://extjs.com/products/extjs/direct.php">Ext.Direct Specification</a>.</p>
206
+ *
207
+ * <p><b><u>Providers</u></b></p>
208
+ *
209
+ * <p>Ext.Direct uses a provider architecture, where one or more providers are
210
+ * used to transport data to and from the server. There are several providers
211
+ * that exist in the core at the moment:</p><div class="mdetail-params"><ul>
212
+ *
213
+ * <li>{@link Ext.direct.JsonProvider JsonProvider} for simple JSON operations</li>
214
+ * <li>{@link Ext.direct.PollingProvider PollingProvider} for repeated requests</li>
215
+ * <li>{@link Ext.direct.RemotingProvider RemotingProvider} exposes server side
216
+ * on the client.</li>
217
+ * </ul></div>
218
+ *
219
+ * <p>A provider does not need to be invoked directly, providers are added via
220
+ * {@link Ext.Direct}.{@link Ext.Direct#add add}.</p>
221
+ *
222
+ * <p><b><u>Router</u></b></p>
223
+ *
224
+ * <p>Ext.Direct utilizes a "router" on the server to direct requests from the client
225
+ * to the appropriate server-side method. Because the Ext.Direct API is completely
226
+ * platform-agnostic, you could completely swap out a Java based server solution
227
+ * and replace it with one that uses C# without changing the client side JavaScript
228
+ * at all.</p>
229
+ *
230
+ * <p><b><u>Server side events</u></b></p>
231
+ *
232
+ * <p>Custom events from the server may be handled by the client by adding
233
+ * listeners, for example:</p>
234
+ * <pre><code>
235
+ {"type":"event","name":"message","data":"Successfully polled at: 11:19:30 am"}
236
+
237
+ // add a handler for a 'message' event sent by the server
238
+ Ext.Direct.on('message', function(e){
239
+ out.append(String.format('&lt;p>&lt;i>{0}&lt;/i>&lt;/p>', e.data));
240
+ out.el.scrollTo('t', 100000, true);
241
+ });
242
+ * </code></pre>
243
+ * @singleton
244
+ */
245
+ Ext.Direct = Ext.extend(Ext.util.Observable, {
246
+ /**
247
+ * Each event type implements a getData() method. The default event types are:
248
+ * <div class="mdetail-params"><ul>
249
+ * <li><b><tt>event</tt></b> : Ext.Direct.Event</li>
250
+ * <li><b><tt>exception</tt></b> : Ext.Direct.ExceptionEvent</li>
251
+ * <li><b><tt>rpc</tt></b> : Ext.Direct.RemotingEvent</li>
252
+ * </ul></div>
253
+ * @property eventTypes
254
+ * @type Object
255
+ */
256
+
257
+ /**
258
+ * Four types of possible exceptions which can occur:
259
+ * <div class="mdetail-params"><ul>
260
+ * <li><b><tt>Ext.Direct.exceptions.TRANSPORT</tt></b> : 'xhr'</li>
261
+ * <li><b><tt>Ext.Direct.exceptions.PARSE</tt></b> : 'parse'</li>
262
+ * <li><b><tt>Ext.Direct.exceptions.LOGIN</tt></b> : 'login'</li>
263
+ * <li><b><tt>Ext.Direct.exceptions.SERVER</tt></b> : 'exception'</li>
264
+ * </ul></div>
265
+ * @property exceptions
266
+ * @type Object
267
+ */
268
+ exceptions: {
269
+ TRANSPORT: 'xhr',
270
+ PARSE: 'parse',
271
+ LOGIN: 'login',
272
+ SERVER: 'exception'
273
+ },
274
+
275
+ // private
276
+ constructor: function(){
277
+ this.addEvents(
278
+ /**
279
+ * @event event
280
+ * Fires after an event.
281
+ * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
282
+ * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
283
+ */
284
+ 'event',
285
+ /**
286
+ * @event exception
287
+ * Fires after an event exception.
288
+ * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
289
+ */
290
+ 'exception'
291
+ );
292
+ this.transactions = {};
293
+ this.providers = {};
294
+ },
295
+
296
+ /**
297
+ * Adds an Ext.Direct Provider and creates the proxy or stub methods to execute server-side methods.
298
+ * If the provider is not already connected, it will auto-connect.
299
+ * <pre><code>
300
+ var pollProv = new Ext.direct.PollingProvider({
301
+ url: 'php/poll2.php'
302
+ });
303
+
304
+ Ext.Direct.addProvider(
305
+ {
306
+ "type":"remoting", // create a {@link Ext.direct.RemotingProvider}
307
+ "url":"php\/router.php", // url to connect to the Ext.Direct server-side router.
308
+ "actions":{ // each property within the actions object represents a Class
309
+ "TestAction":[ // array of methods within each server side Class
310
+ {
311
+ "name":"doEcho", // name of method
312
+ "len":1
313
+ },{
314
+ "name":"multiply",
315
+ "len":1
316
+ },{
317
+ "name":"doForm",
318
+ "formHandler":true, // handle form on server with Ext.Direct.Transaction
319
+ "len":1
320
+ }]
321
+ },
322
+ "namespace":"myApplication",// namespace to create the Remoting Provider in
323
+ },{
324
+ type: 'polling', // create a {@link Ext.direct.PollingProvider}
325
+ url: 'php/poll.php'
326
+ },
327
+ pollProv // reference to previously created instance
328
+ );
329
+ * </code></pre>
330
+ * @param {Object/Array} provider Accepts either an Array of Provider descriptions (an instance
331
+ * or config object for a Provider) or any number of Provider descriptions as arguments. Each
332
+ * Provider description instructs Ext.Direct how to create client-side stub methods.
333
+ */
334
+ addProvider : function(provider){
335
+ var a = arguments;
336
+ if(a.length > 1){
337
+ for(var i = 0, len = a.length; i < len; i++){
338
+ this.addProvider(a[i]);
339
+ }
340
+ return;
341
+ }
342
+
343
+ // if provider has not already been instantiated
344
+ if(!provider.events){
345
+ provider = new Ext.Direct.PROVIDERS[provider.type](provider);
346
+ }
347
+ provider.id = provider.id || Ext.id();
348
+ this.providers[provider.id] = provider;
349
+
350
+ provider.on('data', this.onProviderData, this);
351
+ provider.on('exception', this.onProviderException, this);
352
+
353
+
354
+ if(!provider.isConnected()){
355
+ provider.connect();
356
+ }
357
+
358
+ return provider;
359
+ },
360
+
361
+ /**
362
+ * Retrieve a {@link Ext.direct.Provider provider} by the
363
+ * <b><tt>{@link Ext.direct.Provider#id id}</tt></b> specified when the provider is
364
+ * {@link #addProvider added}.
365
+ * @param {String} id Unique identifier assigned to the provider when calling {@link #addProvider}
366
+ */
367
+ getProvider : function(id){
368
+ return this.providers[id];
369
+ },
370
+
371
+ removeProvider : function(id){
372
+ var provider = id.id ? id : this.providers[id.id];
373
+ provider.un('data', this.onProviderData, this);
374
+ provider.un('exception', this.onProviderException, this);
375
+ delete this.providers[provider.id];
376
+ return provider;
377
+ },
378
+
379
+ addTransaction: function(t){
380
+ this.transactions[t.tid] = t;
381
+ return t;
382
+ },
383
+
384
+ removeTransaction: function(t){
385
+ delete this.transactions[t.tid || t];
386
+ return t;
387
+ },
388
+
389
+ getTransaction: function(tid){
390
+ return this.transactions[tid.tid || tid];
391
+ },
392
+
393
+ onProviderData : function(provider, e){
394
+ if(Ext.isArray(e)){
395
+ for(var i = 0, len = e.length; i < len; i++){
396
+ this.onProviderData(provider, e[i]);
397
+ }
398
+ return;
399
+ }
400
+ if(e.name && e.name != 'event' && e.name != 'exception'){
401
+ this.fireEvent(e.name, e);
402
+ }else if(e.type == 'exception'){
403
+ this.fireEvent('exception', e);
404
+ }
405
+ this.fireEvent('event', e, provider);
406
+ },
407
+
408
+ createEvent : function(response, extraProps){
409
+ return new Ext.Direct.eventTypes[response.type](Ext.apply(response, extraProps));
410
+ }
411
+ });
412
+ // overwrite impl. with static instance
413
+ Ext.Direct = new Ext.Direct();
414
+
415
+ Ext.Direct.TID = 1;
416
+ Ext.Direct.PROVIDERS = {};/**
417
+ * @class Ext.Direct.Transaction
418
+ * @extends Object
419
+ * <p>Supporting Class for Ext.Direct (not intended to be used directly).</p>
420
+ * @constructor
421
+ * @param {Object} config
422
+ */
423
+ Ext.Direct.Transaction = function(config){
424
+ Ext.apply(this, config);
425
+ this.tid = ++Ext.Direct.TID;
426
+ this.retryCount = 0;
427
+ };
428
+ Ext.Direct.Transaction.prototype = {
429
+ send: function(){
430
+ this.provider.queueTransaction(this);
431
+ },
432
+
433
+ retry: function(){
434
+ this.retryCount++;
435
+ this.send();
436
+ },
437
+
438
+ getProvider: function(){
439
+ return this.provider;
440
+ }
441
+ };Ext.Direct.Event = function(config){
442
+ Ext.apply(this, config);
443
+ }
444
+ Ext.Direct.Event.prototype = {
445
+ status: true,
446
+ getData: function(){
447
+ return this.data;
448
+ }
449
+ };
450
+
451
+ Ext.Direct.RemotingEvent = Ext.extend(Ext.Direct.Event, {
452
+ type: 'rpc',
453
+ getTransaction: function(){
454
+ return this.transaction || Ext.Direct.getTransaction(this.tid);
455
+ }
456
+ });
457
+
458
+ Ext.Direct.ExceptionEvent = Ext.extend(Ext.Direct.RemotingEvent, {
459
+ status: false,
460
+ type: 'exception'
461
+ });
462
+
463
+ Ext.Direct.eventTypes = {
464
+ 'rpc': Ext.Direct.RemotingEvent,
465
+ 'event': Ext.Direct.Event,
466
+ 'exception': Ext.Direct.ExceptionEvent
467
+ };
468
+
469
+ /**
470
+ * @class Ext.direct.Provider
471
+ * @extends Ext.util.Observable
472
+ * <p>Ext.direct.Provider is an abstract class meant to be extended.</p>
473
+ *
474
+ * <p>For example ExtJs implements the following subclasses:</p>
475
+ * <pre><code>
476
+ Provider
477
+ |
478
+ +---{@link Ext.direct.JsonProvider JsonProvider}
479
+ |
480
+ +---{@link Ext.direct.PollingProvider PollingProvider}
481
+ |
482
+ +---{@link Ext.direct.RemotingProvider RemotingProvider}
483
+ * </code></pre>
484
+ * @abstract
485
+ */
486
+ Ext.direct.Provider = Ext.extend(Ext.util.Observable, {
487
+ /**
488
+ * @cfg {String} id
489
+ * The unique id of the provider (defaults to an {@link Ext#id auto-assigned id}).
490
+ * You should assign an id if you need to be able to access the provider later and you do
491
+ * not have an object reference available, for example:
492
+ * <pre><code>
493
+ Ext.Direct.addProvider(
494
+ {
495
+ type: 'polling',
496
+ url: 'php/poll.php',
497
+ id: 'poll-provider'
498
+ }
499
+ );
500
+
501
+ var p = {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#getProvider getProvider}('poll-provider');
502
+ p.disconnect();
503
+ * </code></pre>
504
+ */
505
+
506
+ /**
507
+ * @cfg {Number} priority
508
+ * Priority of the request. Lower is higher priority, <tt>0</tt> means "duplex" (always on).
509
+ * All Providers default to <tt>1</tt> except for PollingProvider which defaults to <tt>3</tt>.
510
+ */
511
+ priority: 1,
512
+
513
+ /**
514
+ * @cfg {String} type
515
+ * <b>Required</b>, <tt>undefined</tt> by default. The <tt>type</tt> of provider specified
516
+ * to {@link Ext.Direct Ext.Direct}.{@link Ext.Direct#addProvider addProvider} to create a
517
+ * new Provider. Acceptable values by default are:<div class="mdetail-params"><ul>
518
+ * <li><b><tt>polling</tt></b> : {@link Ext.direct.PollingProvider PollingProvider}</li>
519
+ * <li><b><tt>remoting</tt></b> : {@link Ext.direct.RemotingProvider RemotingProvider}</li>
520
+ * </ul></div>
521
+ */
522
+
523
+ // private
524
+ constructor : function(config){
525
+ Ext.apply(this, config);
526
+ this.addEvents(
527
+ /**
528
+ * @event connect
529
+ * Fires when the Provider connects to the server-side
530
+ * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
531
+ */
532
+ 'connect',
533
+ /**
534
+ * @event disconnect
535
+ * Fires when the Provider disconnects from the server-side
536
+ * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
537
+ */
538
+ 'disconnect',
539
+ /**
540
+ * @event data
541
+ * Fires when the Provider receives data from the server-side
542
+ * @param {Ext.direct.Provider} provider The {@link Ext.direct.Provider Provider}.
543
+ * @param {event} e The {@link Ext.Direct#eventTypes Ext.Direct.Event type} that occurred.
544
+ */
545
+ 'data',
546
+ /**
547
+ * @event exception
548
+ * Fires when the Provider receives an exception from the server-side
549
+ */
550
+ 'exception'
551
+ );
552
+ Ext.direct.Provider.superclass.constructor.call(this, config);
553
+ },
554
+
555
+ /**
556
+ * Returns whether or not the server-side is currently connected.
557
+ * Abstract method for subclasses to implement.
558
+ */
559
+ isConnected: function(){
560
+ return false;
561
+ },
562
+
563
+ /**
564
+ * Abstract methods for subclasses to implement.
565
+ */
566
+ connect: Ext.emptyFn,
567
+
568
+ /**
569
+ * Abstract methods for subclasses to implement.
570
+ */
571
+ disconnect: Ext.emptyFn
572
+ });
573
+ /**
574
+ * @class Ext.direct.JsonProvider
575
+ * @extends Ext.direct.Provider
576
+ */
577
+ Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, {
578
+ parseResponse: function(xhr){
579
+ if(!Ext.isEmpty(xhr.responseText)){
580
+ if(typeof xhr.responseText == 'object'){
581
+ return xhr.responseText;
582
+ }
583
+ return Ext.decode(xhr.responseText);
584
+ }
585
+ return null;
586
+ },
587
+
588
+ getEvents: function(xhr){
589
+ var data = null;
590
+ try{
591
+ data = this.parseResponse(xhr);
592
+ }catch(e){
593
+ var event = new Ext.Direct.ExceptionEvent({
594
+ data: e,
595
+ xhr: xhr,
596
+ code: Ext.Direct.exceptions.PARSE,
597
+ message: 'Error parsing json response: \n\n ' + data
598
+ })
599
+ return [event];
600
+ }
601
+ var events = [];
602
+ if(Ext.isArray(data)){
603
+ for(var i = 0, len = data.length; i < len; i++){
604
+ events.push(Ext.Direct.createEvent(data[i]));
605
+ }
606
+ }else{
607
+ events.push(Ext.Direct.createEvent(data));
608
+ }
609
+ return events;
610
+ }
611
+ });/**
612
+ * @class Ext.direct.PollingProvider
613
+ * @extends Ext.direct.JsonProvider
614
+ *
615
+ * <p>Provides for repetitive polling of the server at distinct {@link #interval intervals}.
616
+ * The initial request for data originates from the client, and then is responded to by the
617
+ * server.</p>
618
+ *
619
+ * <p>All configurations for the PollingProvider should be generated by the server-side
620
+ * API portion of the Ext.Direct stack.</p>
621
+ *
622
+ * <p>An instance of PollingProvider may be created directly via the new keyword or by simply
623
+ * specifying <tt>type = 'polling'</tt>. For example:</p>
624
+ * <pre><code>
625
+ var pollA = new Ext.direct.PollingProvider({
626
+ type:'polling',
627
+ url: 'php/pollA.php',
628
+ });
629
+ Ext.Direct.addProvider(pollA);
630
+ pollA.disconnect();
631
+
632
+ Ext.Direct.addProvider(
633
+ {
634
+ type:'polling',
635
+ url: 'php/pollB.php',
636
+ id: 'pollB-provider'
637
+ }
638
+ );
639
+ var pollB = Ext.Direct.getProvider('pollB-provider');
640
+ * </code></pre>
641
+ */
642
+ Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, {
643
+ /**
644
+ * @cfg {Number} priority
645
+ * Priority of the request (defaults to <tt>3</tt>). See {@link Ext.direct.Provider#priority}.
646
+ */
647
+ // override default priority
648
+ priority: 3,
649
+
650
+ /**
651
+ * @cfg {Number} interval
652
+ * How often to poll the server-side in milliseconds (defaults to <tt>3000</tt> - every
653
+ * 3 seconds).
654
+ */
655
+ interval: 3000,
656
+
657
+ /**
658
+ * @cfg {Object} baseParams An object containing properties which are to be sent as parameters
659
+ * on every polling request
660
+ */
661
+
662
+ /**
663
+ * @cfg {String/Function} url
664
+ * The url which the PollingProvider should contact with each request. This can also be
665
+ * an imported Ext.Direct method which will accept the baseParams as its only argument.
666
+ */
667
+
668
+ // private
669
+ constructor : function(config){
670
+ Ext.direct.PollingProvider.superclass.constructor.call(this, config);
671
+ this.addEvents(
672
+ /**
673
+ * @event beforepoll
674
+ * Fired immediately before a poll takes place, an event handler can return false
675
+ * in order to cancel the poll.
676
+ * @param {Ext.direct.PollingProvider}
677
+ */
678
+ 'beforepoll',
679
+ /**
680
+ * @event poll
681
+ * This event has not yet been implemented.
682
+ * @param {Ext.direct.PollingProvider}
683
+ */
684
+ 'poll'
685
+ );
686
+ },
687
+
688
+ // inherited
689
+ isConnected: function(){
690
+ return !!this.pollTask;
691
+ },
692
+
693
+ /**
694
+ * Connect to the server-side and begin the polling process. To handle each
695
+ * response subscribe to the data event.
696
+ */
697
+ connect: function(){
698
+ if(this.url && !this.pollTask){
699
+ this.pollTask = Ext.TaskMgr.start({
700
+ run: function(){
701
+ if(this.fireEvent('beforepoll', this) !== false){
702
+ if(typeof this.url == 'function'){
703
+ this.url(this.baseParams);
704
+ }else{
705
+ Ext.Ajax.request({
706
+ url: this.url,
707
+ callback: this.onData,
708
+ scope: this,
709
+ params: this.baseParams
710
+ });
711
+ }
712
+ }
713
+ },
714
+ interval: this.interval,
715
+ scope: this
716
+ });
717
+ this.fireEvent('connect', this);
718
+ }else if(!this.url){
719
+ throw 'Error initializing PollingProvider, no url configured.';
720
+ }
721
+ },
722
+
723
+ /**
724
+ * Disconnect from the server-side and stop the polling process. The disconnect
725
+ * event will be fired on a successful disconnect.
726
+ */
727
+ disconnect: function(){
728
+ if(this.pollTask){
729
+ Ext.TaskMgr.stop(this.pollTask);
730
+ delete this.pollTask;
731
+ this.fireEvent('disconnect', this);
732
+ }
733
+ },
734
+
735
+ // private
736
+ onData: function(opt, success, xhr){
737
+ if(success){
738
+ var events = this.getEvents(xhr);
739
+ for(var i = 0, len = events.length; i < len; i++){
740
+ var e = events[i];
741
+ this.fireEvent('data', this, e);
742
+ }
743
+ }else{
744
+ var e = new Ext.Direct.ExceptionEvent({
745
+ data: e,
746
+ code: Ext.Direct.exceptions.TRANSPORT,
747
+ message: 'Unable to connect to the server.',
748
+ xhr: xhr
749
+ });
750
+ this.fireEvent('data', this, e);
751
+ }
752
+ }
753
+ });
754
+
755
+ Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider;/**
756
+ * @class Ext.direct.RemotingProvider
757
+ * @extends Ext.direct.JsonProvider
758
+ *
759
+ * <p>The {@link Ext.direct.RemotingProvider RemotingProvider} exposes access to
760
+ * server side methods on the client (a remote procedure call (RPC) type of
761
+ * connection where the client can initiate a procedure on the server).</p>
762
+ *
763
+ * <p>This allows for code to be organized in a fashion that is maintainable,
764
+ * while providing a clear path between client and server, something that is
765
+ * not always apparent when using URLs.</p>
766
+ *
767
+ * <p>To accomplish this the server-side needs to describe what classes and methods
768
+ * are available on the client-side. This configuration will typically be
769
+ * outputted by the server-side Ext.Direct stack when the API description is built.</p>
770
+ */
771
+ Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, {
772
+ /**
773
+ * @cfg {Object} actions
774
+ * Object literal defining the server side actions and methods. For example, if
775
+ * the Provider is configured with:
776
+ * <pre><code>
777
+ "actions":{ // each property within the 'actions' object represents a server side Class
778
+ "TestAction":[ // array of methods within each server side Class to be
779
+ { // stubbed out on client
780
+ "name":"doEcho",
781
+ "len":1
782
+ },{
783
+ "name":"multiply",// name of method
784
+ "len":2 // The number of parameters that will be used to create an
785
+ // array of data to send to the server side function.
786
+ // Ensure the server sends back a Number, not a String.
787
+ },{
788
+ "name":"doForm",
789
+ "formHandler":true, // direct the client to use specialized form handling method
790
+ "len":1
791
+ }]
792
+ }
793
+ * </code></pre>
794
+ * <p>Note that a Store is not required, a server method can be called at any time.
795
+ * In the following example a <b>client side</b> handler is used to call the
796
+ * server side method "multiply" in the server-side "TestAction" Class:</p>
797
+ * <pre><code>
798
+ TestAction.multiply(
799
+ 2, 4, // pass two arguments to server, so specify len=2
800
+ // callback function after the server is called
801
+ // result: the result returned by the server
802
+ // e: Ext.Direct.RemotingEvent object
803
+ function(result, e){
804
+ var t = e.getTransaction();
805
+ var action = t.action; // server side Class called
806
+ var method = t.method; // server side method called
807
+ if(e.status){
808
+ var answer = Ext.encode(result); // 8
809
+
810
+ }else{
811
+ var msg = e.message; // failure message
812
+ }
813
+ }
814
+ );
815
+ * </code></pre>
816
+ * In the example above, the server side "multiply" function will be passed two
817
+ * arguments (2 and 4). The "multiply" method should return the value 8 which will be
818
+ * available as the <tt>result</tt> in the example above.
819
+ */
820
+
821
+ /**
822
+ * @cfg {String/Object} namespace
823
+ * Namespace for the Remoting Provider (defaults to the browser global scope of <i>window</i>).
824
+ * Explicitly specify the namespace Object, or specify a String to have a
825
+ * {@link Ext#namespace namespace created} implicitly.
826
+ */
827
+
828
+ /**
829
+ * @cfg {String} url
830
+ * <b>Required<b>. The url to connect to the {@link Ext.Direct} server-side router.
831
+ */
832
+
833
+ /**
834
+ * @cfg {String} enableUrlEncode
835
+ * Specify which param will hold the arguments for the method.
836
+ * Defaults to <tt>'data'</tt>.
837
+ */
838
+
839
+ /**
840
+ * @cfg {Number/Boolean} enableBuffer
841
+ * <p><tt>true</tt> or <tt>false</tt> to enable or disable combining of method
842
+ * calls. If a number is specified this is the amount of time in milliseconds
843
+ * to wait before sending a batched request (defaults to <tt>10</tt>).</p>
844
+ * <br><p>Calls which are received within the specified timeframe will be
845
+ * concatenated together and sent in a single request, optimizing the
846
+ * application by reducing the amount of round trips that have to be made
847
+ * to the server.</p>
848
+ */
849
+ enableBuffer: 10,
850
+
851
+ /**
852
+ * @cfg {Number} maxRetries
853
+ * Number of times to re-attempt delivery on failure of a call.
854
+ */
855
+ maxRetries: 1,
856
+
857
+ constructor : function(config){
858
+ Ext.direct.RemotingProvider.superclass.constructor.call(this, config);
859
+ this.addEvents(
860
+ /**
861
+ * @event beforecall
862
+ * Fires immediately before the client-side sends off the RPC call.
863
+ * By returning false from an event handler you can prevent the call from
864
+ * executing.
865
+ * @param {Ext.direct.RemotingProvider} provider
866
+ * @param {Ext.Direct.Transaction} transaction
867
+ */
868
+ 'beforecall',
869
+ /**
870
+ * @event call
871
+ * Fires immediately after the request to the server-side is sent. This does
872
+ * NOT fire after the response has come back from the call.
873
+ * @param {Ext.direct.RemotingProvider} provider
874
+ * @param {Ext.Direct.Transaction} transaction
875
+ */
876
+ 'call'
877
+ );
878
+ this.namespace = (typeof this.namespace === 'string') ? Ext.ns(this.namespace) : this.namespace || window;
879
+ this.transactions = {};
880
+ this.callBuffer = [];
881
+ },
882
+
883
+ // private
884
+ initAPI : function(){
885
+ var o = this.actions;
886
+ for(var c in o){
887
+ var cls = this.namespace[c] || (this.namespace[c] = {});
888
+ var ms = o[c];
889
+ for(var i = 0, len = ms.length; i < len; i++){
890
+ var m = ms[i];
891
+ cls[m.name] = this.createMethod(c, m);
892
+ }
893
+ }
894
+ },
895
+
896
+ // inherited
897
+ isConnected: function(){
898
+ return !!this.connected;
899
+ },
900
+
901
+ connect: function(){
902
+ if(this.url){
903
+ this.initAPI();
904
+ this.connected = true;
905
+ this.fireEvent('connect', this);
906
+ }else if(!this.url){
907
+ throw 'Error initializing RemotingProvider, no url configured.';
908
+ }
909
+ },
910
+
911
+ disconnect: function(){
912
+ if(this.connected){
913
+ this.connected = false;
914
+ this.fireEvent('disconnect', this);
915
+ }
916
+ },
917
+
918
+ onData: function(opt, success, xhr){
919
+ if(success){
920
+ var events = this.getEvents(xhr);
921
+ for(var i = 0, len = events.length; i < len; i++){
922
+ var e = events[i];
923
+ var t = this.getTransaction(e);
924
+ this.fireEvent('data', this, e);
925
+ if(t){
926
+ this.doCallback(t, e, true);
927
+ Ext.Direct.removeTransaction(t);
928
+ }
929
+ }
930
+ }else{
931
+ var ts = [].concat(opt.ts);
932
+ for(var i = 0, len = ts.length; i < len; i++){
933
+ var t = this.getTransaction(ts[i]);
934
+ if(t && t.retryCount < this.maxRetries){
935
+ t.retry();
936
+ }else{
937
+ var e = new Ext.Direct.ExceptionEvent({
938
+ data: e,
939
+ transaction: t,
940
+ code: Ext.Direct.exceptions.TRANSPORT,
941
+ message: 'Unable to connect to the server.',
942
+ xhr: xhr
943
+ });
944
+ this.fireEvent('data', this, e);
945
+ if(t){
946
+ this.doCallback(t, e, false);
947
+ Ext.Direct.removeTransaction(t);
948
+ }
949
+ }
950
+ }
951
+ }
952
+ },
953
+
954
+ getCallData: function(t){
955
+ return {
956
+ action: t.action,
957
+ method: t.method,
958
+ data: t.data,
959
+ type: 'rpc',
960
+ tid: t.tid
961
+ };
962
+ },
963
+
964
+ doSend : function(data){
965
+ var o = {
966
+ url: this.url,
967
+ callback: this.onData,
968
+ scope: this,
969
+ ts: data
970
+ };
971
+
972
+ // send only needed data
973
+ var callData;
974
+ if(Ext.isArray(data)){
975
+ callData = [];
976
+ for(var i = 0, len = data.length; i < len; i++){
977
+ callData.push(this.getCallData(data[i]));
978
+ }
979
+ }else{
980
+ callData = this.getCallData(data);
981
+ }
982
+
983
+ if(this.enableUrlEncode){
984
+ var params = {};
985
+ params[typeof this.enableUrlEncode == 'string' ? this.enableUrlEncode : 'data'] = Ext.encode(callData);
986
+ o.params = params;
987
+ }else{
988
+ o.jsonData = callData;
989
+ }
990
+ Ext.Ajax.request(o);
991
+ },
992
+
993
+ combineAndSend : function(){
994
+ var len = this.callBuffer.length;
995
+ if(len > 0){
996
+ this.doSend(len == 1 ? this.callBuffer[0] : this.callBuffer);
997
+ this.callBuffer = [];
998
+ }
999
+ },
1000
+
1001
+ queueTransaction: function(t){
1002
+ if(t.form){
1003
+ this.processForm(t);
1004
+ return;
1005
+ }
1006
+ this.callBuffer.push(t);
1007
+ if(this.enableBuffer){
1008
+ if(!this.callTask){
1009
+ this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this);
1010
+ }
1011
+ this.callTask.delay(typeof this.enableBuffer == 'number' ? this.enableBuffer : 10);
1012
+ }else{
1013
+ this.combineAndSend();
1014
+ }
1015
+ },
1016
+
1017
+ doCall : function(c, m, args){
1018
+ var data = null, hs = args[m.len], scope = args[m.len+1];
1019
+
1020
+ if(m.len !== 0){
1021
+ data = args.slice(0, m.len);
1022
+ }
1023
+
1024
+ var t = new Ext.Direct.Transaction({
1025
+ provider: this,
1026
+ args: args,
1027
+ action: c,
1028
+ method: m.name,
1029
+ data: data,
1030
+ cb: scope && Ext.isFunction(hs) ? hs.createDelegate(scope) : hs
1031
+ });
1032
+
1033
+ if(this.fireEvent('beforecall', this, t) !== false){
1034
+ Ext.Direct.addTransaction(t);
1035
+ this.queueTransaction(t);
1036
+ this.fireEvent('call', this, t);
1037
+ }
1038
+ },
1039
+
1040
+ doForm : function(c, m, form, callback, scope){
1041
+ var t = new Ext.Direct.Transaction({
1042
+ provider: this,
1043
+ action: c,
1044
+ method: m.name,
1045
+ args:[form, callback, scope],
1046
+ cb: scope && Ext.isFunction(callback) ? callback.createDelegate(scope) : callback,
1047
+ isForm: true
1048
+ });
1049
+
1050
+ if(this.fireEvent('beforecall', this, t) !== false){
1051
+ Ext.Direct.addTransaction(t);
1052
+ var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data',
1053
+ params = {
1054
+ extTID: t.tid,
1055
+ extAction: c,
1056
+ extMethod: m.name,
1057
+ extType: 'rpc',
1058
+ extUpload: String(isUpload)
1059
+ };
1060
+
1061
+ // change made from typeof callback check to callback.params
1062
+ // to support addl param passing in DirectSubmit EAC 6/2
1063
+ Ext.apply(t, {
1064
+ form: Ext.getDom(form),
1065
+ isUpload: isUpload,
1066
+ params: callback && Ext.isObject(callback.params) ? Ext.apply(params, callback.params) : params
1067
+ });
1068
+ this.fireEvent('call', this, t);
1069
+ this.processForm(t);
1070
+ }
1071
+ },
1072
+
1073
+ processForm: function(t){
1074
+ Ext.Ajax.request({
1075
+ url: this.url,
1076
+ params: t.params,
1077
+ callback: this.onData,
1078
+ scope: this,
1079
+ form: t.form,
1080
+ isUpload: t.isUpload,
1081
+ ts: t
1082
+ });
1083
+ },
1084
+
1085
+ createMethod : function(c, m){
1086
+ var f;
1087
+ if(!m.formHandler){
1088
+ f = function(){
1089
+ this.doCall(c, m, Array.prototype.slice.call(arguments, 0));
1090
+ }.createDelegate(this);
1091
+ }else{
1092
+ f = function(form, callback, scope){
1093
+ this.doForm(c, m, form, callback, scope);
1094
+ }.createDelegate(this);
1095
+ }
1096
+ f.directCfg = {
1097
+ action: c,
1098
+ method: m
1099
+ };
1100
+ return f;
1101
+ },
1102
+
1103
+ getTransaction: function(opt){
1104
+ return opt && opt.tid ? Ext.Direct.getTransaction(opt.tid) : null;
1105
+ },
1106
+
1107
+ doCallback: function(t, e){
1108
+ var fn = e.status ? 'success' : 'failure';
1109
+ if(t && t.cb){
1110
+ var hs = t.cb;
1111
+ var result = e.result || e.data;
1112
+ if(Ext.isFunction(hs)){
1113
+ hs(result, e);
1114
+ } else{
1115
+ Ext.callback(hs[fn], hs.scope, [result, e]);
1116
+ Ext.callback(hs.callback, hs.scope, [result, e]);
1117
+ }
1118
+ }
1119
+ }
1120
+ });
1121
+ Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider;