extjs-rails 4.1.0.alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (517) hide show
  1. data/.gitignore +18 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE +36 -0
  4. data/README.md +29 -0
  5. data/Rakefile +2 -0
  6. data/app/assets/javascripts/extjs-rails/extjs-rails.js +1 -0
  7. data/app/assets/javascripts/extjs-rails/index.js.erb +9 -0
  8. data/app/assets/javascripts/extjs-rails/sdk.jsb3 +2017 -0
  9. data/app/assets/javascripts/extjs-rails/src/AbstractComponent.js +3290 -0
  10. data/app/assets/javascripts/extjs-rails/src/AbstractManager.js +144 -0
  11. data/app/assets/javascripts/extjs-rails/src/AbstractPlugin.js +72 -0
  12. data/app/assets/javascripts/extjs-rails/src/Action.js +276 -0
  13. data/app/assets/javascripts/extjs-rails/src/Ajax.js +99 -0
  14. data/app/assets/javascripts/extjs-rails/src/Component.js +1344 -0
  15. data/app/assets/javascripts/extjs-rails/src/ComponentLoader.js +202 -0
  16. data/app/assets/javascripts/extjs-rails/src/ComponentManager.js +47 -0
  17. data/app/assets/javascripts/extjs-rails/src/ComponentQuery.js +521 -0
  18. data/app/assets/javascripts/extjs-rails/src/Editor.js +494 -0
  19. data/app/assets/javascripts/extjs-rails/src/ElementLoader.js +404 -0
  20. data/app/assets/javascripts/extjs-rails/src/FocusManager.js +712 -0
  21. data/app/assets/javascripts/extjs-rails/src/Img.js +111 -0
  22. data/app/assets/javascripts/extjs-rails/src/Layer.js +543 -0
  23. data/app/assets/javascripts/extjs-rails/src/LoadMask.js +432 -0
  24. data/app/assets/javascripts/extjs-rails/src/ModelManager.js +186 -0
  25. data/app/assets/javascripts/extjs-rails/src/PluginManager.js +110 -0
  26. data/app/assets/javascripts/extjs-rails/src/ProgressBar.js +336 -0
  27. data/app/assets/javascripts/extjs-rails/src/Shadow.js +233 -0
  28. data/app/assets/javascripts/extjs-rails/src/ShadowPool.js +43 -0
  29. data/app/assets/javascripts/extjs-rails/src/Template.js +331 -0
  30. data/app/assets/javascripts/extjs-rails/src/XTemplate.js +365 -0
  31. data/app/assets/javascripts/extjs-rails/src/XTemplateCompiler.js +450 -0
  32. data/app/assets/javascripts/extjs-rails/src/XTemplateParser.js +249 -0
  33. data/app/assets/javascripts/extjs-rails/src/ZIndexManager.js +519 -0
  34. data/app/assets/javascripts/extjs-rails/src/app/Application.js +271 -0
  35. data/app/assets/javascripts/extjs-rails/src/app/Controller.js +458 -0
  36. data/app/assets/javascripts/extjs-rails/src/app/EventBus.js +112 -0
  37. data/app/assets/javascripts/extjs-rails/src/button/Button.js +1483 -0
  38. data/app/assets/javascripts/extjs-rails/src/button/Cycle.js +215 -0
  39. data/app/assets/javascripts/extjs-rails/src/button/Split.js +99 -0
  40. data/app/assets/javascripts/extjs-rails/src/chart/Callout.js +140 -0
  41. data/app/assets/javascripts/extjs-rails/src/chart/Chart.js +966 -0
  42. data/app/assets/javascripts/extjs-rails/src/chart/Highlight.js +172 -0
  43. data/app/assets/javascripts/extjs-rails/src/chart/Label.js +241 -0
  44. data/app/assets/javascripts/extjs-rails/src/chart/Legend.js +474 -0
  45. data/app/assets/javascripts/extjs-rails/src/chart/LegendItem.js +217 -0
  46. data/app/assets/javascripts/extjs-rails/src/chart/Mask.js +230 -0
  47. data/app/assets/javascripts/extjs-rails/src/chart/MaskLayer.js +48 -0
  48. data/app/assets/javascripts/extjs-rails/src/chart/Navigation.js +79 -0
  49. data/app/assets/javascripts/extjs-rails/src/chart/Shape.js +106 -0
  50. data/app/assets/javascripts/extjs-rails/src/chart/Tip.js +98 -0
  51. data/app/assets/javascripts/extjs-rails/src/chart/TipSurface.js +42 -0
  52. data/app/assets/javascripts/extjs-rails/src/chart/axis/Abstract.js +73 -0
  53. data/app/assets/javascripts/extjs-rails/src/chart/axis/Axis.js +961 -0
  54. data/app/assets/javascripts/extjs-rails/src/chart/axis/Category.js +130 -0
  55. data/app/assets/javascripts/extjs-rails/src/chart/axis/Gauge.js +203 -0
  56. data/app/assets/javascripts/extjs-rails/src/chart/axis/Numeric.js +235 -0
  57. data/app/assets/javascripts/extjs-rails/src/chart/axis/Radial.js +204 -0
  58. data/app/assets/javascripts/extjs-rails/src/chart/axis/Time.js +135 -0
  59. data/app/assets/javascripts/extjs-rails/src/chart/series/Area.js +803 -0
  60. data/app/assets/javascripts/extjs-rails/src/chart/series/Bar.js +853 -0
  61. data/app/assets/javascripts/extjs-rails/src/chart/series/Cartesian.js +328 -0
  62. data/app/assets/javascripts/extjs-rails/src/chart/series/Column.js +104 -0
  63. data/app/assets/javascripts/extjs-rails/src/chart/series/Gauge.js +490 -0
  64. data/app/assets/javascripts/extjs-rails/src/chart/series/Line.js +1104 -0
  65. data/app/assets/javascripts/extjs-rails/src/chart/series/Pie.js +1072 -0
  66. data/app/assets/javascripts/extjs-rails/src/chart/series/Radar.js +440 -0
  67. data/app/assets/javascripts/extjs-rails/src/chart/series/Scatter.js +668 -0
  68. data/app/assets/javascripts/extjs-rails/src/chart/series/Series.js +443 -0
  69. data/app/assets/javascripts/extjs-rails/src/chart/theme/Base.js +175 -0
  70. data/app/assets/javascripts/extjs-rails/src/chart/theme/Theme.js +253 -0
  71. data/app/assets/javascripts/extjs-rails/src/container/AbstractContainer.js +1062 -0
  72. data/app/assets/javascripts/extjs-rails/src/container/ButtonGroup.js +143 -0
  73. data/app/assets/javascripts/extjs-rails/src/container/Container.js +212 -0
  74. data/app/assets/javascripts/extjs-rails/src/container/DockingContainer.js +265 -0
  75. data/app/assets/javascripts/extjs-rails/src/container/Viewport.js +184 -0
  76. data/app/assets/javascripts/extjs-rails/src/core/dom/Element.form.js +50 -0
  77. data/app/assets/javascripts/extjs-rails/src/core/dom/Element.static-more.js +159 -0
  78. data/app/assets/javascripts/extjs-rails/src/core/examples/index.html +321 -0
  79. data/app/assets/javascripts/extjs-rails/src/core/examples/index.js +6 -0
  80. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/CTO.js +25 -0
  81. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/CoolGuy.js +20 -0
  82. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Developer.js +43 -0
  83. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Gun.js +3 -0
  84. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/HumanResource.js +23 -0
  85. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Musician.js +20 -0
  86. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Person.js +50 -0
  87. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/ability/CanComposeSongs.js +9 -0
  88. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/ability/CanPlayGuitar.js +9 -0
  89. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/ability/CanSing.js +18 -0
  90. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/A.js +3 -0
  91. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/B.js +3 -0
  92. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/C.js +3 -0
  93. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/D.js +3 -0
  94. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/E.js +3 -0
  95. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/notdeadlock/A.js +3 -0
  96. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/notdeadlock/B.js +4 -0
  97. data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/notdeadlock/C.js +3 -0
  98. data/app/assets/javascripts/extjs-rails/src/core/src/EventManager.js +1167 -0
  99. data/app/assets/javascripts/extjs-rails/src/core/src/EventObject.js +883 -0
  100. data/app/assets/javascripts/extjs-rails/src/core/src/Ext-more.js +1283 -0
  101. data/app/assets/javascripts/extjs-rails/src/core/src/Ext.js +736 -0
  102. data/app/assets/javascripts/extjs-rails/src/core/src/Support.js +662 -0
  103. data/app/assets/javascripts/extjs-rails/src/core/src/class/Base.js +1085 -0
  104. data/app/assets/javascripts/extjs-rails/src/core/src/class/Class.js +676 -0
  105. data/app/assets/javascripts/extjs-rails/src/core/src/class/ClassManager.js +1591 -0
  106. data/app/assets/javascripts/extjs-rails/src/core/src/class/Loader.js +1423 -0
  107. data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.alignment.js +173 -0
  108. data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.insertion.js +193 -0
  109. data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.js +681 -0
  110. data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.position.js +356 -0
  111. data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.static.js +474 -0
  112. data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.style.js +851 -0
  113. data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.traversal.js +180 -0
  114. data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractHelper.js +291 -0
  115. data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractQuery.js +72 -0
  116. data/app/assets/javascripts/extjs-rails/src/core/src/dom/CompositeElement.js +75 -0
  117. data/app/assets/javascripts/extjs-rails/src/core/src/dom/CompositeElementLite.js +436 -0
  118. data/app/assets/javascripts/extjs-rails/src/core/src/dom/DomQuery-aria.js +1049 -0
  119. data/app/assets/javascripts/extjs-rails/src/core/src/env/Browser.js +186 -0
  120. data/app/assets/javascripts/extjs-rails/src/core/src/env/FeatureDetector.js +274 -0
  121. data/app/assets/javascripts/extjs-rails/src/core/src/env/OS.js +141 -0
  122. data/app/assets/javascripts/extjs-rails/src/core/src/lang/Array.js +1205 -0
  123. data/app/assets/javascripts/extjs-rails/src/core/src/lang/Date.js +1463 -0
  124. data/app/assets/javascripts/extjs-rails/src/core/src/lang/Error.js +326 -0
  125. data/app/assets/javascripts/extjs-rails/src/core/src/lang/Function.js +485 -0
  126. data/app/assets/javascripts/extjs-rails/src/core/src/lang/Number.js +175 -0
  127. data/app/assets/javascripts/extjs-rails/src/core/src/lang/Object.js +606 -0
  128. data/app/assets/javascripts/extjs-rails/src/core/src/lang/String.js +333 -0
  129. data/app/assets/javascripts/extjs-rails/src/core/src/misc/JSON.js +236 -0
  130. data/app/assets/javascripts/extjs-rails/src/core/src/perf/Accumulator.js +244 -0
  131. data/app/assets/javascripts/extjs-rails/src/core/src/perf/Monitor.js +197 -0
  132. data/app/assets/javascripts/extjs-rails/src/core/src/util/DelayedTask.js +71 -0
  133. data/app/assets/javascripts/extjs-rails/src/core/src/util/Event.js +215 -0
  134. data/app/assets/javascripts/extjs-rails/src/core/src/util/Format.js +551 -0
  135. data/app/assets/javascripts/extjs-rails/src/core/src/util/TaskManager.js +417 -0
  136. data/app/assets/javascripts/extjs-rails/src/core/src/version/Version.js +364 -0
  137. data/app/assets/javascripts/extjs-rails/src/core/test/unit/README.MD +91 -0
  138. data/app/assets/javascripts/extjs-rails/src/core/test/unit/bootstrap.js +39 -0
  139. data/app/assets/javascripts/extjs-rails/src/core/test/unit/build/build-data.js +34 -0
  140. data/app/assets/javascripts/extjs-rails/src/core/test/unit/build/build.sh +2 -0
  141. data/app/assets/javascripts/extjs-rails/src/core/test/unit/data.js +27 -0
  142. data/app/assets/javascripts/extjs-rails/src/core/test/unit/index.html +15 -0
  143. data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom.html +40 -0
  144. data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/extjs-api.js +12 -0
  145. data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/platform-api.js +134 -0
  146. data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/sanity.js +4 -0
  147. data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/touch-api-out.js +128 -0
  148. data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/touch-api.js +89 -0
  149. data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/env/Environment.js +357 -0
  150. data/app/assets/javascripts/extjs-rails/src/core/test/unit/resources/APITest.js +37 -0
  151. data/app/assets/javascripts/extjs-rails/src/core/test/unit/resources/jsb3.js +14 -0
  152. data/app/assets/javascripts/extjs-rails/src/core/test/unit/resources/test-setup.js +137 -0
  153. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/EventManager.js +629 -0
  154. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/Ext-mess.backup +198 -0
  155. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/Ext-more.js +520 -0
  156. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/Ext.js +1550 -0
  157. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/Support.js +250 -0
  158. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/class/Base.js +47 -0
  159. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/class/Class.js +561 -0
  160. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/class/ClassManager.js +555 -0
  161. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/CompositeElementLite.js +409 -0
  162. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/DomHelper.js +444 -0
  163. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.insertion.js +342 -0
  164. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.js +731 -0
  165. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.static.js +201 -0
  166. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.style.js +118 -0
  167. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.traversal.js +336 -0
  168. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Array.js +1229 -0
  169. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Date.js +697 -0
  170. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Error.js +277 -0
  171. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Function.js +536 -0
  172. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Number.js +323 -0
  173. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Object.js +591 -0
  174. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/String.js +451 -0
  175. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/misc/JSON.js +252 -0
  176. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/util/Format.js +521 -0
  177. data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/version/Version.js +148 -0
  178. data/app/assets/javascripts/extjs-rails/src/core/test/unit/specs.html +19 -0
  179. data/app/assets/javascripts/extjs-rails/src/data/AbstractStore.js +887 -0
  180. data/app/assets/javascripts/extjs-rails/src/data/ArrayStore.js +74 -0
  181. data/app/assets/javascripts/extjs-rails/src/data/Batch.js +236 -0
  182. data/app/assets/javascripts/extjs-rails/src/data/BufferStore.js +13 -0
  183. data/app/assets/javascripts/extjs-rails/src/data/Connection.js +969 -0
  184. data/app/assets/javascripts/extjs-rails/src/data/DirectStore.js +50 -0
  185. data/app/assets/javascripts/extjs-rails/src/data/Errors.js +52 -0
  186. data/app/assets/javascripts/extjs-rails/src/data/Field.js +341 -0
  187. data/app/assets/javascripts/extjs-rails/src/data/IdGenerator.js +198 -0
  188. data/app/assets/javascripts/extjs-rails/src/data/JsonP.js +253 -0
  189. data/app/assets/javascripts/extjs-rails/src/data/JsonPStore.js +51 -0
  190. data/app/assets/javascripts/extjs-rails/src/data/JsonStore.js +60 -0
  191. data/app/assets/javascripts/extjs-rails/src/data/Model.js +1673 -0
  192. data/app/assets/javascripts/extjs-rails/src/data/NodeInterface.js +1294 -0
  193. data/app/assets/javascripts/extjs-rails/src/data/NodeStore.js +254 -0
  194. data/app/assets/javascripts/extjs-rails/src/data/Operation.js +331 -0
  195. data/app/assets/javascripts/extjs-rails/src/data/Request.js +40 -0
  196. data/app/assets/javascripts/extjs-rails/src/data/ResultSet.js +56 -0
  197. data/app/assets/javascripts/extjs-rails/src/data/SequentialIdGenerator.js +61 -0
  198. data/app/assets/javascripts/extjs-rails/src/data/SortTypes.js +125 -0
  199. data/app/assets/javascripts/extjs-rails/src/data/Store.js +2609 -0
  200. data/app/assets/javascripts/extjs-rails/src/data/StoreManager.js +156 -0
  201. data/app/assets/javascripts/extjs-rails/src/data/Tree.js +290 -0
  202. data/app/assets/javascripts/extjs-rails/src/data/TreeStore.js +655 -0
  203. data/app/assets/javascripts/extjs-rails/src/data/Types.js +190 -0
  204. data/app/assets/javascripts/extjs-rails/src/data/UuidGenerator.js +215 -0
  205. data/app/assets/javascripts/extjs-rails/src/data/XmlStore.js +76 -0
  206. data/app/assets/javascripts/extjs-rails/src/data/association/Association.js +243 -0
  207. data/app/assets/javascripts/extjs-rails/src/data/association/BelongsTo.js +291 -0
  208. data/app/assets/javascripts/extjs-rails/src/data/association/HasMany.js +289 -0
  209. data/app/assets/javascripts/extjs-rails/src/data/association/HasOne.js +304 -0
  210. data/app/assets/javascripts/extjs-rails/src/data/proxy/Ajax.js +282 -0
  211. data/app/assets/javascripts/extjs-rails/src/data/proxy/Client.js +21 -0
  212. data/app/assets/javascripts/extjs-rails/src/data/proxy/Direct.js +181 -0
  213. data/app/assets/javascripts/extjs-rails/src/data/proxy/JsonP.js +313 -0
  214. data/app/assets/javascripts/extjs-rails/src/data/proxy/LocalStorage.js +69 -0
  215. data/app/assets/javascripts/extjs-rails/src/data/proxy/Memory.js +156 -0
  216. data/app/assets/javascripts/extjs-rails/src/data/proxy/Proxy.js +433 -0
  217. data/app/assets/javascripts/extjs-rails/src/data/proxy/Rest.js +173 -0
  218. data/app/assets/javascripts/extjs-rails/src/data/proxy/Server.js +460 -0
  219. data/app/assets/javascripts/extjs-rails/src/data/proxy/SessionStorage.js +39 -0
  220. data/app/assets/javascripts/extjs-rails/src/data/proxy/WebStorage.js +546 -0
  221. data/app/assets/javascripts/extjs-rails/src/data/reader/Array.js +68 -0
  222. data/app/assets/javascripts/extjs-rails/src/data/reader/Json.js +383 -0
  223. data/app/assets/javascripts/extjs-rails/src/data/reader/Reader.js +735 -0
  224. data/app/assets/javascripts/extjs-rails/src/data/reader/Xml.js +292 -0
  225. data/app/assets/javascripts/extjs-rails/src/data/validations.js +149 -0
  226. data/app/assets/javascripts/extjs-rails/src/data/writer/Json.js +81 -0
  227. data/app/assets/javascripts/extjs-rails/src/data/writer/Writer.js +147 -0
  228. data/app/assets/javascripts/extjs-rails/src/data/writer/Xml.js +88 -0
  229. data/app/assets/javascripts/extjs-rails/src/dd/DD.js +300 -0
  230. data/app/assets/javascripts/extjs-rails/src/dd/DDProxy.js +204 -0
  231. data/app/assets/javascripts/extjs-rails/src/dd/DDTarget.js +171 -0
  232. data/app/assets/javascripts/extjs-rails/src/dd/DragDrop.js +1101 -0
  233. data/app/assets/javascripts/extjs-rails/src/dd/DragDropManager.js +1264 -0
  234. data/app/assets/javascripts/extjs-rails/src/dd/DragSource.js +392 -0
  235. data/app/assets/javascripts/extjs-rails/src/dd/DragTracker.js +562 -0
  236. data/app/assets/javascripts/extjs-rails/src/dd/DragZone.js +137 -0
  237. data/app/assets/javascripts/extjs-rails/src/dd/DropTarget.js +118 -0
  238. data/app/assets/javascripts/extjs-rails/src/dd/DropZone.js +254 -0
  239. data/app/assets/javascripts/extjs-rails/src/dd/Registry.js +117 -0
  240. data/app/assets/javascripts/extjs-rails/src/dd/ScrollManager.js +218 -0
  241. data/app/assets/javascripts/extjs-rails/src/dd/StatusProxy.js +179 -0
  242. data/app/assets/javascripts/extjs-rails/src/diag/layout/Context.js +523 -0
  243. data/app/assets/javascripts/extjs-rails/src/diag/layout/ContextItem.js +179 -0
  244. data/app/assets/javascripts/extjs-rails/src/direct/Event.js +35 -0
  245. data/app/assets/javascripts/extjs-rails/src/direct/ExceptionEvent.js +16 -0
  246. data/app/assets/javascripts/extjs-rails/src/direct/JsonProvider.js +82 -0
  247. data/app/assets/javascripts/extjs-rails/src/direct/Manager.js +263 -0
  248. data/app/assets/javascripts/extjs-rails/src/direct/PollingProvider.js +156 -0
  249. data/app/assets/javascripts/extjs-rails/src/direct/Provider.js +96 -0
  250. data/app/assets/javascripts/extjs-rails/src/direct/RemotingEvent.js +24 -0
  251. data/app/assets/javascripts/extjs-rails/src/direct/RemotingMethod.js +100 -0
  252. data/app/assets/javascripts/extjs-rails/src/direct/RemotingProvider.js +510 -0
  253. data/app/assets/javascripts/extjs-rails/src/direct/Transaction.js +41 -0
  254. data/app/assets/javascripts/extjs-rails/src/dom/Element.alignment.js +378 -0
  255. data/app/assets/javascripts/extjs-rails/src/dom/Element.anim.js +962 -0
  256. data/app/assets/javascripts/extjs-rails/src/dom/Element.dd.js +40 -0
  257. data/app/assets/javascripts/extjs-rails/src/dom/Element.fx.js +194 -0
  258. data/app/assets/javascripts/extjs-rails/src/dom/Element.js +1407 -0
  259. data/app/assets/javascripts/extjs-rails/src/dom/Element.position.js +501 -0
  260. data/app/assets/javascripts/extjs-rails/src/dom/Element.scroll.js +214 -0
  261. data/app/assets/javascripts/extjs-rails/src/dom/Element.style.js +792 -0
  262. data/app/assets/javascripts/extjs-rails/src/dom/Element.traversal.js +8 -0
  263. data/app/assets/javascripts/extjs-rails/src/dom/Helper.js +466 -0
  264. data/app/assets/javascripts/extjs-rails/src/dom/Query.js +1067 -0
  265. data/app/assets/javascripts/extjs-rails/src/draw/Color.js +303 -0
  266. data/app/assets/javascripts/extjs-rails/src/draw/Component.js +245 -0
  267. data/app/assets/javascripts/extjs-rails/src/draw/CompositeSprite.js +299 -0
  268. data/app/assets/javascripts/extjs-rails/src/draw/Draw.js +1217 -0
  269. data/app/assets/javascripts/extjs-rails/src/draw/Matrix.js +183 -0
  270. data/app/assets/javascripts/extjs-rails/src/draw/Sprite.js +554 -0
  271. data/app/assets/javascripts/extjs-rails/src/draw/SpriteDD.js +87 -0
  272. data/app/assets/javascripts/extjs-rails/src/draw/Surface.js +1001 -0
  273. data/app/assets/javascripts/extjs-rails/src/draw/Text.js +175 -0
  274. data/app/assets/javascripts/extjs-rails/src/draw/engine/ImageExporter.js +106 -0
  275. data/app/assets/javascripts/extjs-rails/src/draw/engine/Svg.js +734 -0
  276. data/app/assets/javascripts/extjs-rails/src/draw/engine/SvgExporter.js +280 -0
  277. data/app/assets/javascripts/extjs-rails/src/draw/engine/Vml.js +916 -0
  278. data/app/assets/javascripts/extjs-rails/src/flash/Component.js +248 -0
  279. data/app/assets/javascripts/extjs-rails/src/form/Basic.js +1018 -0
  280. data/app/assets/javascripts/extjs-rails/src/form/CheckboxGroup.js +441 -0
  281. data/app/assets/javascripts/extjs-rails/src/form/CheckboxManager.js +26 -0
  282. data/app/assets/javascripts/extjs-rails/src/form/FieldAncestor.js +210 -0
  283. data/app/assets/javascripts/extjs-rails/src/form/FieldContainer.js +290 -0
  284. data/app/assets/javascripts/extjs-rails/src/form/FieldSet.js +506 -0
  285. data/app/assets/javascripts/extjs-rails/src/form/Label.js +110 -0
  286. data/app/assets/javascripts/extjs-rails/src/form/Labelable.js +764 -0
  287. data/app/assets/javascripts/extjs-rails/src/form/Panel.js +335 -0
  288. data/app/assets/javascripts/extjs-rails/src/form/RadioGroup.js +124 -0
  289. data/app/assets/javascripts/extjs-rails/src/form/RadioManager.js +26 -0
  290. data/app/assets/javascripts/extjs-rails/src/form/action/Action.js +307 -0
  291. data/app/assets/javascripts/extjs-rails/src/form/action/DirectLoad.js +107 -0
  292. data/app/assets/javascripts/extjs-rails/src/form/action/DirectSubmit.js +119 -0
  293. data/app/assets/javascripts/extjs-rails/src/form/action/Load.js +120 -0
  294. data/app/assets/javascripts/extjs-rails/src/form/action/StandardSubmit.js +34 -0
  295. data/app/assets/javascripts/extjs-rails/src/form/action/Submit.js +257 -0
  296. data/app/assets/javascripts/extjs-rails/src/form/field/Base.js +813 -0
  297. data/app/assets/javascripts/extjs-rails/src/form/field/Checkbox.js +505 -0
  298. data/app/assets/javascripts/extjs-rails/src/form/field/ComboBox.js +1427 -0
  299. data/app/assets/javascripts/extjs-rails/src/form/field/Date.js +578 -0
  300. data/app/assets/javascripts/extjs-rails/src/form/field/Display.js +155 -0
  301. data/app/assets/javascripts/extjs-rails/src/form/field/Field.js +430 -0
  302. data/app/assets/javascripts/extjs-rails/src/form/field/File.js +265 -0
  303. data/app/assets/javascripts/extjs-rails/src/form/field/Hidden.js +75 -0
  304. data/app/assets/javascripts/extjs-rails/src/form/field/HtmlEditor.js +1439 -0
  305. data/app/assets/javascripts/extjs-rails/src/form/field/Number.js +380 -0
  306. data/app/assets/javascripts/extjs-rails/src/form/field/Picker.js +321 -0
  307. data/app/assets/javascripts/extjs-rails/src/form/field/Radio.js +279 -0
  308. data/app/assets/javascripts/extjs-rails/src/form/field/Spinner.js +321 -0
  309. data/app/assets/javascripts/extjs-rails/src/form/field/Text.js +727 -0
  310. data/app/assets/javascripts/extjs-rails/src/form/field/TextArea.js +228 -0
  311. data/app/assets/javascripts/extjs-rails/src/form/field/Time.js +459 -0
  312. data/app/assets/javascripts/extjs-rails/src/form/field/Trigger.js +469 -0
  313. data/app/assets/javascripts/extjs-rails/src/form/field/VTypes.js +172 -0
  314. data/app/assets/javascripts/extjs-rails/src/fx/Anim.js +472 -0
  315. data/app/assets/javascripts/extjs-rails/src/fx/Animator.js +410 -0
  316. data/app/assets/javascripts/extjs-rails/src/fx/CubicBezier.js +77 -0
  317. data/app/assets/javascripts/extjs-rails/src/fx/Easing.js +136 -0
  318. data/app/assets/javascripts/extjs-rails/src/fx/Manager.js +353 -0
  319. data/app/assets/javascripts/extjs-rails/src/fx/PropertyHandler.js +381 -0
  320. data/app/assets/javascripts/extjs-rails/src/fx/Queue.js +123 -0
  321. data/app/assets/javascripts/extjs-rails/src/fx/target/Component.js +118 -0
  322. data/app/assets/javascripts/extjs-rails/src/fx/target/CompositeElement.js +46 -0
  323. data/app/assets/javascripts/extjs-rails/src/fx/target/CompositeElementCSS.js +22 -0
  324. data/app/assets/javascripts/extjs-rails/src/fx/target/CompositeSprite.js +34 -0
  325. data/app/assets/javascripts/extjs-rails/src/fx/target/Element.js +83 -0
  326. data/app/assets/javascripts/extjs-rails/src/fx/target/ElementCSS.js +77 -0
  327. data/app/assets/javascripts/extjs-rails/src/fx/target/Sprite.js +128 -0
  328. data/app/assets/javascripts/extjs-rails/src/fx/target/Target.js +36 -0
  329. data/app/assets/javascripts/extjs-rails/src/grid/CellEditor.js +172 -0
  330. data/app/assets/javascripts/extjs-rails/src/grid/ColumnComponentLayout.js +34 -0
  331. data/app/assets/javascripts/extjs-rails/src/grid/ColumnLayout.js +201 -0
  332. data/app/assets/javascripts/extjs-rails/src/grid/Lockable.js +863 -0
  333. data/app/assets/javascripts/extjs-rails/src/grid/LockingView.js +169 -0
  334. data/app/assets/javascripts/extjs-rails/src/grid/PagingScroller.js +539 -0
  335. data/app/assets/javascripts/extjs-rails/src/grid/Panel.js +393 -0
  336. data/app/assets/javascripts/extjs-rails/src/grid/RowEditor.js +731 -0
  337. data/app/assets/javascripts/extjs-rails/src/grid/RowNumberer.js +76 -0
  338. data/app/assets/javascripts/extjs-rails/src/grid/Scroller.js +5 -0
  339. data/app/assets/javascripts/extjs-rails/src/grid/View.js +44 -0
  340. data/app/assets/javascripts/extjs-rails/src/grid/ViewDropZone.js +41 -0
  341. data/app/assets/javascripts/extjs-rails/src/grid/column/Action.js +318 -0
  342. data/app/assets/javascripts/extjs-rails/src/grid/column/Boolean.js +82 -0
  343. data/app/assets/javascripts/extjs-rails/src/grid/column/Column.js +835 -0
  344. data/app/assets/javascripts/extjs-rails/src/grid/column/Date.js +63 -0
  345. data/app/assets/javascripts/extjs-rails/src/grid/column/Number.js +52 -0
  346. data/app/assets/javascripts/extjs-rails/src/grid/column/Template.js +58 -0
  347. data/app/assets/javascripts/extjs-rails/src/grid/feature/AbstractSummary.js +154 -0
  348. data/app/assets/javascripts/extjs-rails/src/grid/feature/Chunking.js +77 -0
  349. data/app/assets/javascripts/extjs-rails/src/grid/feature/Feature.js +158 -0
  350. data/app/assets/javascripts/extjs-rails/src/grid/feature/Grouping.js +822 -0
  351. data/app/assets/javascripts/extjs-rails/src/grid/feature/GroupingSummary.js +243 -0
  352. data/app/assets/javascripts/extjs-rails/src/grid/feature/RowBody.js +116 -0
  353. data/app/assets/javascripts/extjs-rails/src/grid/feature/RowWrap.js +120 -0
  354. data/app/assets/javascripts/extjs-rails/src/grid/feature/Summary.js +167 -0
  355. data/app/assets/javascripts/extjs-rails/src/grid/header/Container.js +965 -0
  356. data/app/assets/javascripts/extjs-rails/src/grid/header/DragZone.js +69 -0
  357. data/app/assets/javascripts/extjs-rails/src/grid/header/DropZone.js +265 -0
  358. data/app/assets/javascripts/extjs-rails/src/grid/plugin/CellEditing.js +453 -0
  359. data/app/assets/javascripts/extjs-rails/src/grid/plugin/DragDrop.js +254 -0
  360. data/app/assets/javascripts/extjs-rails/src/grid/plugin/Editing.js +561 -0
  361. data/app/assets/javascripts/extjs-rails/src/grid/plugin/HeaderReorderer.js +49 -0
  362. data/app/assets/javascripts/extjs-rails/src/grid/plugin/HeaderResizer.js +292 -0
  363. data/app/assets/javascripts/extjs-rails/src/grid/plugin/RowEditing.js +339 -0
  364. data/app/assets/javascripts/extjs-rails/src/grid/property/Grid.js +351 -0
  365. data/app/assets/javascripts/extjs-rails/src/grid/property/HeaderContainer.js +109 -0
  366. data/app/assets/javascripts/extjs-rails/src/grid/property/Property.js +36 -0
  367. data/app/assets/javascripts/extjs-rails/src/grid/property/Store.js +141 -0
  368. data/app/assets/javascripts/extjs-rails/src/layout/ClassList.js +90 -0
  369. data/app/assets/javascripts/extjs-rails/src/layout/Context.js +1232 -0
  370. data/app/assets/javascripts/extjs-rails/src/layout/ContextItem.js +1470 -0
  371. data/app/assets/javascripts/extjs-rails/src/layout/Layout.js +761 -0
  372. data/app/assets/javascripts/extjs-rails/src/layout/component/Auto.js +220 -0
  373. data/app/assets/javascripts/extjs-rails/src/layout/component/Body.js +80 -0
  374. data/app/assets/javascripts/extjs-rails/src/layout/component/BoundList.js +95 -0
  375. data/app/assets/javascripts/extjs-rails/src/layout/component/Button.js +261 -0
  376. data/app/assets/javascripts/extjs-rails/src/layout/component/Component.js +427 -0
  377. data/app/assets/javascripts/extjs-rails/src/layout/component/Dock.js +1132 -0
  378. data/app/assets/javascripts/extjs-rails/src/layout/component/Draw.js +79 -0
  379. data/app/assets/javascripts/extjs-rails/src/layout/component/FieldSet.js +62 -0
  380. data/app/assets/javascripts/extjs-rails/src/layout/component/ProgressBar.js +54 -0
  381. data/app/assets/javascripts/extjs-rails/src/layout/component/Tab.js +23 -0
  382. data/app/assets/javascripts/extjs-rails/src/layout/component/field/ComboBox.js +52 -0
  383. data/app/assets/javascripts/extjs-rails/src/layout/component/field/Field.js +372 -0
  384. data/app/assets/javascripts/extjs-rails/src/layout/component/field/FieldContainer.js +48 -0
  385. data/app/assets/javascripts/extjs-rails/src/layout/component/field/HtmlEditor.js +54 -0
  386. data/app/assets/javascripts/extjs-rails/src/layout/component/field/Slider.js +58 -0
  387. data/app/assets/javascripts/extjs-rails/src/layout/component/field/Text.js +75 -0
  388. data/app/assets/javascripts/extjs-rails/src/layout/component/field/TextArea.js +51 -0
  389. data/app/assets/javascripts/extjs-rails/src/layout/component/field/Trigger.js +132 -0
  390. data/app/assets/javascripts/extjs-rails/src/layout/container/Absolute.js +121 -0
  391. data/app/assets/javascripts/extjs-rails/src/layout/container/Accordion.js +308 -0
  392. data/app/assets/javascripts/extjs-rails/src/layout/container/Anchor.js +403 -0
  393. data/app/assets/javascripts/extjs-rails/src/layout/container/Auto.js +70 -0
  394. data/app/assets/javascripts/extjs-rails/src/layout/container/Border-old-js +1079 -0
  395. data/app/assets/javascripts/extjs-rails/src/layout/container/Border.js +816 -0
  396. data/app/assets/javascripts/extjs-rails/src/layout/container/Box.js +929 -0
  397. data/app/assets/javascripts/extjs-rails/src/layout/container/Card.js +361 -0
  398. data/app/assets/javascripts/extjs-rails/src/layout/container/CheckboxGroup.js +376 -0
  399. data/app/assets/javascripts/extjs-rails/src/layout/container/Column.js +234 -0
  400. data/app/assets/javascripts/extjs-rails/src/layout/container/Container.js +961 -0
  401. data/app/assets/javascripts/extjs-rails/src/layout/container/Editor.js +74 -0
  402. data/app/assets/javascripts/extjs-rails/src/layout/container/Fit.js +287 -0
  403. data/app/assets/javascripts/extjs-rails/src/layout/container/Form.js +157 -0
  404. data/app/assets/javascripts/extjs-rails/src/layout/container/HBox.js +134 -0
  405. data/app/assets/javascripts/extjs-rails/src/layout/container/Table.js +412 -0
  406. data/app/assets/javascripts/extjs-rails/src/layout/container/VBox.js +139 -0
  407. data/app/assets/javascripts/extjs-rails/src/layout/container/boxOverflow/Menu.js +365 -0
  408. data/app/assets/javascripts/extjs-rails/src/layout/container/boxOverflow/None.js +83 -0
  409. data/app/assets/javascripts/extjs-rails/src/layout/container/boxOverflow/Scroller.js +475 -0
  410. data/app/assets/javascripts/extjs-rails/src/menu/CheckItem.js +169 -0
  411. data/app/assets/javascripts/extjs-rails/src/menu/ColorPicker.js +110 -0
  412. data/app/assets/javascripts/extjs-rails/src/menu/DatePicker.js +100 -0
  413. data/app/assets/javascripts/extjs-rails/src/menu/Item.js +553 -0
  414. data/app/assets/javascripts/extjs-rails/src/menu/KeyNav.js +134 -0
  415. data/app/assets/javascripts/extjs-rails/src/menu/Manager.js +219 -0
  416. data/app/assets/javascripts/extjs-rails/src/menu/Menu.js +579 -0
  417. data/app/assets/javascripts/extjs-rails/src/menu/Separator.js +126 -0
  418. data/app/assets/javascripts/extjs-rails/src/panel/AbstractPanel.js +323 -0
  419. data/app/assets/javascripts/extjs-rails/src/panel/DD.js +99 -0
  420. data/app/assets/javascripts/extjs-rails/src/panel/Header.js +518 -0
  421. data/app/assets/javascripts/extjs-rails/src/panel/Panel.js +2150 -0
  422. data/app/assets/javascripts/extjs-rails/src/panel/Proxy.js +131 -0
  423. data/app/assets/javascripts/extjs-rails/src/panel/Table.js +1018 -0
  424. data/app/assets/javascripts/extjs-rails/src/panel/Tool.js +304 -0
  425. data/app/assets/javascripts/extjs-rails/src/picker/Color.js +219 -0
  426. data/app/assets/javascripts/extjs-rails/src/picker/Date.js +1140 -0
  427. data/app/assets/javascripts/extjs-rails/src/picker/Month.js +490 -0
  428. data/app/assets/javascripts/extjs-rails/src/picker/Time.js +165 -0
  429. data/app/assets/javascripts/extjs-rails/src/resizer/BorderSplitter.js +22 -0
  430. data/app/assets/javascripts/extjs-rails/src/resizer/BorderSplitterTracker.js +210 -0
  431. data/app/assets/javascripts/extjs-rails/src/resizer/Handle.js +29 -0
  432. data/app/assets/javascripts/extjs-rails/src/resizer/ResizeTracker.js +346 -0
  433. data/app/assets/javascripts/extjs-rails/src/resizer/Resizer.js +477 -0
  434. data/app/assets/javascripts/extjs-rails/src/resizer/Splitter.js +242 -0
  435. data/app/assets/javascripts/extjs-rails/src/resizer/SplitterTracker.js +230 -0
  436. data/app/assets/javascripts/extjs-rails/src/selection/CellModel.js +395 -0
  437. data/app/assets/javascripts/extjs-rails/src/selection/CheckboxModel.js +234 -0
  438. data/app/assets/javascripts/extjs-rails/src/selection/DataViewModel.js +160 -0
  439. data/app/assets/javascripts/extjs-rails/src/selection/Model.js +646 -0
  440. data/app/assets/javascripts/extjs-rails/src/selection/RowModel.js +499 -0
  441. data/app/assets/javascripts/extjs-rails/src/selection/TreeModel.js +78 -0
  442. data/app/assets/javascripts/extjs-rails/src/slider/Multi.js +835 -0
  443. data/app/assets/javascripts/extjs-rails/src/slider/Single.js +56 -0
  444. data/app/assets/javascripts/extjs-rails/src/slider/Thumb.js +259 -0
  445. data/app/assets/javascripts/extjs-rails/src/slider/Tip.js +130 -0
  446. data/app/assets/javascripts/extjs-rails/src/state/CookieProvider.js +120 -0
  447. data/app/assets/javascripts/extjs-rails/src/state/LocalStorageProvider.js +72 -0
  448. data/app/assets/javascripts/extjs-rails/src/state/Manager.js +70 -0
  449. data/app/assets/javascripts/extjs-rails/src/state/Provider.js +182 -0
  450. data/app/assets/javascripts/extjs-rails/src/state/Stateful.js +364 -0
  451. data/app/assets/javascripts/extjs-rails/src/tab/Bar.js +258 -0
  452. data/app/assets/javascripts/extjs-rails/src/tab/Panel.js +654 -0
  453. data/app/assets/javascripts/extjs-rails/src/tab/Tab.js +358 -0
  454. data/app/assets/javascripts/extjs-rails/src/tail.js +10 -0
  455. data/app/assets/javascripts/extjs-rails/src/tip/QuickTip.js +335 -0
  456. data/app/assets/javascripts/extjs-rails/src/tip/QuickTipManager.js +239 -0
  457. data/app/assets/javascripts/extjs-rails/src/tip/Tip.js +160 -0
  458. data/app/assets/javascripts/extjs-rails/src/tip/ToolTip.js +691 -0
  459. data/app/assets/javascripts/extjs-rails/src/toolbar/Fill.js +28 -0
  460. data/app/assets/javascripts/extjs-rails/src/toolbar/Item.js +16 -0
  461. data/app/assets/javascripts/extjs-rails/src/toolbar/Paging.js +600 -0
  462. data/app/assets/javascripts/extjs-rails/src/toolbar/Separator.js +23 -0
  463. data/app/assets/javascripts/extjs-rails/src/toolbar/Spacer.js +33 -0
  464. data/app/assets/javascripts/extjs-rails/src/toolbar/TextItem.js +57 -0
  465. data/app/assets/javascripts/extjs-rails/src/toolbar/Toolbar-legacy.js +123 -0
  466. data/app/assets/javascripts/extjs-rails/src/toolbar/Toolbar.js +447 -0
  467. data/app/assets/javascripts/extjs-rails/src/tree/Column.js +90 -0
  468. data/app/assets/javascripts/extjs-rails/src/tree/Panel.js +505 -0
  469. data/app/assets/javascripts/extjs-rails/src/tree/View.js +658 -0
  470. data/app/assets/javascripts/extjs-rails/src/tree/ViewDragZone.js +49 -0
  471. data/app/assets/javascripts/extjs-rails/src/tree/ViewDropZone.js +287 -0
  472. data/app/assets/javascripts/extjs-rails/src/tree/plugin/TreeViewDragDrop.js +244 -0
  473. data/app/assets/javascripts/extjs-rails/src/util/AbstractMixedCollection.js +772 -0
  474. data/app/assets/javascripts/extjs-rails/src/util/Animate.js +426 -0
  475. data/app/assets/javascripts/extjs-rails/src/util/Bindable.js +102 -0
  476. data/app/assets/javascripts/extjs-rails/src/util/CSS.js +185 -0
  477. data/app/assets/javascripts/extjs-rails/src/util/ClickRepeater.js +238 -0
  478. data/app/assets/javascripts/extjs-rails/src/util/ComponentDragger.js +126 -0
  479. data/app/assets/javascripts/extjs-rails/src/util/Cookies.js +91 -0
  480. data/app/assets/javascripts/extjs-rails/src/util/ElementContainer.js +293 -0
  481. data/app/assets/javascripts/extjs-rails/src/util/Filter.js +159 -0
  482. data/app/assets/javascripts/extjs-rails/src/util/Floating.js +321 -0
  483. data/app/assets/javascripts/extjs-rails/src/util/Grouper.js +26 -0
  484. data/app/assets/javascripts/extjs-rails/src/util/HashMap.js +356 -0
  485. data/app/assets/javascripts/extjs-rails/src/util/History.js +285 -0
  486. data/app/assets/javascripts/extjs-rails/src/util/Inflector.js +297 -0
  487. data/app/assets/javascripts/extjs-rails/src/util/KeyMap.js +427 -0
  488. data/app/assets/javascripts/extjs-rails/src/util/KeyNav.js +239 -0
  489. data/app/assets/javascripts/extjs-rails/src/util/LruCache.js +257 -0
  490. data/app/assets/javascripts/extjs-rails/src/util/Memento.js +131 -0
  491. data/app/assets/javascripts/extjs-rails/src/util/MixedCollection.js +239 -0
  492. data/app/assets/javascripts/extjs-rails/src/util/Observable.js +1003 -0
  493. data/app/assets/javascripts/extjs-rails/src/util/Offset.js +60 -0
  494. data/app/assets/javascripts/extjs-rails/src/util/Point.js +93 -0
  495. data/app/assets/javascripts/extjs-rails/src/util/ProtoElement.js +205 -0
  496. data/app/assets/javascripts/extjs-rails/src/util/Queue.js +76 -0
  497. data/app/assets/javascripts/extjs-rails/src/util/Region.js +388 -0
  498. data/app/assets/javascripts/extjs-rails/src/util/Renderable.js +1079 -0
  499. data/app/assets/javascripts/extjs-rails/src/util/Sortable.js +248 -0
  500. data/app/assets/javascripts/extjs-rails/src/util/Sorter.js +179 -0
  501. data/app/assets/javascripts/extjs-rails/src/util/TextMetrics.js +148 -0
  502. data/app/assets/javascripts/extjs-rails/src/view/AbstractView.js +1103 -0
  503. data/app/assets/javascripts/extjs-rails/src/view/BoundList.js +207 -0
  504. data/app/assets/javascripts/extjs-rails/src/view/BoundListKeyNav.js +92 -0
  505. data/app/assets/javascripts/extjs-rails/src/view/DragZone.js +106 -0
  506. data/app/assets/javascripts/extjs-rails/src/view/DropZone.js +240 -0
  507. data/app/assets/javascripts/extjs-rails/src/view/Table.js +1229 -0
  508. data/app/assets/javascripts/extjs-rails/src/view/TableChunker.js +139 -0
  509. data/app/assets/javascripts/extjs-rails/src/view/View.js +636 -0
  510. data/app/assets/javascripts/extjs-rails/src/window/MessageBox.js +880 -0
  511. data/app/assets/javascripts/extjs-rails/src/window/Window-legacy.js +56 -0
  512. data/app/assets/javascripts/extjs-rails/src/window/Window.js +793 -0
  513. data/extjs-rails.gemspec +24 -0
  514. data/lib/extjs-rails.rb +7 -0
  515. data/lib/extjs-rails/engine.rb +7 -0
  516. data/lib/extjs-rails/version.rb +5 -0
  517. metadata +660 -0
