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,99 @@
1
+ /**
2
+ * @class Ext.Ajax
3
+ * @singleton
4
+ * @markdown
5
+
6
+ A singleton instance of an {@link Ext.data.Connection}. This class
7
+ is used to communicate with your server side code. It can be used as follows:
8
+
9
+ Ext.Ajax.request({
10
+ url: 'page.php',
11
+ params: {
12
+ id: 1
13
+ },
14
+ success: function(response){
15
+ var text = response.responseText;
16
+ // process server response here
17
+ }
18
+ });
19
+
20
+ Default options for all requests can be set by changing a property on the Ext.Ajax class:
21
+
22
+ Ext.Ajax.timeout = 60000; // 60 seconds
23
+
24
+ Any options specified in the request method for the Ajax request will override any
25
+ defaults set on the Ext.Ajax class. In the code sample below, the timeout for the
26
+ request will be 60 seconds.
27
+
28
+ Ext.Ajax.timeout = 120000; // 120 seconds
29
+ Ext.Ajax.request({
30
+ url: 'page.aspx',
31
+ timeout: 60000
32
+ });
33
+
34
+ In general, this class will be used for all Ajax requests in your application.
35
+ The main reason for creating a separate {@link Ext.data.Connection} is for a
36
+ series of requests that share common settings that are different to all other
37
+ requests in the application.
38
+
39
+ */
40
+ Ext.define('Ext.Ajax', {
41
+ extend: 'Ext.data.Connection',
42
+ singleton: true,
43
+
44
+ /**
45
+ * @cfg {Object} extraParams @hide
46
+ */
47
+ /**
48
+ * @cfg {Object} defaultHeaders @hide
49
+ */
50
+ /**
51
+ * @cfg {String} method @hide
52
+ */
53
+ /**
54
+ * @cfg {Number} timeout @hide
55
+ */
56
+ /**
57
+ * @cfg {Boolean} autoAbort @hide
58
+ */
59
+ /**
60
+ * @cfg {Boolean} disableCaching @hide
61
+ */
62
+
63
+ /**
64
+ * @property {Boolean} disableCaching
65
+ * True to add a unique cache-buster param to GET requests. Defaults to true.
66
+ */
67
+ /**
68
+ * @property {String} url
69
+ * The default URL to be used for requests to the server.
70
+ * If the server receives all requests through one URL, setting this once is easier than
71
+ * entering it on every request.
72
+ */
73
+ /**
74
+ * @property {Object} extraParams
75
+ * An object containing properties which are used as extra parameters to each request made
76
+ * by this object. Session information and other data that you need
77
+ * to pass with each request are commonly put here.
78
+ */
79
+ /**
80
+ * @property {Object} defaultHeaders
81
+ * An object containing request headers which are added to each request made by this object.
82
+ */
83
+ /**
84
+ * @property {String} method
85
+ * The default HTTP method to be used for requests. Note that this is case-sensitive and
86
+ * should be all caps (if not set but params are present will use
87
+ * <tt>"POST"</tt>, otherwise will use <tt>"GET"</tt>.)
88
+ */
89
+ /**
90
+ * @property {Number} timeout
91
+ * The timeout in milliseconds to be used for requests. Defaults to 30000.
92
+ */
93
+
94
+ /**
95
+ * @property {Boolean} autoAbort
96
+ * Whether a new request should abort any pending requests.
97
+ */
98
+ autoAbort : false
99
+ });
@@ -0,0 +1,1344 @@
1
+ /**
2
+ * Base class for all Ext components. All subclasses of Component may participate in the automated Ext component
3
+ * lifecycle of creation, rendering and destruction which is provided by the {@link Ext.container.Container Container}
4
+ * class. Components may be added to a Container through the {@link Ext.container.Container#cfg-items items} config option
5
+ * at the time the Container is created, or they may be added dynamically via the
6
+ * {@link Ext.container.Container#method-add add} method.
7
+ *
8
+ * The Component base class has built-in support for basic hide/show and enable/disable and size control behavior.
9
+ *
10
+ * All Components are registered with the {@link Ext.ComponentManager} on construction so that they can be referenced at
11
+ * any time via {@link Ext#getCmp Ext.getCmp}, passing the {@link #id}.
12
+ *
13
+ * All user-developed visual widgets that are required to participate in automated lifecycle and size management should
14
+ * subclass Component.
15
+ *
16
+ * See the Creating new UI controls chapter in [Component Guide][1] for details on how and to either extend
17
+ * or augment Ext JS base classes to create custom Components.
18
+ *
19
+ * Every component has a specific xtype, which is its Ext-specific type name, along with methods for checking the xtype
20
+ * like {@link #getXType} and {@link #isXType}. See the [Component Guide][1] for more information on xtypes and the
21
+ * Component hierarchy.
22
+ *
23
+ * This is the list of all valid xtypes:
24
+ *
25
+ * xtype Class
26
+ * ------------- ------------------
27
+ * button {@link Ext.button.Button}
28
+ * buttongroup {@link Ext.container.ButtonGroup}
29
+ * colorpalette {@link Ext.picker.Color}
30
+ * component {@link Ext.Component}
31
+ * container {@link Ext.container.Container}
32
+ * cycle {@link Ext.button.Cycle}
33
+ * dataview {@link Ext.view.View}
34
+ * datepicker {@link Ext.picker.Date}
35
+ * editor {@link Ext.Editor}
36
+ * editorgrid {@link Ext.grid.plugin.Editing}
37
+ * grid {@link Ext.grid.Panel}
38
+ * multislider {@link Ext.slider.Multi}
39
+ * panel {@link Ext.panel.Panel}
40
+ * progressbar {@link Ext.ProgressBar}
41
+ * slider {@link Ext.slider.Single}
42
+ * splitbutton {@link Ext.button.Split}
43
+ * tabpanel {@link Ext.tab.Panel}
44
+ * treepanel {@link Ext.tree.Panel}
45
+ * viewport {@link Ext.container.Viewport}
46
+ * window {@link Ext.window.Window}
47
+ *
48
+ * Toolbar components
49
+ * ---------------------------------------
50
+ * pagingtoolbar {@link Ext.toolbar.Paging}
51
+ * toolbar {@link Ext.toolbar.Toolbar}
52
+ * tbfill {@link Ext.toolbar.Fill}
53
+ * tbitem {@link Ext.toolbar.Item}
54
+ * tbseparator {@link Ext.toolbar.Separator}
55
+ * tbspacer {@link Ext.toolbar.Spacer}
56
+ * tbtext {@link Ext.toolbar.TextItem}
57
+ *
58
+ * Menu components
59
+ * ---------------------------------------
60
+ * menu {@link Ext.menu.Menu}
61
+ * menucheckitem {@link Ext.menu.CheckItem}
62
+ * menuitem {@link Ext.menu.Item}
63
+ * menuseparator {@link Ext.menu.Separator}
64
+ * menutextitem {@link Ext.menu.Item}
65
+ *
66
+ * Form components
67
+ * ---------------------------------------
68
+ * form {@link Ext.form.Panel}
69
+ * checkbox {@link Ext.form.field.Checkbox}
70
+ * combo {@link Ext.form.field.ComboBox}
71
+ * datefield {@link Ext.form.field.Date}
72
+ * displayfield {@link Ext.form.field.Display}
73
+ * field {@link Ext.form.field.Base}
74
+ * fieldset {@link Ext.form.FieldSet}
75
+ * hidden {@link Ext.form.field.Hidden}
76
+ * htmleditor {@link Ext.form.field.HtmlEditor}
77
+ * label {@link Ext.form.Label}
78
+ * numberfield {@link Ext.form.field.Number}
79
+ * radio {@link Ext.form.field.Radio}
80
+ * radiogroup {@link Ext.form.RadioGroup}
81
+ * textarea {@link Ext.form.field.TextArea}
82
+ * textfield {@link Ext.form.field.Text}
83
+ * timefield {@link Ext.form.field.Time}
84
+ * trigger {@link Ext.form.field.Trigger}
85
+ *
86
+ * Chart components
87
+ * ---------------------------------------
88
+ * chart {@link Ext.chart.Chart}
89
+ * barchart {@link Ext.chart.series.Bar}
90
+ * columnchart {@link Ext.chart.series.Column}
91
+ * linechart {@link Ext.chart.series.Line}
92
+ * piechart {@link Ext.chart.series.Pie}
93
+ *
94
+ * It should not usually be necessary to instantiate a Component because there are provided subclasses which implement
95
+ * specialized Component use cases which cover most application needs. However it is possible to instantiate a base
96
+ * Component, and it will be renderable, or will particpate in layouts as the child item of a Container:
97
+ *
98
+ * @example
99
+ * Ext.create('Ext.Component', {
100
+ * html: 'Hello world!',
101
+ * width: 300,
102
+ * height: 200,
103
+ * padding: 20,
104
+ * style: {
105
+ * color: '#FFFFFF',
106
+ * backgroundColor:'#000000'
107
+ * },
108
+ * renderTo: Ext.getBody()
109
+ * });
110
+ *
111
+ * The Component above creates its encapsulating `div` upon render, and use the configured HTML as content. More complex
112
+ * internal structure may be created using the {@link #renderTpl} configuration, although to display database-derived
113
+ * mass data, it is recommended that an ExtJS data-backed Component such as a {@link Ext.view.View View}, or {@link
114
+ * Ext.grid.Panel GridPanel}, or {@link Ext.tree.Panel TreePanel} be used.
115
+ *
116
+ * [2]: #!/guide/components
117
+ */
118
+ Ext.define('Ext.Component', {
119
+
120
+ /* Begin Definitions */
121
+
122
+ alias: ['widget.component', 'widget.box'],
123
+
124
+ extend: 'Ext.AbstractComponent',
125
+
126
+ requires: [
127
+ 'Ext.util.DelayedTask'
128
+ ],
129
+
130
+ uses: [
131
+ 'Ext.Layer',
132
+ 'Ext.resizer.Resizer',
133
+ 'Ext.util.ComponentDragger'
134
+ ],
135
+
136
+ mixins: {
137
+ floating: 'Ext.util.Floating'
138
+ },
139
+
140
+ statics: {
141
+ // Collapse/expand directions
142
+ DIRECTION_TOP: 'top',
143
+ DIRECTION_RIGHT: 'right',
144
+ DIRECTION_BOTTOM: 'bottom',
145
+ DIRECTION_LEFT: 'left',
146
+
147
+ VERTICAL_DIRECTION_Re: /^(?:top|bottom)$/,
148
+
149
+ // RegExp whih specifies characters in an xtype which must be translated to '-' when generating auto IDs.
150
+ // This includes dot, comma and whitespace
151
+ INVALID_ID_CHARS_Re: /[\.,\s]/g
152
+ },
153
+
154
+ /* End Definitions */
155
+
156
+ /**
157
+ * @cfg {Boolean/Object} resizable
158
+ * Specify as `true` to apply a {@link Ext.resizer.Resizer Resizer} to this Component after rendering.
159
+ *
160
+ * May also be specified as a config object to be passed to the constructor of {@link Ext.resizer.Resizer Resizer}
161
+ * to override any defaults. By default the Component passes its minimum and maximum size, and uses
162
+ * `{@link Ext.resizer.Resizer#dynamic}: false`
163
+ */
164
+
165
+ /**
166
+ * @cfg {String} resizeHandles
167
+ * A valid {@link Ext.resizer.Resizer} handles config string. Only applies when resizable = true.
168
+ */
169
+ resizeHandles: 'all',
170
+
171
+ /**
172
+ * @cfg {Boolean} [autoScroll=false]
173
+ * `true` to use overflow:'auto' on the components layout element and show scroll bars automatically when necessary,
174
+ * `false` to clip any overflowing content.
175
+ * This should not be combined with {@link #overflowX} or {@link #overflowY}.
176
+ */
177
+
178
+ /**
179
+ * @cfg {String} overflowX
180
+ * Possible values are:
181
+ * * `'auto'` to enable automatic horizontal scrollbar (overflow-x: 'auto').
182
+ * * `'scroll'` to always enable horizontal scrollbar (overflow-x: 'scroll').
183
+ * The default is overflow-x: 'hidden'. This should not be combined with {@link #autoScroll}.
184
+ */
185
+
186
+ /**
187
+ * @cfg {String} overflowY
188
+ * Possible values are:
189
+ * * `'auto'` to enable automatic vertical scrollbar (overflow-y: 'auto').
190
+ * * `'scroll'` to always enable vertical scrollbar (overflow-y: 'scroll').
191
+ * The default is overflow-y: 'hidden'. This should not be combined with {@link #autoScroll}.
192
+ */
193
+
194
+ /**
195
+ * @cfg {Boolean} floating
196
+ * Specify as true to float the Component outside of the document flow using CSS absolute positioning.
197
+ *
198
+ * Components such as {@link Ext.window.Window Window}s and {@link Ext.menu.Menu Menu}s are floating by default.
199
+ *
200
+ * Floating Components that are programatically {@link Ext.Component#render rendered} will register themselves with
201
+ * the global {@link Ext.WindowManager ZIndexManager}
202
+ *
203
+ * ### Floating Components as child items of a Container
204
+ *
205
+ * A floating Component may be used as a child item of a Container. This just allows the floating Component to seek
206
+ * a ZIndexManager by examining the ownerCt chain.
207
+ *
208
+ * When configured as floating, Components acquire, at render time, a {@link Ext.ZIndexManager ZIndexManager} which
209
+ * manages a stack of related floating Components. The ZIndexManager brings a single floating Component to the top
210
+ * of its stack when the Component's {@link #toFront} method is called.
211
+ *
212
+ * The ZIndexManager is found by traversing up the {@link #ownerCt} chain to find an ancestor which itself is
213
+ * floating. This is so that descendant floating Components of floating _Containers_ (Such as a ComboBox dropdown
214
+ * within a Window) can have its zIndex managed relative to any siblings, but always **above** that floating
215
+ * ancestor Container.
216
+ *
217
+ * If no floating ancestor is found, a floating Component registers itself with the default {@link Ext.WindowManager
218
+ * ZIndexManager}.
219
+ *
220
+ * Floating components _do not participate in the Container's layout_. Because of this, they are not rendered until
221
+ * you explicitly {@link #method-show} them.
222
+ *
223
+ * After rendering, the ownerCt reference is deleted, and the {@link #floatParent} property is set to the found
224
+ * floating ancestor Container. If no floating ancestor Container was found the {@link #floatParent} property will
225
+ * not be set.
226
+ */
227
+ floating: false,
228
+
229
+ /**
230
+ * @cfg {Boolean} toFrontOnShow
231
+ * True to automatically call {@link #toFront} when the {@link #method-show} method is called on an already visible,
232
+ * floating component.
233
+ */
234
+ toFrontOnShow: true,
235
+
236
+ /**
237
+ * @property {Ext.ZIndexManager} zIndexManager
238
+ * Only present for {@link #floating} Components after they have been rendered.
239
+ *
240
+ * A reference to the ZIndexManager which is managing this Component's z-index.
241
+ *
242
+ * The {@link Ext.ZIndexManager ZIndexManager} maintains a stack of floating Component z-indices, and also provides
243
+ * a single modal mask which is insert just beneath the topmost visible modal floating Component.
244
+ *
245
+ * Floating Components may be {@link #toFront brought to the front} or {@link #toBack sent to the back} of the
246
+ * z-index stack.
247
+ *
248
+ * This defaults to the global {@link Ext.WindowManager ZIndexManager} for floating Components that are
249
+ * programatically {@link Ext.Component#render rendered}.
250
+ *
251
+ * For {@link #floating} Components which are added to a Container, the ZIndexManager is acquired from the first
252
+ * ancestor Container found which is floating. If no floating ancestor is found, the global {@link Ext.WindowManager ZIndexManager} is
253
+ * used.
254
+ *
255
+ * See {@link #floating} and {@link #zIndexParent}
256
+ * @readonly
257
+ */
258
+
259
+ /**
260
+ * @property {Ext.Container} floatParent
261
+ * Only present for {@link #floating} Components which were inserted as child items of Containers.
262
+ *
263
+ * Floating Components that are programatically {@link Ext.Component#render rendered} will not have a `floatParent`
264
+ * property.
265
+ *
266
+ * For {@link #floating} Components which are child items of a Container, the floatParent will be the owning Container.
267
+ *
268
+ * For example, the dropdown {@link Ext.view.BoundList BoundList} of a ComboBox which is in a Window will have the
269
+ * Window as its `floatParent`
270
+ *
271
+ * See {@link #floating} and {@link #zIndexManager}
272
+ * @readonly
273
+ */
274
+
275
+ /**
276
+ * @property {Ext.Container} zIndexParent
277
+ * Only present for {@link #floating} Components which were inserted as child items of Containers, and which have a floating
278
+ * Container in their containment ancestry.
279
+ *
280
+ * For {@link #floating} Components which are child items of a Container, the zIndexParent will be a floating
281
+ * ancestor Container which is responsible for the base z-index value of all its floating descendants. It provides
282
+ * a {@link Ext.ZIndexManager ZIndexManager} which provides z-indexing services for all its descendant floating
283
+ * Components.
284
+ *
285
+ * Floating Components that are programatically {@link Ext.Component#render rendered} will not have a `zIndexParent`
286
+ * property.
287
+ *
288
+ * For example, the dropdown {@link Ext.view.BoundList BoundList} of a ComboBox which is in a Window will have the
289
+ * Window as its `zIndexParent`, and will always show above that Window, wherever the Window is placed in the z-index stack.
290
+ *
291
+ * See {@link #floating} and {@link #zIndexManager}
292
+ * @readonly
293
+ */
294
+
295
+ /**
296
+ * @cfg {Boolean/Object} [draggable=false]
297
+ * Specify as true to make a {@link #floating} Component draggable using the Component's encapsulating element as
298
+ * the drag handle.
299
+ *
300
+ * This may also be specified as a config object for the {@link Ext.util.ComponentDragger ComponentDragger} which is
301
+ * instantiated to perform dragging.
302
+ *
303
+ * For example to create a Component which may only be dragged around using a certain internal element as the drag
304
+ * handle, use the delegate option:
305
+ *
306
+ * new Ext.Component({
307
+ * constrain: true,
308
+ * floating: true,
309
+ * style: {
310
+ * backgroundColor: '#fff',
311
+ * border: '1px solid black'
312
+ * },
313
+ * html: '<h1 style="cursor:move">The title</h1><p>The content</p>',
314
+ * draggable: {
315
+ * delegate: 'h1'
316
+ * }
317
+ * }).show();
318
+ */
319
+
320
+ hideMode: 'display',
321
+ // Deprecate 5.0
322
+ hideParent: false,
323
+
324
+ bubbleEvents: [],
325
+
326
+ actionMode: 'el',
327
+ monPropRe: /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/,
328
+
329
+ //renderTpl: new Ext.XTemplate(
330
+ // '<div id="{id}" class="{baseCls} {cls} {cmpCls}<tpl if="typeof ui !== \'undefined\'"> {uiBase}-{ui}</tpl>"<tpl if="typeof style !== \'undefined\'"> style="{style}"</tpl>></div>', {
331
+ // compiled: true,
332
+ // disableFormats: true
333
+ // }
334
+ //),
335
+
336
+ /**
337
+ * Creates new Component.
338
+ * @param {Ext.Element/String/Object} config The configuration options may be specified as either:
339
+ *
340
+ * - **an element** : it is set as the internal element and its id used as the component id
341
+ * - **a string** : it is assumed to be the id of an existing element and is used as the component id
342
+ * - **anything else** : it is assumed to be a standard config object and is applied to the component
343
+ */
344
+ constructor: function(config) {
345
+ var me = this;
346
+
347
+ config = config || {};
348
+ if (config.initialConfig) {
349
+
350
+ // Being initialized from an Ext.Action instance...
351
+ if (config.isAction) {
352
+ me.baseAction = config;
353
+ }
354
+ config = config.initialConfig;
355
+ // component cloning / action set up
356
+ }
357
+ else if (config.tagName || config.dom || Ext.isString(config)) {
358
+ // element object
359
+ config = {
360
+ applyTo: config,
361
+ id: config.id || config
362
+ };
363
+ }
364
+
365
+ me.callParent([config]);
366
+
367
+ // If we were configured from an instance of Ext.Action, (or configured with a baseAction option),
368
+ // register this Component as one of its items
369
+ if (me.baseAction){
370
+ me.baseAction.addComponent(me);
371
+ }
372
+ },
373
+
374
+ /**
375
+ * The initComponent template method is an important initialization step for a Component. It is intended to be
376
+ * implemented by each subclass of Ext.Component to provide any needed constructor logic. The
377
+ * initComponent method of the class being created is called first, with each initComponent method
378
+ * up the hierarchy to Ext.Component being called thereafter. This makes it easy to implement and,
379
+ * if needed, override the constructor logic of the Component at any step in the hierarchy.
380
+ *
381
+ * The initComponent method **must** contain a call to {@link Ext.Base#callParent callParent} in order
382
+ * to ensure that the parent class' initComponent method is also called.
383
+ *
384
+ * All config options passed to the constructor are applied to `this` before initComponent is called,
385
+ * so you can simply access them with `this.someOption`.
386
+ *
387
+ * The following example demonstrates using a dynamic string for the text of a button at the time of
388
+ * instantiation of the class.
389
+ *
390
+ * Ext.define('DynamicButtonText', {
391
+ * extend: 'Ext.button.Button',
392
+ *
393
+ * initComponent: function() {
394
+ * this.text = new Date();
395
+ * this.renderTo = Ext.getBody();
396
+ * this.callParent();
397
+ * }
398
+ * });
399
+ *
400
+ * Ext.onReady(function() {
401
+ * Ext.create('DynamicButtonText');
402
+ * });
403
+ *
404
+ * @template
405
+ * @protected
406
+ */
407
+ initComponent: function() {
408
+ var me = this;
409
+
410
+ me.callParent();
411
+
412
+ if (me.listeners) {
413
+ me.on(me.listeners);
414
+ me.listeners = null; //change the value to remove any on prototype
415
+ }
416
+ me.enableBubble(me.bubbleEvents);
417
+ me.mons = [];
418
+ },
419
+
420
+
421
+ // private
422
+ afterRender: function() {
423
+ var me = this;
424
+
425
+ me.callParent();
426
+
427
+ if (!(me.x && me.y) && (me.pageX || me.pageY)) {
428
+ me.setPagePosition(me.pageX, me.pageY);
429
+ }
430
+ },
431
+
432
+ /**
433
+ * Sets the overflow on the content element of the component.
434
+ * @param {Boolean} scroll True to allow the Component to auto scroll.
435
+ * @return {Ext.Component} this
436
+ */
437
+ setAutoScroll : function(scroll) {
438
+ var me = this;
439
+
440
+ me.autoScroll = !!scroll;
441
+
442
+ // Scrolling styles must be applied to Component's main element.
443
+ // Layouts which use an innerCt (Box layout), shrinkwrap the innerCt round overflowing content,
444
+ // so the innerCt must be scrolled by the container, it does not scroll content.
445
+ if (me.rendered) {
446
+ me.getTargetEl().setStyle(me.getOverflowStyle());
447
+ }
448
+ me.updateLayout();
449
+ return me;
450
+ },
451
+
452
+ /**
453
+ * Sets the overflow x/y on the content element of the component. The x/y overflow
454
+ * values can be any valid CSS overflow (e.g., 'auto' or 'scroll'). By default, the
455
+ * value is 'hidden'. Passing null for one of the values will erase the inline style.
456
+ * Passing `undefined` will preserve the current value.
457
+ *
458
+ * @param {String} overflowX The overflow-x value.
459
+ * @param {String} overflowY The overflow-y value.
460
+ * @return {Ext.Component} this
461
+ */
462
+ setOverflowXY: function(overflowX, overflowY) {
463
+ var me = this,
464
+ argCount = arguments.length;
465
+
466
+ if (argCount) {
467
+ me.overflowX = overflowX || '';
468
+ if (argCount > 1) {
469
+ me.overflowY = overflowY || '';
470
+ }
471
+ }
472
+
473
+ // Scrolling styles must be applied to Component's main element.
474
+ // Layouts which use an innerCt (Box layout), shrinkwrap the innerCt round overflowing content,
475
+ // so the innerCt must be scrolled by the container, it does not scroll content.
476
+ if (me.rendered) {
477
+ me.getTargetEl().setStyle(me.getOverflowStyle());
478
+ }
479
+ me.updateLayout();
480
+ return me;
481
+ },
482
+
483
+ beforeRender: function () {
484
+ var me = this,
485
+ floating = me.floating,
486
+ cls;
487
+
488
+ if (floating) {
489
+ me.addCls(Ext.baseCSSPrefix + 'layer');
490
+
491
+ cls = floating.cls;
492
+ if (cls) {
493
+ me.addCls(cls);
494
+ }
495
+ }
496
+
497
+ return me.callParent();
498
+ },
499
+
500
+ afterComponentLayout: function(){
501
+ this.callParent(arguments);
502
+ if (this.floating) {
503
+ this.onAfterFloatLayout();
504
+ }
505
+ },
506
+
507
+ // private
508
+ makeFloating : function (dom) {
509
+ this.mixins.floating.constructor.call(this, dom);
510
+ },
511
+
512
+ wrapPrimaryEl: function (dom) {
513
+ if (this.floating) {
514
+ this.makeFloating(dom);
515
+ } else {
516
+ this.callParent(arguments);
517
+ }
518
+ },
519
+
520
+ initResizable: function(resizable) {
521
+ var me = this;
522
+
523
+ resizable = Ext.apply({
524
+ target: me,
525
+ dynamic: false,
526
+ constrainTo: me.constrainTo || (me.floatParent ? me.floatParent.getTargetEl() : null),
527
+ handles: me.resizeHandles
528
+ }, resizable);
529
+ resizable.target = me;
530
+ me.resizer = new Ext.resizer.Resizer(resizable);
531
+ },
532
+
533
+ getDragEl: function() {
534
+ return this.el;
535
+ },
536
+
537
+ initDraggable: function() {
538
+ var me = this,
539
+
540
+ // If we are resizable, and the resizer had to wrap this Component's el (eg an Img)
541
+ // Then we have to create a pseudo-Component out of the resizer to drag that,
542
+ // otherwise, we just drag this Component
543
+ dragTarget = (me.resizer && me.resizer.el !== me.el) ? me.resizerComponent = new Ext.Component({
544
+ el: me.resizer.el,
545
+ rendered: true,
546
+ container: me.container
547
+ }) : me,
548
+ ddConfig = Ext.applyIf({
549
+ el: dragTarget.getDragEl(),
550
+ constrainTo: me.constrain ? (me.constrainTo || (me.floatParent ? me.floatParent.getTargetEl() : me.el.getScopeParent())) : undefined
551
+ }, me.draggable);
552
+
553
+ // Add extra configs if Component is specified to be constrained
554
+ if (me.constrain || me.constrainDelegate) {
555
+ ddConfig.constrain = me.constrain;
556
+ ddConfig.constrainDelegate = me.constrainDelegate;
557
+ }
558
+
559
+ me.dd = new Ext.util.ComponentDragger(dragTarget, ddConfig);
560
+ },
561
+
562
+ /**
563
+ * Scrolls this Component's {@link #getTargetEl target element} by the passed delta values, optionally animating.
564
+ *
565
+ * All of the following are equivalent:
566
+ *
567
+ * comp.scrollBy(10, 10, true);
568
+ * comp.scrollBy([10, 10], true);
569
+ * comp.scrollBy({ x: 10, y: 10 }, true);
570
+ *
571
+ * @param {Number/Number[]/Object} deltaX Either the x delta, an Array specifying x and y deltas or
572
+ * an object with "x" and "y" properties.
573
+ * @param {Number/Boolean/Object} deltaY Either the y delta, or an animate flag or config object.
574
+ * @param {Boolean/Object} animate Animate flag/config object if the delta values were passed separately.
575
+ */
576
+ scrollBy: function(deltaX, deltaY, animate) {
577
+ var el;
578
+
579
+ if ((el = this.getTargetEl()) && el.dom) {
580
+ el.scrollBy.apply(el, arguments);
581
+ }
582
+ },
583
+
584
+ /**
585
+ * This method allows you to show or hide a LoadMask on top of this component.
586
+ *
587
+ * @param {Boolean/Object/String} load True to show the default LoadMask, a config object that will be passed to the
588
+ * LoadMask constructor, or a message String to show. False to hide the current LoadMask.
589
+ * @param {Boolean} [targetEl=false] True to mask the targetEl of this Component instead of the `this.el`. For example,
590
+ * setting this to true on a Panel will cause only the body to be masked.
591
+ * @return {Ext.LoadMask} The LoadMask instance that has just been shown.
592
+ */
593
+ setLoading : function(load, targetEl) {
594
+ var me = this,
595
+ config;
596
+
597
+ if (me.rendered) {
598
+ Ext.destroy(me.loadMask);
599
+ me.loadMask = null;
600
+
601
+ if (load !== false && !me.collapsed) {
602
+ if (Ext.isObject(load)) {
603
+ config = Ext.apply({}, load);
604
+ } else if (Ext.isString(load)) {
605
+ config = {msg: load};
606
+ } else {
607
+ config = {};
608
+ }
609
+ if (targetEl) {
610
+ Ext.applyIf(config, {
611
+ useTargetEl: true
612
+ });
613
+ }
614
+ me.loadMask = new Ext.LoadMask(me, config);
615
+ me.loadMask.show();
616
+ }
617
+ }
618
+ return me.loadMask;
619
+ },
620
+
621
+ beforeSetPosition: function () {
622
+ var me = this,
623
+ pos = me.callParent(arguments), // pass all args on for signature decoding
624
+ adj;
625
+
626
+ if (pos) {
627
+ adj = me.adjustPosition(pos.x, pos.y);
628
+ pos.x = adj.x;
629
+ pos.y = adj.y;
630
+ }
631
+ return pos || null;
632
+ },
633
+
634
+ afterSetPosition: function(ax, ay) {
635
+ this.onPosition(ax, ay);
636
+ this.fireEvent('move', this, ax, ay);
637
+ },
638
+
639
+ /**
640
+ * Displays component at specific xy position.
641
+ * A floating component (like a menu) is positioned relative to its ownerCt if any.
642
+ * Useful for popping up a context menu:
643
+ *
644
+ * listeners: {
645
+ * itemcontextmenu: function(view, record, item, index, event, options) {
646
+ * Ext.create('Ext.menu.Menu', {
647
+ * width: 100,
648
+ * height: 100,
649
+ * margin: '0 0 10 0',
650
+ * items: [{
651
+ * text: 'regular item 1'
652
+ * },{
653
+ * text: 'regular item 2'
654
+ * },{
655
+ * text: 'regular item 3'
656
+ * }]
657
+ * }).showAt(event.getXY());
658
+ * }
659
+ * }
660
+ *
661
+ * @param {Number} x The new x position
662
+ * @param {Number} y The new y position
663
+ * @param {Boolean/Object} [animate] True to animate the Component into its new position. You may also pass an
664
+ * animation configuration.
665
+ */
666
+ showAt: function(x, y, animate) {
667
+ var me = this;
668
+
669
+ if (!me.rendered && (me.autoRender || me.floating)) {
670
+ me.doAutoRender();
671
+ }
672
+ if (me.floating) {
673
+ me.setPosition(x, y, animate);
674
+ } else {
675
+ me.setPagePosition(x, y, animate);
676
+ }
677
+ me.show();
678
+ },
679
+
680
+ /**
681
+ * Sets the page XY position of the component. To set the left and top instead, use {@link #setPosition}.
682
+ * This method fires the {@link #move} event.
683
+ * @param {Number} x The new x position
684
+ * @param {Number} y The new y position
685
+ * @param {Boolean/Object} [animate] True to animate the Component into its new position. You may also pass an
686
+ * animation configuration.
687
+ * @return {Ext.Component} this
688
+ */
689
+ setPagePosition: function(x, y, animate) {
690
+ var me = this,
691
+ p,
692
+ floatParentBox;
693
+
694
+ if (Ext.isArray(x)) {
695
+ y = x[1];
696
+ x = x[0];
697
+ }
698
+ me.pageX = x;
699
+ me.pageY = y;
700
+
701
+ if (me.floating) {
702
+
703
+ // Floating Components which are registered with a Container have to have their x and y properties made relative
704
+ if (me.isContainedFloater()) {
705
+ floatParentBox = me.floatParent.getTargetEl().getViewRegion();
706
+ if (Ext.isNumber(x) && Ext.isNumber(floatParentBox.left)) {
707
+ x -= floatParentBox.left;
708
+ }
709
+ if (Ext.isNumber(y) && Ext.isNumber(floatParentBox.top)) {
710
+ y -= floatParentBox.top;
711
+ }
712
+ } else {
713
+ p = me.el.translatePoints(x, y);
714
+ x = p.left;
715
+ y = p.top;
716
+ }
717
+
718
+ me.setPosition(x, y, animate);
719
+ } else {
720
+ p = me.el.translatePoints(x, y);
721
+ me.setPosition(p.left, p.top, animate);
722
+ }
723
+
724
+ return me;
725
+ },
726
+
727
+ // Utility method to determine if a Component is floating, and has an owning Container whose coordinate system
728
+ // it must be positioned in when using setPosition.
729
+ isContainedFloater: function() {
730
+ return (this.floating && this.floatParent);
731
+ },
732
+
733
+ /**
734
+ * Gets the current box measurements of the component's underlying element.
735
+ * @param {Boolean} [local=false] If true the element's left and top are returned instead of page XY.
736
+ * @return {Object} box An object in the format {x, y, width, height}
737
+ */
738
+ getBox : function(local){
739
+ var pos = local ? this.getPosition(local) : this.el.getXY(),
740
+ size = this.getSize();
741
+
742
+ size.x = pos[0];
743
+ size.y = pos[1];
744
+ return size;
745
+ },
746
+
747
+ /**
748
+ * Sets the current box measurements of the component's underlying element.
749
+ * @param {Object} box An object in the format {x, y, width, height}
750
+ * @return {Ext.Component} this
751
+ */
752
+ updateBox : function(box){
753
+ this.setSize(box.width, box.height);
754
+ this.setPagePosition(box.x, box.y);
755
+ return this;
756
+ },
757
+
758
+ // Include margins
759
+ getOuterSize: function() {
760
+ var el = this.el;
761
+ return {
762
+ width: el.getWidth() + el.getMargin('lr'),
763
+ height: el.getHeight() + el.getMargin('tb')
764
+ };
765
+ },
766
+
767
+ // private
768
+ adjustPosition: function(x, y) {
769
+ var me = this,
770
+ floatParentBox;
771
+
772
+ // Floating Components being positioned in their ownerCt have to be made absolute.
773
+ if (me.isContainedFloater()) {
774
+ floatParentBox = me.floatParent.getTargetEl().getViewRegion();
775
+ x += floatParentBox.left;
776
+ y += floatParentBox.top;
777
+ }
778
+
779
+ return {
780
+ x: x,
781
+ y: y
782
+ };
783
+ },
784
+
785
+ /**
786
+ * Gets the current XY position of the component's underlying element.
787
+ * @param {Boolean} [local=false] If true the element's left and top are returned instead of page XY.
788
+ * @return {Number[]} The XY position of the element (e.g., [100, 200])
789
+ */
790
+ getPosition: function(local) {
791
+ var me = this,
792
+ el = me.el,
793
+ xy,
794
+ isContainedFloater = me.isContainedFloater(),
795
+ floatParentBox;
796
+
797
+ // Floating Components which were just rendered with no ownerCt return local position.
798
+ if ((local === true) || !isContainedFloater) {
799
+ return [el.getLeft(true), el.getTop(true)];
800
+ }
801
+
802
+ // Use our previously set x and y properties if possible.
803
+ if (me.x !== undefined && me.y !== undefined) {
804
+ xy = [me.x, me.y];
805
+ } else {
806
+ xy = me.el.getXY();
807
+
808
+ // Floating Components in an ownerCt have to have their positions made relative
809
+ if (isContainedFloater) {
810
+ floatParentBox = me.floatParent.getTargetEl().getViewRegion();
811
+ xy[0] -= floatParentBox.left;
812
+ xy[1] -= floatParentBox.top;
813
+ }
814
+ }
815
+ return xy;
816
+ },
817
+
818
+ getId: function() {
819
+ var me = this,
820
+ xtype;
821
+
822
+ if (!me.id) {
823
+ xtype = me.getXType();
824
+ if (xtype) {
825
+ xtype = xtype.replace(Ext.Component.INVALID_ID_CHARS_Re, '-');
826
+ } else {
827
+ xtype = Ext.name.toLowerCase() + '-comp';
828
+ }
829
+ me.id = xtype + '-' + me.getAutoId();
830
+ }
831
+ return me.id;
832
+ },
833
+
834
+ /**
835
+ * Shows this Component, rendering it first if {@link #autoRender} or {@link #floating} are `true`.
836
+ *
837
+ * After being shown, a {@link #floating} Component (such as a {@link Ext.window.Window}), is activated it and
838
+ * brought to the front of its {@link #zIndexManager z-index stack}.
839
+ *
840
+ * @param {String/Ext.Element} [animateTarget=null] **only valid for {@link #floating} Components such as {@link
841
+ * Ext.window.Window Window}s or {@link Ext.tip.ToolTip ToolTip}s, or regular Components which have been configured
842
+ * with `floating: true`.** The target from which the Component should animate from while opening.
843
+ * @param {Function} [callback] A callback function to call after the Component is displayed.
844
+ * Only necessary if animation was specified.
845
+ * @param {Object} [scope] The scope (`this` reference) in which the callback is executed.
846
+ * Defaults to this Component.
847
+ * @return {Ext.Component} this
848
+ */
849
+ show: function(animateTarget, cb, scope) {
850
+ var me = this,
851
+ rendered = me.rendered;
852
+
853
+ if (rendered && me.isVisible()) {
854
+ if (me.toFrontOnShow && me.floating) {
855
+ me.toFront();
856
+ }
857
+ } else if (me.fireEvent('beforeshow', me) !== false) {
858
+ // Render on first show if there is an autoRender config, or if this is a floater (Window, Menu, BoundList etc).
859
+ me.hidden = false;
860
+ if (!rendered && (me.autoRender || me.floating)) {
861
+ me.doAutoRender();
862
+ rendered = me.rendered;
863
+ }
864
+
865
+ if (rendered) {
866
+ me.beforeShow();
867
+ me.onShow.apply(me, arguments);
868
+ me.afterShow.apply(me, arguments);
869
+ }
870
+ }
871
+ return me;
872
+ },
873
+
874
+ /**
875
+ * Invoked before the Component is shown.
876
+ *
877
+ * @method
878
+ * @template
879
+ * @protected
880
+ */
881
+ beforeShow: Ext.emptyFn,
882
+
883
+ /**
884
+ * Allows addition of behavior to the show operation. After
885
+ * calling the superclass's onShow, the Component will be visible.
886
+ *
887
+ * Override in subclasses where more complex behaviour is needed.
888
+ *
889
+ * Gets passed the same parameters as #show.
890
+ *
891
+ * @param {String/Ext.Element} [animateTarget]
892
+ * @param {Function} [callback]
893
+ * @param {Object} [scope]
894
+ *
895
+ * @template
896
+ * @protected
897
+ */
898
+ onShow: function() {
899
+ var me = this;
900
+
901
+ me.el.show();
902
+ me.callParent(arguments);
903
+ if (me.floating && me.constrain) {
904
+ me.doConstrain();
905
+ }
906
+ },
907
+
908
+ /**
909
+ * Invoked after the Component is shown (after #onShow is called).
910
+ *
911
+ * Gets passed the same parameters as #show.
912
+ *
913
+ * @param {String/Ext.Element} [animateTarget]
914
+ * @param {Function} [callback]
915
+ * @param {Object} [scope]
916
+ *
917
+ * @template
918
+ * @protected
919
+ */
920
+ afterShow: function(animateTarget, cb, scope) {
921
+ var me = this,
922
+ fromBox,
923
+ toBox,
924
+ ghostPanel;
925
+
926
+ // Default to configured animate target if none passed
927
+ animateTarget = animateTarget || me.animateTarget;
928
+
929
+ // Need to be able to ghost the Component
930
+ if (!me.ghost) {
931
+ animateTarget = null;
932
+ }
933
+ // If we're animating, kick of an animation of the ghost from the target to the *Element* current box
934
+ if (animateTarget) {
935
+ animateTarget = animateTarget.el ? animateTarget.el : Ext.get(animateTarget);
936
+ toBox = me.el.getBox();
937
+ fromBox = animateTarget.getBox();
938
+ me.el.addCls(Ext.baseCSSPrefix + 'hide-offsets');
939
+ ghostPanel = me.ghost();
940
+ ghostPanel.el.stopAnimation();
941
+
942
+ // Shunting it offscreen immediately, *before* the Animation class grabs it ensure no flicker.
943
+ ghostPanel.el.setX(-10000);
944
+
945
+ ghostPanel.el.animate({
946
+ from: fromBox,
947
+ to: toBox,
948
+ listeners: {
949
+ afteranimate: function() {
950
+ delete ghostPanel.componentLayout.lastComponentSize;
951
+ me.unghost();
952
+ me.el.removeCls(Ext.baseCSSPrefix + 'hide-offsets');
953
+ me.onShowComplete(cb, scope);
954
+ }
955
+ }
956
+ });
957
+ }
958
+ else {
959
+ me.onShowComplete(cb, scope);
960
+ }
961
+ },
962
+
963
+ /**
964
+ * Invoked after the #afterShow method is complete.
965
+ *
966
+ * Gets passed the same `callback` and `scope` parameters that #afterShow received.
967
+ *
968
+ * @param {Function} [callback]
969
+ * @param {Object} [scope]
970
+ *
971
+ * @template
972
+ * @protected
973
+ */
974
+ onShowComplete: function(cb, scope) {
975
+ var me = this;
976
+ if (me.floating) {
977
+ me.toFront();
978
+ me.onFloatShow();
979
+ }
980
+ Ext.callback(cb, scope || me);
981
+ me.fireEvent('show', me);
982
+ delete me.hiddenByLayout;
983
+ },
984
+
985
+ /**
986
+ * Hides this Component, setting it to invisible using the configured {@link #hideMode}.
987
+ * @param {String/Ext.Element/Ext.Component} [animateTarget=null] **only valid for {@link #floating} Components
988
+ * such as {@link Ext.window.Window Window}s or {@link Ext.tip.ToolTip ToolTip}s, or regular Components which have
989
+ * been configured with `floating: true`.**. The target to which the Component should animate while hiding.
990
+ * @param {Function} [callback] A callback function to call after the Component is hidden.
991
+ * @param {Object} [scope] The scope (`this` reference) in which the callback is executed.
992
+ * Defaults to this Component.
993
+ * @return {Ext.Component} this
994
+ */
995
+ hide: function() {
996
+ var me = this;
997
+
998
+ // Clear the flag which is set if a floatParent was hidden while this is visible.
999
+ // If a hide operation was subsequently called, that pending show must be hidden.
1000
+ me.showOnParentShow = false;
1001
+
1002
+ if (!(me.rendered && !me.isVisible()) && me.fireEvent('beforehide', me) !== false) {
1003
+ me.hidden = true;
1004
+ if (me.rendered) {
1005
+ me.onHide.apply(me, arguments);
1006
+ }
1007
+ }
1008
+ return me;
1009
+ },
1010
+
1011
+ /**
1012
+ * Possibly animates down to a target element.
1013
+ *
1014
+ * Allows addition of behavior to the hide operation. After
1015
+ * calling the superclass’s onHide, the Component will be hidden.
1016
+ *
1017
+ * Gets passed the same parameters as #hide.
1018
+ *
1019
+ * @param {String/Ext.Element/Ext.Component} [animateTarget]
1020
+ * @param {Function} [callback]
1021
+ * @param {Object} [scope]
1022
+ *
1023
+ * @template
1024
+ * @protected
1025
+ */
1026
+ onHide: function(animateTarget, cb, scope) {
1027
+ var me = this,
1028
+ ghostPanel,
1029
+ toBox;
1030
+
1031
+ // Default to configured animate target if none passed
1032
+ animateTarget = animateTarget || me.animateTarget;
1033
+
1034
+ // Need to be able to ghost the Component
1035
+ if (!me.ghost) {
1036
+ animateTarget = null;
1037
+ }
1038
+ // If we're animating, kick off an animation of the ghost down to the target
1039
+ if (animateTarget) {
1040
+ animateTarget = animateTarget.el ? animateTarget.el : Ext.get(animateTarget);
1041
+ ghostPanel = me.ghost();
1042
+ ghostPanel.el.stopAnimation();
1043
+ toBox = animateTarget.getBox();
1044
+ toBox.width += 'px';
1045
+ toBox.height += 'px';
1046
+ ghostPanel.el.animate({
1047
+ to: toBox,
1048
+ listeners: {
1049
+ afteranimate: function() {
1050
+ delete ghostPanel.componentLayout.lastComponentSize;
1051
+ ghostPanel.el.hide();
1052
+ me.afterHide(cb, scope);
1053
+ }
1054
+ }
1055
+ });
1056
+ }
1057
+ me.el.hide();
1058
+ if (!animateTarget) {
1059
+ me.afterHide(cb, scope);
1060
+ }
1061
+ },
1062
+
1063
+ /**
1064
+ * Invoked after the Component has been hidden.
1065
+ *
1066
+ * Gets passed the same `callback` and `scope` parameters that #onHide received.
1067
+ *
1068
+ * @param {Function} [callback]
1069
+ * @param {Object} [scope]
1070
+ *
1071
+ * @template
1072
+ * @protected
1073
+ */
1074
+ afterHide: function(cb, scope) {
1075
+ var me = this;
1076
+ delete me.hiddenByLayout;
1077
+
1078
+ // we are the back-end method of onHide at this level, but our call to our parent
1079
+ // may need to be async... so callParent won't quite work here...
1080
+ Ext.AbstractComponent.prototype.onHide.call(this);
1081
+
1082
+ Ext.callback(cb, scope || me);
1083
+ me.fireEvent('hide', me);
1084
+ },
1085
+
1086
+ /**
1087
+ * Allows addition of behavior to the destroy operation.
1088
+ * After calling the superclass’s onDestroy, the Component will be destroyed.
1089
+ *
1090
+ * @template
1091
+ * @protected
1092
+ */
1093
+ onDestroy: function() {
1094
+ var me = this;
1095
+
1096
+ // Ensure that any ancillary components are destroyed.
1097
+ if (me.rendered) {
1098
+ Ext.destroy(
1099
+ me.proxy,
1100
+ me.proxyWrap,
1101
+ me.resizer,
1102
+ me.resizerComponent
1103
+ );
1104
+ // Different from AbstractComponent
1105
+ if (me.actionMode == 'container' || me.removeMode == 'container') {
1106
+ me.container.remove();
1107
+ }
1108
+ }
1109
+ delete me.focusTask;
1110
+ me.callParent();
1111
+ },
1112
+
1113
+ deleteMembers: function() {
1114
+ var args = arguments,
1115
+ len = args.length,
1116
+ i = 0;
1117
+ for (; i < len; ++i) {
1118
+ delete this[args[i]];
1119
+ }
1120
+ },
1121
+
1122
+ /**
1123
+ * Try to focus this component.
1124
+ * @param {Boolean} [selectText] If applicable, true to also select the text in this component
1125
+ * @param {Boolean/Number} [delay] Delay the focus this number of milliseconds (true for 10 milliseconds).
1126
+ * @return {Ext.Component} The focused Component. Usually <code>this</code> Component. Some Containers may
1127
+ * delegate focus to a descendant Component ({@link Ext.window.Window Window}s can do this through their
1128
+ * {@link Ext.window.Window#defaultFocus defaultFocus} config option.
1129
+ */
1130
+ focus: function(selectText, delay) {
1131
+ var me = this,
1132
+ focusEl,
1133
+ focusElDom;
1134
+
1135
+ if (me.rendered && !me.isDestroyed && me.isVisible(true) && (focusEl = me.getFocusEl())) {
1136
+
1137
+ // getFocusEl might return a Component if a Container wishes to delegate focus to a descendant.
1138
+ // Window can do this via its defaultFocus configuration which can reference a Button.
1139
+ if (focusEl.isComponent) {
1140
+ return focusEl.focus(selectText, delay);
1141
+ }
1142
+
1143
+ // If delay is wanted, queue a call to this function.
1144
+ if (delay) {
1145
+ if (!me.focusTask) {
1146
+ me.focusTask = new Ext.util.DelayedTask(me.focus);
1147
+ }
1148
+ me.focusTask.delay(Ext.isNumber(delay) ? delay : 10, null, me, [selectText, false]);
1149
+ return me;
1150
+ }
1151
+
1152
+ // If it was an Element with a dom property
1153
+ if ((focusElDom = focusEl.dom)) {
1154
+
1155
+ // Not a natural focus holding element, add a tab index to make it programatically focusable.
1156
+ if (focusEl.needsTabIndex()) {
1157
+ focusElDom.tabIndex = -1;
1158
+ }
1159
+
1160
+ // Focus the element.
1161
+ // The focusEl has a DOM focus listener on it which invokes the Component's onFocus method
1162
+ // to perform Component-specific focus processing
1163
+ focusEl.focus();
1164
+ if (selectText === true) {
1165
+ focusElDom.select();
1166
+ }
1167
+ }
1168
+
1169
+ // Focusing a floating Component brings it to the front of its stack.
1170
+ // this is performed by its zIndexManager. Pass preventFocus true to avoid recursion.
1171
+ if (me.floating) {
1172
+ me.toFront(true);
1173
+ }
1174
+ }
1175
+ return me;
1176
+ },
1177
+
1178
+ /**
1179
+ * Cancel any deferred focus on this component
1180
+ * @protected
1181
+ */
1182
+ cancelFocus: function(){
1183
+ var task = this.focusTask;
1184
+ if (task) {
1185
+ task.cancel();
1186
+ }
1187
+ },
1188
+
1189
+ // private
1190
+ blur: function() {
1191
+ var focusEl;
1192
+ if (this.rendered && (focusEl = this.getFocusEl())) {
1193
+ focusEl.blur();
1194
+ }
1195
+ return this;
1196
+ },
1197
+
1198
+ getEl: function() {
1199
+ return this.el;
1200
+ },
1201
+
1202
+ // Deprecate 5.0
1203
+ getResizeEl: function() {
1204
+ return this.el;
1205
+ },
1206
+
1207
+ // Deprecate 5.0
1208
+ getPositionEl: function() {
1209
+ return this.el;
1210
+ },
1211
+
1212
+ // Deprecate 5.0
1213
+ getActionEl: function() {
1214
+ return this.el;
1215
+ },
1216
+
1217
+ // Deprecate 5.0
1218
+ getVisibilityEl: function() {
1219
+ return this.el;
1220
+ },
1221
+
1222
+ // Deprecate 5.0
1223
+ onResize: Ext.emptyFn,
1224
+
1225
+ // private
1226
+ // Implements an upward event bubbilng policy. By default a Component bubbles events up to its ownerCt
1227
+ // Floating Components target the floatParent.
1228
+ // Some Component subclasses (such as Menu) might implement a different ownership hierarchy.
1229
+ // The up() method uses this to find the immediate owner.
1230
+ getBubbleTarget: function() {
1231
+ return this.ownerCt || this.floatParent;
1232
+ },
1233
+
1234
+ // private
1235
+ getContentTarget: function() {
1236
+ return this.el;
1237
+ },
1238
+
1239
+ /**
1240
+ * Clone the current component using the original config values passed into this instance by default.
1241
+ * @param {Object} overrides A new config containing any properties to override in the cloned version.
1242
+ * An id property can be passed on this object, otherwise one will be generated to avoid duplicates.
1243
+ * @return {Ext.Component} clone The cloned copy of this component
1244
+ */
1245
+ cloneConfig: function(overrides) {
1246
+ overrides = overrides || {};
1247
+ var id = overrides.id || Ext.id(),
1248
+ cfg = Ext.applyIf(overrides, this.initialConfig),
1249
+ self;
1250
+
1251
+ cfg.id = id;
1252
+
1253
+ self = Ext.getClass(this);
1254
+
1255
+ // prevent dup id
1256
+ return new self(cfg);
1257
+ },
1258
+
1259
+ /**
1260
+ * Gets the xtype for this component as registered with {@link Ext.ComponentManager}. For a list of all available
1261
+ * xtypes, see the {@link Ext.Component} header. Example usage:
1262
+ *
1263
+ * var t = new Ext.form.field.Text();
1264
+ * alert(t.getXType()); // alerts 'textfield'
1265
+ *
1266
+ * @return {String} The xtype
1267
+ */
1268
+ getXType: function() {
1269
+ return this.self.xtype;
1270
+ },
1271
+
1272
+ /**
1273
+ * Find a container above this component at any level by a custom function. If the passed function returns true, the
1274
+ * container will be returned.
1275
+ *
1276
+ * See also the {@link Ext.Component#up up} method.
1277
+ *
1278
+ * @param {Function} fn The custom function to call with the arguments (container, this component).
1279
+ * @return {Ext.container.Container} The first Container for which the custom function returns true
1280
+ */
1281
+ findParentBy: function(fn) {
1282
+ var p;
1283
+
1284
+ // Iterate up the ownerCt chain until there's no ownerCt, or we find an ancestor which matches using the selector function.
1285
+ for (p = this.getBubbleTarget(); p && !fn(p, this); p = p.getBubbleTarget()) {
1286
+ // do nothing
1287
+ }
1288
+ return p || null;
1289
+ },
1290
+
1291
+ /**
1292
+ * Find a container above this component at any level by xtype or class
1293
+ *
1294
+ * See also the {@link Ext.Component#up up} method.
1295
+ *
1296
+ * @param {String/Ext.Class} xtype The xtype string for a component, or the class of the component directly
1297
+ * @return {Ext.container.Container} The first Container which matches the given xtype or class
1298
+ */
1299
+ findParentByType: function(xtype) {
1300
+ return Ext.isFunction(xtype) ?
1301
+ this.findParentBy(function(p) {
1302
+ return p.constructor === xtype;
1303
+ })
1304
+ :
1305
+ this.up(xtype);
1306
+ },
1307
+
1308
+ /**
1309
+ * Bubbles up the component/container heirarchy, calling the specified function with each component. The scope
1310
+ * (*this*) of function call will be the scope provided or the current component. The arguments to the function will
1311
+ * be the args provided or the current component. If the function returns false at any point, the bubble is stopped.
1312
+ *
1313
+ * @param {Function} fn The function to call
1314
+ * @param {Object} [scope] The scope of the function. Defaults to current node.
1315
+ * @param {Array} [args] The args to call the function with. Defaults to passing the current component.
1316
+ * @return {Ext.Component} this
1317
+ */
1318
+ bubble: function(fn, scope, args) {
1319
+ var p = this;
1320
+ while (p) {
1321
+ if (fn.apply(scope || p, args || [p]) === false) {
1322
+ break;
1323
+ }
1324
+ p = p.getBubbleTarget();
1325
+ }
1326
+ return this;
1327
+ },
1328
+
1329
+ getProxy: function() {
1330
+ var me = this,
1331
+ target;
1332
+
1333
+ if (!me.proxy) {
1334
+ target = Ext.getBody();
1335
+ if (Ext.scopeResetCSS) {
1336
+ me.proxyWrap = target = Ext.getBody().createChild({
1337
+ cls: Ext.resetCls
1338
+ });
1339
+ }
1340
+ me.proxy = me.el.createProxy(Ext.baseCSSPrefix + 'proxy-el', target, true);
1341
+ }
1342
+ return me.proxy;
1343
+ }
1344
+ });