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,1079 @@
1
+ /**
2
+ * Given a component hierarchy of this:
3
+ *
4
+ * {
5
+ * xtype: 'panel',
6
+ * id: 'ContainerA',
7
+ * layout: 'hbox',
8
+ * renderTo: Ext.getBody(),
9
+ * items: [
10
+ * {
11
+ * id: 'ContainerB',
12
+ * xtype: 'container',
13
+ * items: [
14
+ * { id: 'ComponentA' }
15
+ * ]
16
+ * }
17
+ * ]
18
+ * }
19
+ *
20
+ * The rendering of the above proceeds roughly like this:
21
+ *
22
+ * - ContainerA's initComponent calls #render passing the `renderTo` property as the
23
+ * container argument.
24
+ * - `render` calls the `getRenderTree` method to get a complete {@link Ext.DomHelper} spec.
25
+ * - `getRenderTree` fires the "beforerender" event and calls the #beforeRender
26
+ * method. Its result is obtained by calling #getElConfig.
27
+ * - The #getElConfig method uses the `renderTpl` and its render data as the content
28
+ * of the `autoEl` described element.
29
+ * - The result of `getRenderTree` is passed to {@link Ext.DomHelper#append}.
30
+ * - The `renderTpl` contains calls to render things like docked items, container items
31
+ * and raw markup (such as the `html` or `tpl` config properties). These calls are to
32
+ * methods added to the {@link Ext.XTemplate} instance by #setupRenderTpl.
33
+ * - The #setupRenderTpl method adds methods such as `renderItems`, `renderContent`, etc.
34
+ * to the template. These are directed to "doRenderItems", "doRenderContent" etc..
35
+ * - The #setupRenderTpl calls traverse from components to their {@link Ext.layout.Layout}
36
+ * object.
37
+ * - When a container is rendered, it also has a `renderTpl`. This is processed when the
38
+ * `renderContainer` method is called in the component's `renderTpl`. This call goes to
39
+ * Ext.layout.container.Container#doRenderContainer. This method repeats this
40
+ * process for all components in the container.
41
+ * - After the top-most component's markup is generated and placed in to the DOM, the next
42
+ * step is to link elements to their components and finish calling the component methods
43
+ * `onRender` and `afterRender` as well as fire the corresponding events.
44
+ * - The first step in this is to call #finishRender. This method descends the
45
+ * component hierarchy and calls `onRender` and fires the `render` event. These calls
46
+ * are delivered top-down to approximate the timing of these calls/events from previous
47
+ * versions.
48
+ * - During the pass, the component's `el` is set. Likewise, the `renderSelectors` and
49
+ * `childEls` are applied to capture references to the component's elements.
50
+ * - These calls are also made on the {@link Ext.layout.container.Container} layout to
51
+ * capture its elements. Both of these classes use {@link Ext.util.ElementContainer} to
52
+ * handle `childEls` processing.
53
+ * - Once this is complete, a similar pass is made by calling #finishAfterRender.
54
+ * This call also descends the component hierarchy, but this time the calls are made in
55
+ * a bottom-up order to `afterRender`.
56
+ *
57
+ * @private
58
+ */
59
+ Ext.define('Ext.util.Renderable', {
60
+ requires: [
61
+ 'Ext.dom.Element'
62
+ ],
63
+
64
+ frameCls: Ext.baseCSSPrefix + 'frame',
65
+
66
+ frameIdRegex: /[\-]frame\d+[TMB][LCR]$/,
67
+
68
+ frameElementCls: {
69
+ tl: [],
70
+ tc: [],
71
+ tr: [],
72
+ ml: [],
73
+ mc: [],
74
+ mr: [],
75
+ bl: [],
76
+ bc: [],
77
+ br: []
78
+ },
79
+
80
+ frameElNames: ['TL','TC','TR','ML','MC','MR','BL','BC','BR'],
81
+
82
+ frameTpl: [
83
+ '{%this.renderDockedItems(out,values,0);%}',
84
+ '<tpl if="top">',
85
+ '<tpl if="left"><div id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left: {frameWidth}px" role="presentation"></tpl>',
86
+ '<tpl if="right"><div id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-right: {frameWidth}px" role="presentation"></tpl>',
87
+ '<div id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></div>',
88
+ '<tpl if="right"></div></tpl>',
89
+ '<tpl if="left"></div></tpl>',
90
+ '</tpl>',
91
+ '<tpl if="left"><div id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></tpl>',
92
+ '<tpl if="right"><div id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-right: {frameWidth}px" role="presentation"></tpl>',
93
+ '<div id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" role="presentation">',
94
+ '{%this.applyRenderTpl(out, values)%}',
95
+ '</div>',
96
+ '<tpl if="right"></div></tpl>',
97
+ '<tpl if="left"></div></tpl>',
98
+ '<tpl if="bottom">',
99
+ '<tpl if="left"><div id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></tpl>',
100
+ '<tpl if="right"><div id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-right: {frameWidth}px" role="presentation"></tpl>',
101
+ '<div id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></div>',
102
+ '<tpl if="right"></div></tpl>',
103
+ '<tpl if="left"></div></tpl>',
104
+ '</tpl>',
105
+ '{%this.renderDockedItems(out,values,1);%}'
106
+ ],
107
+
108
+ frameTableTpl: [
109
+ '{%this.renderDockedItems(out,values,0);%}',
110
+ '<table><tbody>',
111
+ '<tpl if="top">',
112
+ '<tr>',
113
+ '<tpl if="left"><td id="{fgid}TL" class="{frameCls}-tl {baseCls}-tl {baseCls}-{ui}-tl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tl</tpl>" style="background-position: {tl}; padding-left:{frameWidth}px" role="presentation"></td></tpl>',
114
+ '<td id="{fgid}TC" class="{frameCls}-tc {baseCls}-tc {baseCls}-{ui}-tc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tc</tpl>" style="background-position: {tc}; height: {frameWidth}px" role="presentation"></td>',
115
+ '<tpl if="right"><td id="{fgid}TR" class="{frameCls}-tr {baseCls}-tr {baseCls}-{ui}-tr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-tr</tpl>" style="background-position: {tr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
116
+ '</tr>',
117
+ '</tpl>',
118
+ '<tr>',
119
+ '<tpl if="left"><td id="{fgid}ML" class="{frameCls}-ml {baseCls}-ml {baseCls}-{ui}-ml<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-ml</tpl>" style="background-position: {ml}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
120
+ '<td id="{fgid}MC" class="{frameCls}-mc {baseCls}-mc {baseCls}-{ui}-mc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mc</tpl>" style="background-position: 0 0;" role="presentation">',
121
+ '{%this.applyRenderTpl(out, values)%}',
122
+ '</td>',
123
+ '<tpl if="right"><td id="{fgid}MR" class="{frameCls}-mr {baseCls}-mr {baseCls}-{ui}-mr<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-mr</tpl>" style="background-position: {mr}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
124
+ '</tr>',
125
+ '<tpl if="bottom">',
126
+ '<tr>',
127
+ '<tpl if="left"><td id="{fgid}BL" class="{frameCls}-bl {baseCls}-bl {baseCls}-{ui}-bl<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bl</tpl>" style="background-position: {bl}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
128
+ '<td id="{fgid}BC" class="{frameCls}-bc {baseCls}-bc {baseCls}-{ui}-bc<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-bc</tpl>" style="background-position: {bc}; height: {frameWidth}px" role="presentation"></td>',
129
+ '<tpl if="right"><td id="{fgid}BR" class="{frameCls}-br {baseCls}-br {baseCls}-{ui}-br<tpl for="uiCls"> {parent.baseCls}-{parent.ui}-{.}-br</tpl>" style="background-position: {br}; padding-left: {frameWidth}px" role="presentation"></td></tpl>',
130
+ '</tr>',
131
+ '</tpl>',
132
+ '</tbody></table>',
133
+ '{%this.renderDockedItems(out,values,1);%}'
134
+ ],
135
+
136
+ /**
137
+ * Allows addition of behavior after rendering is complete. At this stage the Component’s Element
138
+ * will have been styled according to the configuration, will have had any configured CSS class
139
+ * names added, and will be in the configured visibility and the configured enable state.
140
+ *
141
+ * @template
142
+ * @protected
143
+ */
144
+ afterRender : function() {
145
+ var me = this,
146
+ data = {},
147
+ protoEl = me.protoEl,
148
+ target = me.getTargetEl(),
149
+ item;
150
+
151
+ me.finishRenderChildren();
152
+
153
+ if (me.styleHtmlContent) {
154
+ target.addCls(me.styleHtmlCls);
155
+ }
156
+
157
+ protoEl.writeTo(data);
158
+
159
+ // Here we apply any styles that were set on the protoEl during the rendering phase
160
+ // A majority of times this will not happen, but we still need to handle it
161
+
162
+ item = data.removed;
163
+ if (item) {
164
+ target.removeCls(item);
165
+ }
166
+
167
+ item = data.cls;
168
+ if (item.length) {
169
+ target.addCls(item);
170
+ }
171
+
172
+ item = data.style;
173
+ if (data.style) {
174
+ target.setStyle(item);
175
+ }
176
+
177
+ me.protoEl = null;
178
+
179
+ // If this is the outermost Container, lay it out as soon as it is rendered.
180
+ if (!me.ownerCt) {
181
+ me.updateLayout();
182
+ }
183
+ },
184
+
185
+ afterFirstLayout : function(width, height) {
186
+ var me = this,
187
+ hasX = Ext.isDefined(me.x),
188
+ hasY = Ext.isDefined(me.y),
189
+ pos, xy;
190
+
191
+ // For floaters, calculate x and y if they aren't defined by aligning
192
+ // the sized element to the center of either the container or the ownerCt
193
+ if (me.floating && (!hasX || !hasY)) {
194
+ if (me.floatParent) {
195
+ xy = me.el.getAlignToXY(me.floatParent.getTargetEl(), 'c-c');
196
+ pos = me.floatParent.getTargetEl().translatePoints(xy[0], xy[1]);
197
+ } else {
198
+ xy = me.el.getAlignToXY(me.container, 'c-c');
199
+ pos = me.container.translatePoints(xy[0], xy[1]);
200
+ }
201
+ me.x = hasX ? me.x : pos.left;
202
+ me.y = hasY ? me.y : pos.top;
203
+ hasX = hasY = true;
204
+ }
205
+
206
+ if (hasX || hasY) {
207
+ me.setPosition(me.x, me.y);
208
+ }
209
+ me.onBoxReady(width, height);
210
+ if (me.hasListeners.boxready) {
211
+ me.fireEvent('boxready', me, width, height);
212
+ }
213
+ },
214
+
215
+ onBoxReady: Ext.emptyFn,
216
+
217
+ /**
218
+ * Sets references to elements inside the component. This applies {@link #renderSelectors}
219
+ * as well as {@link #childEls}.
220
+ * @private
221
+ */
222
+ applyRenderSelectors: function() {
223
+ var me = this,
224
+ selectors = me.renderSelectors,
225
+ el = me.el,
226
+ dom = el.dom,
227
+ selector;
228
+
229
+ me.applyChildEls(el);
230
+
231
+ // We still support renderSelectors. There are a few places in the framework that
232
+ // need them and they are a documented part of the API. In fact, we support mixing
233
+ // childEls and renderSelectors (no reason not to).
234
+ if (selectors) {
235
+ for (selector in selectors) {
236
+ if (selectors.hasOwnProperty(selector) && selectors[selector]) {
237
+ me[selector] = Ext.get(Ext.DomQuery.selectNode(selectors[selector], dom));
238
+ }
239
+ }
240
+ }
241
+ },
242
+
243
+ beforeRender: function () {
244
+ var me = this,
245
+ target = me.getTargetEl(),
246
+ layout = me.getComponentLayout();
247
+
248
+ // Just before rendering, set the frame flag if we are an always-framed component like Window or Tip.
249
+ me.frame = me.frame || me.alwaysFramed;
250
+
251
+ if (!layout.initialized) {
252
+ layout.initLayout();
253
+ }
254
+
255
+ // Attempt to set overflow style prior to render if the targetEl can be accessed.
256
+ // If the targetEl does not exist yet, this will take place in finishRender
257
+ if (target) {
258
+ target.setStyle(me.getOverflowStyle());
259
+ me.overflowStyleSet = true;
260
+ }
261
+
262
+ me.setUI(me.ui);
263
+
264
+ if (me.disabled) {
265
+ // pass silent so the event doesn't fire the first time.
266
+ me.disable(true);
267
+ }
268
+ },
269
+
270
+ /**
271
+ * @private
272
+ * Called from the selected frame generation template to insert this Component's inner structure inside the framing structure.
273
+ *
274
+ * When framing is used, a selected frame generation template is used as the primary template of the #getElConfig instead
275
+ * of the configured {@link #renderTpl}. The {@link #renderTpl} is invoked by this method which is injected into the framing template.
276
+ */
277
+ doApplyRenderTpl: function(out, values) {
278
+ // Careful! This method is bolted on to the frameTpl so all we get for context is
279
+ // the renderData! The "this" pointer is the frameTpl instance!
280
+
281
+ var me = values.$comp,
282
+ tpl;
283
+
284
+ // Don't do this if the component is already rendered:
285
+ if (!me.rendered) {
286
+ tpl = me.initRenderTpl();
287
+ tpl.applyOut(values.renderData, out);
288
+ }
289
+ },
290
+
291
+ /**
292
+ * Handles autoRender.
293
+ * Floating Components may have an ownerCt. If they are asking to be constrained, constrain them within that
294
+ * ownerCt, and have their z-index managed locally. Floating Components are always rendered to document.body
295
+ */
296
+ doAutoRender: function() {
297
+ var me = this;
298
+ if (!me.rendered) {
299
+ if (me.floating) {
300
+ me.render(document.body);
301
+ } else {
302
+ me.render(Ext.isBoolean(me.autoRender) ? Ext.getBody() : me.autoRender);
303
+ }
304
+ }
305
+ },
306
+
307
+ doRenderContent: function (out, renderData) {
308
+ // Careful! This method is bolted on to the renderTpl so all we get for context is
309
+ // the renderData! The "this" pointer is the renderTpl instance!
310
+
311
+ var me = renderData.$comp;
312
+
313
+ if (me.html) {
314
+ Ext.DomHelper.generateMarkup(me.html, out);
315
+ delete me.html;
316
+ }
317
+
318
+ if (me.tpl) {
319
+ // Make sure this.tpl is an instantiated XTemplate
320
+ if (!me.tpl.isTemplate) {
321
+ me.tpl = new Ext.XTemplate(me.tpl);
322
+ }
323
+
324
+ if (me.data) {
325
+ //me.tpl[me.tplWriteMode](target, me.data);
326
+ me.tpl.applyOut(me.data, out);
327
+ delete me.data;
328
+ }
329
+ }
330
+ },
331
+
332
+ doRenderFramingDockedItems: function (out, renderData, after) {
333
+ // Careful! This method is bolted on to the frameTpl so all we get for context is
334
+ // the renderData! The "this" pointer is the frameTpl instance!
335
+
336
+ var me = renderData.$comp;
337
+
338
+ // Most components don't have dockedItems, so check for doRenderDockedItems on the
339
+ // component (also, don't do this if the component is already rendered):
340
+ if (!me.rendered && me.doRenderDockedItems) {
341
+ // The "renderData" property is placed in scope for the renderTpl, but we don't
342
+ // want to render docked items at that level in addition to the framing level:
343
+ renderData.renderData.$skipDockedItems = true;
344
+
345
+ // doRenderDockedItems requires the $comp property on renderData, but this is
346
+ // set on the frameTpl's renderData as well:
347
+ me.doRenderDockedItems.call(this, out, renderData, after);
348
+ }
349
+ },
350
+
351
+ /**
352
+ * This method visits the rendered component tree in a "top-down" order. That is, this
353
+ * code runs on a parent component before running on a child. This method calls the
354
+ * {@link #onRender} method of each component.
355
+ * @param {Number} containerIdx The index into the Container items of this Component.
356
+ *
357
+ * @private
358
+ */
359
+ finishRender: function(containerIdx) {
360
+ var me = this,
361
+ tpl, data, contentEl, el, pre, hide;
362
+
363
+ // We are typically called w/me.el==null as a child of some ownerCt that is being
364
+ // rendered. We are also called by render for a normal component (w/o a configured
365
+ // me.el). In this case, render sets me.el and me.rendering (indirectly). Lastly
366
+ // we are also called on a component (like a Viewport) that has a configured me.el
367
+ // (body for a Viewport) when render is called. In this case, it is not flagged as
368
+ // "me.rendering" yet becasue it does not produce a renderTree. We use this to know
369
+ // not to regen the renderTpl.
370
+
371
+ if (!me.el || me.$pid) {
372
+ if (me.container) {
373
+ el = me.container.getById(me.id, true);
374
+ } else {
375
+ el = Ext.getDom(me.id);
376
+ }
377
+
378
+ if (!me.el) {
379
+ // Typical case: we produced the el during render
380
+ me.wrapPrimaryEl(el);
381
+ } else {
382
+ // We were configured with an el and created a proxy, so now we can swap
383
+ // the proxy for me.el:
384
+ delete me.$pid;
385
+
386
+ if (!me.el.dom) {
387
+ // make sure me.el is an Element
388
+ me.wrapPrimaryEl(me.el);
389
+ }
390
+ el.parentNode.insertBefore(me.el.dom, el);
391
+ Ext.removeNode(el); // remove placeholder el
392
+ // TODO - what about class/style?
393
+ }
394
+ } else if (!me.rendering) {
395
+ // We were configured with an el and then told to render (e.g., Viewport). We
396
+ // need to generate the proper DOM. Insert first because the layout system
397
+ // insists that child Component elements indices match the Component indices.
398
+ tpl = me.initRenderTpl();
399
+ if (tpl) {
400
+ data = me.initRenderData();
401
+ tpl.insertFirst(me.getTargetEl(), data);
402
+ }
403
+ }
404
+ // else we are rendering
405
+
406
+ if (!me.container) {
407
+ // top-level rendered components will already have me.container set up
408
+ me.container = Ext.get(me.el.dom.parentNode);
409
+ }
410
+
411
+ if (me.ctCls) {
412
+ me.container.addCls(me.ctCls);
413
+ }
414
+
415
+ // Sets the rendered flag and clears the redering flag
416
+ me.onRender(me.container, containerIdx);
417
+
418
+ // If we could not access a target protoEl in bewforeRender, we have to set the overflow styles here.
419
+ if (!me.overflowStyleSet) {
420
+ me.getTargetEl().setStyle(me.getOverflowStyle());
421
+ }
422
+
423
+ // Tell the encapsulating element to hide itself in the way the Component is configured to hide
424
+ // This means DISPLAY, VISIBILITY or OFFSETS.
425
+ me.el.setVisibilityMode(Ext.Element[me.hideMode.toUpperCase()]);
426
+
427
+ if (me.overCls) {
428
+ me.el.hover(me.addOverCls, me.removeOverCls, me);
429
+ }
430
+
431
+ if (me.hasListeners.render) {
432
+ me.fireEvent('render', me);
433
+ }
434
+
435
+ if (me.contentEl) {
436
+ pre = Ext.baseCSSPrefix;
437
+ hide = pre + 'hide-';
438
+ contentEl = Ext.get(me.contentEl);
439
+ contentEl.removeCls([pre+'hidden', hide+'display', hide+'offsets', hide+'nosize']);
440
+ me.getTargetEl().appendChild(contentEl.dom);
441
+ }
442
+
443
+ me.afterRender(); // this can cause a layout
444
+ if (me.hasListeners.afterrender) {
445
+ me.fireEvent('afterrender', me);
446
+ }
447
+ me.initEvents();
448
+
449
+ if (me.hidden) {
450
+ // Hiding during the render process should not perform any ancillary
451
+ // actions that the full hide process does; It is not hiding, it begins in a hidden state.'
452
+ // So just make the element hidden according to the configured hideMode
453
+ me.el.hide();
454
+ }
455
+ },
456
+
457
+ finishRenderChildren: function () {
458
+ var layout = this.getComponentLayout();
459
+
460
+ layout.finishRender();
461
+ },
462
+
463
+ getElConfig : function() {
464
+ var me = this,
465
+ autoEl = me.autoEl,
466
+ frameInfo = me.getFrameInfo(),
467
+ config = {
468
+ tag: 'div',
469
+ id: me.id,
470
+ tpl: frameInfo ? me.initFramingTpl(frameInfo.table) : me.initRenderTpl()
471
+ },
472
+ i, frameElNames, len, suffix, frameGenId;
473
+
474
+ me.initStyles(me.protoEl);
475
+ me.protoEl.writeTo(config);
476
+ me.protoEl.flush();
477
+
478
+ if (Ext.isString(autoEl)) {
479
+ config.tag = autoEl;
480
+ } else {
481
+ Ext.apply(config, autoEl); // harmless if !autoEl
482
+ }
483
+
484
+ if (config.tpl) {
485
+ // Use the framingTpl as the main content creating template. It will call out to this.applyRenderTpl(out, values)
486
+ if (frameInfo) {
487
+ frameElNames = me.frameElNames;
488
+ len = frameElNames.length;
489
+ frameGenId = me.id + '-frame1';
490
+
491
+ me.frameGenId = 1;
492
+ config.tplData = Ext.apply({}, {
493
+ $comp: me,
494
+ fgid: frameGenId,
495
+ ui: me.ui,
496
+ uiCls: me.uiCls,
497
+ frameCls: me.frameCls,
498
+ baseCls: me.baseCls,
499
+ frameWidth: frameInfo.maxWidth,
500
+ top: !!frameInfo.top,
501
+ left: !!frameInfo.left,
502
+ right: !!frameInfo.right,
503
+ bottom: !!frameInfo.bottom,
504
+ renderData: me.initRenderData()
505
+ }, me.getFramePositions(frameInfo));
506
+
507
+ // Add the childEls for each of the frame elements
508
+ for (i = 0; i < len; i++) {
509
+ suffix = frameElNames[i];
510
+ me.addChildEls({ name: 'frame' + suffix, id: frameGenId + suffix });
511
+ }
512
+
513
+ // Panel must have a frameBody
514
+ me.addChildEls({
515
+ name: 'frameBody',
516
+ id: frameGenId + 'MC'
517
+ });
518
+ } else {
519
+ config.tplData = me.initRenderData();
520
+ }
521
+ }
522
+
523
+ return config;
524
+ },
525
+
526
+ // Create the framingTpl from the string.
527
+ // Poke in a reference to applyRenderTpl(frameInfo, out)
528
+ initFramingTpl: function(table) {
529
+ var tpl = table ? this.getTpl('frameTableTpl') : this.getTpl('frameTpl');
530
+
531
+ if (tpl && !tpl.applyRenderTpl) {
532
+ this.setupFramingTpl(tpl);
533
+ }
534
+
535
+ return tpl;
536
+ },
537
+
538
+ /**
539
+ * @private
540
+ * Inject a reference to the function which applies the render template into the framing template. The framing template
541
+ * wraps the content.
542
+ */
543
+ setupFramingTpl: function(frameTpl) {
544
+ frameTpl.applyRenderTpl = this.doApplyRenderTpl;
545
+ frameTpl.renderDockedItems = this.doRenderFramingDockedItems;
546
+ },
547
+
548
+ /**
549
+ * This function takes the position argument passed to onRender and returns a
550
+ * DOM element that you can use in the insertBefore.
551
+ * @param {String/Number/Ext.dom.Element/HTMLElement} position Index, element id or element you want
552
+ * to put this component before.
553
+ * @return {HTMLElement} DOM element that you can use in the insertBefore
554
+ */
555
+ getInsertPosition: function(position) {
556
+ // Convert the position to an element to insert before
557
+ if (position !== undefined) {
558
+ if (Ext.isNumber(position)) {
559
+ position = this.container.dom.childNodes[position];
560
+ }
561
+ else {
562
+ position = Ext.getDom(position);
563
+ }
564
+ }
565
+
566
+ return position;
567
+ },
568
+
569
+ getRenderTree: function() {
570
+ var me = this;
571
+
572
+ if (!me.hasListeners.beforerender || me.fireEvent('beforerender', me) !== false) {
573
+ me.beforeRender();
574
+
575
+ // Flag to let the layout's finishRenderItems and afterFinishRenderItems
576
+ // know which items to process
577
+ me.rendering = true;
578
+
579
+ if (me.el) {
580
+ // Since we are producing a render tree, we produce a "proxy el" that will
581
+ // sit in the rendered DOM precisely where me.el belongs. We replace the
582
+ // proxy el in the finishRender phase.
583
+ return {
584
+ tag: 'div',
585
+ id: (me.$pid = Ext.id())
586
+ };
587
+ }
588
+
589
+ return me.getElConfig();
590
+ }
591
+
592
+ return null;
593
+ },
594
+
595
+ initContainer: function(container) {
596
+ var me = this;
597
+
598
+ // If you render a component specifying the el, we get the container
599
+ // of the el, and make sure we dont move the el around in the dom
600
+ // during the render
601
+ if (!container && me.el) {
602
+ container = me.el.dom.parentNode;
603
+ me.allowDomMove = false;
604
+ }
605
+ me.container = container.dom ? container : Ext.get(container);
606
+
607
+ return me.container;
608
+ },
609
+
610
+ /**
611
+ * Initialized the renderData to be used when rendering the renderTpl.
612
+ * @return {Object} Object with keys and values that are going to be applied to the renderTpl
613
+ * @private
614
+ */
615
+ initRenderData: function() {
616
+ var me = this;
617
+
618
+ return Ext.apply({
619
+ $comp: me,
620
+ id: me.id,
621
+ ui: me.ui,
622
+ uiCls: me.uiCls,
623
+ baseCls: me.baseCls,
624
+ componentCls: me.componentCls,
625
+ frame: me.frame
626
+ }, me.renderData);
627
+ },
628
+
629
+ /**
630
+ * Initializes the renderTpl.
631
+ * @return {Ext.XTemplate} The renderTpl XTemplate instance.
632
+ * @private
633
+ */
634
+ initRenderTpl: function() {
635
+ var tpl = this.getTpl('renderTpl');
636
+
637
+ if (tpl && !tpl.renderContent) {
638
+ this.setupRenderTpl(tpl);
639
+ }
640
+
641
+ return tpl;
642
+ },
643
+
644
+ /**
645
+ * Template method called when this Component's DOM structure is created.
646
+ *
647
+ * At this point, this Component's (and all descendants') DOM structure *exists* but it has not
648
+ * been layed out (positioned and sized).
649
+ *
650
+ * Subclasses which override this to gain access to the structure at render time should
651
+ * call the parent class's method before attempting to access any child elements of the Component.
652
+ *
653
+ * @param {Ext.core.Element} parentNode The parent Element in which this Component's encapsulating element is contained.
654
+ * @param {Number} containerIdx The index within the parent Container's child collection of this Component.
655
+ *
656
+ * @template
657
+ * @protected
658
+ */
659
+ onRender: function(parentNode, containerIdx) {
660
+ var me = this,
661
+ x = me.x,
662
+ y = me.y,
663
+ lastBox, width, height,
664
+ el = me.el;
665
+
666
+ // After the container property has been collected, we can wrap the Component in a reset wraper if necessary
667
+ if (Ext.scopeResetCSS && !me.ownerCt) {
668
+ // If this component's el is the body element, we add the reset class to the html tag
669
+ if (el.dom == Ext.getBody().dom) {
670
+ el.parent().addCls(Ext.resetCls);
671
+ }
672
+ else {
673
+ // Else we wrap this element in an element that adds the reset class.
674
+ me.resetEl = el.wrap({
675
+ cls: Ext.resetCls
676
+ });
677
+ }
678
+ }
679
+
680
+ me.applyRenderSelectors();
681
+
682
+ // Flag set on getRenderTree to flag to the layout's postprocessing routine that
683
+ // the Component is in the process of being rendered and needs postprocessing.
684
+ delete me.rendering;
685
+
686
+ me.rendered = true;
687
+
688
+ // We need to remember these to avoid writing them during the initial layout:
689
+ lastBox = null;
690
+
691
+ if (x !== undefined) {
692
+ lastBox = lastBox || {};
693
+ lastBox.x = x;
694
+ }
695
+ if (y !== undefined) {
696
+ lastBox = lastBox || {};
697
+ lastBox.y = y;
698
+ }
699
+ // Framed components need their width/height to apply to the frame, which is
700
+ // best handled in layout at present.
701
+ // If we're using the content box model, we also cannot assign initial sizes since we do not know the border widths to subtract
702
+ if (!me.getFrameInfo() && Ext.isBorderBox) {
703
+ width = me.width;
704
+ height = me.height;
705
+
706
+ if (typeof width == 'number') {
707
+ lastBox = lastBox || {};
708
+ lastBox.width = width;
709
+ }
710
+ if (typeof height == 'number') {
711
+ lastBox = lastBox || {};
712
+ lastBox.height = height;
713
+ }
714
+ }
715
+
716
+ me.lastBox = me.el.lastBox = lastBox;
717
+ },
718
+
719
+ render: function(container, position) {
720
+ var me = this,
721
+ el = me.el && (me.el = Ext.get(me.el)), // ensure me.el is wrapped
722
+ tree,
723
+ nextSibling;
724
+
725
+ Ext.suspendLayouts();
726
+
727
+ container = me.initContainer(container);
728
+
729
+ nextSibling = me.getInsertPosition(position);
730
+
731
+ if (!el) {
732
+ tree = me.getRenderTree();
733
+
734
+ // tree will be null if a beforerender listener returns false
735
+ if (tree) {
736
+ if (nextSibling) {
737
+ el = Ext.DomHelper.insertBefore(nextSibling, tree);
738
+ } else {
739
+ el = Ext.DomHelper.append(container, tree);
740
+ }
741
+
742
+ me.wrapPrimaryEl(el);
743
+ }
744
+ } else {
745
+ // Set configured styles on pre-rendered Component's element
746
+ me.initStyles(el);
747
+ if (me.allowDomMove !== false) {
748
+ //debugger; // TODO
749
+ if (nextSibling) {
750
+ container.dom.insertBefore(el.dom, nextSibling);
751
+ } else {
752
+ container.dom.appendChild(el.dom);
753
+ }
754
+ }
755
+ }
756
+
757
+ if (el) {
758
+ me.finishRender(position);
759
+ }
760
+
761
+ Ext.resumeLayouts(!container.isDetachedBody);
762
+ },
763
+
764
+ /**
765
+ * Ensures that this component is attached to `document.body`. If the component was
766
+ * rendered to {@link Ext#getDetachedBody}, then it will be appended to `document.body`.
767
+ * Any configured position is also restored.
768
+ * @param {Boolean} [runLayout=false] True to run the component's layout.
769
+ */
770
+ ensureAttachedToBody: function (runLayout) {
771
+ var comp = this,
772
+ body;
773
+
774
+ while (comp.ownerCt) {
775
+ comp = comp.ownerCt;
776
+ }
777
+
778
+ if (comp.container.isDetachedBody) {
779
+ comp.container = body = Ext.getBody();
780
+ body.appendChild(comp.el.dom);
781
+ if (runLayout) {
782
+ comp.updateLayout();
783
+ }
784
+ if (typeof comp.x == 'number' || typeof comp.y == 'number') {
785
+ comp.setPosition(comp.x, comp.y);
786
+ }
787
+ }
788
+ },
789
+
790
+ setupRenderTpl: function (renderTpl) {
791
+ renderTpl.renderBody = renderTpl.renderContent = this.doRenderContent;
792
+ },
793
+
794
+ wrapPrimaryEl: function (dom) {
795
+ this.el = Ext.get(dom, true);
796
+ },
797
+
798
+ /**
799
+ * @private
800
+ */
801
+ initFrame : function() {
802
+ if (Ext.supports.CSS3BorderRadius || !this.frame) {
803
+ return;
804
+ }
805
+
806
+ var me = this,
807
+ frameInfo = me.getFrameInfo(),
808
+ frameWidth, frameTpl, frameGenId,
809
+ i,
810
+ frameElNames = me.frameElNames,
811
+ len = frameElNames.length,
812
+ suffix;
813
+
814
+ if (frameInfo) {
815
+ frameWidth = frameInfo.maxWidth;
816
+ frameTpl = me.getFrameTpl(frameInfo.table);
817
+
818
+ // since we render id's into the markup and id's NEED to be unique, we have a
819
+ // simple strategy for numbering their generations.
820
+ me.frameGenId = frameGenId = (me.frameGenId || 0) + 1;
821
+ frameGenId = me.id + '-frame' + frameGenId;
822
+
823
+ // Here we render the frameTpl to this component. This inserts the 9point div or the table framing.
824
+ frameTpl.insertFirst(me.el, Ext.apply({
825
+ $comp: me,
826
+ fgid: frameGenId,
827
+ ui: me.ui,
828
+ uiCls: me.uiCls,
829
+ frameCls: me.frameCls,
830
+ baseCls: me.baseCls,
831
+ frameWidth: frameWidth,
832
+ top: !!frameInfo.top,
833
+ left: !!frameInfo.left,
834
+ right: !!frameInfo.right,
835
+ bottom: !!frameInfo.bottom
836
+ }, me.getFramePositions(frameInfo)));
837
+
838
+ // The frameBody is returned in getTargetEl, so that layouts render items to the correct target.
839
+ me.frameBody = me.el.down('.' + me.frameCls + '-mc');
840
+
841
+ // Clean out the childEls for the old frame elements (the majority of the els)
842
+ me.removeChildEls(function (c) {
843
+ return c.id && me.frameIdRegex.test(c.id);
844
+ });
845
+
846
+ // Grab references to the childEls for each of the new frame elements
847
+ for (i = 0; i < len; i++) {
848
+ suffix = frameElNames[i];
849
+ me['frame' + suffix] = me.el.getById(frameGenId + suffix);
850
+ }
851
+ }
852
+ },
853
+
854
+ updateFrame: function() {
855
+ if (Ext.supports.CSS3BorderRadius || !this.frame) {
856
+ return;
857
+ }
858
+
859
+ var me = this,
860
+ wasTable = this.frameSize && this.frameSize.table,
861
+ oldFrameTL = this.frameTL,
862
+ oldFrameBL = this.frameBL,
863
+ oldFrameML = this.frameML,
864
+ oldFrameMC = this.frameMC,
865
+ newMCClassName;
866
+
867
+ this.initFrame();
868
+
869
+ if (oldFrameMC) {
870
+ if (me.frame) {
871
+
872
+ // Store the class names set on the new MC
873
+ newMCClassName = this.frameMC.dom.className;
874
+
875
+ // Framing elements have been selected in initFrame, no need to run applyRenderSelectors
876
+ // Replace the new mc with the old mc
877
+ oldFrameMC.insertAfter(this.frameMC);
878
+ this.frameMC.remove();
879
+
880
+ // Restore the reference to the old frame mc as the framebody
881
+ this.frameBody = this.frameMC = oldFrameMC;
882
+
883
+ // Apply the new mc classes to the old mc element
884
+ oldFrameMC.dom.className = newMCClassName;
885
+
886
+ // Remove the old framing
887
+ if (wasTable) {
888
+ me.el.query('> table')[1].remove();
889
+ }
890
+ else {
891
+ if (oldFrameTL) {
892
+ oldFrameTL.remove();
893
+ }
894
+ if (oldFrameBL) {
895
+ oldFrameBL.remove();
896
+ }
897
+ if (oldFrameML) {
898
+ oldFrameML.remove();
899
+ }
900
+ }
901
+ }
902
+ }
903
+ else if (me.frame) {
904
+ this.applyRenderSelectors();
905
+ }
906
+ },
907
+
908
+ /**
909
+ * @private
910
+ * On render, reads an encoded style attribute, "background-position" from the style of this Component's element.
911
+ * This information is memoized based upon the CSS class name of this Component's element.
912
+ * Because child Components are rendered as textual HTML as part of the topmost Container, a dummy div is inserted
913
+ * into the document to receive the document element's CSS class name, and therefore style attributes.
914
+ */
915
+ getFrameInfo: function() {
916
+ // If native framing can be used, or this component is not going to be framed, then do not attempt to read CSS framing info.
917
+ if (Ext.supports.CSS3BorderRadius || !this.frame) {
918
+ return false;
919
+ }
920
+
921
+ var me = this,
922
+ frameInfoCache = me.frameInfoCache,
923
+ el = me.el || me.protoEl,
924
+ cls = el.dom ? el.dom.className : el.classList.join(' '),
925
+ frameInfo = frameInfoCache[cls],
926
+ styleEl, left, top, info;
927
+
928
+ if (frameInfo == null) {
929
+ // Get the singleton frame style proxy with our el class name stamped into it.
930
+ styleEl = Ext.fly(me.getStyleProxy(cls), 'frame-style-el');
931
+ left = styleEl.getStyle('background-position-x');
932
+ top = styleEl.getStyle('background-position-y');
933
+
934
+ // Some browsers don't support background-position-x and y, so for those
935
+ // browsers let's split background-position into two parts.
936
+ if (!left && !top) {
937
+ info = styleEl.getStyle('background-position').split(' ');
938
+ left = info[0];
939
+ top = info[1];
940
+ }
941
+
942
+ frameInfo = me.calculateFrame(left, top);
943
+
944
+ if (frameInfo) {
945
+ // Just to be sure we set the background image of the el to none.
946
+ el.setStyle('background-image', 'none');
947
+ }
948
+
949
+ //<debug error>
950
+ // This happens when you set frame: true explicitly without using the x-frame mixin in sass.
951
+ // This way IE can't figure out what sizes to use and thus framing can't work.
952
+ if (me.frame === true && !frameInfo) {
953
+ Ext.log.error('You have set frame: true explicity on this component (' + me.getXType() + ') and it ' +
954
+ 'does not have any framing defined in the CSS template. In this case IE cannot figure out ' +
955
+ 'what sizes to use and thus framing on this component will be disabled.');
956
+ }
957
+ //</debug>
958
+
959
+ frameInfoCache[cls] = frameInfo;
960
+ }
961
+
962
+ me.frame = !!frameInfo;
963
+ me.frameSize = frameInfo;
964
+
965
+ return frameInfo;
966
+ },
967
+
968
+ calculateFrame: function(left, top){
969
+ // We actually pass a string in the form of '[type][tl][tr]px [direction][br][bl]px' as
970
+ // the background position of this.el from the CSS to indicate to IE that this component needs
971
+ // framing. We parse it here.
972
+ if (!(parseInt(left, 10) >= 1000000 && parseInt(top, 10) >= 1000000)) {
973
+ return false;
974
+ }
975
+ var max = Math.max,
976
+ tl = parseInt(left.substr(3, 2), 10),
977
+ tr = parseInt(left.substr(5, 2), 10),
978
+ br = parseInt(top.substr(3, 2), 10),
979
+ bl = parseInt(top.substr(5, 2), 10),
980
+ frameInfo = {
981
+ // Table markup starts with 110, div markup with 100.
982
+ table: left.substr(0, 3) == '110',
983
+
984
+ // Determine if we are dealing with a horizontal or vertical component
985
+ vertical: top.substr(0, 3) == '110',
986
+
987
+ // Get and parse the different border radius sizes
988
+ top: max(tl, tr),
989
+ right: max(tr, br),
990
+ bottom: max(bl, br),
991
+ left: max(tl, bl)
992
+ };
993
+
994
+ frameInfo.maxWidth = max(frameInfo.top, frameInfo.right, frameInfo.bottom, frameInfo.left);
995
+ frameInfo.width = frameInfo.left + frameInfo.right;
996
+ frameInfo.height = frameInfo.top + frameInfo.bottom;
997
+ return frameInfo;
998
+ },
999
+
1000
+ /**
1001
+ * @private
1002
+ * Returns an offscreen div with the same class name as the element this is being rendered.
1003
+ * This is because child item rendering takes place in a detached div which, being not part of the document, has no styling.
1004
+ */
1005
+ getStyleProxy: function(cls) {
1006
+ var result = this.styleProxyEl || (Ext.AbstractComponent.prototype.styleProxyEl = Ext.getBody().createChild({
1007
+ style: {
1008
+ position: 'absolute',
1009
+ top: '-10000px'
1010
+ }
1011
+ }, null, true));
1012
+
1013
+ result.className = cls;
1014
+ return result;
1015
+ },
1016
+
1017
+ getFramePositions: function(frameInfo) {
1018
+ var me = this,
1019
+ frameWidth = frameInfo.maxWidth,
1020
+ dock = me.dock,
1021
+ positions, tc, bc, ml, mr;
1022
+
1023
+ if (frameInfo.vertical) {
1024
+ tc = '0 -' + (frameWidth * 0) + 'px';
1025
+ bc = '0 -' + (frameWidth * 1) + 'px';
1026
+
1027
+ if (dock && dock == "right") {
1028
+ tc = 'right -' + (frameWidth * 0) + 'px';
1029
+ bc = 'right -' + (frameWidth * 1) + 'px';
1030
+ }
1031
+
1032
+ positions = {
1033
+ tl: '0 -' + (frameWidth * 0) + 'px',
1034
+ tr: '0 -' + (frameWidth * 1) + 'px',
1035
+ bl: '0 -' + (frameWidth * 2) + 'px',
1036
+ br: '0 -' + (frameWidth * 3) + 'px',
1037
+
1038
+ ml: '-' + (frameWidth * 1) + 'px 0',
1039
+ mr: 'right 0',
1040
+
1041
+ tc: tc,
1042
+ bc: bc
1043
+ };
1044
+ } else {
1045
+ ml = '-' + (frameWidth * 0) + 'px 0';
1046
+ mr = 'right 0';
1047
+
1048
+ if (dock && dock == "bottom") {
1049
+ ml = 'left bottom';
1050
+ mr = 'right bottom';
1051
+ }
1052
+
1053
+ positions = {
1054
+ tl: '0 -' + (frameWidth * 2) + 'px',
1055
+ tr: 'right -' + (frameWidth * 3) + 'px',
1056
+ bl: '0 -' + (frameWidth * 4) + 'px',
1057
+ br: 'right -' + (frameWidth * 5) + 'px',
1058
+
1059
+ ml: ml,
1060
+ mr: mr,
1061
+
1062
+ tc: '0 -' + (frameWidth * 0) + 'px',
1063
+ bc: '0 -' + (frameWidth * 1) + 'px'
1064
+ };
1065
+ }
1066
+
1067
+ return positions;
1068
+ },
1069
+
1070
+ /**
1071
+ * @private
1072
+ */
1073
+ getFrameTpl : function(table) {
1074
+ return this.getTpl(table ? 'frameTableTpl' : 'frameTpl');
1075
+ },
1076
+
1077
+ // Cache the frame information object so as not to cause style recalculations
1078
+ frameInfoCache: {}
1079
+ });