@@ -0,0 +1,248 @@
1
+ /**
2
+ * A simple Component for displaying an Adobe Flash SWF movie. The movie will be sized and can participate
3
+ * in layout like any other Component.
4
+ *
5
+ * This component requires the third-party SWFObject library version 2.2 or above. It is not included within
6
+ * the ExtJS distribution, so you will have to include it into your page manually in order to use this component.
7
+ * The SWFObject library can be downloaded from the [SWFObject project page](http://code.google.com/p/swfobject)
8
+ * and then simply import it into the head of your HTML document:
9
+ *
10
+ * <script type="text/javascript" src="path/to/local/swfobject.js"></script>
11
+ *
12
+ * ## Configuration
13
+ *
14
+ * This component allows several options for configuring how the target Flash movie is embedded. The most
15
+ * important is the required {@link #url} which points to the location of the Flash movie to load. Other
16
+ * configurations include:
17
+ *
18
+ * - {@link #backgroundColor}
19
+ * - {@link #wmode}
20
+ * - {@link #flashVars}
21
+ * - {@link #flashParams}
22
+ * - {@link #flashAttributes}
23
+ *
24
+ * ## Example usage:
25
+ *
26
+ * var win = Ext.widget('window', {
27
+ * title: "It's a tiger!",
28
+ * layout: 'fit',
29
+ * width: 300,
30
+ * height: 300,
31
+ * x: 20,
32
+ * y: 20,
33
+ * resizable: true,
34
+ * items: {
35
+ * xtype: 'flash',
36
+ * url: 'tiger.swf'
37
+ * }
38
+ * });
39
+ * win.show();
40
+ *
41
+ * ## Express Install
42
+ *
43
+ * Adobe provides a tool called [Express Install](http://www.adobe.com/devnet/flashplayer/articles/express_install.html)
44
+ * that offers users an easy way to upgrade their Flash player. If you wish to make use of this, you should set
45
+ * the static EXPRESS\_INSTALL\_URL property to the location of your Express Install SWF file:
46
+ *
47
+ * Ext.flash.Component.EXPRESS_INSTALL_URL = 'path/to/local/expressInstall.swf';
48
+ *
49
+ * @docauthor Jason Johnston <jason@sencha.com>
50
+ */
51
+ Ext.define('Ext.flash.Component', {
52
+ extend: 'Ext.Component',
53
+ alternateClassName: 'Ext.FlashComponent',
54
+ alias: 'widget.flash',
55
+
56
+ /**
57
+ * @cfg {String} [flashVersion="9.0.115"]
58
+ * Indicates the version the flash content was published for.
59
+ */
60
+ flashVersion : '9.0.115',
61
+
62
+ /**
63
+ * @cfg {String} [backgroundColor="#ffffff"]
64
+ * The background color of the SWF movie.
65
+ */
66
+ backgroundColor: '#ffffff',
67
+
68
+ /**
69
+ * @cfg {String} [wmode="opaque"]
70
+ * The wmode of the flash object. This can be used to control layering.
71
+ * Set to 'transparent' to ignore the {@link #backgroundColor} and make the background of the Flash
72
+ * movie transparent.
73
+ */
74
+ wmode: 'opaque',
75
+
76
+ /**
77
+ * @cfg {Object} flashVars
78
+ * A set of key value pairs to be passed to the flash object as flash variables.
79
+ */
80
+
81
+ /**
82
+ * @cfg {Object} flashParams
83
+ * A set of key value pairs to be passed to the flash object as parameters. Possible parameters can be found here:
84
+ * http://kb2.adobe.com/cps/127/tn_12701.html
85
+ */
86
+
87
+ /**
88
+ * @cfg {Object} flashAttributes
89
+ * A set of key value pairs to be passed to the flash object as attributes.
90
+ */
91
+
92
+ /**
93
+ * @cfg {String} url (required)
94
+ * The URL of the SWF file to include.
95
+ */
96
+
97
+ /**
98
+ * @cfg {String/Number} [swfWidth="100%"]
99
+ * The width of the embedded SWF movie inside the component.
100
+ *
101
+ * Defaults to "100%" so that the movie matches the width of the component.
102
+ */
103
+ swfWidth: '100%',
104
+
105
+ /**
106
+ * @cfg {String/Number} [swfHeight="100%"]
107
+ * The height of the embedded SWF movie inside the component.
108
+ *
109
+ * Defaults to "100%" so that the movie matches the height of the component.
110
+ */
111
+ swfHeight: '100%',
112
+
113
+ /**
114
+ * @cfg {Boolean} [expressInstall=false]
115
+ * True to prompt the user to install flash if not installed. Note that this uses
116
+ * Ext.FlashComponent.EXPRESS_INSTALL_URL, which should be set to the local resource.
117
+ */
118
+ expressInstall: false,
119
+
120
+ /**
121
+ * @property {Ext.Element} swf
122
+ * A reference to the object or embed element into which the SWF file is loaded. Only
123
+ * populated after the component is rendered and the SWF has been successfully embedded.
124
+ */
125
+
126
+ // Have to create a placeholder div with the swfId, which SWFObject will replace with the object/embed element.
127
+ renderTpl: ['<div id="{swfId}"></div>'],
128
+
129
+ initComponent: function() {
130
+ // <debug>
131
+ if (!('swfobject' in window)) {
132
+ Ext.Error.raise('The SWFObject library is not loaded. Ext.flash.Component requires SWFObject version 2.2 or later: http://code.google.com/p/swfobject/');
133
+ }
134
+ if (!this.url) {
135
+ Ext.Error.raise('The "url" config is required for Ext.flash.Component');
136
+ }
137
+ // </debug>
138
+
139
+ this.callParent();
140
+ this.addEvents(
141
+ /**
142
+ * @event success
143
+ * Fired when the Flash movie has been successfully embedded
144
+ * @param {Ext.flash.Component} this
145
+ */
146
+ 'success',
147
+
148
+ /**
149
+ * @event failure
150
+ * Fired when the Flash movie embedding fails
151
+ * @param {Ext.flash.Component} this
152
+ */
153
+ 'failure'
154
+ );
155
+ },
156
+
157
+ beforeRender: function(){
158
+ this.callParent();
159
+
160
+ Ext.applyIf(this.renderData, {
161
+ swfId: this.getSwfId()
162
+ });
163
+ },
164
+
165
+ afterRender: function() {
166
+ var me = this,
167
+ flashParams = Ext.apply({}, me.flashParams),
168
+ flashVars = Ext.apply({}, me.flashVars);
169
+
170
+ me.callParent();
171
+
172
+ Ext.apply({
173
+ allowScriptAccess: 'always',
174
+ bgcolor: me.backgroundColor,
175
+ wmode: me.wmode
176
+ }, flashParams);
177
+
178
+ Ext.apply({
179
+ allowedDomain: document.location.hostname
180
+ }, flashVars);
181
+
182
+ new swfobject.embedSWF(
183
+ me.url,
184
+ me.getSwfId(),
185
+ me.swfWidth,
186
+ me.swfHeight,
187
+ me.flashVersion,
188
+ me.expressInstall ? me.statics.EXPRESS_INSTALL_URL : undefined,
189
+ flashVars,
190
+ flashParams,
191
+ me.flashAttributes,
192
+ Ext.bind(me.swfCallback, me)
193
+ );
194
+ },
195
+
196
+ /**
197
+ * @private
198
+ * The callback method for handling an embedding success or failure by SWFObject
199
+ * @param {Object} e The event object passed by SWFObject - see http://code.google.com/p/swfobject/wiki/api
200
+ */
201
+ swfCallback: function(e) {
202
+ var me = this;
203
+ if (e.success) {
204
+ me.swf = Ext.get(e.ref);
205
+ me.onSuccess();
206
+ me.fireEvent('success', me);
207
+ } else {
208
+ me.onFailure();
209
+ me.fireEvent('failure', me);
210
+ }
211
+ },
212
+
213
+ /**
214
+ * Retrieves the id of the SWF object/embed element.
215
+ */
216
+ getSwfId: function() {
217
+ return this.swfId || (this.swfId = "extswf" + this.getAutoId());
218
+ },
219
+
220
+ onSuccess: function() {
221
+ // swfobject forces visiblity:visible on the swf element, which prevents it
222
+ // from getting hidden when an ancestor is given visibility:hidden.
223
+ this.swf.setStyle('visibility', 'inherit');
224
+ },
225
+
226
+ onFailure: Ext.emptyFn,
227
+
228
+ beforeDestroy: function() {
229
+ var me = this,
230
+ swf = me.swf;
231
+ if (swf) {
232
+ swfobject.removeSWF(me.getSwfId());
233
+ Ext.destroy(swf);
234
+ delete me.swf;
235
+ }
236
+ me.callParent();
237
+ },
238
+
239
+ statics: {
240
+ /**
241
+ * @property {String}
242
+ * The url for installing flash if it doesn't exist. This should be set to a local resource.
243
+ * See http://www.adobe.com/devnet/flashplayer/articles/express_install.html for details.
244
+ * @static
245
+ */
246
+ EXPRESS_INSTALL_URL: 'http:/' + '/swfobject.googlecode.com/svn/trunk/swfobject/expressInstall.swf'
247
+ }
248
+ });
@@ -0,0 +1,1018 @@
1
+ /**
2
+ * Provides input field management, validation, submission, and form loading services for the collection
3
+ * of {@link Ext.form.field.Field Field} instances within a {@link Ext.container.Container}. It is recommended
4
+ * that you use a {@link Ext.form.Panel} as the form container, as that has logic to automatically
5
+ * hook up an instance of {@link Ext.form.Basic} (plus other conveniences related to field configuration.)
6
+ *
7
+ * ## Form Actions
8
+ *
9
+ * The Basic class delegates the handling of form loads and submits to instances of {@link Ext.form.action.Action}.
10
+ * See the various Action implementations for specific details of each one's functionality, as well as the
11
+ * documentation for {@link #doAction} which details the configuration options that can be specified in
12
+ * each action call.
13
+ *
14
+ * The default submit Action is {@link Ext.form.action.Submit}, which uses an Ajax request to submit the
15
+ * form's values to a configured URL. To enable normal browser submission of an Ext form, use the
16
+ * {@link #standardSubmit} config option.
17
+ *
18
+ * ## File uploads
19
+ *
20
+ * File uploads are not performed using normal 'Ajax' techniques; see the description for
21
+ * {@link #hasUpload} for details. If you're using file uploads you should read the method description.
22
+ *
23
+ * ## Example usage:
24
+ *
25
+ * @example
26
+ * Ext.create('Ext.form.Panel', {
27
+ * title: 'Basic Form',
28
+ * renderTo: Ext.getBody(),
29
+ * bodyPadding: 5,
30
+ * width: 350,
31
+ *
32
+ * // Any configuration items here will be automatically passed along to
33
+ * // the Ext.form.Basic instance when it gets created.
34
+ *
35
+ * // The form will submit an AJAX request to this URL when submitted
36
+ * url: 'save-form.php',
37
+ *
38
+ * items: [{
39
+ * xtype: 'textfield',
40
+ * fieldLabel: 'Field',
41
+ * name: 'theField'
42
+ * }],
43
+ *
44
+ * buttons: [{
45
+ * text: 'Submit',
46
+ * handler: function() {
47
+ * // The getForm() method returns the Ext.form.Basic instance:
48
+ * var form = this.up('form').getForm();
49
+ * if (form.isValid()) {
50
+ * // Submit the Ajax request and handle the response
51
+ * form.submit({
52
+ * success: function(form, action) {
53
+ * Ext.Msg.alert('Success', action.result.msg);
54
+ * },
55
+ * failure: function(form, action) {
56
+ * Ext.Msg.alert('Failed', action.result ? action.result.msg : 'No response');
57
+ * }
58
+ * });
59
+ * }
60
+ * }
61
+ * }]
62
+ * });
63
+ *
64
+ * @docauthor Jason Johnston <jason@sencha.com>
65
+ */
66
+ Ext.define('Ext.form.Basic', {
67
+ extend: 'Ext.util.Observable',
68
+ alternateClassName: 'Ext.form.BasicForm',
69
+ requires: ['Ext.util.MixedCollection', 'Ext.form.action.Load', 'Ext.form.action.Submit',
70
+ 'Ext.window.MessageBox', 'Ext.data.Errors', 'Ext.util.DelayedTask'],
71
+
72
+ /**
73
+ * Creates new form.
74
+ * @param {Ext.container.Container} owner The component that is the container for the form, usually a {@link Ext.form.Panel}
75
+ * @param {Object} config Configuration options. These are normally specified in the config to the
76
+ * {@link Ext.form.Panel} constructor, which passes them along to the BasicForm automatically.
77
+ */
78
+ constructor: function(owner, config) {
79
+ var me = this,
80
+ onItemAddOrRemove = me.onItemAddOrRemove,
81
+ api,
82
+ fn;
83
+
84
+ /**
85
+ * @property {Ext.container.Container} owner
86
+ * The container component to which this BasicForm is attached.
87
+ */
88
+ me.owner = owner;
89
+
90
+ // Listen for addition/removal of fields in the owner container
91
+ me.mon(owner, {
92
+ add: onItemAddOrRemove,
93
+ remove: onItemAddOrRemove,
94
+ scope: me
95
+ });
96
+
97
+ Ext.apply(me, config);
98
+
99
+ // Normalize the paramOrder to an Array
100
+ if (Ext.isString(me.paramOrder)) {
101
+ me.paramOrder = me.paramOrder.split(/[\s,|]/);
102
+ }
103
+
104
+ if (me.api) {
105
+ api = me.api = Ext.apply({}, me.api);
106
+ for (fn in api) {
107
+ if (api.hasOwnProperty(fn)) {
108
+ api[fn] = Ext.direct.Manager.parseMethod(api[fn]);
109
+ }
110
+ }
111
+ }
112
+
113
+ me.checkValidityTask = new Ext.util.DelayedTask(me.checkValidity, me);
114
+
115
+ me.addEvents(
116
+ /**
117
+ * @event beforeaction
118
+ * Fires before any action is performed. Return false to cancel the action.
119
+ * @param {Ext.form.Basic} this
120
+ * @param {Ext.form.action.Action} action The {@link Ext.form.action.Action} to be performed
121
+ */
122
+ 'beforeaction',
123
+ /**
124
+ * @event actionfailed
125
+ * Fires when an action fails.
126
+ * @param {Ext.form.Basic} this
127
+ * @param {Ext.form.action.Action} action The {@link Ext.form.action.Action} that failed
128
+ */
129
+ 'actionfailed',
130
+ /**
131
+ * @event actioncomplete
132
+ * Fires when an action is completed.
133
+ * @param {Ext.form.Basic} this
134
+ * @param {Ext.form.action.Action} action The {@link Ext.form.action.Action} that completed
135
+ */
136
+ 'actioncomplete',
137
+ /**
138
+ * @event validitychange
139
+ * Fires when the validity of the entire form changes.
140
+ * @param {Ext.form.Basic} this
141
+ * @param {Boolean} valid `true` if the form is now valid, `false` if it is now invalid.
142
+ */
143
+ 'validitychange',
144
+ /**
145
+ * @event dirtychange
146
+ * Fires when the dirty state of the entire form changes.
147
+ * @param {Ext.form.Basic} this
148
+ * @param {Boolean} dirty `true` if the form is now dirty, `false` if it is no longer dirty.
149
+ */
150
+ 'dirtychange'
151
+ );
152
+ me.callParent();
153
+ },
154
+
155
+ /**
156
+ * Do any post layout initialization
157
+ * @private
158
+ */
159
+ initialize : function() {
160
+ var me = this;
161
+ me.initialized = true;
162
+ me.onValidityChange(!me.hasInvalidField());
163
+ },
164
+
165
+
166
+ /**
167
+ * @cfg {String} method
168
+ * The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
169
+ */
170
+
171
+ /**
172
+ * @cfg {Ext.data.reader.Reader} reader
173
+ * An Ext.data.DataReader (e.g. {@link Ext.data.reader.Xml}) to be used to read
174
+ * data when executing 'load' actions. This is optional as there is built-in
175
+ * support for processing JSON responses.
176
+ */
177
+
178
+ /**
179
+ * @cfg {Ext.data.reader.Reader} errorReader
180
+ * An Ext.data.DataReader (e.g. {@link Ext.data.reader.Xml}) to be used to
181
+ * read field error messages returned from 'submit' actions. This is optional
182
+ * as there is built-in support for processing JSON responses.
183
+ *
184
+ * The Records which provide messages for the invalid Fields must use the
185
+ * Field name (or id) as the Record ID, and must contain a field called 'msg'
186
+ * which contains the error message.
187
+ *
188
+ * The errorReader does not have to be a full-blown implementation of a
189
+ * Reader. It simply needs to implement a `read(xhr)` function
190
+ * which returns an Array of Records in an object with the following
191
+ * structure:
192
+ *
193
+ * {
194
+ * records: recordArray
195
+ * }
196
+ */
197
+
198
+ /**
199
+ * @cfg {String} url
200
+ * The URL to use for form actions if one isn't supplied in the
201
+ * {@link #doAction doAction} options.
202
+ */
203
+
204
+ /**
205
+ * @cfg {Object} baseParams
206
+ * Parameters to pass with all requests. e.g. baseParams: `{id: '123', foo: 'bar'}`.
207
+ *
208
+ * Parameters are encoded as standard HTTP parameters using {@link Ext.Object#toQueryString}.
209
+ */
210
+
211
+ /**
212
+ * @cfg {Number} timeout
213
+ * Timeout for form actions in seconds.
214
+ */
215
+ timeout: 30,
216
+
217
+ /**
218
+ * @cfg {Object} api
219
+ * If specified, load and submit actions will be handled
220
+ * with {@link Ext.form.action.DirectLoad} and {@link Ext.form.action.DirectLoad}.
221
+ * Methods which have been imported by {@link Ext.direct.Manager} can be specified here to load and submit
222
+ * forms. API methods may also be specified as strings. See {@link Ext.data.proxy.Direct#directFn}.
223
+ * Such as the following:
224
+ *
225
+ * api: {
226
+ * load: App.ss.MyProfile.load,
227
+ * submit: App.ss.MyProfile.submit
228
+ * }
229
+ *
230
+ * Load actions can use {@link #paramOrder} or {@link #paramsAsHash}
231
+ * to customize how the load method is invoked.
232
+ * Submit actions will always use a standard form submit. The `formHandler` configuration must
233
+ * be set on the associated server-side method which has been imported by {@link Ext.direct.Manager}.
234
+ */
235
+
236
+ /**
237
+ * @cfg {String/String[]} paramOrder
238
+ * A list of params to be executed server side. Only used for the {@link #api} `load`
239
+ * configuration.
240
+ *
241
+ * Specify the params in the order in which they must be executed on the
242
+ * server-side as either (1) an Array of String values, or (2) a String of params
243
+ * delimited by either whitespace, comma, or pipe. For example,
244
+ * any of the following would be acceptable:
245
+ *
246
+ * paramOrder: ['param1','param2','param3']
247
+ * paramOrder: 'param1 param2 param3'
248
+ * paramOrder: 'param1,param2,param3'
249
+ * paramOrder: 'param1|param2|param'
250
+ */
251
+
252
+ /**
253
+ * @cfg {Boolean} paramsAsHash
254
+ * Only used for the {@link #api} `load` configuration. If true, parameters will be sent as a
255
+ * single hash collection of named arguments. Providing a {@link #paramOrder} nullifies this
256
+ * configuration.
257
+ */
258
+ paramsAsHash: false,
259
+
260
+ /**
261
+ * @cfg {String} waitTitle
262
+ * The default title to show for the waiting message box
263
+ */
264
+ //<locale>
265
+ waitTitle: 'Please Wait...',
266
+ //</locale>
267
+
268
+ /**
269
+ * @cfg {Boolean} trackResetOnLoad
270
+ * If set to true, {@link #reset}() resets to the last loaded or {@link #setValues}() data instead of
271
+ * when the form was first created.
272
+ */
273
+ trackResetOnLoad: false,
274
+
275
+ /**
276
+ * @cfg {Boolean} standardSubmit
277
+ * If set to true, a standard HTML form submit is used instead of a XHR (Ajax) style form submission.
278
+ * All of the field values, plus any additional params configured via {@link #baseParams}
279
+ * and/or the `options` to {@link #submit}, will be included in the values submitted in the form.
280
+ */
281
+
282
+ /**
283
+ * @cfg {String/HTMLElement/Ext.Element} waitMsgTarget
284
+ * By default wait messages are displayed with Ext.MessageBox.wait. You can target a specific
285
+ * element by passing it or its id or mask the form itself by passing in true.
286
+ */
287
+
288
+
289
+ // Private
290
+ wasDirty: false,
291
+
292
+
293
+ /**
294
+ * Destroys this object.
295
+ */
296
+ destroy: function() {
297
+ this.clearListeners();
298
+ this.checkValidityTask.cancel();
299
+ },
300
+
301
+ /**
302
+ * @private
303
+ * Handle addition or removal of descendant items. Invalidates the cached list of fields
304
+ * so that {@link #getFields} will do a fresh query next time it is called. Also adds listeners
305
+ * for state change events on added fields, and tracks components with formBind=true.
306
+ */
307
+ onItemAddOrRemove: function(parent, child) {
308
+ var me = this,
309
+ isAdding = !!child.ownerCt,
310
+ isContainer = child.isContainer;
311
+
312
+ function handleField(field) {
313
+ // Listen for state change events on fields
314
+ me[isAdding ? 'mon' : 'mun'](field, {
315
+ validitychange: me.checkValidity,
316
+ dirtychange: me.checkDirty,
317
+ scope: me,
318
+ buffer: 100 //batch up sequential calls to avoid excessive full-form validation
319
+ });
320
+ // Flush the cached list of fields
321
+ delete me._fields;
322
+ }
323
+
324
+ if (child.isFormField) {
325
+ handleField(child);
326
+ } else if (isContainer) {
327
+ // Walk down
328
+ if (child.isDestroyed) {
329
+ // the container is destroyed, this means we may have child fields, so here
330
+ // we just invalidate all the fields to be sure.
331
+ delete me._fields;
332
+ } else {
333
+ Ext.Array.forEach(child.query('[isFormField]'), handleField);
334
+ }
335
+ }
336
+
337
+ // Flush the cached list of formBind components
338
+ delete this._boundItems;
339
+
340
+ // Check form bind, but only after initial add. Batch it to prevent excessive validation
341
+ // calls when many fields are being added at once.
342
+ if (me.initialized) {
343
+ me.checkValidityTask.delay(10);
344
+ }
345
+ },
346
+
347
+ /**
348
+ * Return all the {@link Ext.form.field.Field} components in the owner container.
349
+ * @return {Ext.util.MixedCollection} Collection of the Field objects
350
+ */
351
+ getFields: function() {
352
+ var fields = this._fields;
353
+ if (!fields) {
354
+ fields = this._fields = new Ext.util.MixedCollection();
355
+ fields.addAll(this.owner.query('[isFormField]'));
356
+ }
357
+ return fields;
358
+ },
359
+
360
+ /**
361
+ * @private
362
+ * Finds and returns the set of all items bound to fields inside this form
363
+ * @return {Ext.util.MixedCollection} The set of all bound form field items
364
+ */
365
+ getBoundItems: function() {
366
+ var boundItems = this._boundItems;
367
+
368
+ if (!boundItems || boundItems.getCount() === 0) {
369
+ boundItems = this._boundItems = new Ext.util.MixedCollection();
370
+ boundItems.addAll(this.owner.query('[formBind]'));
371
+ }
372
+
373
+ return boundItems;
374
+ },
375
+
376
+ /**
377
+ * Returns true if the form contains any invalid fields. No fields will be marked as invalid
378
+ * as a result of calling this; to trigger marking of fields use {@link #isValid} instead.
379
+ */
380
+ hasInvalidField: function() {
381
+ return !!this.getFields().findBy(function(field) {
382
+ var preventMark = field.preventMark,
383
+ isValid;
384
+ field.preventMark = true;
385
+ isValid = field.isValid();
386
+ field.preventMark = preventMark;
387
+ return !isValid;
388
+ });
389
+ },
390
+
391
+ /**
392
+ * Returns true if client-side validation on the form is successful. Any invalid fields will be
393
+ * marked as invalid. If you only want to determine overall form validity without marking anything,
394
+ * use {@link #hasInvalidField} instead.
395
+ * @return Boolean
396
+ */
397
+ isValid: function() {
398
+ var me = this,
399
+ invalid;
400
+ Ext.suspendLayouts();
401
+ invalid = me.getFields().filterBy(function(field) {
402
+ return !field.validate();
403
+ });
404
+ Ext.resumeLayouts(true);
405
+ return invalid.length < 1;
406
+ },
407
+
408
+ /**
409
+ * Check whether the validity of the entire form has changed since it was last checked, and
410
+ * if so fire the {@link #validitychange validitychange} event. This is automatically invoked
411
+ * when an individual field's validity changes.
412
+ */
413
+ checkValidity: function() {
414
+ var me = this,
415
+ valid = !me.hasInvalidField();
416
+ if (valid !== me.wasValid) {
417
+ me.onValidityChange(valid);
418
+ me.fireEvent('validitychange', me, valid);
419
+ me.wasValid = valid;
420
+ }
421
+ },
422
+
423
+ /**
424
+ * @private
425
+ * Handle changes in the form's validity. If there are any sub components with
426
+ * formBind=true then they are enabled/disabled based on the new validity.
427
+ * @param {Boolean} valid
428
+ */
429
+ onValidityChange: function(valid) {
430
+ var boundItems = this.getBoundItems(),
431
+ items, i, iLen, cmp;
432
+
433
+ if (boundItems) {
434
+ items = boundItems.items;
435
+ iLen = items.length;
436
+
437
+ for (i = 0; i < iLen; i++) {
438
+ cmp = items[i];
439
+
440
+ if (cmp.disabled === valid) {
441
+ cmp.setDisabled(!valid);
442
+ }
443
+ }
444
+ }
445
+ },
446
+
447
+ /**
448
+ * Returns true if any fields in this form have changed from their original values.
449
+ *
450
+ * Note that if this BasicForm was configured with {@link #trackResetOnLoad} then the
451
+ * Fields' *original values* are updated when the values are loaded by {@link #setValues}
452
+ * or {@link #loadRecord}.
453
+ *
454
+ * @return Boolean
455
+ */
456
+ isDirty: function() {
457
+ return !!this.getFields().findBy(function(f) {
458
+ return f.isDirty();
459
+ });
460
+ },
461
+
462
+ /**
463
+ * Check whether the dirty state of the entire form has changed since it was last checked, and
464
+ * if so fire the {@link #dirtychange dirtychange} event. This is automatically invoked
465
+ * when an individual field's dirty state changes.
466
+ */
467
+ checkDirty: function() {
468
+ var dirty = this.isDirty();
469
+ if (dirty !== this.wasDirty) {
470
+ this.fireEvent('dirtychange', this, dirty);
471
+ this.wasDirty = dirty;
472
+ }
473
+ },
474
+
475
+ /**
476
+ * Returns true if the form contains a file upload field. This is used to determine the method for submitting the
477
+ * form: File uploads are not performed using normal 'Ajax' techniques, that is they are **not** performed using
478
+ * XMLHttpRequests. Instead a hidden `<form>` element containing all the fields is created temporarily and submitted
479
+ * with its [target][1] set to refer to a dynamically generated, hidden `<iframe>` which is inserted into the document
480
+ * but removed after the return data has been gathered.
481
+ *
482
+ * The server response is parsed by the browser to create the document for the IFRAME. If the server is using JSON
483
+ * to send the return object, then the [Content-Type][2] header must be set to "text/html" in order to tell the
484
+ * browser to insert the text unchanged into the document body.
485
+ *
486
+ * Characters which are significant to an HTML parser must be sent as HTML entities, so encode `"<"` as `"&lt;"`,
487
+ * `"&"` as `"&amp;"` etc.
488
+ *
489
+ * The response text is retrieved from the document, and a fake XMLHttpRequest object is created containing a
490
+ * responseText property in order to conform to the requirements of event handlers and callbacks.
491
+ *
492
+ * Be aware that file upload packets are sent with the content type [multipart/form][3] and some server technologies
493
+ * (notably JEE) may require some custom processing in order to retrieve parameter names and parameter values from
494
+ * the packet content.
495
+ *
496
+ * [1]: http://www.w3.org/TR/REC-html40/present/frames.html#adef-target
497
+ * [2]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
498
+ * [3]: http://www.faqs.org/rfcs/rfc2388.html
499
+ *
500
+ * @return Boolean
501
+ */
502
+ hasUpload: function() {
503
+ return !!this.getFields().findBy(function(f) {
504
+ return f.isFileUpload();
505
+ });
506
+ },
507
+
508
+ /**
509
+ * Performs a predefined action (an implementation of {@link Ext.form.action.Action}) to perform application-
510
+ * specific processing.
511
+ *
512
+ * @param {String/Ext.form.action.Action} action The name of the predefined action type, or instance of {@link
513
+ * Ext.form.action.Action} to perform.
514
+ *
515
+ * @param {Object} [options] The options to pass to the {@link Ext.form.action.Action} that will get created,
516
+ * if the action argument is a String.
517
+ *
518
+ * All of the config options listed below are supported by both the {@link Ext.form.action.Submit submit} and
519
+ * {@link Ext.form.action.Load load} actions unless otherwise noted (custom actions could also accept other
520
+ * config options):
521
+ *
522
+ * @param {String} options.url
523
+ * The url for the action (defaults to the form's {@link #url}.)
524
+ *
525
+ * @param {String} options.method
526
+ * The form method to use (defaults to the form's method, or POST if not defined)
527
+ *
528
+ * @param {String/Object} options.params
529
+ * The params to pass (defaults to the form's baseParams, or none if not defined)
530
+ *
531
+ * Parameters are encoded as standard HTTP parameters using {@link Ext#urlEncode Ext.Object.toQueryString}.
532
+ *
533
+ * @param {Object} options.headers
534
+ * Request headers to set for the action.
535
+ *
536
+ * @param {Function} options.success
537
+ * The callback that will be invoked after a successful response (see top of {@link Ext.form.action.Submit submit}
538
+ * and {@link Ext.form.action.Load load} for a description of what constitutes a successful response).
539
+ * @param {Ext.form.Basic} options.success.form The form that requested the action.
540
+ * @param {Ext.form.action.Action} options.success.action The Action object which performed the operation.
541
+ * The action object contains these properties of interest:
542
+ *
543
+ * - {@link Ext.form.action.Action#response response}
544
+ * - {@link Ext.form.action.Action#result result} - interrogate for custom postprocessing
545
+ * - {@link Ext.form.action.Action#type type}
546
+ *
547
+ * @param {Function} options.failure
548
+ * The callback that will be invoked after a failed transaction attempt.
549
+ * @param {Ext.form.Basic} options.failure.form The form that requested the action.
550
+ * @param {Ext.form.action.Action} options.failure.action The Action object which performed the operation.
551
+ * The action object contains these properties of interest:
552
+ *
553
+ * - {@link Ext.form.action.Action#failureType failureType}
554
+ * - {@link Ext.form.action.Action#response response}
555
+ * - {@link Ext.form.action.Action#result result} - interrogate for custom postprocessing
556
+ * - {@link Ext.form.action.Action#type type}
557
+ *
558
+ * @param {Object} options.scope
559
+ * The scope in which to call the callback functions (The this reference for the callback functions).
560
+ *
561
+ * @param {Boolean} options.clientValidation
562
+ * Submit Action only. Determines whether a Form's fields are validated in a final call to {@link
563
+ * Ext.form.Basic#isValid isValid} prior to submission. Set to false to prevent this. If undefined, pre-submission
564
+ * field validation is performed.
565
+ *
566
+ * @return {Ext.form.Basic} this
567
+ */
568
+ doAction: function(action, options) {
569
+ if (Ext.isString(action)) {
570
+ action = Ext.ClassManager.instantiateByAlias('formaction.' + action, Ext.apply({}, options, {form: this}));
571
+ }
572
+ if (this.fireEvent('beforeaction', this, action) !== false) {
573
+ this.beforeAction(action);
574
+ Ext.defer(action.run, 100, action);
575
+ }
576
+ return this;
577
+ },
578
+
579
+ /**
580
+ * Shortcut to {@link #doAction do} a {@link Ext.form.action.Submit submit action}. This will use the
581
+ * {@link Ext.form.action.Submit AJAX submit action} by default. If the {@link #standardSubmit} config
582
+ * is enabled it will use a standard form element to submit, or if the {@link #api} config is present
583
+ * it will use the {@link Ext.form.action.DirectLoad Ext.direct.Direct submit action}.
584
+ *
585
+ * The following code:
586
+ *
587
+ * myFormPanel.getForm().submit({
588
+ * clientValidation: true,
589
+ * url: 'updateConsignment.php',
590
+ * params: {
591
+ * newStatus: 'delivered'
592
+ * },
593
+ * success: function(form, action) {
594
+ * Ext.Msg.alert('Success', action.result.msg);
595
+ * },
596
+ * failure: function(form, action) {
597
+ * switch (action.failureType) {
598
+ * case Ext.form.action.Action.CLIENT_INVALID:
599
+ * Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
600
+ * break;
601
+ * case Ext.form.action.Action.CONNECT_FAILURE:
602
+ * Ext.Msg.alert('Failure', 'Ajax communication failed');
603
+ * break;
604
+ * case Ext.form.action.Action.SERVER_INVALID:
605
+ * Ext.Msg.alert('Failure', action.result.msg);
606
+ * }
607
+ * }
608
+ * });
609
+ *
610
+ * would process the following server response for a successful submission:
611
+ *
612
+ * {
613
+ * "success":true, // note this is Boolean, not string
614
+ * "msg":"Consignment updated"
615
+ * }
616
+ *
617
+ * and the following server response for a failed submission:
618
+ *
619
+ * {
620
+ * "success":false, // note this is Boolean, not string
621
+ * "msg":"You do not have permission to perform this operation"
622
+ * }
623
+ *
624
+ * @param {Object} options The options to pass to the action (see {@link #doAction} for details).
625
+ * @return {Ext.form.Basic} this
626
+ */
627
+ submit: function(options) {
628
+ return this.doAction(this.standardSubmit ? 'standardsubmit' : this.api ? 'directsubmit' : 'submit', options);
629
+ },
630
+
631
+ /**
632
+ * Shortcut to {@link #doAction do} a {@link Ext.form.action.Load load action}.
633
+ * @param {Object} options The options to pass to the action (see {@link #doAction} for details)
634
+ * @return {Ext.form.Basic} this
635
+ */
636
+ load: function(options) {
637
+ return this.doAction(this.api ? 'directload' : 'load', options);
638
+ },
639
+
640
+ /**
641
+ * Persists the values in this form into the passed {@link Ext.data.Model} object in a beginEdit/endEdit block.
642
+ * If the record is not specified, it will attempt to update (if it exists) the record provided to loadRecord.
643
+ * @param {Ext.data.Model} [record] The record to edit
644
+ * @return {Ext.form.Basic} this
645
+ */
646
+ updateRecord: function(record) {
647
+ record = record || this._record;
648
+ //<debug>
649
+ if (!record) {
650
+ Ext.Error.raise("A record is required.");
651
+ }
652
+ //</debug>
653
+ var fields = record.fields.items,
654
+ values = this.getFieldValues(),
655
+ obj = {},
656
+ i = 0,
657
+ len = fields.length,
658
+ name;
659
+
660
+ for (; i < len; ++i) {
661
+ name = fields[i].name;
662
+
663
+ if (values.hasOwnProperty(name)) {
664
+ obj[name] = values[name];
665
+ }
666
+ }
667
+
668
+ record.beginEdit();
669
+ record.set(obj);
670
+ record.endEdit();
671
+
672
+ return this;
673
+ },
674
+
675
+ /**
676
+ * Loads an {@link Ext.data.Model} into this form by calling {@link #setValues} with the
677
+ * {@link Ext.data.Model#raw record data}.
678
+ * See also {@link #trackResetOnLoad}.
679
+ * @param {Ext.data.Model} record The record to load
680
+ * @return {Ext.form.Basic} this
681
+ */
682
+ loadRecord: function(record) {
683
+ this._record = record;
684
+ return this.setValues(record.data);
685
+ },
686
+
687
+ /**
688
+ * Returns the last Ext.data.Model instance that was loaded via {@link #loadRecord}
689
+ * @return {Ext.data.Model} The record
690
+ */
691
+ getRecord: function() {
692
+ return this._record;
693
+ },
694
+
695
+ /**
696
+ * @private
697
+ * Called before an action is performed via {@link #doAction}.
698
+ * @param {Ext.form.action.Action} action The Action instance that was invoked
699
+ */
700
+ beforeAction: function(action) {
701
+ var waitMsg = action.waitMsg,
702
+ maskCls = Ext.baseCSSPrefix + 'mask-loading',
703
+ fields = this.getFields().items,
704
+ f,
705
+ fLen = fields.length,
706
+ field, waitMsgTarget;
707
+
708
+ // Call HtmlEditor's syncValue before actions
709
+ for (f = 0; f < fLen; f++) {
710
+ field = fields[f];
711
+
712
+ if (field.isFormField && field.syncValue) {
713
+ field.syncValue();
714
+ }
715
+ }
716
+
717
+ if (waitMsg) {
718
+ waitMsgTarget = this.waitMsgTarget;
719
+ if (waitMsgTarget === true) {
720
+ this.owner.el.mask(waitMsg, maskCls);
721
+ } else if (waitMsgTarget) {
722
+ waitMsgTarget = this.waitMsgTarget = Ext.get(waitMsgTarget);
723
+ waitMsgTarget.mask(waitMsg, maskCls);
724
+ } else {
725
+ Ext.MessageBox.wait(waitMsg, action.waitTitle || this.waitTitle);
726
+ }
727
+ }
728
+ },
729
+
730
+ /**
731
+ * @private
732
+ * Called after an action is performed via {@link #doAction}.
733
+ * @param {Ext.form.action.Action} action The Action instance that was invoked
734
+ * @param {Boolean} success True if the action completed successfully, false, otherwise.
735
+ */
736
+ afterAction: function(action, success) {
737
+ if (action.waitMsg) {
738
+ var MessageBox = Ext.MessageBox,
739
+ waitMsgTarget = this.waitMsgTarget;
740
+ if (waitMsgTarget === true) {
741
+ this.owner.el.unmask();
742
+ } else if (waitMsgTarget) {
743
+ waitMsgTarget.unmask();
744
+ } else {
745
+ MessageBox.updateProgress(1);
746
+ MessageBox.hide();
747
+ }
748
+ }
749
+ if (success) {
750
+ if (action.reset) {
751
+ this.reset();
752
+ }
753
+ Ext.callback(action.success, action.scope || action, [this, action]);
754
+ this.fireEvent('actioncomplete', this, action);
755
+ } else {
756
+ Ext.callback(action.failure, action.scope || action, [this, action]);
757
+ this.fireEvent('actionfailed', this, action);
758
+ }
759
+ },
760
+
761
+
762
+ /**
763
+ * Find a specific {@link Ext.form.field.Field} in this form by id or name.
764
+ * @param {String} id The value to search for (specify either a {@link Ext.Component#id id} or
765
+ * {@link Ext.form.field.Field#getName name or hiddenName}).
766
+ * @return {Ext.form.field.Field} The first matching field, or `null` if none was found.
767
+ */
768
+ findField: function(id) {
769
+ return this.getFields().findBy(function(f) {
770
+ return f.id === id || f.getName() === id;
771
+ });
772
+ },
773
+
774
+
775
+ /**
776
+ * Mark fields in this form invalid in bulk.
777
+ * @param {Object/Object[]/Ext.data.Errors} errors
778
+ * Either an array in the form `[{id:'fieldId', msg:'The message'}, ...]`,
779
+ * an object hash of `{id: msg, id2: msg2}`, or a {@link Ext.data.Errors} object.
780
+ * @return {Ext.form.Basic} this
781
+ */
782
+ markInvalid: function(errors) {
783
+ var me = this,
784
+ e, eLen, error, value,
785
+ key;
786
+
787
+ function mark(fieldId, msg) {
788
+ var field = me.findField(fieldId);
789
+ if (field) {
790
+ field.markInvalid(msg);
791
+ }
792
+ }
793
+
794
+ if (Ext.isArray(errors)) {
795
+ eLen = errors.length;
796
+
797
+ for (e = 0; e < eLen; e++) {
798
+ error = errors[e];
799
+ mark(error.id, error.msg);
800
+ }
801
+ } else if (errors instanceof Ext.data.Errors) {
802
+ eLen = errors.items.length;
803
+ for (e = 0; e < eLen; e++) {
804
+ error = errors.items[e];
805
+
806
+ mark(error.field, error.message);
807
+ }
808
+ } else {
809
+ for (key in errors) {
810
+ if (errors.hasOwnProperty(key)) {
811
+ value = errors[key];
812
+ mark(key, value, errors);
813
+ }
814
+ }
815
+ }
816
+ return this;
817
+ },
818
+
819
+ /**
820
+ * Set values for fields in this form in bulk.
821
+ *
822
+ * @param {Object/Object[]} values Either an array in the form:
823
+ *
824
+ * [{id:'clientName', value:'Fred. Olsen Lines'},
825
+ * {id:'portOfLoading', value:'FXT'},
826
+ * {id:'portOfDischarge', value:'OSL'} ]
827
+ *
828
+ * or an object hash of the form:
829
+ *
830
+ * {
831
+ * clientName: 'Fred. Olsen Lines',
832
+ * portOfLoading: 'FXT',
833
+ * portOfDischarge: 'OSL'
834
+ * }
835
+ *
836
+ * @return {Ext.form.Basic} this
837
+ */
838
+ setValues: function(values) {
839
+ var me = this,
840
+ v, vLen, val, field;
841
+
842
+ function setVal(fieldId, val) {
843
+ var field = me.findField(fieldId);
844
+ if (field) {
845
+ field.setValue(val);
846
+ if (me.trackResetOnLoad) {
847
+ field.resetOriginalValue();
848
+ }
849
+ }
850
+ }
851
+
852
+ if (Ext.isArray(values)) {
853
+ // array of objects
854
+ vLen = values.length;
855
+
856
+ for (v = 0; v < vLen; v++) {
857
+ val = values[v];
858
+
859
+ setVal(val.id, val.value);
860
+ }
861
+ } else {
862
+ // object hash
863
+ Ext.iterate(values, setVal);
864
+ }
865
+ return this;
866
+ },
867
+
868
+ /**
869
+ * Retrieves the fields in the form as a set of key/value pairs, using their
870
+ * {@link Ext.form.field.Field#getSubmitData getSubmitData()} method to collect the values.
871
+ * If multiple fields return values under the same name those values will be combined into an Array.
872
+ * This is similar to {@link #getFieldValues} except that this method collects only String values for
873
+ * submission, while getFieldValues collects type-specific data values (e.g. Date objects for date fields.)
874
+ *
875
+ * @param {Boolean} [asString=false] If true, will return the key/value collection as a single
876
+ * URL-encoded param string.
877
+ * @param {Boolean} [dirtyOnly=false] If true, only fields that are dirty will be included in the result.
878
+ * @param {Boolean} [includeEmptyText=false]] If true, the configured emptyText of empty fields will be used.
879
+ * @return {String/Object}
880
+ */
881
+ getValues: function(asString, dirtyOnly, includeEmptyText, useDataValues) {
882
+ var values = {},
883
+ fields = this.getFields().items,
884
+ f,
885
+ fLen = fields.length,
886
+ isArray = Ext.isArray,
887
+ field, data, val, bucket, name;
888
+
889
+ for (f = 0; f < fLen; f++) {
890
+ field = fields[f];
891
+
892
+ if (!dirtyOnly || field.isDirty()) {
893
+ data = field[useDataValues ? 'getModelData' : 'getSubmitData'](includeEmptyText);
894
+
895
+ if (Ext.isObject(data)) {
896
+ for (name in data) {
897
+ if (data.hasOwnProperty(name)) {
898
+ val = data[name];
899
+
900
+ if (includeEmptyText && val === '') {
901
+ val = field.emptyText || '';
902
+ }
903
+
904
+ if (values.hasOwnProperty(name)) {
905
+ bucket = values[name];
906
+
907
+ if (!isArray(bucket)) {
908
+ bucket = values[name] = [bucket];
909
+ }
910
+
911
+ if (isArray(val)) {
912
+ values[name] = values[name] = bucket.concat(val);
913
+ } else {
914
+ bucket.push(val);
915
+ }
916
+ } else {
917
+ values[name] = val;
918
+ }
919
+ }
920
+ }
921
+ }
922
+ }
923
+ }
924
+
925
+ if (asString) {
926
+ values = Ext.Object.toQueryString(values);
927
+ }
928
+ return values;
929
+ },
930
+
931
+ /**
932
+ * Retrieves the fields in the form as a set of key/value pairs, using their
933
+ * {@link Ext.form.field.Field#getModelData getModelData()} method to collect the values.
934
+ * If multiple fields return values under the same name those values will be combined into an Array.
935
+ * This is similar to {@link #getValues} except that this method collects type-specific data values
936
+ * (e.g. Date objects for date fields) while getValues returns only String values for submission.
937
+ *
938
+ * @param {Boolean} [dirtyOnly=false] If true, only fields that are dirty will be included in the result.
939
+ * @return {Object}
940
+ */
941
+ getFieldValues: function(dirtyOnly) {
942
+ return this.getValues(false, dirtyOnly, false, true);
943
+ },
944
+
945
+ /**
946
+ * Clears all invalid field messages in this form.
947
+ * @return {Ext.form.Basic} this
948
+ */
949
+ clearInvalid: function() {
950
+ Ext.suspendLayouts();
951
+
952
+ var me = this,
953
+ fields = me.getFields().items,
954
+ f,
955
+ fLen = fields.length;
956
+
957
+ for (f = 0; f < fLen; f++) {
958
+ fields[f].clearInvalid();
959
+ }
960
+
961
+ Ext.resumeLayouts(true);
962
+ return me;
963
+ },
964
+
965
+ /**
966
+ * Resets all fields in this form.
967
+ * @return {Ext.form.Basic} this
968
+ */
969
+ reset: function() {
970
+ Ext.suspendLayouts();
971
+
972
+ var me = this,
973
+ fields = me.getFields().items,
974
+ f,
975
+ fLen = fields.length;
976
+
977
+ for (f = 0; f < fLen; f++) {
978
+ fields[f].reset();
979
+ }
980
+
981
+ Ext.resumeLayouts(true);
982
+ return me;
983
+ },
984
+
985
+ /**
986
+ * Calls {@link Ext#apply Ext.apply} for all fields in this form with the passed object.
987
+ * @param {Object} obj The object to be applied
988
+ * @return {Ext.form.Basic} this
989
+ */
990
+ applyToFields: function(obj) {
991
+ var fields = this.getFields().items,
992
+ f,
993
+ fLen = fields.length;
994
+
995
+ for (f = 0; f < fLen; f++) {
996
+ Ext.apply(fields[f], obj);
997
+ }
998
+
999
+ return this;
1000
+ },
1001
+
1002
+ /**
1003
+ * Calls {@link Ext#applyIf Ext.applyIf} for all field in this form with the passed object.
1004
+ * @param {Object} obj The object to be applied
1005
+ * @return {Ext.form.Basic} this
1006
+ */
1007
+ applyIfToFields: function(obj) {
1008
+ var fields = this.getFields().items,
1009
+ f,
1010
+ fLen = fields.length;
1011
+
1012
+ for (f = 0; f < fLen; f++) {
1013
+ Ext.applyIf(fields[f], obj);
1014
+ }
1015
+
1016
+ return this;
1017
+ }
1018
+ });