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,929 @@
1
+ /**
2
+ * Base Class for HBoxLayout and VBoxLayout Classes. Generally it should not need to be used directly.
3
+ */
4
+ Ext.define('Ext.layout.container.Box', {
5
+
6
+ /* Begin Definitions */
7
+
8
+ alias: ['layout.box'],
9
+ extend: 'Ext.layout.container.Container',
10
+ alternateClassName: 'Ext.layout.BoxLayout',
11
+
12
+ requires: [
13
+ 'Ext.layout.container.boxOverflow.None',
14
+ 'Ext.layout.container.boxOverflow.Menu',
15
+ 'Ext.layout.container.boxOverflow.Scroller',
16
+ 'Ext.util.Format',
17
+ 'Ext.dd.DragDropManager'
18
+ ],
19
+
20
+ /* End Definitions */
21
+
22
+ /**
23
+ * @cfg {Object} defaultMargins
24
+ * If the individual contained items do not have a margins property specified or margin specified via CSS, the
25
+ * default margins from this property will be applied to each item.
26
+ *
27
+ * This property may be specified as an object containing margins to apply in the format:
28
+ *
29
+ * {
30
+ * top: (top margin),
31
+ * right: (right margin),
32
+ * bottom: (bottom margin),
33
+ * left: (left margin)
34
+ * }
35
+ *
36
+ * This property may also be specified as a string containing space-separated, numeric margin values. The order of
37
+ * the sides associated with each value matches the way CSS processes margin values:
38
+ *
39
+ * - If there is only one value, it applies to all sides.
40
+ * - If there are two values, the top and bottom borders are set to the first value and the right and left are
41
+ * set to the second.
42
+ * - If there are three values, the top is set to the first value, the left and right are set to the second,
43
+ * and the bottom is set to the third.
44
+ * - If there are four values, they apply to the top, right, bottom, and left, respectively.
45
+ */
46
+ defaultMargins: {
47
+ top: 0,
48
+ right: 0,
49
+ bottom: 0,
50
+ left: 0
51
+ },
52
+
53
+ /**
54
+ * @cfg {String} padding
55
+ * Sets the padding to be applied to all child items managed by this layout.
56
+ *
57
+ * This property must be specified as a string containing space-separated, numeric padding values. The order of the
58
+ * sides associated with each value matches the way CSS processes padding values:
59
+ *
60
+ * - If there is only one value, it applies to all sides.
61
+ * - If there are two values, the top and bottom borders are set to the first value and the right and left are
62
+ * set to the second.
63
+ * - If there are three values, the top is set to the first value, the left and right are set to the second,
64
+ * and the bottom is set to the third.
65
+ * - If there are four values, they apply to the top, right, bottom, and left, respectively.
66
+ */
67
+ padding: 0,
68
+
69
+ /**
70
+ * @cfg {String} pack
71
+ * Controls how the child items of the container are packed together. Acceptable configuration values for this
72
+ * property are:
73
+ *
74
+ * - **start** - child items are packed together at **left** side of container (*default**)
75
+ * - **center** - child items are packed together at **mid-width** of container
76
+ * - **end** - child items are packed together at **right** side of container
77
+ */
78
+ pack: 'start',
79
+
80
+ /**
81
+ * @cfg {Number} flex
82
+ * This configuration option is to be applied to **child items** of the container managed by this layout. Each child
83
+ * item with a flex property will be flexed (horizontally in `hbox`, vertically in `vbox`) according to each item's
84
+ * **relative** flex value compared to the sum of all items with a flex value specified. Any child items that have
85
+ * either a `flex = 0` or `flex = undefined` will not be 'flexed' (the initial size will not be changed).
86
+ */
87
+ flex: undefined,
88
+
89
+ /**
90
+ * @cfg {String/Ext.Component} stretchMaxPartner
91
+ * Allows stretchMax calculation to take into account the max perpendicular size (height for HBox layout and width
92
+ * for VBox layout) of another Box layout when calculating its maximum perpendicular child size.
93
+ *
94
+ * If specified as a string, this may be either a known Container ID, or a ComponentQuery selector which is rooted
95
+ * at this layout's Container (ie, to find a sibling, use `"^>#siblingItemId`).
96
+ */
97
+ stretchMaxPartner: undefined,
98
+
99
+ type: 'box',
100
+ scrollOffset: 0,
101
+ itemCls: Ext.baseCSSPrefix + 'box-item',
102
+ targetCls: Ext.baseCSSPrefix + 'box-layout-ct',
103
+ innerCls: Ext.baseCSSPrefix + 'box-inner',
104
+
105
+ // availableSpaceOffset is used to adjust the availableWidth, typically used
106
+ // to reserve space for a scrollbar
107
+ availableSpaceOffset: 0,
108
+
109
+ // whether or not to reserve the availableSpaceOffset in layout calculations
110
+ reserveOffset: true,
111
+
112
+ manageMargins: true,
113
+
114
+ childEls: [
115
+ 'innerCt',
116
+ 'targetEl'
117
+ ],
118
+
119
+ renderTpl: [
120
+ '{%var oc,l=values.$comp.layout,oh=l.overflowHandler;',
121
+ 'if (oh.getPrefixConfig!==Ext.emptyFn) {',
122
+ 'if(oc=oh.getPrefixConfig())dh.generateMarkup(oc, out)',
123
+ '}%}',
124
+ '<div id="{ownerId}-innerCt" class="{[l.innerCls]} {[oh.getOverflowCls()]}" role="presentation">',
125
+ '<div id="{ownerId}-targetEl" style="position:absolute;',
126
+ // This width for the "CSS container box" of the box child items gives
127
+ // them the room they need to avoid being "crushed" (aka, "wrapped").
128
+ // On Opera, elements cannot be wider than 32767px or else they break
129
+ // the scrollWidth (it becomes == offsetWidth) and you cannot scroll
130
+ // the content.
131
+ 'width:20000px;',
132
+ // On IE quirks and IE6/7 strict, a text-align:center style trickles
133
+ // down to this el at times and will cause it to move off the left edge.
134
+ // The easy fix is to just always set left:0px here. The top:0px part
135
+ // is just being paranoid. The requirement for targetEl is that its
136
+ // origin align with innerCt... this ensures that it does!
137
+ 'left:0px;top:0px;',
138
+ // If we don't give the element a height, it does not always participate
139
+ // in the scrollWidth.
140
+ 'height:1px">',
141
+ '{%this.renderBody(out, values)%}',
142
+ '</div>',
143
+ '</div>',
144
+ '{%if (oh.getSuffixConfig!==Ext.emptyFn) {',
145
+ 'if(oc=oh.getSuffixConfig())dh.generateMarkup(oc, out)',
146
+ '}%}',
147
+ {
148
+ disableFormats: true,
149
+ definitions: 'var dh=Ext.DomHelper;'
150
+ }
151
+ ],
152
+
153
+ constructor: function(config) {
154
+ var me = this,
155
+ type;
156
+
157
+ me.callParent(arguments);
158
+
159
+ // The sort function needs access to properties in this, so must be bound.
160
+ me.flexSortFn = Ext.Function.bind(me.flexSort, me);
161
+
162
+ me.initOverflowHandler();
163
+
164
+ type = typeof me.padding;
165
+ if (type == 'string' || type == 'number') {
166
+ me.padding = Ext.util.Format.parseBox(me.padding);
167
+ me.padding.height = me.padding.top + me.padding.bottom;
168
+ me.padding.width = me.padding.left + me.padding.right;
169
+ }
170
+ },
171
+
172
+ getNames: function () {
173
+ return this.names;
174
+ },
175
+
176
+ getItemSizePolicy: function (item, ownerSizeModel) {
177
+ var me = this,
178
+ policy = me.sizePolicy,
179
+ align = me.align,
180
+ key = align,
181
+ ownerHeightModel;
182
+
183
+ if (align === 'stretch') {
184
+ ownerHeightModel = (ownerSizeModel || me.owner.getSizeModel())[me.names.height];
185
+ if (ownerHeightModel.shrinkWrap) {
186
+ key = 'stretchmax';
187
+ }
188
+ } else if (align !== 'stretchmax') {
189
+ key = '';
190
+ }
191
+
192
+ if (item.flex) {
193
+ policy = policy.flex;
194
+ }
195
+
196
+ return policy[key];
197
+ },
198
+
199
+ flexSort: function (a, b) {
200
+ var maxWidthName = this.getNames().maxWidth,
201
+ infiniteValue = Infinity;
202
+
203
+ a = a.target[maxWidthName] || infiniteValue;
204
+ b = b.target[maxWidthName] || infiniteValue;
205
+
206
+ // IE 6/7 Don't like Infinity - Infinity...
207
+ if (!isFinite(a) && !isFinite(b)) {
208
+ return 0;
209
+ }
210
+
211
+ return a - b;
212
+ },
213
+
214
+ isItemBoxParent: function (itemContext) {
215
+ return true;
216
+ },
217
+
218
+ isItemShrinkWrap: function (item) {
219
+ return true;
220
+ },
221
+
222
+ // Sort into *descending* order.
223
+ minSizeSortFn: function(a, b) {
224
+ return b.available - a.available;
225
+ },
226
+
227
+ roundFlex: function(width) {
228
+ return Math.ceil(width);
229
+ },
230
+
231
+ /**
232
+ * @private
233
+ * Called by an owning Panel before the Panel begins its collapse process.
234
+ * Most layouts will not need to override the default Ext.emptyFn implementation.
235
+ */
236
+ beginCollapse: function(child) {
237
+ var me = this;
238
+
239
+ if (me.direction === 'vertical' && child.collapsedVertical()) {
240
+ child.collapseMemento.capture(['flex']);
241
+ delete child.flex;
242
+ } else if (me.direction === 'horizontal' && child.collapsedHorizontal()) {
243
+ child.collapseMemento.capture(['flex']);
244
+ delete child.flex;
245
+ }
246
+ },
247
+
248
+ /**
249
+ * @private
250
+ * Called by an owning Panel before the Panel begins its expand process.
251
+ * Most layouts will not need to override the default Ext.emptyFn implementation.
252
+ */
253
+ beginExpand: function(child) {
254
+
255
+ // Restores the flex if we used to be flexed before
256
+ child.collapseMemento.restore(['flex']);
257
+ },
258
+
259
+ beginLayout: function (ownerContext) {
260
+ var me = this,
261
+ smp = me.owner.stretchMaxPartner,
262
+ style = me.innerCt.dom.style,
263
+ names = me.getNames();
264
+
265
+ // this must happen before callParent to allow the overflow handler to do its work
266
+ // that can effect the childItems collection...
267
+ me.overflowHandler.beginLayout(ownerContext);
268
+
269
+ // get the contextItem for our stretchMax buddy:
270
+ if (typeof smp === 'string') {
271
+ smp = Ext.getCmp(smp) || me.owner.query(smp)[0];
272
+ }
273
+
274
+ ownerContext.stretchMaxPartner = smp && ownerContext.context.getCmp(smp);
275
+
276
+ me.callParent(arguments);
277
+
278
+ ownerContext.innerCtContext = ownerContext.getEl('innerCt', me);
279
+
280
+ // Capture whether the owning Container is scrolling in the parallel direction
281
+ me.scrollParallel = !!(me.owner.autoScroll || me.owner[names.overflowX]);
282
+
283
+ // Capture whether the owning Container is scrolling in the perpendicular direction
284
+ me.scrollPerpendicular = !!(me.owner.autoScroll || me.owner[names.overflowY]);
285
+
286
+ // If we *are* scrolling parallel, capture the scroll position of the encapsulating element
287
+ if (me.scrollParallel) {
288
+ me.scrollPos = me.owner.getTargetEl().dom[names.scrollLeft];
289
+ }
290
+
291
+ // Don't allow sizes burned on to the innerCt to influence measurements.
292
+ style.width = '';
293
+ style.height = '';
294
+
295
+ me.cacheFlexes(ownerContext);
296
+ },
297
+
298
+ beginLayoutCycle: function (ownerContext, firstCycle) {
299
+ var me = this,
300
+ align = me.align,
301
+ names = me.getNames(),
302
+ pack = me.pack,
303
+ heightModelName = names.heightModel,
304
+ childItems, childContext, i, length, shrinkWrap;
305
+
306
+ // this must happen before callParent to allow the overflow handler to do its work
307
+ // that can effect the childItems collection...
308
+ me.overflowHandler.beginLayoutCycle(ownerContext, firstCycle);
309
+
310
+ me.callParent(arguments);
311
+
312
+ // Cache several of our string concat/compare results (since width/heightModel can
313
+ // change if we are invalidated, we cannot do this in beginLayout)
314
+
315
+ ownerContext.parallelSizeModel = ownerContext[names.widthModel];
316
+ ownerContext.perpendicularSizeModel = ownerContext[heightModelName];
317
+
318
+ ownerContext.boxOptions = {
319
+ align: align = {
320
+ stretch: align == 'stretch',
321
+ stretchmax: align == 'stretchmax',
322
+ center: align == names.center
323
+ },
324
+ pack: pack = {
325
+ center: pack == 'center',
326
+ end: pack == 'end'
327
+ }
328
+ };
329
+
330
+ // Consider an hbox w/stretch which means "assign all items the container's height".
331
+ // The spirit of this request is make all items the same height, but when shrinkWrap
332
+ // height is also requested, the height of the tallest item determines the height.
333
+ // This is exactly what the stretchmax option does, so we jiggle the flags here to
334
+ // act as if stretchmax were requested.
335
+
336
+ if (align.stretch && ownerContext.perpendicularSizeModel.shrinkWrap) {
337
+ align.stretchmax = true;
338
+ align.stretch = false;
339
+ }
340
+
341
+ // In our example hbox, packing items to the right (end) or center can only work if
342
+ // there is a container width. So, if we are shrinkWrap, we just turn off the pack
343
+ // options for the run.
344
+
345
+ if (ownerContext.parallelSizeModel.shrinkWrap) {
346
+ pack.center = pack.end = false;
347
+ }
348
+
349
+ // StretchMax
350
+ // ==========
351
+ // This fellow is more interesting than just about any other layout. Consider an
352
+ // hbox w/stretchmax. The idea is to first first allow the children to perform their
353
+ // natural (shrinkWrap) layout and then to set the height of all children to the
354
+ // the maximum height of any child. In terms of layout, this equates to starting
355
+ // with all children as heightModel.shrinkWrap or heightModel.configured.
356
+ //
357
+ // Then down in calculateStretcMax we flip the shrinkWrap children to layout-sized
358
+ // heightModel.calculated and set their height to the maxHeight. If we ever have to
359
+ // start over due to invalidate, we must restart back at the beginning (which is
360
+ // why this logic is not in beginLayout).
361
+
362
+ if (align.stretchmax) {
363
+ childItems = ownerContext.childItems;
364
+ length = childItems.length;
365
+ shrinkWrap = me.sizeModels.shrinkWrap;
366
+
367
+ for (i = 0; i < length; ++i) {
368
+ childContext = childItems[i];
369
+ if (!childContext[heightModelName].configured) {
370
+ childContext[heightModelName] = shrinkWrap;
371
+ }
372
+ }
373
+ }
374
+ },
375
+
376
+ /**
377
+ * This method is called to (re)cache our understanding of flexes. This happens during beginLayout and may need to
378
+ * be called again if the flexes are changed during the layout (e.g., like ColumnLayout).
379
+ * @param {Object} ownerContext
380
+ * @protected
381
+ */
382
+ cacheFlexes: function (ownerContext) {
383
+ var names = this.getNames(),
384
+ widthModelName = names.widthModel,
385
+ totalFlex = 0,
386
+ childItems = ownerContext.childItems,
387
+ i = childItems.length,
388
+ flexedItems = [],
389
+ minWidth = 0,
390
+ minWidthName = names.minWidth,
391
+ child, childContext, flex;
392
+
393
+ while (i--) {
394
+ childContext = childItems[i];
395
+
396
+ // if the child has a flex it could be "accidental" (typically via "defaults"),
397
+ // so just check widthModel to see if we are the sizing layout. If so, copy
398
+ // the flex from the item to the contextItem and add it to totalFlex
399
+ //
400
+ if (childContext[widthModelName].calculated) {
401
+ child = childContext.target;
402
+ childContext.flex = flex = child.flex;
403
+ if (flex) {
404
+ totalFlex += flex;
405
+ flexedItems.push(childContext);
406
+ minWidth += child[minWidthName] || 0;
407
+ }
408
+ }
409
+ // the above means that "childContext.flex" is properly truthy/falsy, which is
410
+ // often times quite convenient...
411
+ }
412
+
413
+ ownerContext.flexedItems = flexedItems;
414
+ ownerContext.flexedMinSize = minWidth;
415
+ ownerContext.totalFlex = totalFlex;
416
+
417
+ // The flexed boxes need to be sorted in ascending order of maxSize to work properly
418
+ // so that unallocated space caused by maxWidth being less than flexed width can be
419
+ // reallocated to subsequent flexed boxes.
420
+ Ext.Array.sort(flexedItems, this.flexSortFn);
421
+ },
422
+
423
+ calculate: function(ownerContext) {
424
+ var me = this,
425
+ targetSize = me.getContainerSize(ownerContext),
426
+ names = me.getNames(),
427
+ state = ownerContext.state,
428
+ plan = state.boxPlan || (state.boxPlan = {}),
429
+ extraWidth = Ext.getScrollbarSize()[names.width];
430
+
431
+ plan.targetSize = targetSize;
432
+
433
+ // Set an extra scrollbar-sized increment to add if
434
+ // Scrollbars take up space
435
+ // and we are scrolling in the perpendicular direction
436
+ // and shrinkWrapping in the parallel direction,
437
+ // and NOT stretching perpendicular dimensions to fit
438
+ // and NOT shrinkWrapping in the perpendicular direction
439
+ // publishInnerCtSize may need to add this to contentHeight if the perpendicular maxSize overflows
440
+ if (extraWidth &&
441
+ me.scrollPerpendicular &&
442
+ ownerContext.parallelSizeModel.shrinkWrap &&
443
+ !ownerContext.boxOptions.align.stretch &&
444
+ !ownerContext.perpendicularSizeModel.shrinkWrap) {
445
+
446
+ // Set the flag/possible extra height for shrinkWrap
447
+ state.additionalScrollbarWidth = extraWidth;
448
+
449
+ // In this mode, we MUST have a "height" (perpendicular measurement) to proceed.
450
+ if (!targetSize[names.gotHeight]) {
451
+ me.done = false;
452
+ return;
453
+ }
454
+ } else {
455
+ state.additionalScrollbarWidth = 0;
456
+ }
457
+
458
+ // If we are not widthModel.shrinkWrap, we need the width before we can lay out boxes:
459
+ if (!ownerContext.parallelSizeModel.shrinkWrap && !targetSize[names.gotWidth]) {
460
+ me.done = false;
461
+ return;
462
+ }
463
+
464
+ if (!state.parallelDone) {
465
+ state.parallelDone = me.calculateParallel(ownerContext, names, plan);
466
+ }
467
+
468
+ if (!state.perpendicularDone) {
469
+ state.perpendicularDone = me.calculatePerpendicular(ownerContext, names, plan);
470
+ }
471
+
472
+ if (state.parallelDone && state.perpendicularDone) {
473
+ // Fix for left and right docked Components in a dock component layout. This is for docked Headers and docked Toolbars.
474
+ // Older Microsoft browsers do not size a position:absolute element's width to match its content.
475
+ // So in this case, in the publishInnerCtSize method we may need to adjust the size of the owning Container's element explicitly based upon
476
+ // the discovered max width. So here we put a calculatedWidth property in the metadata to facilitate this.
477
+ if (me.owner.dock && (Ext.isIE6 || Ext.isIE7 || Ext.isIEQuirks) && !me.owner.width && !me.horizontal) {
478
+ plan.isIEVerticalDock = true;
479
+ plan.calculatedWidth = plan.maxSize + ownerContext.getPaddingInfo().width + ownerContext.getFrameInfo().width;
480
+ }
481
+
482
+ me.publishInnerCtSize(ownerContext, me.reserveOffset ? me.availableSpaceOffset : 0);
483
+
484
+ // Calculate stretchmax only if there is >1 child item
485
+ if (me.done && ownerContext.childItems.length > 1 && ownerContext.boxOptions.align.stretchmax && !state.stretchMaxDone) {
486
+ me.calculateStretchMax(ownerContext, names, plan);
487
+ state.stretchMaxDone = true;
488
+ }
489
+ } else {
490
+ me.done = false;
491
+ }
492
+ },
493
+
494
+ calculateParallel: function(ownerContext, names, plan) {
495
+ var me = this,
496
+ widthShrinkWrap = ownerContext.parallelSizeModel.shrinkWrap,
497
+ widthName = names.width,
498
+ childItems = ownerContext.childItems,
499
+ leftName = names.left,
500
+ rightName = names.right,
501
+ setWidthName = names.setWidth,
502
+ childItemsLength = childItems.length,
503
+ flexedItems = ownerContext.flexedItems,
504
+ flexedItemsLength = flexedItems.length,
505
+ pack = ownerContext.boxOptions.pack,
506
+ padding = me.padding,
507
+ left = padding[leftName],
508
+ nonFlexWidth = left + padding[rightName] + me.scrollOffset +
509
+ (me.reserveOffset ? me.availableSpaceOffset : 0),
510
+ i, childMargins, remainingWidth, remainingFlex, childContext, flex, flexedWidth,
511
+ contentWidth;
512
+
513
+ // Gather the total size taken up by non-flexed items:
514
+ for (i = 0; i < childItemsLength; ++i) {
515
+ childContext = childItems[i];
516
+ childMargins = childContext.marginInfo || childContext.getMarginInfo();
517
+
518
+ nonFlexWidth += childMargins[widthName];
519
+
520
+ if (!childContext.flex) {
521
+ nonFlexWidth += childContext.getProp(widthName); // min/maxWidth safe
522
+ if (isNaN(nonFlexWidth)) {
523
+ return false;
524
+ }
525
+ }
526
+ }
527
+ // if we get here, we have all the childWidths for non-flexed items...
528
+
529
+ if (widthShrinkWrap) {
530
+ plan.availableSpace = 0;
531
+ plan.tooNarrow = false;
532
+ } else {
533
+ plan.availableSpace = plan.targetSize[widthName] - nonFlexWidth;
534
+
535
+ // If we're going to need space for a parallel scrollbar, then we need to redo the perpendicular measurements
536
+ plan.tooNarrow = plan.availableSpace < ownerContext.flexedMinSize;
537
+ if (plan.tooNarrow && Ext.getScrollbarSize()[names.height] && me.scrollParallel && ownerContext.state.perpendicularDone) {
538
+ ownerContext.state.perpendicularDone = false;
539
+ for (i = 0; i < childItemsLength; ++i) {
540
+ childItems[i].invalidate();
541
+ }
542
+ }
543
+ }
544
+
545
+ contentWidth = nonFlexWidth;
546
+ remainingWidth = plan.availableSpace;
547
+ remainingFlex = ownerContext.totalFlex;
548
+
549
+ // Calculate flexed item sizes:
550
+ for (i = 0; i < flexedItemsLength; i++) {
551
+ childContext = flexedItems[i];
552
+ flex = childContext.flex;
553
+ flexedWidth = me.roundFlex((flex / remainingFlex) * remainingWidth);
554
+ flexedWidth = childContext[setWidthName](flexedWidth); // constrained
555
+ // for shrinkWrap w/flex, the item will be reduced to minWidth (maybe 0)
556
+
557
+ // due to minWidth constraints, it may be that flexedWidth > remainingWidth
558
+
559
+ contentWidth += flexedWidth;
560
+ // Remaining space has already had margins subtracted, so just subtract size
561
+ remainingWidth = Math.max(0, remainingWidth - flexedWidth); // no negatives!
562
+ remainingFlex -= flex;
563
+ }
564
+
565
+ if (pack.center) {
566
+ left += remainingWidth / 2;
567
+
568
+ // If content is too wide to pack to center, do not allow the centering calculation to place it off the left edge.
569
+ if (left < 0) {
570
+ left = 0;
571
+ }
572
+ } else if (pack.end) {
573
+ left += remainingWidth;
574
+ }
575
+
576
+ // Assign parallel position for the boxes:
577
+ for (i = 0; i < childItemsLength; ++i) {
578
+ childContext = childItems[i];
579
+ childMargins = childContext.marginInfo; // already cached by first loop
580
+
581
+ left += childMargins[leftName];
582
+
583
+ childContext.setProp(names.x, left);
584
+
585
+ // We can read directly from "props.width" because we have already properly
586
+ // requested it in the calculation of nonFlexedWidths or we calculated it.
587
+ // We cannot call getProp because that would be inappropriate for flexed items
588
+ // and we don't need any extra function call overhead:
589
+ left += childMargins[rightName] + childContext.props[widthName];
590
+ }
591
+
592
+ // Stash the contentWidth on the state so that it can always be accessed later in the calculation
593
+ ownerContext.state.contentWidth = contentWidth + ownerContext.targetContext.getPaddingInfo()[widthName];
594
+
595
+ // If we may have to increase our contentWidth to accommodate shrinkwrapping a scrollbar, we cannot publish our contentWidth
596
+ // Until we know whether that scrollbar is neeeded. Which won't be until we've calculated perpendicular
597
+ if (!ownerContext.state.additionalScrollbarWidth) {
598
+ ownerContext[names.setContentWidth](ownerContext.state.contentWidth);
599
+ }
600
+
601
+ return true;
602
+ },
603
+
604
+ calculatePerpendicular: function(ownerContext, names, plan) {
605
+ var me = this,
606
+ heightShrinkWrap = ownerContext.perpendicularSizeModel.shrinkWrap,
607
+ targetSize = plan.targetSize,
608
+ childItems = ownerContext.childItems,
609
+ childItemsLength = childItems.length,
610
+ mmax = Math.max,
611
+ heightName = names.height,
612
+ setHeightName = names.setHeight,
613
+ topName = names.top,
614
+ topPositionName = names.y,
615
+ padding = me.padding,
616
+ top = padding[topName],
617
+ availHeight = targetSize[heightName] - top - padding[names.bottom],
618
+ align = ownerContext.boxOptions.align,
619
+ isStretch = align.stretch, // never true if heightShrinkWrap (see beginLayoutCycle)
620
+ isStretchMax = align.stretchmax,
621
+ isCenter = align.center,
622
+ maxHeight = 0,
623
+ childTop, i, childHeight, childMargins, diff, height, childContext,
624
+ stretchMaxPartner,
625
+ scrollbarHeight,
626
+ stretchMaxChildren;
627
+
628
+ if (isStretch || (isCenter && !heightShrinkWrap)) {
629
+ if (isNaN(availHeight)) {
630
+ return false;
631
+ }
632
+ }
633
+
634
+ // If the intention is to horizontally scroll height-fitted child components, but the container is too narrow,
635
+ // then we must allow for the parallel scrollbar to intrude into the perpendicular dimension
636
+ if (isStretch && me.scrollParallel && plan.tooNarrow) {
637
+ scrollbarHeight = Ext.getScrollbarSize().height;
638
+ availHeight -= scrollbarHeight;
639
+ plan.targetSize[heightName] -= scrollbarHeight;
640
+ }
641
+
642
+ if (isStretch) {
643
+ height = availHeight; // never heightShrinkWrap...
644
+ } else {
645
+ for (i = 0; i < childItemsLength; i++) {
646
+ childContext = childItems[i];
647
+ childMargins = childContext.marginInfo || childContext.getMarginInfo();
648
+ childHeight = childContext.getProp(heightName);
649
+
650
+ // Max perpendicular measurement (used for stretchmax) must take the min perpendicular size of each child into account in case any fall short.
651
+ if (isNaN(maxHeight = mmax(maxHeight, childHeight + childMargins[heightName], childContext.target[names.minHeight]||0))) {
652
+ return false; // heightShrinkWrap || isCenter || isStretchMax ??
653
+ }
654
+ }
655
+
656
+ // If we are associated with another box layout, grab its maxChildHeight
657
+ stretchMaxPartner = ownerContext.stretchMaxPartner;
658
+ if (stretchMaxPartner) {
659
+ // Publish maxChildHeight as soon as it has been calculated for our partner:
660
+ ownerContext.setProp('maxChildHeight', maxHeight);
661
+ stretchMaxChildren = stretchMaxPartner.childItems;
662
+ // Only wait for maxChildHeight if our partner has visible items:
663
+ if (stretchMaxChildren && stretchMaxChildren.length) {
664
+ maxHeight = mmax(maxHeight, stretchMaxPartner.getProp('maxChildHeight'));
665
+ if (isNaN(maxHeight)) {
666
+ return false;
667
+ }
668
+ }
669
+ }
670
+
671
+ plan.maxSize = maxHeight;
672
+ ownerContext[names.setContentHeight](maxHeight + me.padding[heightName] +
673
+ ownerContext.targetContext.getPaddingInfo()[heightName]);
674
+
675
+ if (isStretchMax) {
676
+ height = maxHeight;
677
+ } else if (isCenter) {
678
+ height = heightShrinkWrap ? maxHeight : mmax(availHeight, maxHeight);
679
+
680
+ // When calculating a centered position within the content box of the innerCt,
681
+ // the width of the borders must be subtracted from the size to yield the
682
+ // space available to center within. The publishInnerCtSize method explicitly
683
+ // adds the border widths to the set size of the innerCt.
684
+ height -= ownerContext.innerCtContext.getBorderInfo()[heightName];
685
+ }
686
+ }
687
+
688
+ for (i = 0; i < childItemsLength; i++) {
689
+ childContext = childItems[i];
690
+ childMargins = childContext.marginInfo || childContext.getMarginInfo();
691
+
692
+ childTop = top + childMargins[topName];
693
+
694
+ if (isStretch) {
695
+ childContext[setHeightName](height - childMargins[heightName]);
696
+ } else if (isCenter) {
697
+ diff = height - childContext.props[heightName];
698
+ if (diff > 0) {
699
+ childTop = top + Math.round(diff / 2);
700
+ }
701
+ }
702
+
703
+ childContext.setProp(topPositionName, childTop);
704
+ }
705
+
706
+ return true;
707
+ },
708
+
709
+ calculateStretchMax: function (ownerContext, names, plan) {
710
+ var me = this,
711
+ heightName = names.height,
712
+ widthName = names.width,
713
+ childItems = ownerContext.childItems,
714
+ length = childItems.length,
715
+ height = plan.maxSize,
716
+ onBeforeInvalidateChild = me.onBeforeInvalidateChild,
717
+ onAfterInvalidateChild = me.onAfterInvalidateChild,
718
+ childContext, props, i, childHeight;
719
+
720
+ for (i = 0; i < length; ++i) {
721
+ childContext = childItems[i];
722
+
723
+ props = childContext.props;
724
+ childHeight = height - childContext.getMarginInfo()[heightName];
725
+
726
+ if (childHeight != props[heightName] || // if (wrong height ...
727
+ childContext[names.heightModel].constrained) { // ...or needs invalidation)
728
+ // When we invalidate a child, since we won't be around to size or position
729
+ // it, we include an after callback that will be run after the invalidate
730
+ // that will (re)do that work. The good news here is that we can read the
731
+ // results of all that from the childContext props.
732
+ //
733
+ // We also include a before callback to change the sizeModel to calculated
734
+ // prior to the layout being invoked.
735
+ childContext.invalidate({
736
+ before: onBeforeInvalidateChild,
737
+ after: onAfterInvalidateChild,
738
+ layout: me,
739
+ // passing this data avoids a 'scope' and its Function.bind
740
+ childWidth: props[widthName],
741
+ // subtract margins from the maximum value
742
+ childHeight: childHeight,
743
+ childX: props.x,
744
+ childY: props.y,
745
+ names: names
746
+ });
747
+ }
748
+ }
749
+ },
750
+
751
+ completeLayout: function(ownerContext) {
752
+ var me = this;
753
+
754
+ me.overflowHandler.completeLayout(ownerContext);
755
+
756
+ // If we are scrolling parallel, restore the saved scroll position
757
+ if (me.scrollParallel) {
758
+ me.owner.getTargetEl().dom[me.getNames().scrollLeft] = me.scrollPos;
759
+ }
760
+ },
761
+
762
+ finishedLayout: function(ownerContext) {
763
+ this.overflowHandler.finishedLayout(ownerContext);
764
+ this.callParent(arguments);
765
+ },
766
+
767
+ onBeforeInvalidateChild: function (childContext, options) {
768
+ // NOTE: No "this" pointer in here...
769
+ var heightModelName = options.names.heightModel;
770
+
771
+ // Change the childItem to calculated (i.e., "set by ownerCt"). The component layout
772
+ // of the child can course-correct (like dock layout does for a collapsed panel),
773
+ // so we must make these changes here before that layout's beginLayoutCycle is
774
+ // called.
775
+ if (!childContext[heightModelName].constrainedMax) {
776
+ // if the child hit a max constraint, it needs to be at its configured size, so
777
+ // we leave the sizeModel alone...
778
+ childContext[heightModelName] = Ext.layout.SizeModel.calculated;
779
+ }
780
+ },
781
+
782
+ onAfterInvalidateChild: function (childContext, options) {
783
+ // NOTE: No "this" pointer in here...
784
+ var names = options.names;
785
+
786
+ childContext.setProp('x', options.childX);
787
+ childContext.setProp('y', options.childY);
788
+
789
+ if (childContext[names.heightModel].calculated) {
790
+ // We need to respect a child that is still not calculated (such as a collapsed
791
+ // panel)...
792
+ childContext[names.setHeight](options.childHeight);
793
+ }
794
+
795
+ if (childContext[names.widthModel].calculated) {
796
+ childContext[names.setWidth](options.childWidth);
797
+ }
798
+ },
799
+
800
+ publishInnerCtSize: function(ownerContext, reservedSpace) {
801
+ var me = this,
802
+ names = me.getNames(),
803
+ heightName = names.height,
804
+ widthName = names.width,
805
+ align = ownerContext.boxOptions.align,
806
+ dock = me.owner.dock,
807
+ padding = me.padding,
808
+ plan = ownerContext.state.boxPlan,
809
+ targetSize = plan.targetSize,
810
+ height = targetSize[heightName],
811
+ innerCtContext = ownerContext.innerCtContext,
812
+ parallelContentDim = names.contentWidth,
813
+ innerCtWidth = (ownerContext.parallelSizeModel.shrinkWrap || (plan.tooNarrow && me.scrollParallel)
814
+ ? ownerContext.state.contentWidth
815
+ : targetSize[widthName]) - (reservedSpace || 0),
816
+ innerCtHeight;
817
+
818
+ if (align.stretch) {
819
+ innerCtHeight = height;
820
+ } else {
821
+ innerCtHeight = plan.maxSize + padding[names.top] + padding[names.bottom] + innerCtContext.getBorderInfo()[heightName];
822
+
823
+ if (!ownerContext.perpendicularSizeModel.shrinkWrap && align.center) {
824
+ innerCtHeight = Math.max(height, innerCtHeight);
825
+ }
826
+ }
827
+
828
+ innerCtContext[names.setWidth](innerCtWidth);
829
+ innerCtContext[names.setHeight](innerCtHeight);
830
+
831
+ // If we are scrolling in the perpendicular dimension
832
+ // AND we are shrinkWrapping the parallel dimension (Imagine stacking boxes on top of each other and stretching the container height),
833
+ // AND the perpendicular is *not* shrinkWrapped, and overflows
834
+ // AND scrollbars take up space
835
+ // Then the shrink wrap size must extend to include the scrollbar
836
+ if (ownerContext.state.additionalScrollbarWidth) {
837
+ if (innerCtHeight > plan.targetSize[names.height]) {
838
+ ownerContext.setProp(parallelContentDim, ownerContext.state.contentWidth + ownerContext.state.additionalScrollbarWidth);
839
+
840
+ // Scrollbar does not stretch the container in IE6, 7 and quirks, so we must explicitly extend the container to accommodate the scrollbar, otherwise it "cuts into" the content.
841
+ if (Ext.isIE6 || Ext.isIE7 || Ext.isIEQuirks) {
842
+ ownerContext[names.setWidth](ownerContext.props[parallelContentDim] + ownerContext.getPaddingInfo()[names.width] + ownerContext.getBorderInfo()[names.width]);
843
+ }
844
+ } else {
845
+ ownerContext.setProp(parallelContentDim, ownerContext.state.contentWidth);
846
+ }
847
+ }
848
+
849
+ // If unable to publish both dimensions, this layout needs to run again
850
+ if (isNaN(innerCtWidth + innerCtHeight)) {
851
+ me.done = false;
852
+ }
853
+
854
+ // If a calculated width has been found (this only happens for widthModel.shrinkWrap
855
+ // vertical docked Components in old Microsoft browsers) then, if the Component has
856
+ // not assumed the size of its content, set it to do so.
857
+ //
858
+ // We MUST pass the dirty flag to get that into the DOM, and because we are a Container
859
+ // layout, and not really supposed to perform sizing, we must also use the force flag.
860
+ if (plan.calculatedWidth && (dock == 'left' || dock == 'right')) {
861
+ ownerContext.setWidth(plan.calculatedWidth, true, true);
862
+ }
863
+ },
864
+
865
+ onRemove: function(comp){
866
+ var me = this;
867
+ me.callParent(arguments);
868
+ if (me.overflowHandler) {
869
+ me.overflowHandler.onRemove(comp);
870
+ }
871
+ if (comp.layoutMarginCap == me.id) {
872
+ delete comp.layoutMarginCap;
873
+ }
874
+ },
875
+
876
+ /**
877
+ * @private
878
+ */
879
+ initOverflowHandler: function() {
880
+ var me = this,
881
+ handler = me.overflowHandler,
882
+ handlerType,
883
+ constructor;
884
+
885
+ if (typeof handler == 'string') {
886
+ handler = {
887
+ type: handler
888
+ };
889
+ }
890
+
891
+ handlerType = 'None';
892
+ if (handler && handler.type !== undefined) {
893
+ handlerType = handler.type;
894
+ }
895
+
896
+ constructor = Ext.layout.container.boxOverflow[handlerType];
897
+ if (constructor[me.type]) {
898
+ constructor = constructor[me.type];
899
+ }
900
+
901
+ me.overflowHandler = Ext.create('Ext.layout.container.boxOverflow.' + handlerType, me, handler);
902
+ },
903
+
904
+ // Overridden method from Ext.layout.container.Container.
905
+ // Used in the beforeLayout method to render all items into.
906
+ getRenderTarget: function() {
907
+ return this.targetEl;
908
+ },
909
+
910
+ // Overridden method from Ext.layout.container.Container.
911
+ // Used by Container classes to insert special DOM elements which must exist in addition to the child components
912
+ getElementTarget: function() {
913
+ return this.innerCt;
914
+ },
915
+
916
+ //<debug>
917
+ calculateChildBox: Ext.deprecated(),
918
+ calculateChildBoxes: Ext.deprecated(),
919
+ updateChildBoxes: Ext.deprecated(),
920
+ //</debug>
921
+
922
+ /**
923
+ * @private
924
+ */
925
+ destroy: function() {
926
+ Ext.destroy(this.innerCt, this.overflowHandler);
927
+ this.callParent(arguments);
928
+ }
929
+ });