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,40 @@
1
+ /**
2
+ * @class Ext.dom.Element
3
+ */
4
+ Ext.dom.Element.override({
5
+ /**
6
+ * Initializes a {@link Ext.dd.DD} drag drop object for this element.
7
+ * @param {String} group The group the DD object is member of
8
+ * @param {Object} config The DD config object
9
+ * @param {Object} overrides An object containing methods to override/implement on the DD object
10
+ * @return {Ext.dd.DD} The DD object
11
+ */
12
+ initDD : function(group, config, overrides){
13
+ var dd = new Ext.dd.DD(Ext.id(this.dom), group, config);
14
+ return Ext.apply(dd, overrides);
15
+ },
16
+
17
+ /**
18
+ * Initializes a {@link Ext.dd.DDProxy} object for this element.
19
+ * @param {String} group The group the DDProxy object is member of
20
+ * @param {Object} config The DDProxy config object
21
+ * @param {Object} overrides An object containing methods to override/implement on the DDProxy object
22
+ * @return {Ext.dd.DDProxy} The DDProxy object
23
+ */
24
+ initDDProxy : function(group, config, overrides){
25
+ var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config);
26
+ return Ext.apply(dd, overrides);
27
+ },
28
+
29
+ /**
30
+ * Initializes a {@link Ext.dd.DDTarget} object for this element.
31
+ * @param {String} group The group the DDTarget object is member of
32
+ * @param {Object} config The DDTarget config object
33
+ * @param {Object} overrides An object containing methods to override/implement on the DDTarget object
34
+ * @return {Ext.dd.DDTarget} The DDTarget object
35
+ */
36
+ initDDTarget : function(group, config, overrides){
37
+ var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config);
38
+ return Ext.apply(dd, overrides);
39
+ }
40
+ });
@@ -0,0 +1,194 @@
1
+ /**
2
+ * @class Ext.dom.Element
3
+ */
4
+ (function() {
5
+
6
+ var Element = Ext.dom.Element,
7
+ VISIBILITY = "visibility",
8
+ DISPLAY = "display",
9
+ NONE = "none",
10
+ HIDDEN = 'hidden',
11
+ VISIBLE = 'visible',
12
+ OFFSETS = "offsets",
13
+ ASCLASS = "asclass",
14
+ NOSIZE = 'nosize',
15
+ ORIGINALDISPLAY = 'originalDisplay',
16
+ VISMODE = 'visibilityMode',
17
+ ISVISIBLE = 'isVisible',
18
+ OFFSETCLASS = Ext.baseCSSPrefix + 'hide-offsets',
19
+ getDisplay = function(el) {
20
+ var data = (el.$cache || el.getCache()).data,
21
+ display = data[ORIGINALDISPLAY];
22
+
23
+ if (display === undefined) {
24
+ data[ORIGINALDISPLAY] = display = '';
25
+ }
26
+ return display;
27
+ },
28
+ getVisMode = function(el){
29
+ var data = (el.$cache || el.getCache()).data,
30
+ visMode = data[VISMODE];
31
+
32
+ if (visMode === undefined) {
33
+ data[VISMODE] = visMode = Element.VISIBILITY;
34
+ }
35
+ return visMode;
36
+ };
37
+
38
+ Element.override({
39
+ /**
40
+ * The element's default display mode.
41
+ */
42
+ originalDisplay : "",
43
+ visibilityMode : 1,
44
+
45
+ /**
46
+ * Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
47
+ * the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.
48
+ * @param {Boolean} visible Whether the element is visible
49
+ * @param {Boolean/Object} [animate] True for the default animation, or a standard Element animation config object
50
+ * @return {Ext.dom.Element} this
51
+ */
52
+ setVisible : function(visible, animate) {
53
+ var me = this,
54
+ dom = me.dom,
55
+ visMode = getVisMode(me);
56
+
57
+ // hideMode string override
58
+ if (typeof animate == 'string') {
59
+ switch (animate) {
60
+ case DISPLAY:
61
+ visMode = Element.DISPLAY;
62
+ break;
63
+ case VISIBILITY:
64
+ visMode = Element.VISIBILITY;
65
+ break;
66
+ case OFFSETS:
67
+ visMode = Element.OFFSETS;
68
+ break;
69
+ case NOSIZE:
70
+ case ASCLASS:
71
+ visMode = Element.ASCLASS;
72
+ break;
73
+ }
74
+ me.setVisibilityMode(visMode);
75
+ animate = false;
76
+ }
77
+
78
+ if (!animate || !me.anim) {
79
+ if (visMode == Element.DISPLAY) {
80
+ return me.setDisplayed(visible);
81
+ } else if (visMode == Element.OFFSETS) {
82
+ me[visible?'removeCls':'addCls'](OFFSETCLASS);
83
+ } else if (visMode == Element.VISIBILITY) {
84
+ me.fixDisplay();
85
+ // Show by clearing visibility style. Explicitly setting to "visible" overrides parent visibility setting
86
+ dom.style.visibility = visible ? '' : HIDDEN;
87
+ } else if (visMode == Element.ASCLASS) {
88
+ me[visible?'removeCls':'addCls'](me.visibilityCls || Element.visibilityCls);
89
+ }
90
+ } else {
91
+ // closure for composites
92
+ if (visible) {
93
+ me.setOpacity(0.01);
94
+ me.setVisible(true);
95
+ }
96
+ if (!Ext.isObject(animate)) {
97
+ animate = {
98
+ duration: 350,
99
+ easing: 'ease-in'
100
+ };
101
+ }
102
+ me.animate(Ext.applyIf({
103
+ callback: function() {
104
+ if (!visible) {
105
+ me.setVisible(false).setOpacity(1);
106
+ }
107
+ },
108
+ to: {
109
+ opacity: (visible) ? 1 : 0
110
+ }
111
+ }, animate));
112
+ }
113
+ (me.$cache || me.getCache()).data[ISVISIBLE] = visible;
114
+ return me;
115
+ },
116
+
117
+ /**
118
+ * @private
119
+ * Determine if the Element has a relevant height and width available based
120
+ * upon current logical visibility state
121
+ */
122
+ hasMetrics : function(){
123
+ var visMode = getVisMode(this);
124
+ return this.isVisible() || (visMode == Element.OFFSETS) || (visMode == Element.VISIBILITY);
125
+ },
126
+
127
+ /**
128
+ * Toggles the element's visibility or display, depending on visibility mode.
129
+ * @param {Boolean/Object} [animate] True for the default animation, or a standard Element animation config object
130
+ * @return {Ext.dom.Element} this
131
+ */
132
+ toggle : function(animate){
133
+ var me = this;
134
+ me.setVisible(!me.isVisible(), me.anim(animate));
135
+ return me;
136
+ },
137
+
138
+ /**
139
+ * Sets the CSS display property. Uses originalDisplay if the specified value is a boolean true.
140
+ * @param {Boolean/String} value Boolean value to display the element using its default display, or a string to set the display directly.
141
+ * @return {Ext.dom.Element} this
142
+ */
143
+ setDisplayed : function(value) {
144
+ if(typeof value == "boolean"){
145
+ value = value ? getDisplay(this) : NONE;
146
+ }
147
+ this.setStyle(DISPLAY, value);
148
+ return this;
149
+ },
150
+
151
+ // private
152
+ fixDisplay : function(){
153
+ var me = this;
154
+ if (me.isStyle(DISPLAY, NONE)) {
155
+ me.setStyle(VISIBILITY, HIDDEN);
156
+ me.setStyle(DISPLAY, getDisplay(me)); // first try reverting to default
157
+ if (me.isStyle(DISPLAY, NONE)) { // if that fails, default to block
158
+ me.setStyle(DISPLAY, "block");
159
+ }
160
+ }
161
+ },
162
+
163
+ /**
164
+ * Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
165
+ * @param {Boolean/Object} [animate] true for the default animation or a standard Element animation config object
166
+ * @return {Ext.dom.Element} this
167
+ */
168
+ hide : function(animate){
169
+ // hideMode override
170
+ if (typeof animate == 'string'){
171
+ this.setVisible(false, animate);
172
+ return this;
173
+ }
174
+ this.setVisible(false, this.anim(animate));
175
+ return this;
176
+ },
177
+
178
+ /**
179
+ * Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
180
+ * @param {Boolean/Object} [animate] true for the default animation or a standard Element animation config object
181
+ * @return {Ext.dom.Element} this
182
+ */
183
+ show : function(animate){
184
+ // hideMode override
185
+ if (typeof animate == 'string'){
186
+ this.setVisible(true, animate);
187
+ return this;
188
+ }
189
+ this.setVisible(true, this.anim(animate));
190
+ return this;
191
+ }
192
+ });
193
+
194
+ }());
@@ -0,0 +1,1407 @@
1
+ /**
2
+ * @class Ext.dom.Element
3
+ * @alternateClassName Ext.Element
4
+ * @alternateClassName Ext.core.Element
5
+ * @extend Ext.dom.AbstractElement
6
+ *
7
+ * Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.
8
+ *
9
+ * All instances of this class inherit the methods of {@link Ext.fx.Anim} making visual effects easily available to all
10
+ * DOM elements.
11
+ *
12
+ * Note that the events documented in this class are not Ext events, they encapsulate browser events. Some older browsers
13
+ * may not support the full range of events. Which events are supported is beyond the control of Ext JS.
14
+ *
15
+ * Usage:
16
+ *
17
+ * // by id
18
+ * var el = Ext.get("my-div");
19
+ *
20
+ * // by DOM element reference
21
+ * var el = Ext.get(myDivElement);
22
+ *
23
+ * # Animations
24
+ *
25
+ * When an element is manipulated, by default there is no animation.
26
+ *
27
+ * var el = Ext.get("my-div");
28
+ *
29
+ * // no animation
30
+ * el.setWidth(100);
31
+ *
32
+ * Many of the functions for manipulating an element have an optional "animate" parameter. This parameter can be
33
+ * specified as boolean (true) for default animation effects.
34
+ *
35
+ * // default animation
36
+ * el.setWidth(100, true);
37
+ *
38
+ * To configure the effects, an object literal with animation options to use as the Element animation configuration
39
+ * object can also be specified. Note that the supported Element animation configuration options are a subset of the
40
+ * {@link Ext.fx.Anim} animation options specific to Fx effects. The supported Element animation configuration options
41
+ * are:
42
+ *
43
+ * Option Default Description
44
+ * --------- -------- ---------------------------------------------
45
+ * {@link Ext.fx.Anim#duration duration} .35 The duration of the animation in seconds
46
+ * {@link Ext.fx.Anim#easing easing} easeOut The easing method
47
+ * {@link Ext.fx.Anim#callback callback} none A function to execute when the anim completes
48
+ * {@link Ext.fx.Anim#scope scope} this The scope (this) of the callback function
49
+ *
50
+ * Usage:
51
+ *
52
+ * // Element animation options object
53
+ * var opt = {
54
+ * {@link Ext.fx.Anim#duration duration}: 1,
55
+ * {@link Ext.fx.Anim#easing easing}: 'elasticIn',
56
+ * {@link Ext.fx.Anim#callback callback}: this.foo,
57
+ * {@link Ext.fx.Anim#scope scope}: this
58
+ * };
59
+ * // animation with some options set
60
+ * el.setWidth(100, opt);
61
+ *
62
+ * The Element animation object being used for the animation will be set on the options object as "anim", which allows
63
+ * you to stop or manipulate the animation. Here is an example:
64
+ *
65
+ * // using the "anim" property to get the Anim object
66
+ * if(opt.anim.isAnimated()){
67
+ * opt.anim.stop();
68
+ * }
69
+ *
70
+ * # Composite (Collections of) Elements
71
+ *
72
+ * For working with collections of Elements, see {@link Ext.CompositeElement}
73
+ *
74
+ * @constructor
75
+ * Creates new Element directly.
76
+ * @param {String/HTMLElement} element
77
+ * @param {Boolean} [forceNew] By default the constructor checks to see if there is already an instance of this
78
+ * element in the cache and if there is it returns the same instance. This will skip that check (useful for extending
79
+ * this class).
80
+ * @return {Object}
81
+ */
82
+ (function() {
83
+
84
+ var HIDDEN = 'hidden',
85
+ DOC = document,
86
+ VISIBILITY = "visibility",
87
+ DISPLAY = "display",
88
+ NONE = "none",
89
+ XMASKED = Ext.baseCSSPrefix + "masked",
90
+ XMASKEDRELATIVE = Ext.baseCSSPrefix + "masked-relative",
91
+ EXTELMASKMSG = Ext.baseCSSPrefix + "mask-msg",
92
+ bodyRe = /^body/i,
93
+ visFly,
94
+
95
+ // speedy lookup for elements never to box adjust
96
+ noBoxAdjust = Ext.isStrict ? {
97
+ select: 1
98
+ }: {
99
+ input: 1,
100
+ select: 1,
101
+ textarea: 1
102
+ },
103
+
104
+ // Pseudo for use by cacheScrollValues
105
+ isScrolled = function(c) {
106
+ var r = [], ri = -1,
107
+ i, ci;
108
+ for (i = 0; ci = c[i]; i++) {
109
+ if (ci.scrollTop > 0 || ci.scrollLeft > 0) {
110
+ r[++ri] = ci;
111
+ }
112
+ }
113
+ return r;
114
+ },
115
+
116
+ Element = Ext.define('Ext.dom.Element', {
117
+
118
+ extend: 'Ext.dom.AbstractElement',
119
+
120
+ alternateClassName: ['Ext.Element', 'Ext.core.Element'],
121
+
122
+ addUnits: function() {
123
+ return this.self.addUnits.apply(this.self, arguments);
124
+ },
125
+
126
+ /**
127
+ * Tries to focus the element. Any exceptions are caught and ignored.
128
+ * @param {Number} [defer] Milliseconds to defer the focus
129
+ * @return {Ext.dom.Element} this
130
+ */
131
+ focus: function(defer, /* private */ dom) {
132
+ var me = this,
133
+ scrollTop,
134
+ body;
135
+
136
+ dom = dom || me.dom;
137
+ body = (dom.ownerDocument || DOC).body || DOC.body;
138
+ try {
139
+ if (Number(defer)) {
140
+ Ext.defer(me.focus, defer, me, [null, dom]);
141
+ } else {
142
+ // Focusing a large element, the browser attempts to scroll as much of it into view
143
+ // as possible. We need to override this behaviour.
144
+ if (dom.offsetHeight > Element.getViewHeight()) {
145
+ scrollTop = body.scrollTop;
146
+ }
147
+ dom.focus();
148
+ if (scrollTop !== undefined) {
149
+ body.scrollTop = scrollTop;
150
+ }
151
+ }
152
+ } catch(e) {
153
+ }
154
+ return me;
155
+ },
156
+
157
+ /**
158
+ * Tries to blur the element. Any exceptions are caught and ignored.
159
+ * @return {Ext.dom.Element} this
160
+ */
161
+ blur: function() {
162
+ try {
163
+ this.dom.blur();
164
+ } catch(e) {
165
+ }
166
+ return this;
167
+ },
168
+
169
+ /**
170
+ * Tests various css rules/browsers to determine if this element uses a border box
171
+ * @return {Boolean}
172
+ */
173
+ isBorderBox: function() {
174
+ var box = Ext.isBorderBox;
175
+ if (box) {
176
+ box = !((this.dom.tagName || "").toLowerCase() in noBoxAdjust);
177
+ }
178
+ return box;
179
+ },
180
+
181
+ /**
182
+ * Sets up event handlers to call the passed functions when the mouse is moved into and out of the Element.
183
+ * @param {Function} overFn The function to call when the mouse enters the Element.
184
+ * @param {Function} outFn The function to call when the mouse leaves the Element.
185
+ * @param {Object} [scope] The scope (`this` reference) in which the functions are executed. Defaults
186
+ * to the Element's DOM element.
187
+ * @param {Object} [options] Options for the listener. See {@link Ext.util.Observable#addListener the
188
+ * options parameter}.
189
+ * @return {Ext.dom.Element} this
190
+ */
191
+ hover: function(overFn, outFn, scope, options) {
192
+ var me = this;
193
+ me.on('mouseenter', overFn, scope || me.dom, options);
194
+ me.on('mouseleave', outFn, scope || me.dom, options);
195
+ return me;
196
+ },
197
+
198
+ /**
199
+ * Returns the value of a namespaced attribute from the element's underlying DOM node.
200
+ * @param {String} namespace The namespace in which to look for the attribute
201
+ * @param {String} name The attribute name
202
+ * @return {String} The attribute value
203
+ */
204
+ getAttributeNS: function(ns, name) {
205
+ return this.getAttribute(name, ns);
206
+ },
207
+
208
+ getAttribute: (Ext.isIE && !(Ext.isIE9 && DOC.documentMode === 9)) ?
209
+ function(name, ns) {
210
+ var d = this.dom,
211
+ type;
212
+ if (ns) {
213
+ type = typeof d[ns + ":" + name];
214
+ if (type != 'undefined' && type != 'unknown') {
215
+ return d[ns + ":" + name] || null;
216
+ }
217
+ return null;
218
+ }
219
+ if (name === "for") {
220
+ name = "htmlFor";
221
+ }
222
+ return d[name] || null;
223
+ } : function(name, ns) {
224
+ var d = this.dom;
225
+ if (ns) {
226
+ return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name);
227
+ }
228
+ return d.getAttribute(name) || d[name] || null;
229
+ },
230
+
231
+ /**
232
+ * When an element is moved around in the DOM, or is hidden using `display:none`, it loses layout, and therefore
233
+ * all scroll positions of all descendant elements are lost.
234
+ *
235
+ * This function caches them, and returns a function, which when run will restore the cached positions.
236
+ * In the following example, the Panel is moved from one Container to another which will cause it to lose all scroll positions:
237
+ *
238
+ * var restoreScroll = myPanel.el.cacheScrollValues();
239
+ * myOtherContainer.add(myPanel);
240
+ * restoreScroll();
241
+ *
242
+ * @return {Function} A function which will restore all descentant elements of this Element to their scroll
243
+ * positions recorded when this function was executed. Be aware that the returned function is a closure which has
244
+ * captured the scope of `cacheScrollValues`, so take care to derefence it as soon as not needed - if is it is a `var`
245
+ * it will drop out of scope, and the reference will be freed.
246
+ */
247
+ cacheScrollValues: function() {
248
+ var me = this,
249
+ scrolledDescendants,
250
+ el, i,
251
+ scrollValues = [],
252
+ result = function() {
253
+ for (i = 0; i < scrolledDescendants.length; i++) {
254
+ el = scrolledDescendants[i];
255
+ el.scrollLeft = scrollValues[i][0];
256
+ el.scrollTop = scrollValues[i][1];
257
+ }
258
+ };
259
+
260
+ if (!Ext.DomQuery.pseudos.isScrolled) {
261
+ Ext.DomQuery.pseudos.isScrolled = isScrolled;
262
+ }
263
+ scrolledDescendants = me.query(':isScrolled');
264
+ for (i = 0; i < scrolledDescendants.length; i++) {
265
+ el = scrolledDescendants[i];
266
+ scrollValues[i] = [el.scrollLeft, el.scrollTop];
267
+ }
268
+ return result;
269
+ },
270
+
271
+ /**
272
+ * @property {Boolean} autoBoxAdjust
273
+ * True to automatically adjust width and height settings for box-model issues.
274
+ */
275
+ autoBoxAdjust: true,
276
+
277
+ /**
278
+ * Checks whether the element is currently visible using both visibility and display properties.
279
+ * @param {Boolean} [deep=false] True to walk the dom and see if parent elements are hidden.
280
+ * If false, the function only checks the visibility of the element itself and it may return
281
+ * `true` even though a parent is not visible.
282
+ * @return {Boolean} `true` if the element is currently visible, else `false`
283
+ */
284
+ isVisible : function(deep) {
285
+ var me = this,
286
+ dom = me.dom,
287
+ stopNode = dom.ownerDocument.documentElement;
288
+
289
+ if (!visFly) {
290
+ visFly = new Element.Fly();
291
+ }
292
+
293
+ while (dom !== stopNode) {
294
+ // We're invisible if we hit a nonexistent parentNode or a document
295
+ // fragment or computed style visibility:hidden or display:none
296
+ if (!dom || dom.nodeType === 11 || (visFly.attach(dom)).isStyle(VISIBILITY, HIDDEN) || visFly.isStyle(DISPLAY, NONE)) {
297
+ return false;
298
+ }
299
+ // Quit now unless we are being asked to check parent nodes.
300
+ if (!deep) {
301
+ break;
302
+ }
303
+ dom = dom.parentNode;
304
+ }
305
+ return true;
306
+ },
307
+
308
+ /**
309
+ * Returns true if display is not "none"
310
+ * @return {Boolean}
311
+ */
312
+ isDisplayed : function() {
313
+ return !this.isStyle(DISPLAY, NONE);
314
+ },
315
+
316
+ /**
317
+ * Convenience method for setVisibilityMode(Element.DISPLAY)
318
+ * @param {String} [display] What to set display to when visible
319
+ * @return {Ext.dom.Element} this
320
+ */
321
+ enableDisplayMode : function(display) {
322
+ var me = this;
323
+
324
+ me.setVisibilityMode(Element.DISPLAY);
325
+
326
+ if (!Ext.isEmpty(display)) {
327
+ (me.$cache || me.getCache()).data.originalDisplay = display;
328
+ }
329
+
330
+ return me;
331
+ },
332
+
333
+ /**
334
+ * Puts a mask over this element to disable user interaction. Requires core.css.
335
+ * This method can only be applied to elements which accept child nodes.
336
+ * @param {String} [msg] A message to display in the mask
337
+ * @param {String} [msgCls] A css class to apply to the msg element
338
+ * @return {Ext.dom.Element} The mask element
339
+ */
340
+ mask : function(msg, msgCls /* private - passed by AbstractComponent.mask to avoid the need to interrogate the DOM to get the height*/, elHeight) {
341
+ var me = this,
342
+ dom = me.dom,
343
+ setExpression = dom.style.setExpression,
344
+ data = (me.$cache || me.getCache()).data,
345
+ maskEl = data.maskEl,
346
+ maskMsg = data.maskMsg;
347
+
348
+ if (!(bodyRe.test(dom.tagName) && me.getStyle('position') == 'static')) {
349
+ me.addCls(XMASKEDRELATIVE);
350
+ }
351
+
352
+ // We always needs to recreate the mask since the DOM element may have been re-created
353
+ if (maskEl) {
354
+ maskEl.remove();
355
+ }
356
+
357
+ if (maskMsg) {
358
+ maskMsg.remove();
359
+ }
360
+
361
+ Ext.DomHelper.append(dom, [{
362
+ cls : Ext.baseCSSPrefix + "mask"
363
+ }, {
364
+ cls : msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG,
365
+ cn : {
366
+ tag: 'div',
367
+ html: msg || ''
368
+ }
369
+ }]);
370
+
371
+ maskMsg = Ext.get(dom.lastChild);
372
+ maskEl = Ext.get(maskMsg.dom.previousSibling);
373
+ data.maskMsg = maskMsg;
374
+ data.maskEl = maskEl;
375
+
376
+ me.addCls(XMASKED);
377
+ maskEl.setDisplayed(true);
378
+
379
+ if (typeof msg == 'string') {
380
+ maskMsg.setDisplayed(true);
381
+ maskMsg.center(me);
382
+ } else {
383
+ maskMsg.setDisplayed(false);
384
+ }
385
+ // NOTE: CSS expressions are resource intensive and to be used only as a last resort
386
+ // These expressions are removed as soon as they are no longer necessary - in the unmask method.
387
+ // In normal use cases an element will be masked for a limited period of time.
388
+ // Fix for https://sencha.jira.com/browse/EXTJSIV-19.
389
+ // IE6 strict mode and IE6-9 quirks mode takes off left+right padding when calculating width!
390
+ if (!Ext.supports.IncludePaddingInWidthCalculation && setExpression) {
391
+ maskEl.dom.style.setExpression('width', 'this.parentNode.clientWidth + "px"');
392
+ }
393
+
394
+ // Some versions and modes of IE subtract top+bottom padding when calculating height.
395
+ // Different versions from those which make the same error for width!
396
+ if (!Ext.supports.IncludePaddingInHeightCalculation && setExpression) {
397
+ maskEl.dom.style.setExpression('height', 'this.parentNode.' + (dom == DOC.body ? 'scrollHeight' : 'offsetHeight') + ' + "px"');
398
+ }
399
+ // ie will not expand full height automatically
400
+ else if (Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto') {
401
+ maskEl.setSize(undefined, elHeight || me.getHeight());
402
+ }
403
+ return maskEl;
404
+ },
405
+
406
+ /**
407
+ * Hides a previously applied mask.
408
+ */
409
+ unmask : function() {
410
+ var me = this,
411
+ data = (me.$cache || me.getCache()).data,
412
+ maskEl = data.maskEl,
413
+ maskMsg = data.maskMsg,
414
+ style;
415
+
416
+ if (maskEl) {
417
+ style = maskEl.dom.style;
418
+ // Remove resource-intensive CSS expressions as soon as they are not required.
419
+ if (style.clearExpression) {
420
+ style.clearExpression('width');
421
+ style.clearExpression('height');
422
+ }
423
+
424
+ if (maskEl) {
425
+ maskEl.remove();
426
+ delete data.maskEl;
427
+ }
428
+
429
+ if (maskMsg) {
430
+ maskMsg.remove();
431
+ delete data.maskMsg;
432
+ }
433
+
434
+ me.removeCls([XMASKED, XMASKEDRELATIVE]);
435
+ }
436
+ },
437
+
438
+ /**
439
+ * Returns true if this element is masked. Also re-centers any displayed message within the mask.
440
+ * @return {Boolean}
441
+ */
442
+ isMasked : function() {
443
+ var me = this,
444
+ data = (me.$cache || me.getCache()).data,
445
+ maskEl = data.maskEl,
446
+ maskMsg = data.maskMsg,
447
+ hasMask = false;
448
+
449
+ if (maskEl && maskEl.isVisible()) {
450
+ if (maskMsg) {
451
+ maskMsg.center(me);
452
+ }
453
+ hasMask = true;
454
+ }
455
+ return hasMask;
456
+ },
457
+
458
+ /**
459
+ * Creates an iframe shim for this element to keep selects and other windowed objects from
460
+ * showing through.
461
+ * @return {Ext.dom.Element} The new shim element
462
+ */
463
+ createShim : function() {
464
+ var el = DOC.createElement('iframe'),
465
+ shim;
466
+
467
+ el.frameBorder = '0';
468
+ el.className = Ext.baseCSSPrefix + 'shim';
469
+ el.src = Ext.SSL_SECURE_URL;
470
+ shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom));
471
+ shim.autoBoxAdjust = false;
472
+ return shim;
473
+ },
474
+
475
+ /**
476
+ * Convenience method for constructing a KeyMap
477
+ * @param {String/Number/Number[]/Object} key Either a string with the keys to listen for, the numeric key code,
478
+ * array of key codes or an object with the following options:
479
+ * @param {Number/Array} key.key
480
+ * @param {Boolean} key.shift
481
+ * @param {Boolean} key.ctrl
482
+ * @param {Boolean} key.alt
483
+ * @param {Function} fn The function to call
484
+ * @param {Object} [scope] The scope (`this` reference) in which the specified function is executed. Defaults to this Element.
485
+ * @return {Ext.util.KeyMap} The KeyMap created
486
+ */
487
+ addKeyListener : function(key, fn, scope){
488
+ var config;
489
+ if(typeof key != 'object' || Ext.isArray(key)){
490
+ config = {
491
+ target: this,
492
+ key: key,
493
+ fn: fn,
494
+ scope: scope
495
+ };
496
+ }else{
497
+ config = {
498
+ target: this,
499
+ key : key.key,
500
+ shift : key.shift,
501
+ ctrl : key.ctrl,
502
+ alt : key.alt,
503
+ fn: fn,
504
+ scope: scope
505
+ };
506
+ }
507
+ return new Ext.util.KeyMap(config);
508
+ },
509
+
510
+ /**
511
+ * Creates a KeyMap for this element
512
+ * @param {Object} config The KeyMap config. See {@link Ext.util.KeyMap} for more details
513
+ * @return {Ext.util.KeyMap} The KeyMap created
514
+ */
515
+ addKeyMap : function(config) {
516
+ return new Ext.util.KeyMap(Ext.apply({
517
+ target: this
518
+ }, config));
519
+ },
520
+
521
+ // Mouse events
522
+ /**
523
+ * @event click
524
+ * Fires when a mouse click is detected within the element.
525
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
526
+ * @param {HTMLElement} t The target of the event.
527
+ */
528
+ /**
529
+ * @event contextmenu
530
+ * Fires when a right click is detected within the element.
531
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
532
+ * @param {HTMLElement} t The target of the event.
533
+ */
534
+ /**
535
+ * @event dblclick
536
+ * Fires when a mouse double click is detected within the element.
537
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
538
+ * @param {HTMLElement} t The target of the event.
539
+ */
540
+ /**
541
+ * @event mousedown
542
+ * Fires when a mousedown is detected within the element.
543
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
544
+ * @param {HTMLElement} t The target of the event.
545
+ */
546
+ /**
547
+ * @event mouseup
548
+ * Fires when a mouseup is detected within the element.
549
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
550
+ * @param {HTMLElement} t The target of the event.
551
+ */
552
+ /**
553
+ * @event mouseover
554
+ * Fires when a mouseover is detected within the element.
555
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
556
+ * @param {HTMLElement} t The target of the event.
557
+ */
558
+ /**
559
+ * @event mousemove
560
+ * Fires when a mousemove is detected with the element.
561
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
562
+ * @param {HTMLElement} t The target of the event.
563
+ */
564
+ /**
565
+ * @event mouseout
566
+ * Fires when a mouseout is detected with the element.
567
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
568
+ * @param {HTMLElement} t The target of the event.
569
+ */
570
+ /**
571
+ * @event mouseenter
572
+ * Fires when the mouse enters the element.
573
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
574
+ * @param {HTMLElement} t The target of the event.
575
+ */
576
+ /**
577
+ * @event mouseleave
578
+ * Fires when the mouse leaves the element.
579
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
580
+ * @param {HTMLElement} t The target of the event.
581
+ */
582
+
583
+ // Keyboard events
584
+ /**
585
+ * @event keypress
586
+ * Fires when a keypress is detected within the element.
587
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
588
+ * @param {HTMLElement} t The target of the event.
589
+ */
590
+ /**
591
+ * @event keydown
592
+ * Fires when a keydown is detected within the element.
593
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
594
+ * @param {HTMLElement} t The target of the event.
595
+ */
596
+ /**
597
+ * @event keyup
598
+ * Fires when a keyup is detected within the element.
599
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
600
+ * @param {HTMLElement} t The target of the event.
601
+ */
602
+
603
+ // HTML frame/object events
604
+ /**
605
+ * @event load
606
+ * Fires when the user agent finishes loading all content within the element. Only supported by window, frames,
607
+ * objects and images.
608
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
609
+ * @param {HTMLElement} t The target of the event.
610
+ */
611
+ /**
612
+ * @event unload
613
+ * Fires when the user agent removes all content from a window or frame. For elements, it fires when the target
614
+ * element or any of its content has been removed.
615
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
616
+ * @param {HTMLElement} t The target of the event.
617
+ */
618
+ /**
619
+ * @event abort
620
+ * Fires when an object/image is stopped from loading before completely loaded.
621
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
622
+ * @param {HTMLElement} t The target of the event.
623
+ */
624
+ /**
625
+ * @event error
626
+ * Fires when an object/image/frame cannot be loaded properly.
627
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
628
+ * @param {HTMLElement} t The target of the event.
629
+ */
630
+ /**
631
+ * @event resize
632
+ * Fires when a document view is resized.
633
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
634
+ * @param {HTMLElement} t The target of the event.
635
+ */
636
+ /**
637
+ * @event scroll
638
+ * Fires when a document view is scrolled.
639
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
640
+ * @param {HTMLElement} t The target of the event.
641
+ */
642
+
643
+ // Form events
644
+ /**
645
+ * @event select
646
+ * Fires when a user selects some text in a text field, including input and textarea.
647
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
648
+ * @param {HTMLElement} t The target of the event.
649
+ */
650
+ /**
651
+ * @event change
652
+ * Fires when a control loses the input focus and its value has been modified since gaining focus.
653
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
654
+ * @param {HTMLElement} t The target of the event.
655
+ */
656
+ /**
657
+ * @event submit
658
+ * Fires when a form is submitted.
659
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
660
+ * @param {HTMLElement} t The target of the event.
661
+ */
662
+ /**
663
+ * @event reset
664
+ * Fires when a form is reset.
665
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
666
+ * @param {HTMLElement} t The target of the event.
667
+ */
668
+ /**
669
+ * @event focus
670
+ * Fires when an element receives focus either via the pointing device or by tab navigation.
671
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
672
+ * @param {HTMLElement} t The target of the event.
673
+ */
674
+ /**
675
+ * @event blur
676
+ * Fires when an element loses focus either via the pointing device or by tabbing navigation.
677
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
678
+ * @param {HTMLElement} t The target of the event.
679
+ */
680
+
681
+ // User Interface events
682
+ /**
683
+ * @event DOMFocusIn
684
+ * Where supported. Similar to HTML focus event, but can be applied to any focusable element.
685
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
686
+ * @param {HTMLElement} t The target of the event.
687
+ */
688
+ /**
689
+ * @event DOMFocusOut
690
+ * Where supported. Similar to HTML blur event, but can be applied to any focusable element.
691
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
692
+ * @param {HTMLElement} t The target of the event.
693
+ */
694
+ /**
695
+ * @event DOMActivate
696
+ * Where supported. Fires when an element is activated, for instance, through a mouse click or a keypress.
697
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
698
+ * @param {HTMLElement} t The target of the event.
699
+ */
700
+
701
+ // DOM Mutation events
702
+ /**
703
+ * @event DOMSubtreeModified
704
+ * Where supported. Fires when the subtree is modified.
705
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
706
+ * @param {HTMLElement} t The target of the event.
707
+ */
708
+ /**
709
+ * @event DOMNodeInserted
710
+ * Where supported. Fires when a node has been added as a child of another node.
711
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
712
+ * @param {HTMLElement} t The target of the event.
713
+ */
714
+ /**
715
+ * @event DOMNodeRemoved
716
+ * Where supported. Fires when a descendant node of the element is removed.
717
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
718
+ * @param {HTMLElement} t The target of the event.
719
+ */
720
+ /**
721
+ * @event DOMNodeRemovedFromDocument
722
+ * Where supported. Fires when a node is being removed from a document.
723
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
724
+ * @param {HTMLElement} t The target of the event.
725
+ */
726
+ /**
727
+ * @event DOMNodeInsertedIntoDocument
728
+ * Where supported. Fires when a node is being inserted into a document.
729
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
730
+ * @param {HTMLElement} t The target of the event.
731
+ */
732
+ /**
733
+ * @event DOMAttrModified
734
+ * Where supported. Fires when an attribute has been modified.
735
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
736
+ * @param {HTMLElement} t The target of the event.
737
+ */
738
+ /**
739
+ * @event DOMCharacterDataModified
740
+ * Where supported. Fires when the character data has been modified.
741
+ * @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
742
+ * @param {HTMLElement} t The target of the event.
743
+ */
744
+
745
+ /**
746
+ * Appends an event handler to this element.
747
+ *
748
+ * @param {String} eventName The name of event to handle.
749
+ *
750
+ * @param {Function} fn The handler function the event invokes. This function is passed the following parameters:
751
+ *
752
+ * - **evt** : EventObject
753
+ *
754
+ * The {@link Ext.EventObject EventObject} describing the event.
755
+ *
756
+ * - **el** : HtmlElement
757
+ *
758
+ * The DOM element which was the target of the event. Note that this may be filtered by using the delegate option.
759
+ *
760
+ * - **o** : Object
761
+ *
762
+ * The options object from the call that setup the listener.
763
+ *
764
+ * @param {Object} scope (optional) The scope (**this** reference) in which the handler function is executed. **If
765
+ * omitted, defaults to this Element.**
766
+ *
767
+ * @param {Object} options (optional) An object containing handler configuration properties. This may contain any of
768
+ * the following properties:
769
+ *
770
+ * - **scope** Object :
771
+ *
772
+ * The scope (**this** reference) in which the handler function is executed. **If omitted, defaults to this
773
+ * Element.**
774
+ *
775
+ * - **delegate** String:
776
+ *
777
+ * A simple selector to filter the target or look for a descendant of the target. See below for additional details.
778
+ *
779
+ * - **stopEvent** Boolean:
780
+ *
781
+ * True to stop the event. That is stop propagation, and prevent the default action.
782
+ *
783
+ * - **preventDefault** Boolean:
784
+ *
785
+ * True to prevent the default action
786
+ *
787
+ * - **stopPropagation** Boolean:
788
+ *
789
+ * True to prevent event propagation
790
+ *
791
+ * - **normalized** Boolean:
792
+ *
793
+ * False to pass a browser event to the handler function instead of an Ext.EventObject
794
+ *
795
+ * - **target** Ext.dom.Element:
796
+ *
797
+ * Only call the handler if the event was fired on the target Element, _not_ if the event was bubbled up from a
798
+ * child node.
799
+ *
800
+ * - **delay** Number:
801
+ *
802
+ * The number of milliseconds to delay the invocation of the handler after the event fires.
803
+ *
804
+ * - **single** Boolean:
805
+ *
806
+ * True to add a handler to handle just the next firing of the event, and then remove itself.
807
+ *
808
+ * - **buffer** Number:
809
+ *
810
+ * Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed by the specified number of
811
+ * milliseconds. If the event fires again within that time, the original handler is _not_ invoked, but the new
812
+ * handler is scheduled in its place.
813
+ *
814
+ * **Combining Options**
815
+ *
816
+ * Using the options argument, it is possible to combine different types of listeners:
817
+ *
818
+ * A delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the options
819
+ * object. The options object is available as the third parameter in the handler function.
820
+ *
821
+ * Code:
822
+ *
823
+ * el.on('click', this.onClick, this, {
824
+ * single: true,
825
+ * delay: 100,
826
+ * stopEvent : true,
827
+ * forumId: 4
828
+ * });
829
+ *
830
+ * **Attaching multiple handlers in 1 call**
831
+ *
832
+ * The method also allows for a single argument to be passed which is a config object containing properties which
833
+ * specify multiple handlers.
834
+ *
835
+ * Code:
836
+ *
837
+ * el.on({
838
+ * 'click' : {
839
+ * fn: this.onClick,
840
+ * scope: this,
841
+ * delay: 100
842
+ * },
843
+ * 'mouseover' : {
844
+ * fn: this.onMouseOver,
845
+ * scope: this
846
+ * },
847
+ * 'mouseout' : {
848
+ * fn: this.onMouseOut,
849
+ * scope: this
850
+ * }
851
+ * });
852
+ *
853
+ * Or a shorthand syntax:
854
+ *
855
+ * Code:
856
+ *
857
+ * el.on({
858
+ * 'click' : this.onClick,
859
+ * 'mouseover' : this.onMouseOver,
860
+ * 'mouseout' : this.onMouseOut,
861
+ * scope: this
862
+ * });
863
+ *
864
+ * **delegate**
865
+ *
866
+ * This is a configuration option that you can pass along when registering a handler for an event to assist with
867
+ * event delegation. Event delegation is a technique that is used to reduce memory consumption and prevent exposure
868
+ * to memory-leaks. By registering an event for a container element as opposed to each element within a container.
869
+ * By setting this configuration option to a simple selector, the target element will be filtered to look for a
870
+ * descendant of the target. For example:
871
+ *
872
+ * // using this markup:
873
+ * <div id='elId'>
874
+ * <p id='p1'>paragraph one</p>
875
+ * <p id='p2' class='clickable'>paragraph two</p>
876
+ * <p id='p3'>paragraph three</p>
877
+ * </div>
878
+ *
879
+ * // utilize event delegation to registering just one handler on the container element:
880
+ * el = Ext.get('elId');
881
+ * el.on(
882
+ * 'click',
883
+ * function(e,t) {
884
+ * // handle click
885
+ * console.info(t.id); // 'p2'
886
+ * },
887
+ * this,
888
+ * {
889
+ * // filter the target element to be a descendant with the class 'clickable'
890
+ * delegate: '.clickable'
891
+ * }
892
+ * );
893
+ *
894
+ * @return {Ext.dom.Element} this
895
+ */
896
+ on: function(eventName, fn, scope, options) {
897
+ Ext.EventManager.on(this, eventName, fn, scope || this, options);
898
+ return this;
899
+ },
900
+
901
+ /**
902
+ * Removes an event handler from this element.
903
+ *
904
+ * **Note**: if a *scope* was explicitly specified when {@link #on adding} the listener,
905
+ * the same scope must be specified here.
906
+ *
907
+ * Example:
908
+ *
909
+ * el.un('click', this.handlerFn);
910
+ * // or
911
+ * el.removeListener('click', this.handlerFn);
912
+ *
913
+ * @param {String} eventName The name of the event from which to remove the handler.
914
+ * @param {Function} fn The handler function to remove. **This must be a reference to the function passed into the
915
+ * {@link #on} call.**
916
+ * @param {Object} scope If a scope (**this** reference) was specified when the listener was added, then this must
917
+ * refer to the same object.
918
+ * @return {Ext.dom.Element} this
919
+ */
920
+ un: function(eventName, fn, scope) {
921
+ Ext.EventManager.un(this, eventName, fn, scope || this);
922
+ return this;
923
+ },
924
+
925
+ /**
926
+ * Removes all previous added listeners from this element
927
+ * @return {Ext.dom.Element} this
928
+ */
929
+ removeAllListeners: function() {
930
+ Ext.EventManager.removeAll(this);
931
+ return this;
932
+ },
933
+
934
+ /**
935
+ * Recursively removes all previous added listeners from this element and its children
936
+ * @return {Ext.dom.Element} this
937
+ */
938
+ purgeAllListeners: function() {
939
+ Ext.EventManager.purgeElement(this);
940
+ return this;
941
+ }
942
+
943
+ }, function() {
944
+
945
+ var EC = Ext.cache,
946
+ El = this,
947
+ AbstractElement = Ext.dom.AbstractElement,
948
+ focusRe = /a|button|embed|iframe|img|input|object|select|textarea/i,
949
+ nonSpaceRe = /\S/,
950
+ scriptTagRe = /(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,
951
+ replaceScriptTagRe = /(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,
952
+ srcRe = /\ssrc=([\'\"])(.*?)\1/i,
953
+ typeRe = /\stype=([\'\"])(.*?)\1/i,
954
+ useDocForId = !(Ext.isIE6 || Ext.isIE7 || Ext.isIE8);
955
+
956
+ El.boxMarkup = '<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';
957
+ //</!if>
958
+
959
+ // private
960
+ // Garbage collection - uncache elements/purge listeners on orphaned elements
961
+ // so we don't hold a reference and cause the browser to retain them
962
+ function garbageCollect() {
963
+ if (!Ext.enableGarbageCollector) {
964
+ clearInterval(El.collectorThreadId);
965
+ } else {
966
+ var eid,
967
+ d,
968
+ o,
969
+ t;
970
+
971
+ for (eid in EC) {
972
+ if (!EC.hasOwnProperty(eid)) {
973
+ continue;
974
+ }
975
+
976
+ o = EC[eid];
977
+
978
+ // Skip document and window elements
979
+ if (o.skipGarbageCollection) {
980
+ continue;
981
+ }
982
+
983
+ d = o.dom;
984
+
985
+ //<debug>
986
+ // Should always have a DOM node
987
+ if (!d) {
988
+ Ext.Error.raise('Missing DOM node in element garbage collection: ' + eid);
989
+ }
990
+
991
+ // Check that document and window elements haven't got through
992
+ if (d && (d.getElementById || d.navigator)) {
993
+ Ext.Error.raise('Unexpected document or window element in element garbage collection');
994
+ }
995
+ //</debug>
996
+
997
+ // -------------------------------------------------------
998
+ // Determining what is garbage:
999
+ // -------------------------------------------------------
1000
+ // !d.parentNode
1001
+ // no parentNode == direct orphan, definitely garbage
1002
+ // -------------------------------------------------------
1003
+ // !d.offsetParent && !document.getElementById(eid)
1004
+ // display none elements have no offsetParent so we will
1005
+ // also try to look it up by it's id. However, check
1006
+ // offsetParent first so we don't do unneeded lookups.
1007
+ // This enables collection of elements that are not orphans
1008
+ // directly, but somewhere up the line they have an orphan
1009
+ // parent.
1010
+ // -------------------------------------------------------
1011
+ if (!d.parentNode || (!d.offsetParent && !Ext.getElementById(eid))) {
1012
+ if (d && Ext.enableListenerCollection) {
1013
+ Ext.EventManager.removeAll(d);
1014
+ }
1015
+ delete EC[eid];
1016
+ }
1017
+ }
1018
+ // Cleanup IE Object leaks
1019
+ if (Ext.isIE) {
1020
+ t = {};
1021
+ for (eid in EC) {
1022
+ if (!EC.hasOwnProperty(eid)) {
1023
+ continue;
1024
+ }
1025
+ t[eid] = EC[eid];
1026
+ }
1027
+ EC = Ext.cache = t;
1028
+ }
1029
+ }
1030
+ }
1031
+
1032
+ El.collectorThreadId = setInterval(garbageCollect, 30000);
1033
+
1034
+ //Stuff from Element-more.js
1035
+ El.addMethods({
1036
+
1037
+ /**
1038
+ * Monitors this Element for the mouse leaving. Calls the function after the specified delay only if
1039
+ * the mouse was not moved back into the Element within the delay. If the mouse *was* moved
1040
+ * back in, the function is not called.
1041
+ * @param {Number} delay The delay **in milliseconds** to wait for possible mouse re-entry before calling the handler function.
1042
+ * @param {Function} handler The function to call if the mouse remains outside of this Element for the specified time.
1043
+ * @param {Object} [scope] The scope (`this` reference) in which the handler function executes. Defaults to this Element.
1044
+ * @return {Object} The listeners object which was added to this element so that monitoring can be stopped. Example usage:
1045
+ *
1046
+ * // Hide the menu if the mouse moves out for 250ms or more
1047
+ * this.mouseLeaveMonitor = this.menuEl.monitorMouseLeave(250, this.hideMenu, this);
1048
+ *
1049
+ * ...
1050
+ * // Remove mouseleave monitor on menu destroy
1051
+ * this.menuEl.un(this.mouseLeaveMonitor);
1052
+ *
1053
+ */
1054
+ monitorMouseLeave: function(delay, handler, scope) {
1055
+ var me = this,
1056
+ timer,
1057
+ listeners = {
1058
+ mouseleave: function(e) {
1059
+ timer = setTimeout(Ext.Function.bind(handler, scope||me, [e]), delay);
1060
+ },
1061
+ mouseenter: function() {
1062
+ clearTimeout(timer);
1063
+ },
1064
+ freezeEvent: true
1065
+ };
1066
+
1067
+ me.on(listeners);
1068
+ return listeners;
1069
+ },
1070
+
1071
+ /**
1072
+ * Stops the specified event(s) from bubbling and optionally prevents the default action
1073
+ * @param {String/String[]} eventName an event / array of events to stop from bubbling
1074
+ * @param {Boolean} [preventDefault] true to prevent the default action too
1075
+ * @return {Ext.dom.Element} this
1076
+ */
1077
+ swallowEvent : function(eventName, preventDefault) {
1078
+ var me = this,
1079
+ e, eLen;
1080
+ function fn(e) {
1081
+ e.stopPropagation();
1082
+ if (preventDefault) {
1083
+ e.preventDefault();
1084
+ }
1085
+ }
1086
+
1087
+ if (Ext.isArray(eventName)) {
1088
+ eLen = eventName.length;
1089
+
1090
+ for (e = 0; e < eLen; e++) {
1091
+ me.on(eventName[e], fn);
1092
+ }
1093
+
1094
+ return me;
1095
+ }
1096
+ me.on(eventName, fn);
1097
+ return me;
1098
+ },
1099
+
1100
+ /**
1101
+ * Create an event handler on this element such that when the event fires and is handled by this element,
1102
+ * it will be relayed to another object (i.e., fired again as if it originated from that object instead).
1103
+ * @param {String} eventName The type of event to relay
1104
+ * @param {Object} observable Any object that extends {@link Ext.util.Observable} that will provide the context
1105
+ * for firing the relayed event
1106
+ */
1107
+ relayEvent : function(eventName, observable) {
1108
+ this.on(eventName, function(e) {
1109
+ observable.fireEvent(eventName, e);
1110
+ });
1111
+ },
1112
+
1113
+ /**
1114
+ * Removes Empty, or whitespace filled text nodes. Combines adjacent text nodes.
1115
+ * @param {Boolean} [forceReclean=false] By default the element keeps track if it has been cleaned already
1116
+ * so you can call this over and over. However, if you update the element and need to force a reclean, you
1117
+ * can pass true.
1118
+ */
1119
+ clean : function(forceReclean) {
1120
+ var me = this,
1121
+ dom = me.dom,
1122
+ data = (me.$cache || me.getCache()).data,
1123
+ n = dom.firstChild,
1124
+ ni = -1,
1125
+ nx;
1126
+
1127
+ if (data.isCleaned && forceReclean !== true) {
1128
+ return me;
1129
+ }
1130
+
1131
+ while (n) {
1132
+ nx = n.nextSibling;
1133
+ if (n.nodeType == 3) {
1134
+ // Remove empty/whitespace text nodes
1135
+ if (!(nonSpaceRe.test(n.nodeValue))) {
1136
+ dom.removeChild(n);
1137
+ // Combine adjacent text nodes
1138
+ } else if (nx && nx.nodeType == 3) {
1139
+ n.appendData(Ext.String.trim(nx.data));
1140
+ dom.removeChild(nx);
1141
+ nx = n.nextSibling;
1142
+ n.nodeIndex = ++ni;
1143
+ }
1144
+ } else {
1145
+ // Recursively clean
1146
+ Ext.fly(n).clean();
1147
+ n.nodeIndex = ++ni;
1148
+ }
1149
+ n = nx;
1150
+ }
1151
+
1152
+ data.isCleaned = true;
1153
+ return me;
1154
+ },
1155
+
1156
+ /**
1157
+ * Direct access to the Ext.ElementLoader {@link Ext.ElementLoader#method-load} method. The method takes the same object
1158
+ * parameter as {@link Ext.ElementLoader#method-load}
1159
+ * @return {Ext.dom.Element} this
1160
+ */
1161
+ load : function(options) {
1162
+ this.getLoader().load(options);
1163
+ return this;
1164
+ },
1165
+
1166
+ /**
1167
+ * Gets this element's {@link Ext.ElementLoader ElementLoader}
1168
+ * @return {Ext.ElementLoader} The loader
1169
+ */
1170
+ getLoader : function() {
1171
+ var me = this,
1172
+ data = (me.$cache || me.getCache()).data,
1173
+ loader = data.loader;
1174
+
1175
+ if (!loader) {
1176
+ data.loader = loader = new Ext.ElementLoader({
1177
+ target: me
1178
+ });
1179
+ }
1180
+ return loader;
1181
+ },
1182
+
1183
+ /**
1184
+ * Updates the innerHTML of this element, optionally searching for and processing scripts.
1185
+ * @param {String} html The new HTML
1186
+ * @param {Boolean} [loadScripts] True to look for and process scripts (defaults to false)
1187
+ * @param {Function} [callback] For async script loading you can be notified when the update completes
1188
+ * @return {Ext.dom.Element} this
1189
+ */
1190
+ update : function(html, loadScripts, callback) {
1191
+ var me = this,
1192
+ id,
1193
+ dom,
1194
+ interval;
1195
+
1196
+ if (!me.dom) {
1197
+ return me;
1198
+ }
1199
+ html = html || '';
1200
+ dom = me.dom;
1201
+
1202
+ if (loadScripts !== true) {
1203
+ dom.innerHTML = html;
1204
+ Ext.callback(callback, me);
1205
+ return me;
1206
+ }
1207
+
1208
+ id = Ext.id();
1209
+ html += '<span id="' + id + '"></span>';
1210
+
1211
+ interval = setInterval(function() {
1212
+ var hd,
1213
+ match,
1214
+ attrs,
1215
+ srcMatch,
1216
+ typeMatch,
1217
+ el,
1218
+ s;
1219
+ if (!(el = DOC.getElementById(id))) {
1220
+ return false;
1221
+ }
1222
+ clearInterval(interval);
1223
+ Ext.removeNode(el);
1224
+ hd = Ext.getHead().dom;
1225
+
1226
+ while ((match = scriptTagRe.exec(html))) {
1227
+ attrs = match[1];
1228
+ srcMatch = attrs ? attrs.match(srcRe) : false;
1229
+ if (srcMatch && srcMatch[2]) {
1230
+ s = DOC.createElement("script");
1231
+ s.src = srcMatch[2];
1232
+ typeMatch = attrs.match(typeRe);
1233
+ if (typeMatch && typeMatch[2]) {
1234
+ s.type = typeMatch[2];
1235
+ }
1236
+ hd.appendChild(s);
1237
+ } else if (match[2] && match[2].length > 0) {
1238
+ if (window.execScript) {
1239
+ window.execScript(match[2]);
1240
+ } else {
1241
+ window.eval(match[2]);
1242
+ }
1243
+ }
1244
+ }
1245
+ Ext.callback(callback, me);
1246
+ }, 20);
1247
+ dom.innerHTML = html.replace(replaceScriptTagRe, '');
1248
+ return me;
1249
+ },
1250
+
1251
+ // inherit docs, overridden so we can add removeAnchor
1252
+ removeAllListeners : function() {
1253
+ this.removeAnchor();
1254
+ Ext.EventManager.removeAll(this.dom);
1255
+ return this;
1256
+ },
1257
+
1258
+ /**
1259
+ * Creates a proxy element of this element
1260
+ * @param {String/Object} config The class name of the proxy element or a DomHelper config object
1261
+ * @param {String/HTMLElement} [renderTo] The element or element id to render the proxy to. Defaults to: document.body.
1262
+ * @param {Boolean} [matchBox=false] True to align and size the proxy to this element now.
1263
+ * @return {Ext.dom.Element} The new proxy element
1264
+ */
1265
+ createProxy : function(config, renderTo, matchBox) {
1266
+ config = (typeof config == 'object') ? config : {tag : "div", cls: config};
1267
+
1268
+ var me = this,
1269
+ proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) :
1270
+ Ext.DomHelper.insertBefore(me.dom, config, true);
1271
+
1272
+ proxy.setVisibilityMode(Element.DISPLAY);
1273
+ proxy.hide();
1274
+ if (matchBox && me.setBox && me.getBox) { // check to make sure Element.position.js is loaded
1275
+ proxy.setBox(me.getBox());
1276
+ }
1277
+ return proxy;
1278
+ },
1279
+
1280
+ /**
1281
+ * Gets the parent node of the current element taking into account Ext.scopeResetCSS
1282
+ * @protected
1283
+ * @return {HTMLElement} The parent element
1284
+ */
1285
+ getScopeParent: function() {
1286
+ var parent = this.dom.parentNode;
1287
+ return Ext.scopeResetCSS ? parent.parentNode : parent;
1288
+ },
1289
+
1290
+ /**
1291
+ * Returns true if this element needs an explicit tabIndex to make it focusable. Input fields, text areas, buttons
1292
+ * anchors elements **with an href** etc do not need a tabIndex, but structural elements do.
1293
+ */
1294
+ needsTabIndex: function() {
1295
+ if (this.dom) {
1296
+ if ((this.dom.nodeName === 'a') && (!this.dom.href)) {
1297
+ return true;
1298
+ }
1299
+ return !focusRe.test(this.dom.nodeName);
1300
+ }
1301
+ },
1302
+
1303
+ /**
1304
+ * Checks whether this element can be focused.
1305
+ * @return {Boolean} True if the element is focusable
1306
+ */
1307
+ focusable: function () {
1308
+ var dom = this.dom,
1309
+ nodeName = dom.nodeName,
1310
+ canFocus = false;
1311
+
1312
+ if (!dom.disabled) {
1313
+ if (focusRe.test(nodeName)) {
1314
+ if ((nodeName !== 'a') || dom.href) {
1315
+ canFocus = true;
1316
+ }
1317
+ } else {
1318
+ canFocus = !isNaN(dom.tabIndex);
1319
+ }
1320
+ }
1321
+ return canFocus && this.isVisible(true);
1322
+ }
1323
+ });
1324
+
1325
+ if (Ext.isIE) {
1326
+ El.prototype.getById = function (id, asDom) {
1327
+ var dom = this.dom,
1328
+ cached, el, ret;
1329
+
1330
+ if (dom) {
1331
+ // for normal elements getElementById is the best solution, but if the el is
1332
+ // not part of the document.body, we need to use all[]
1333
+ el = (useDocForId && DOC.getElementById(id)) || dom.all[id];
1334
+ if (el) {
1335
+ if (asDom) {
1336
+ ret = el;
1337
+ } else {
1338
+ // calling El.get here is a real hit (2x slower) because it has to
1339
+ // redetermine that we are giving it a dom el.
1340
+ cached = EC[id];
1341
+ if (cached && cached.el) {
1342
+ ret = cached.el;
1343
+ ret.dom = el;
1344
+ } else {
1345
+ ret = new Element(el);
1346
+ }
1347
+ }
1348
+ return ret;
1349
+ }
1350
+ }
1351
+
1352
+ return asDom ? Ext.getDom(id) : El.get(id);
1353
+ };
1354
+ }
1355
+
1356
+ El.createAlias({
1357
+ /**
1358
+ * @method
1359
+ * @inheritdoc Ext.dom.Element#on
1360
+ * Shorthand for {@link #on}.
1361
+ */
1362
+ addListener: 'on',
1363
+ /**
1364
+ * @method
1365
+ * @inheritdoc Ext.dom.Element#un
1366
+ * Shorthand for {@link #un}.
1367
+ */
1368
+ removeListener: 'un',
1369
+ /**
1370
+ * @method
1371
+ * @inheritdoc Ext.dom.Element#removeAllListeners
1372
+ * Alias for {@link #removeAllListeners}.
1373
+ */
1374
+ clearListeners: 'removeAllListeners'
1375
+ });
1376
+
1377
+ El.Fly = AbstractElement.Fly = new Ext.Class({
1378
+ extend: El,
1379
+
1380
+ constructor: function(dom) {
1381
+ this.dom = dom;
1382
+ },
1383
+
1384
+ attach: AbstractElement.Fly.prototype.attach
1385
+ });
1386
+
1387
+ if (Ext.isIE) {
1388
+ Ext.getElementById = function (id) {
1389
+ var el = DOC.getElementById(id),
1390
+ detachedBodyEl;
1391
+
1392
+ if (!el && (detachedBodyEl = AbstractElement.detachedBodyEl)) {
1393
+ el = detachedBodyEl.dom.all[id];
1394
+ }
1395
+
1396
+ return el;
1397
+ };
1398
+ } else if (!DOC.querySelector) {
1399
+ Ext.getDetachedBody = Ext.getBody;
1400
+
1401
+ Ext.getElementById = function (id) {
1402
+ return DOC.getElementById(id);
1403
+ };
1404
+ }
1405
+ });
1406
+
1407
+ }());