extjs-rails 4.1.0.alpha5 → 4.1.0.alpha6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (507) hide show
  1. data/app/assets/javascripts/extjs-rails.js +95613 -11000
  2. data/lib/extjs-rails/version.rb +1 -1
  3. metadata +2 -509
  4. data/app/assets/javascripts/src/AbstractComponent.js +0 -3290
  5. data/app/assets/javascripts/src/AbstractManager.js +0 -144
  6. data/app/assets/javascripts/src/AbstractPlugin.js +0 -72
  7. data/app/assets/javascripts/src/Action.js +0 -276
  8. data/app/assets/javascripts/src/Ajax.js +0 -99
  9. data/app/assets/javascripts/src/Component.js +0 -1344
  10. data/app/assets/javascripts/src/ComponentLoader.js +0 -202
  11. data/app/assets/javascripts/src/ComponentManager.js +0 -47
  12. data/app/assets/javascripts/src/ComponentQuery.js +0 -521
  13. data/app/assets/javascripts/src/Editor.js +0 -494
  14. data/app/assets/javascripts/src/ElementLoader.js +0 -404
  15. data/app/assets/javascripts/src/FocusManager.js +0 -712
  16. data/app/assets/javascripts/src/Img.js +0 -111
  17. data/app/assets/javascripts/src/Layer.js +0 -543
  18. data/app/assets/javascripts/src/LoadMask.js +0 -432
  19. data/app/assets/javascripts/src/ModelManager.js +0 -186
  20. data/app/assets/javascripts/src/PluginManager.js +0 -110
  21. data/app/assets/javascripts/src/ProgressBar.js +0 -336
  22. data/app/assets/javascripts/src/Shadow.js +0 -233
  23. data/app/assets/javascripts/src/ShadowPool.js +0 -43
  24. data/app/assets/javascripts/src/Template.js +0 -331
  25. data/app/assets/javascripts/src/XTemplate.js +0 -365
  26. data/app/assets/javascripts/src/XTemplateCompiler.js +0 -450
  27. data/app/assets/javascripts/src/XTemplateParser.js +0 -249
  28. data/app/assets/javascripts/src/ZIndexManager.js +0 -519
  29. data/app/assets/javascripts/src/app/Application.js +0 -271
  30. data/app/assets/javascripts/src/app/Controller.js +0 -458
  31. data/app/assets/javascripts/src/app/EventBus.js +0 -112
  32. data/app/assets/javascripts/src/button/Button.js +0 -1483
  33. data/app/assets/javascripts/src/button/Cycle.js +0 -215
  34. data/app/assets/javascripts/src/button/Split.js +0 -99
  35. data/app/assets/javascripts/src/chart/Callout.js +0 -140
  36. data/app/assets/javascripts/src/chart/Chart.js +0 -966
  37. data/app/assets/javascripts/src/chart/Highlight.js +0 -172
  38. data/app/assets/javascripts/src/chart/Label.js +0 -241
  39. data/app/assets/javascripts/src/chart/Legend.js +0 -474
  40. data/app/assets/javascripts/src/chart/LegendItem.js +0 -217
  41. data/app/assets/javascripts/src/chart/Mask.js +0 -230
  42. data/app/assets/javascripts/src/chart/MaskLayer.js +0 -48
  43. data/app/assets/javascripts/src/chart/Navigation.js +0 -79
  44. data/app/assets/javascripts/src/chart/Shape.js +0 -106
  45. data/app/assets/javascripts/src/chart/Tip.js +0 -98
  46. data/app/assets/javascripts/src/chart/TipSurface.js +0 -42
  47. data/app/assets/javascripts/src/chart/axis/Abstract.js +0 -73
  48. data/app/assets/javascripts/src/chart/axis/Axis.js +0 -961
  49. data/app/assets/javascripts/src/chart/axis/Category.js +0 -130
  50. data/app/assets/javascripts/src/chart/axis/Gauge.js +0 -203
  51. data/app/assets/javascripts/src/chart/axis/Numeric.js +0 -235
  52. data/app/assets/javascripts/src/chart/axis/Radial.js +0 -204
  53. data/app/assets/javascripts/src/chart/axis/Time.js +0 -135
  54. data/app/assets/javascripts/src/chart/series/Area.js +0 -803
  55. data/app/assets/javascripts/src/chart/series/Bar.js +0 -853
  56. data/app/assets/javascripts/src/chart/series/Cartesian.js +0 -328
  57. data/app/assets/javascripts/src/chart/series/Column.js +0 -104
  58. data/app/assets/javascripts/src/chart/series/Gauge.js +0 -490
  59. data/app/assets/javascripts/src/chart/series/Line.js +0 -1104
  60. data/app/assets/javascripts/src/chart/series/Pie.js +0 -1072
  61. data/app/assets/javascripts/src/chart/series/Radar.js +0 -440
  62. data/app/assets/javascripts/src/chart/series/Scatter.js +0 -668
  63. data/app/assets/javascripts/src/chart/series/Series.js +0 -443
  64. data/app/assets/javascripts/src/chart/theme/Base.js +0 -175
  65. data/app/assets/javascripts/src/chart/theme/Theme.js +0 -253
  66. data/app/assets/javascripts/src/container/AbstractContainer.js +0 -1062
  67. data/app/assets/javascripts/src/container/ButtonGroup.js +0 -143
  68. data/app/assets/javascripts/src/container/Container.js +0 -212
  69. data/app/assets/javascripts/src/container/DockingContainer.js +0 -265
  70. data/app/assets/javascripts/src/container/Viewport.js +0 -184
  71. data/app/assets/javascripts/src/core/dom/Element.form.js +0 -50
  72. data/app/assets/javascripts/src/core/dom/Element.static-more.js +0 -159
  73. data/app/assets/javascripts/src/core/examples/index.html +0 -321
  74. data/app/assets/javascripts/src/core/examples/index.js +0 -6
  75. data/app/assets/javascripts/src/core/examples/src/Sample/CTO.js +0 -25
  76. data/app/assets/javascripts/src/core/examples/src/Sample/CoolGuy.js +0 -20
  77. data/app/assets/javascripts/src/core/examples/src/Sample/Developer.js +0 -43
  78. data/app/assets/javascripts/src/core/examples/src/Sample/Gun.js +0 -3
  79. data/app/assets/javascripts/src/core/examples/src/Sample/HumanResource.js +0 -23
  80. data/app/assets/javascripts/src/core/examples/src/Sample/Musician.js +0 -20
  81. data/app/assets/javascripts/src/core/examples/src/Sample/Person.js +0 -50
  82. data/app/assets/javascripts/src/core/examples/src/Sample/ability/CanComposeSongs.js +0 -9
  83. data/app/assets/javascripts/src/core/examples/src/Sample/ability/CanPlayGuitar.js +0 -9
  84. data/app/assets/javascripts/src/core/examples/src/Sample/ability/CanSing.js +0 -18
  85. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/A.js +0 -3
  86. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/B.js +0 -3
  87. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/C.js +0 -3
  88. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/D.js +0 -3
  89. data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/E.js +0 -3
  90. data/app/assets/javascripts/src/core/examples/src/Sample/notdeadlock/A.js +0 -3
  91. data/app/assets/javascripts/src/core/examples/src/Sample/notdeadlock/B.js +0 -4
  92. data/app/assets/javascripts/src/core/examples/src/Sample/notdeadlock/C.js +0 -3
  93. data/app/assets/javascripts/src/core/src/EventManager.js +0 -1167
  94. data/app/assets/javascripts/src/core/src/EventObject.js +0 -883
  95. data/app/assets/javascripts/src/core/src/Ext-more.js +0 -1283
  96. data/app/assets/javascripts/src/core/src/Ext.js +0 -736
  97. data/app/assets/javascripts/src/core/src/Support.js +0 -662
  98. data/app/assets/javascripts/src/core/src/class/Base.js +0 -1085
  99. data/app/assets/javascripts/src/core/src/class/Class.js +0 -676
  100. data/app/assets/javascripts/src/core/src/class/ClassManager.js +0 -1591
  101. data/app/assets/javascripts/src/core/src/class/Loader.js +0 -1423
  102. data/app/assets/javascripts/src/core/src/dom/AbstractElement.alignment.js +0 -173
  103. data/app/assets/javascripts/src/core/src/dom/AbstractElement.insertion.js +0 -193
  104. data/app/assets/javascripts/src/core/src/dom/AbstractElement.js +0 -681
  105. data/app/assets/javascripts/src/core/src/dom/AbstractElement.position.js +0 -356
  106. data/app/assets/javascripts/src/core/src/dom/AbstractElement.static.js +0 -474
  107. data/app/assets/javascripts/src/core/src/dom/AbstractElement.style.js +0 -851
  108. data/app/assets/javascripts/src/core/src/dom/AbstractElement.traversal.js +0 -180
  109. data/app/assets/javascripts/src/core/src/dom/AbstractHelper.js +0 -291
  110. data/app/assets/javascripts/src/core/src/dom/AbstractQuery.js +0 -72
  111. data/app/assets/javascripts/src/core/src/dom/CompositeElement.js +0 -75
  112. data/app/assets/javascripts/src/core/src/dom/CompositeElementLite.js +0 -436
  113. data/app/assets/javascripts/src/core/src/dom/DomQuery-aria.js +0 -1049
  114. data/app/assets/javascripts/src/core/src/env/Browser.js +0 -186
  115. data/app/assets/javascripts/src/core/src/env/FeatureDetector.js +0 -274
  116. data/app/assets/javascripts/src/core/src/env/OS.js +0 -141
  117. data/app/assets/javascripts/src/core/src/lang/Array.js +0 -1205
  118. data/app/assets/javascripts/src/core/src/lang/Date.js +0 -1463
  119. data/app/assets/javascripts/src/core/src/lang/Error.js +0 -326
  120. data/app/assets/javascripts/src/core/src/lang/Function.js +0 -485
  121. data/app/assets/javascripts/src/core/src/lang/Number.js +0 -175
  122. data/app/assets/javascripts/src/core/src/lang/Object.js +0 -606
  123. data/app/assets/javascripts/src/core/src/lang/String.js +0 -333
  124. data/app/assets/javascripts/src/core/src/misc/JSON.js +0 -236
  125. data/app/assets/javascripts/src/core/src/perf/Accumulator.js +0 -244
  126. data/app/assets/javascripts/src/core/src/perf/Monitor.js +0 -197
  127. data/app/assets/javascripts/src/core/src/util/DelayedTask.js +0 -71
  128. data/app/assets/javascripts/src/core/src/util/Event.js +0 -215
  129. data/app/assets/javascripts/src/core/src/util/Format.js +0 -551
  130. data/app/assets/javascripts/src/core/src/util/TaskManager.js +0 -417
  131. data/app/assets/javascripts/src/core/src/version/Version.js +0 -364
  132. data/app/assets/javascripts/src/core/test/unit/README.MD +0 -91
  133. data/app/assets/javascripts/src/core/test/unit/bootstrap.js +0 -39
  134. data/app/assets/javascripts/src/core/test/unit/build/build-data.js +0 -34
  135. data/app/assets/javascripts/src/core/test/unit/build/build.sh +0 -2
  136. data/app/assets/javascripts/src/core/test/unit/data.js +0 -27
  137. data/app/assets/javascripts/src/core/test/unit/index.html +0 -15
  138. data/app/assets/javascripts/src/core/test/unit/other_specs/dom.html +0 -40
  139. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/extjs-api.js +0 -12
  140. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/platform-api.js +0 -134
  141. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/sanity.js +0 -4
  142. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/touch-api-out.js +0 -128
  143. data/app/assets/javascripts/src/core/test/unit/other_specs/dom/touch-api.js +0 -89
  144. data/app/assets/javascripts/src/core/test/unit/other_specs/env/Environment.js +0 -357
  145. data/app/assets/javascripts/src/core/test/unit/resources/APITest.js +0 -37
  146. data/app/assets/javascripts/src/core/test/unit/resources/jsb3.js +0 -14
  147. data/app/assets/javascripts/src/core/test/unit/resources/test-setup.js +0 -137
  148. data/app/assets/javascripts/src/core/test/unit/spec/EventManager.js +0 -629
  149. data/app/assets/javascripts/src/core/test/unit/spec/Ext-mess.backup +0 -198
  150. data/app/assets/javascripts/src/core/test/unit/spec/Ext-more.js +0 -520
  151. data/app/assets/javascripts/src/core/test/unit/spec/Ext.js +0 -1550
  152. data/app/assets/javascripts/src/core/test/unit/spec/Support.js +0 -250
  153. data/app/assets/javascripts/src/core/test/unit/spec/class/Base.js +0 -47
  154. data/app/assets/javascripts/src/core/test/unit/spec/class/Class.js +0 -561
  155. data/app/assets/javascripts/src/core/test/unit/spec/class/ClassManager.js +0 -555
  156. data/app/assets/javascripts/src/core/test/unit/spec/dom/CompositeElementLite.js +0 -409
  157. data/app/assets/javascripts/src/core/test/unit/spec/dom/DomHelper.js +0 -444
  158. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.insertion.js +0 -342
  159. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.js +0 -731
  160. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.static.js +0 -201
  161. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.style.js +0 -118
  162. data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.traversal.js +0 -336
  163. data/app/assets/javascripts/src/core/test/unit/spec/lang/Array.js +0 -1229
  164. data/app/assets/javascripts/src/core/test/unit/spec/lang/Date.js +0 -697
  165. data/app/assets/javascripts/src/core/test/unit/spec/lang/Error.js +0 -277
  166. data/app/assets/javascripts/src/core/test/unit/spec/lang/Function.js +0 -536
  167. data/app/assets/javascripts/src/core/test/unit/spec/lang/Number.js +0 -323
  168. data/app/assets/javascripts/src/core/test/unit/spec/lang/Object.js +0 -591
  169. data/app/assets/javascripts/src/core/test/unit/spec/lang/String.js +0 -451
  170. data/app/assets/javascripts/src/core/test/unit/spec/misc/JSON.js +0 -252
  171. data/app/assets/javascripts/src/core/test/unit/spec/util/Format.js +0 -521
  172. data/app/assets/javascripts/src/core/test/unit/spec/version/Version.js +0 -148
  173. data/app/assets/javascripts/src/core/test/unit/specs.html +0 -19
  174. data/app/assets/javascripts/src/data/AbstractStore.js +0 -887
  175. data/app/assets/javascripts/src/data/ArrayStore.js +0 -74
  176. data/app/assets/javascripts/src/data/Batch.js +0 -236
  177. data/app/assets/javascripts/src/data/BufferStore.js +0 -13
  178. data/app/assets/javascripts/src/data/Connection.js +0 -969
  179. data/app/assets/javascripts/src/data/DirectStore.js +0 -50
  180. data/app/assets/javascripts/src/data/Errors.js +0 -52
  181. data/app/assets/javascripts/src/data/Field.js +0 -341
  182. data/app/assets/javascripts/src/data/IdGenerator.js +0 -198
  183. data/app/assets/javascripts/src/data/JsonP.js +0 -253
  184. data/app/assets/javascripts/src/data/JsonPStore.js +0 -51
  185. data/app/assets/javascripts/src/data/JsonStore.js +0 -60
  186. data/app/assets/javascripts/src/data/Model.js +0 -1673
  187. data/app/assets/javascripts/src/data/NodeInterface.js +0 -1294
  188. data/app/assets/javascripts/src/data/NodeStore.js +0 -254
  189. data/app/assets/javascripts/src/data/Operation.js +0 -331
  190. data/app/assets/javascripts/src/data/Request.js +0 -40
  191. data/app/assets/javascripts/src/data/ResultSet.js +0 -56
  192. data/app/assets/javascripts/src/data/SequentialIdGenerator.js +0 -61
  193. data/app/assets/javascripts/src/data/SortTypes.js +0 -125
  194. data/app/assets/javascripts/src/data/Store.js +0 -2609
  195. data/app/assets/javascripts/src/data/StoreManager.js +0 -156
  196. data/app/assets/javascripts/src/data/Tree.js +0 -290
  197. data/app/assets/javascripts/src/data/TreeStore.js +0 -655
  198. data/app/assets/javascripts/src/data/Types.js +0 -190
  199. data/app/assets/javascripts/src/data/UuidGenerator.js +0 -215
  200. data/app/assets/javascripts/src/data/XmlStore.js +0 -76
  201. data/app/assets/javascripts/src/data/association/Association.js +0 -243
  202. data/app/assets/javascripts/src/data/association/BelongsTo.js +0 -291
  203. data/app/assets/javascripts/src/data/association/HasMany.js +0 -289
  204. data/app/assets/javascripts/src/data/association/HasOne.js +0 -304
  205. data/app/assets/javascripts/src/data/proxy/Ajax.js +0 -282
  206. data/app/assets/javascripts/src/data/proxy/Client.js +0 -21
  207. data/app/assets/javascripts/src/data/proxy/Direct.js +0 -181
  208. data/app/assets/javascripts/src/data/proxy/JsonP.js +0 -313
  209. data/app/assets/javascripts/src/data/proxy/LocalStorage.js +0 -69
  210. data/app/assets/javascripts/src/data/proxy/Memory.js +0 -156
  211. data/app/assets/javascripts/src/data/proxy/Proxy.js +0 -433
  212. data/app/assets/javascripts/src/data/proxy/Rest.js +0 -173
  213. data/app/assets/javascripts/src/data/proxy/Server.js +0 -460
  214. data/app/assets/javascripts/src/data/proxy/SessionStorage.js +0 -39
  215. data/app/assets/javascripts/src/data/proxy/WebStorage.js +0 -546
  216. data/app/assets/javascripts/src/data/reader/Array.js +0 -68
  217. data/app/assets/javascripts/src/data/reader/Json.js +0 -383
  218. data/app/assets/javascripts/src/data/reader/Reader.js +0 -735
  219. data/app/assets/javascripts/src/data/reader/Xml.js +0 -292
  220. data/app/assets/javascripts/src/data/validations.js +0 -149
  221. data/app/assets/javascripts/src/data/writer/Json.js +0 -81
  222. data/app/assets/javascripts/src/data/writer/Writer.js +0 -147
  223. data/app/assets/javascripts/src/data/writer/Xml.js +0 -88
  224. data/app/assets/javascripts/src/dd/DD.js +0 -300
  225. data/app/assets/javascripts/src/dd/DDProxy.js +0 -204
  226. data/app/assets/javascripts/src/dd/DDTarget.js +0 -171
  227. data/app/assets/javascripts/src/dd/DragDrop.js +0 -1101
  228. data/app/assets/javascripts/src/dd/DragDropManager.js +0 -1264
  229. data/app/assets/javascripts/src/dd/DragSource.js +0 -392
  230. data/app/assets/javascripts/src/dd/DragTracker.js +0 -562
  231. data/app/assets/javascripts/src/dd/DragZone.js +0 -137
  232. data/app/assets/javascripts/src/dd/DropTarget.js +0 -118
  233. data/app/assets/javascripts/src/dd/DropZone.js +0 -254
  234. data/app/assets/javascripts/src/dd/Registry.js +0 -117
  235. data/app/assets/javascripts/src/dd/ScrollManager.js +0 -218
  236. data/app/assets/javascripts/src/dd/StatusProxy.js +0 -179
  237. data/app/assets/javascripts/src/diag/layout/Context.js +0 -523
  238. data/app/assets/javascripts/src/diag/layout/ContextItem.js +0 -179
  239. data/app/assets/javascripts/src/direct/Event.js +0 -35
  240. data/app/assets/javascripts/src/direct/ExceptionEvent.js +0 -16
  241. data/app/assets/javascripts/src/direct/JsonProvider.js +0 -82
  242. data/app/assets/javascripts/src/direct/Manager.js +0 -263
  243. data/app/assets/javascripts/src/direct/PollingProvider.js +0 -156
  244. data/app/assets/javascripts/src/direct/Provider.js +0 -96
  245. data/app/assets/javascripts/src/direct/RemotingEvent.js +0 -24
  246. data/app/assets/javascripts/src/direct/RemotingMethod.js +0 -100
  247. data/app/assets/javascripts/src/direct/RemotingProvider.js +0 -510
  248. data/app/assets/javascripts/src/direct/Transaction.js +0 -41
  249. data/app/assets/javascripts/src/dom/Element.alignment.js +0 -378
  250. data/app/assets/javascripts/src/dom/Element.anim.js +0 -962
  251. data/app/assets/javascripts/src/dom/Element.dd.js +0 -40
  252. data/app/assets/javascripts/src/dom/Element.fx.js +0 -194
  253. data/app/assets/javascripts/src/dom/Element.js +0 -1407
  254. data/app/assets/javascripts/src/dom/Element.position.js +0 -501
  255. data/app/assets/javascripts/src/dom/Element.scroll.js +0 -214
  256. data/app/assets/javascripts/src/dom/Element.style.js +0 -792
  257. data/app/assets/javascripts/src/dom/Element.traversal.js +0 -8
  258. data/app/assets/javascripts/src/dom/Helper.js +0 -466
  259. data/app/assets/javascripts/src/dom/Query.js +0 -1067
  260. data/app/assets/javascripts/src/draw/Color.js +0 -303
  261. data/app/assets/javascripts/src/draw/Component.js +0 -245
  262. data/app/assets/javascripts/src/draw/CompositeSprite.js +0 -299
  263. data/app/assets/javascripts/src/draw/Draw.js +0 -1217
  264. data/app/assets/javascripts/src/draw/Matrix.js +0 -183
  265. data/app/assets/javascripts/src/draw/Sprite.js +0 -554
  266. data/app/assets/javascripts/src/draw/SpriteDD.js +0 -87
  267. data/app/assets/javascripts/src/draw/Surface.js +0 -1001
  268. data/app/assets/javascripts/src/draw/Text.js +0 -175
  269. data/app/assets/javascripts/src/draw/engine/ImageExporter.js +0 -106
  270. data/app/assets/javascripts/src/draw/engine/Svg.js +0 -734
  271. data/app/assets/javascripts/src/draw/engine/SvgExporter.js +0 -280
  272. data/app/assets/javascripts/src/draw/engine/Vml.js +0 -916
  273. data/app/assets/javascripts/src/flash/Component.js +0 -248
  274. data/app/assets/javascripts/src/form/Basic.js +0 -1018
  275. data/app/assets/javascripts/src/form/CheckboxGroup.js +0 -441
  276. data/app/assets/javascripts/src/form/CheckboxManager.js +0 -26
  277. data/app/assets/javascripts/src/form/FieldAncestor.js +0 -210
  278. data/app/assets/javascripts/src/form/FieldContainer.js +0 -290
  279. data/app/assets/javascripts/src/form/FieldSet.js +0 -506
  280. data/app/assets/javascripts/src/form/Label.js +0 -110
  281. data/app/assets/javascripts/src/form/Labelable.js +0 -764
  282. data/app/assets/javascripts/src/form/Panel.js +0 -335
  283. data/app/assets/javascripts/src/form/RadioGroup.js +0 -124
  284. data/app/assets/javascripts/src/form/RadioManager.js +0 -26
  285. data/app/assets/javascripts/src/form/action/Action.js +0 -307
  286. data/app/assets/javascripts/src/form/action/DirectLoad.js +0 -107
  287. data/app/assets/javascripts/src/form/action/DirectSubmit.js +0 -119
  288. data/app/assets/javascripts/src/form/action/Load.js +0 -120
  289. data/app/assets/javascripts/src/form/action/StandardSubmit.js +0 -34
  290. data/app/assets/javascripts/src/form/action/Submit.js +0 -257
  291. data/app/assets/javascripts/src/form/field/Base.js +0 -813
  292. data/app/assets/javascripts/src/form/field/Checkbox.js +0 -505
  293. data/app/assets/javascripts/src/form/field/ComboBox.js +0 -1427
  294. data/app/assets/javascripts/src/form/field/Date.js +0 -578
  295. data/app/assets/javascripts/src/form/field/Display.js +0 -155
  296. data/app/assets/javascripts/src/form/field/Field.js +0 -430
  297. data/app/assets/javascripts/src/form/field/File.js +0 -265
  298. data/app/assets/javascripts/src/form/field/Hidden.js +0 -75
  299. data/app/assets/javascripts/src/form/field/HtmlEditor.js +0 -1439
  300. data/app/assets/javascripts/src/form/field/Number.js +0 -380
  301. data/app/assets/javascripts/src/form/field/Picker.js +0 -321
  302. data/app/assets/javascripts/src/form/field/Radio.js +0 -279
  303. data/app/assets/javascripts/src/form/field/Spinner.js +0 -321
  304. data/app/assets/javascripts/src/form/field/Text.js +0 -727
  305. data/app/assets/javascripts/src/form/field/TextArea.js +0 -228
  306. data/app/assets/javascripts/src/form/field/Time.js +0 -459
  307. data/app/assets/javascripts/src/form/field/Trigger.js +0 -469
  308. data/app/assets/javascripts/src/form/field/VTypes.js +0 -172
  309. data/app/assets/javascripts/src/fx/Anim.js +0 -472
  310. data/app/assets/javascripts/src/fx/Animator.js +0 -410
  311. data/app/assets/javascripts/src/fx/CubicBezier.js +0 -77
  312. data/app/assets/javascripts/src/fx/Easing.js +0 -136
  313. data/app/assets/javascripts/src/fx/Manager.js +0 -353
  314. data/app/assets/javascripts/src/fx/PropertyHandler.js +0 -381
  315. data/app/assets/javascripts/src/fx/Queue.js +0 -123
  316. data/app/assets/javascripts/src/fx/target/Component.js +0 -118
  317. data/app/assets/javascripts/src/fx/target/CompositeElement.js +0 -46
  318. data/app/assets/javascripts/src/fx/target/CompositeElementCSS.js +0 -22
  319. data/app/assets/javascripts/src/fx/target/CompositeSprite.js +0 -34
  320. data/app/assets/javascripts/src/fx/target/Element.js +0 -83
  321. data/app/assets/javascripts/src/fx/target/ElementCSS.js +0 -77
  322. data/app/assets/javascripts/src/fx/target/Sprite.js +0 -128
  323. data/app/assets/javascripts/src/fx/target/Target.js +0 -36
  324. data/app/assets/javascripts/src/grid/CellEditor.js +0 -172
  325. data/app/assets/javascripts/src/grid/ColumnComponentLayout.js +0 -34
  326. data/app/assets/javascripts/src/grid/ColumnLayout.js +0 -201
  327. data/app/assets/javascripts/src/grid/Lockable.js +0 -863
  328. data/app/assets/javascripts/src/grid/LockingView.js +0 -169
  329. data/app/assets/javascripts/src/grid/PagingScroller.js +0 -539
  330. data/app/assets/javascripts/src/grid/Panel.js +0 -393
  331. data/app/assets/javascripts/src/grid/RowEditor.js +0 -731
  332. data/app/assets/javascripts/src/grid/RowNumberer.js +0 -76
  333. data/app/assets/javascripts/src/grid/Scroller.js +0 -5
  334. data/app/assets/javascripts/src/grid/View.js +0 -44
  335. data/app/assets/javascripts/src/grid/ViewDropZone.js +0 -41
  336. data/app/assets/javascripts/src/grid/column/Action.js +0 -318
  337. data/app/assets/javascripts/src/grid/column/Boolean.js +0 -82
  338. data/app/assets/javascripts/src/grid/column/Column.js +0 -835
  339. data/app/assets/javascripts/src/grid/column/Date.js +0 -63
  340. data/app/assets/javascripts/src/grid/column/Number.js +0 -52
  341. data/app/assets/javascripts/src/grid/column/Template.js +0 -58
  342. data/app/assets/javascripts/src/grid/feature/AbstractSummary.js +0 -154
  343. data/app/assets/javascripts/src/grid/feature/Chunking.js +0 -77
  344. data/app/assets/javascripts/src/grid/feature/Feature.js +0 -158
  345. data/app/assets/javascripts/src/grid/feature/Grouping.js +0 -822
  346. data/app/assets/javascripts/src/grid/feature/GroupingSummary.js +0 -243
  347. data/app/assets/javascripts/src/grid/feature/RowBody.js +0 -116
  348. data/app/assets/javascripts/src/grid/feature/RowWrap.js +0 -120
  349. data/app/assets/javascripts/src/grid/feature/Summary.js +0 -167
  350. data/app/assets/javascripts/src/grid/header/Container.js +0 -965
  351. data/app/assets/javascripts/src/grid/header/DragZone.js +0 -69
  352. data/app/assets/javascripts/src/grid/header/DropZone.js +0 -265
  353. data/app/assets/javascripts/src/grid/plugin/CellEditing.js +0 -453
  354. data/app/assets/javascripts/src/grid/plugin/DragDrop.js +0 -254
  355. data/app/assets/javascripts/src/grid/plugin/Editing.js +0 -561
  356. data/app/assets/javascripts/src/grid/plugin/HeaderReorderer.js +0 -49
  357. data/app/assets/javascripts/src/grid/plugin/HeaderResizer.js +0 -292
  358. data/app/assets/javascripts/src/grid/plugin/RowEditing.js +0 -339
  359. data/app/assets/javascripts/src/grid/property/Grid.js +0 -351
  360. data/app/assets/javascripts/src/grid/property/HeaderContainer.js +0 -109
  361. data/app/assets/javascripts/src/grid/property/Property.js +0 -36
  362. data/app/assets/javascripts/src/grid/property/Store.js +0 -141
  363. data/app/assets/javascripts/src/layout/ClassList.js +0 -90
  364. data/app/assets/javascripts/src/layout/Context.js +0 -1232
  365. data/app/assets/javascripts/src/layout/ContextItem.js +0 -1470
  366. data/app/assets/javascripts/src/layout/Layout.js +0 -761
  367. data/app/assets/javascripts/src/layout/component/Auto.js +0 -220
  368. data/app/assets/javascripts/src/layout/component/Body.js +0 -80
  369. data/app/assets/javascripts/src/layout/component/BoundList.js +0 -95
  370. data/app/assets/javascripts/src/layout/component/Button.js +0 -261
  371. data/app/assets/javascripts/src/layout/component/Component.js +0 -427
  372. data/app/assets/javascripts/src/layout/component/Dock.js +0 -1132
  373. data/app/assets/javascripts/src/layout/component/Draw.js +0 -79
  374. data/app/assets/javascripts/src/layout/component/FieldSet.js +0 -62
  375. data/app/assets/javascripts/src/layout/component/ProgressBar.js +0 -54
  376. data/app/assets/javascripts/src/layout/component/Tab.js +0 -23
  377. data/app/assets/javascripts/src/layout/component/field/ComboBox.js +0 -52
  378. data/app/assets/javascripts/src/layout/component/field/Field.js +0 -372
  379. data/app/assets/javascripts/src/layout/component/field/FieldContainer.js +0 -48
  380. data/app/assets/javascripts/src/layout/component/field/HtmlEditor.js +0 -54
  381. data/app/assets/javascripts/src/layout/component/field/Slider.js +0 -58
  382. data/app/assets/javascripts/src/layout/component/field/Text.js +0 -75
  383. data/app/assets/javascripts/src/layout/component/field/TextArea.js +0 -51
  384. data/app/assets/javascripts/src/layout/component/field/Trigger.js +0 -132
  385. data/app/assets/javascripts/src/layout/container/Absolute.js +0 -121
  386. data/app/assets/javascripts/src/layout/container/Accordion.js +0 -308
  387. data/app/assets/javascripts/src/layout/container/Anchor.js +0 -403
  388. data/app/assets/javascripts/src/layout/container/Auto.js +0 -70
  389. data/app/assets/javascripts/src/layout/container/Border-old-js +0 -1079
  390. data/app/assets/javascripts/src/layout/container/Border.js +0 -816
  391. data/app/assets/javascripts/src/layout/container/Box.js +0 -929
  392. data/app/assets/javascripts/src/layout/container/Card.js +0 -361
  393. data/app/assets/javascripts/src/layout/container/CheckboxGroup.js +0 -376
  394. data/app/assets/javascripts/src/layout/container/Column.js +0 -234
  395. data/app/assets/javascripts/src/layout/container/Container.js +0 -961
  396. data/app/assets/javascripts/src/layout/container/Editor.js +0 -74
  397. data/app/assets/javascripts/src/layout/container/Fit.js +0 -287
  398. data/app/assets/javascripts/src/layout/container/Form.js +0 -157
  399. data/app/assets/javascripts/src/layout/container/HBox.js +0 -134
  400. data/app/assets/javascripts/src/layout/container/Table.js +0 -412
  401. data/app/assets/javascripts/src/layout/container/VBox.js +0 -139
  402. data/app/assets/javascripts/src/layout/container/boxOverflow/Menu.js +0 -365
  403. data/app/assets/javascripts/src/layout/container/boxOverflow/None.js +0 -83
  404. data/app/assets/javascripts/src/layout/container/boxOverflow/Scroller.js +0 -475
  405. data/app/assets/javascripts/src/menu/CheckItem.js +0 -169
  406. data/app/assets/javascripts/src/menu/ColorPicker.js +0 -110
  407. data/app/assets/javascripts/src/menu/DatePicker.js +0 -100
  408. data/app/assets/javascripts/src/menu/Item.js +0 -553
  409. data/app/assets/javascripts/src/menu/KeyNav.js +0 -134
  410. data/app/assets/javascripts/src/menu/Manager.js +0 -219
  411. data/app/assets/javascripts/src/menu/Menu.js +0 -579
  412. data/app/assets/javascripts/src/menu/Separator.js +0 -126
  413. data/app/assets/javascripts/src/panel/AbstractPanel.js +0 -323
  414. data/app/assets/javascripts/src/panel/DD.js +0 -99
  415. data/app/assets/javascripts/src/panel/Header.js +0 -518
  416. data/app/assets/javascripts/src/panel/Panel.js +0 -2150
  417. data/app/assets/javascripts/src/panel/Proxy.js +0 -131
  418. data/app/assets/javascripts/src/panel/Table.js +0 -1018
  419. data/app/assets/javascripts/src/panel/Tool.js +0 -304
  420. data/app/assets/javascripts/src/picker/Color.js +0 -219
  421. data/app/assets/javascripts/src/picker/Date.js +0 -1140
  422. data/app/assets/javascripts/src/picker/Month.js +0 -490
  423. data/app/assets/javascripts/src/picker/Time.js +0 -165
  424. data/app/assets/javascripts/src/resizer/BorderSplitter.js +0 -22
  425. data/app/assets/javascripts/src/resizer/BorderSplitterTracker.js +0 -210
  426. data/app/assets/javascripts/src/resizer/Handle.js +0 -29
  427. data/app/assets/javascripts/src/resizer/ResizeTracker.js +0 -346
  428. data/app/assets/javascripts/src/resizer/Resizer.js +0 -477
  429. data/app/assets/javascripts/src/resizer/Splitter.js +0 -242
  430. data/app/assets/javascripts/src/resizer/SplitterTracker.js +0 -230
  431. data/app/assets/javascripts/src/selection/CellModel.js +0 -395
  432. data/app/assets/javascripts/src/selection/CheckboxModel.js +0 -234
  433. data/app/assets/javascripts/src/selection/DataViewModel.js +0 -160
  434. data/app/assets/javascripts/src/selection/Model.js +0 -646
  435. data/app/assets/javascripts/src/selection/RowModel.js +0 -499
  436. data/app/assets/javascripts/src/selection/TreeModel.js +0 -78
  437. data/app/assets/javascripts/src/slider/Multi.js +0 -835
  438. data/app/assets/javascripts/src/slider/Single.js +0 -56
  439. data/app/assets/javascripts/src/slider/Thumb.js +0 -259
  440. data/app/assets/javascripts/src/slider/Tip.js +0 -130
  441. data/app/assets/javascripts/src/state/CookieProvider.js +0 -120
  442. data/app/assets/javascripts/src/state/LocalStorageProvider.js +0 -72
  443. data/app/assets/javascripts/src/state/Manager.js +0 -70
  444. data/app/assets/javascripts/src/state/Provider.js +0 -182
  445. data/app/assets/javascripts/src/state/Stateful.js +0 -364
  446. data/app/assets/javascripts/src/tab/Bar.js +0 -258
  447. data/app/assets/javascripts/src/tab/Panel.js +0 -654
  448. data/app/assets/javascripts/src/tab/Tab.js +0 -358
  449. data/app/assets/javascripts/src/tail.js +0 -10
  450. data/app/assets/javascripts/src/tip/QuickTip.js +0 -335
  451. data/app/assets/javascripts/src/tip/QuickTipManager.js +0 -239
  452. data/app/assets/javascripts/src/tip/Tip.js +0 -160
  453. data/app/assets/javascripts/src/tip/ToolTip.js +0 -691
  454. data/app/assets/javascripts/src/toolbar/Fill.js +0 -28
  455. data/app/assets/javascripts/src/toolbar/Item.js +0 -16
  456. data/app/assets/javascripts/src/toolbar/Paging.js +0 -600
  457. data/app/assets/javascripts/src/toolbar/Separator.js +0 -23
  458. data/app/assets/javascripts/src/toolbar/Spacer.js +0 -33
  459. data/app/assets/javascripts/src/toolbar/TextItem.js +0 -57
  460. data/app/assets/javascripts/src/toolbar/Toolbar-legacy.js +0 -123
  461. data/app/assets/javascripts/src/toolbar/Toolbar.js +0 -447
  462. data/app/assets/javascripts/src/tree/Column.js +0 -90
  463. data/app/assets/javascripts/src/tree/Panel.js +0 -505
  464. data/app/assets/javascripts/src/tree/View.js +0 -658
  465. data/app/assets/javascripts/src/tree/ViewDragZone.js +0 -49
  466. data/app/assets/javascripts/src/tree/ViewDropZone.js +0 -287
  467. data/app/assets/javascripts/src/tree/plugin/TreeViewDragDrop.js +0 -244
  468. data/app/assets/javascripts/src/util/AbstractMixedCollection.js +0 -772
  469. data/app/assets/javascripts/src/util/Animate.js +0 -426
  470. data/app/assets/javascripts/src/util/Bindable.js +0 -102
  471. data/app/assets/javascripts/src/util/CSS.js +0 -185
  472. data/app/assets/javascripts/src/util/ClickRepeater.js +0 -238
  473. data/app/assets/javascripts/src/util/ComponentDragger.js +0 -126
  474. data/app/assets/javascripts/src/util/Cookies.js +0 -91
  475. data/app/assets/javascripts/src/util/ElementContainer.js +0 -293
  476. data/app/assets/javascripts/src/util/Filter.js +0 -159
  477. data/app/assets/javascripts/src/util/Floating.js +0 -321
  478. data/app/assets/javascripts/src/util/Grouper.js +0 -26
  479. data/app/assets/javascripts/src/util/HashMap.js +0 -356
  480. data/app/assets/javascripts/src/util/History.js +0 -285
  481. data/app/assets/javascripts/src/util/Inflector.js +0 -297
  482. data/app/assets/javascripts/src/util/KeyMap.js +0 -427
  483. data/app/assets/javascripts/src/util/KeyNav.js +0 -239
  484. data/app/assets/javascripts/src/util/LruCache.js +0 -257
  485. data/app/assets/javascripts/src/util/Memento.js +0 -131
  486. data/app/assets/javascripts/src/util/MixedCollection.js +0 -239
  487. data/app/assets/javascripts/src/util/Observable.js +0 -1003
  488. data/app/assets/javascripts/src/util/Offset.js +0 -60
  489. data/app/assets/javascripts/src/util/Point.js +0 -93
  490. data/app/assets/javascripts/src/util/ProtoElement.js +0 -205
  491. data/app/assets/javascripts/src/util/Queue.js +0 -76
  492. data/app/assets/javascripts/src/util/Region.js +0 -388
  493. data/app/assets/javascripts/src/util/Renderable.js +0 -1079
  494. data/app/assets/javascripts/src/util/Sortable.js +0 -248
  495. data/app/assets/javascripts/src/util/Sorter.js +0 -179
  496. data/app/assets/javascripts/src/util/TextMetrics.js +0 -148
  497. data/app/assets/javascripts/src/view/AbstractView.js +0 -1103
  498. data/app/assets/javascripts/src/view/BoundList.js +0 -207
  499. data/app/assets/javascripts/src/view/BoundListKeyNav.js +0 -92
  500. data/app/assets/javascripts/src/view/DragZone.js +0 -106
  501. data/app/assets/javascripts/src/view/DropZone.js +0 -240
  502. data/app/assets/javascripts/src/view/Table.js +0 -1229
  503. data/app/assets/javascripts/src/view/TableChunker.js +0 -139
  504. data/app/assets/javascripts/src/view/View.js +0 -636
  505. data/app/assets/javascripts/src/window/MessageBox.js +0 -880
  506. data/app/assets/javascripts/src/window/Window-legacy.js +0 -56
  507. data/app/assets/javascripts/src/window/Window.js +0 -793
@@ -1,1264 +0,0 @@
1
- /*
2
- * This is a derivative of the similarly named class in the YUI Library.
3
- * The original license:
4
- * Copyright (c) 2006, Yahoo! Inc. All rights reserved.
5
- * Code licensed under the BSD License:
6
- * http://developer.yahoo.net/yui/license.txt
7
- */
8
-
9
-
10
- /**
11
- * DragDropManager is a singleton that tracks the element interaction for
12
- * all DragDrop items in the window. Generally, you will not call
13
- * this class directly, but it does have helper methods that could
14
- * be useful in your DragDrop implementations.
15
- */
16
- Ext.define('Ext.dd.DragDropManager', {
17
- singleton: true,
18
-
19
- requires: ['Ext.util.Region'],
20
-
21
- uses: ['Ext.tip.QuickTipManager'],
22
-
23
- // shorter ClassName, to save bytes and use internally
24
- alternateClassName: ['Ext.dd.DragDropMgr', 'Ext.dd.DDM'],
25
-
26
- /**
27
- * @property {String[]} ids
28
- * Two dimensional Array of registered DragDrop objects. The first
29
- * dimension is the DragDrop item group, the second the DragDrop
30
- * object.
31
- * @private
32
- */
33
- ids: {},
34
-
35
- /**
36
- * @property {String[]} handleIds
37
- * Array of element ids defined as drag handles. Used to determine
38
- * if the element that generated the mousedown event is actually the
39
- * handle and not the html element itself.
40
- * @private
41
- */
42
- handleIds: {},
43
-
44
- /**
45
- * @property {Ext.dd.DragDrop} dragCurrent
46
- * the DragDrop object that is currently being dragged
47
- * @private
48
- */
49
- dragCurrent: null,
50
-
51
- /**
52
- * @property {Ext.dd.DragDrop[]} dragOvers
53
- * the DragDrop object(s) that are being hovered over
54
- * @private
55
- */
56
- dragOvers: {},
57
-
58
- /**
59
- * @property {Number} deltaX
60
- * the X distance between the cursor and the object being dragged
61
- * @private
62
- */
63
- deltaX: 0,
64
-
65
- /**
66
- * @property {Number} deltaY
67
- * the Y distance between the cursor and the object being dragged
68
- * @private
69
- */
70
- deltaY: 0,
71
-
72
- /**
73
- * @property {Boolean} preventDefault
74
- * Flag to determine if we should prevent the default behavior of the
75
- * events we define. By default this is true, but this can be set to
76
- * false if you need the default behavior (not recommended)
77
- */
78
- preventDefault: true,
79
-
80
- /**
81
- * @property {Boolean} stopPropagation
82
- * Flag to determine if we should stop the propagation of the events
83
- * we generate. This is true by default but you may want to set it to
84
- * false if the html element contains other features that require the
85
- * mouse click.
86
- */
87
- stopPropagation: true,
88
-
89
- /**
90
- * Internal flag that is set to true when drag and drop has been
91
- * intialized
92
- * @property initialized
93
- * @private
94
- */
95
- initialized: false,
96
-
97
- /**
98
- * All drag and drop can be disabled.
99
- * @property locked
100
- * @private
101
- */
102
- locked: false,
103
-
104
- /**
105
- * Called the first time an element is registered.
106
- * @private
107
- */
108
- init: function() {
109
- this.initialized = true;
110
- },
111
-
112
- /**
113
- * @property {Number} POINT
114
- * In point mode, drag and drop interaction is defined by the
115
- * location of the cursor during the drag/drop
116
- */
117
- POINT: 0,
118
-
119
- /**
120
- * @property {Number} INTERSECT
121
- * In intersect mode, drag and drop interaction is defined by the
122
- * overlap of two or more drag and drop objects.
123
- */
124
- INTERSECT: 1,
125
-
126
- /**
127
- * @property {Number} mode
128
- * The current drag and drop mode. Default: POINT
129
- */
130
- mode: 0,
131
-
132
- /**
133
- * @property {Boolean} [notifyOccluded=false]
134
- * This config is only provided to provide old, usually unwanted drag/drop behaviour.
135
- *
136
- * From ExtJS 4.1.0 onwards, when drop targets are contained in floating, absolutely positioned elements
137
- * such as in {@link Ext.window.Window Windows}, which may overlap each other, `over` and `drop` events
138
- * are only delivered to the topmost drop target at the mouse position.
139
- *
140
- * If all targets below that in zIndex order should also receive notifications, set
141
- * `notifyOccluded` to `true`.
142
- */
143
- notifyOccluded: false,
144
-
145
- /**
146
- * Runs method on all drag and drop objects
147
- * @private
148
- */
149
- _execOnAll: function(sMethod, args) {
150
- var i, j, oDD;
151
- for (i in this.ids) {
152
- for (j in this.ids[i]) {
153
- oDD = this.ids[i][j];
154
- if (! this.isTypeOfDD(oDD)) {
155
- continue;
156
- }
157
- oDD[sMethod].apply(oDD, args);
158
- }
159
- }
160
- },
161
-
162
- /**
163
- * Drag and drop initialization. Sets up the global event handlers
164
- * @private
165
- */
166
- _onLoad: function() {
167
-
168
- this.init();
169
-
170
- var Event = Ext.EventManager;
171
- Event.on(document, "mouseup", this.handleMouseUp, this, true);
172
- Event.on(document, "mousemove", this.handleMouseMove, this, true);
173
- Event.on(window, "unload", this._onUnload, this, true);
174
- Event.on(window, "resize", this._onResize, this, true);
175
- // Event.on(window, "mouseout", this._test);
176
-
177
- },
178
-
179
- /**
180
- * Reset constraints on all drag and drop objs
181
- * @private
182
- */
183
- _onResize: function(e) {
184
- this._execOnAll("resetConstraints", []);
185
- },
186
-
187
- /**
188
- * Lock all drag and drop functionality
189
- */
190
- lock: function() { this.locked = true; },
191
-
192
- /**
193
- * Unlock all drag and drop functionality
194
- */
195
- unlock: function() { this.locked = false; },
196
-
197
- /**
198
- * Is drag and drop locked?
199
- * @return {Boolean} True if drag and drop is locked, false otherwise.
200
- */
201
- isLocked: function() { return this.locked; },
202
-
203
- /**
204
- * @property {Object} locationCache
205
- * Location cache that is set for all drag drop objects when a drag is
206
- * initiated, cleared when the drag is finished.
207
- * @private
208
- */
209
- locationCache: {},
210
-
211
- /**
212
- * @property {Boolean} useCache
213
- * Set useCache to false if you want to force object the lookup of each
214
- * drag and drop linked element constantly during a drag.
215
- */
216
- useCache: true,
217
-
218
- /**
219
- * @property {Number} clickPixelThresh
220
- * The number of pixels that the mouse needs to move after the
221
- * mousedown before the drag is initiated. Default=3;
222
- */
223
- clickPixelThresh: 3,
224
-
225
- /**
226
- * @property {Number} clickTimeThresh
227
- * The number of milliseconds after the mousedown event to initiate the
228
- * drag if we don't get a mouseup event. Default=350
229
- */
230
- clickTimeThresh: 350,
231
-
232
- /**
233
- * @property {Boolean} dragThreshMet
234
- * Flag that indicates that either the drag pixel threshold or the
235
- * mousdown time threshold has been met
236
- * @private
237
- */
238
- dragThreshMet: false,
239
-
240
- /**
241
- * @property {Object} clickTimeout
242
- * Timeout used for the click time threshold
243
- * @private
244
- */
245
- clickTimeout: null,
246
-
247
- /**
248
- * @property {Number} startX
249
- * The X position of the mousedown event stored for later use when a
250
- * drag threshold is met.
251
- * @private
252
- */
253
- startX: 0,
254
-
255
- /**
256
- * @property {Number} startY
257
- * The Y position of the mousedown event stored for later use when a
258
- * drag threshold is met.
259
- * @private
260
- */
261
- startY: 0,
262
-
263
- /**
264
- * Each DragDrop instance must be registered with the DragDropManager.
265
- * This is executed in DragDrop.init()
266
- * @param {Ext.dd.DragDrop} oDD the DragDrop object to register
267
- * @param {String} sGroup the name of the group this element belongs to
268
- */
269
- regDragDrop: function(oDD, sGroup) {
270
- if (!this.initialized) { this.init(); }
271
-
272
- if (!this.ids[sGroup]) {
273
- this.ids[sGroup] = {};
274
- }
275
- this.ids[sGroup][oDD.id] = oDD;
276
- },
277
-
278
- /**
279
- * Removes the supplied dd instance from the supplied group. Executed
280
- * by DragDrop.removeFromGroup, so don't call this function directly.
281
- * @private
282
- */
283
- removeDDFromGroup: function(oDD, sGroup) {
284
- if (!this.ids[sGroup]) {
285
- this.ids[sGroup] = {};
286
- }
287
-
288
- var obj = this.ids[sGroup];
289
- if (obj && obj[oDD.id]) {
290
- delete obj[oDD.id];
291
- }
292
- },
293
-
294
- /**
295
- * Unregisters a drag and drop item. This is executed in
296
- * DragDrop.unreg, use that method instead of calling this directly.
297
- * @private
298
- */
299
- _remove: function(oDD) {
300
- for (var g in oDD.groups) {
301
- if (g && this.ids[g] && this.ids[g][oDD.id]) {
302
- delete this.ids[g][oDD.id];
303
- }
304
- }
305
- delete this.handleIds[oDD.id];
306
- },
307
-
308
- /**
309
- * Each DragDrop handle element must be registered. This is done
310
- * automatically when executing DragDrop.setHandleElId()
311
- * @param {String} sDDId the DragDrop id this element is a handle for
312
- * @param {String} sHandleId the id of the element that is the drag
313
- * handle
314
- */
315
- regHandle: function(sDDId, sHandleId) {
316
- if (!this.handleIds[sDDId]) {
317
- this.handleIds[sDDId] = {};
318
- }
319
- this.handleIds[sDDId][sHandleId] = sHandleId;
320
- },
321
-
322
- /**
323
- * Utility function to determine if a given element has been
324
- * registered as a drag drop item.
325
- * @param {String} id the element id to check
326
- * @return {Boolean} true if this element is a DragDrop item,
327
- * false otherwise
328
- */
329
- isDragDrop: function(id) {
330
- return ( this.getDDById(id) ) ? true : false;
331
- },
332
-
333
- /**
334
- * Returns the drag and drop instances that are in all groups the
335
- * passed in instance belongs to.
336
- * @param {Ext.dd.DragDrop} p_oDD the obj to get related data for
337
- * @param {Boolean} bTargetsOnly if true, only return targetable objs
338
- * @return {Ext.dd.DragDrop[]} the related instances
339
- */
340
- getRelated: function(p_oDD, bTargetsOnly) {
341
- var oDDs = [],
342
- i, j, dd;
343
- for (i in p_oDD.groups) {
344
- for (j in this.ids[i]) {
345
- dd = this.ids[i][j];
346
- if (! this.isTypeOfDD(dd)) {
347
- continue;
348
- }
349
- if (!bTargetsOnly || dd.isTarget) {
350
- oDDs[oDDs.length] = dd;
351
- }
352
- }
353
- }
354
-
355
- return oDDs;
356
- },
357
-
358
- /**
359
- * Returns true if the specified dd target is a legal target for
360
- * the specifice drag obj
361
- * @param {Ext.dd.DragDrop} oDD the drag obj
362
- * @param {Ext.dd.DragDrop} oTargetDD the target
363
- * @return {Boolean} true if the target is a legal target for the
364
- * dd obj
365
- */
366
- isLegalTarget: function (oDD, oTargetDD) {
367
- var targets = this.getRelated(oDD, true),
368
- i, len;
369
- for (i=0, len=targets.length;i<len;++i) {
370
- if (targets[i].id == oTargetDD.id) {
371
- return true;
372
- }
373
- }
374
-
375
- return false;
376
- },
377
-
378
- /**
379
- * My goal is to be able to transparently determine if an object is
380
- * typeof DragDrop, and the exact subclass of DragDrop. typeof
381
- * returns "object", oDD.constructor.toString() always returns
382
- * "DragDrop" and not the name of the subclass. So for now it just
383
- * evaluates a well-known variable in DragDrop.
384
- * @param {Object} the object to evaluate
385
- * @return {Boolean} true if typeof oDD = DragDrop
386
- */
387
- isTypeOfDD: function (oDD) {
388
- return (oDD && oDD.__ygDragDrop);
389
- },
390
-
391
- /**
392
- * Utility function to determine if a given element has been
393
- * registered as a drag drop handle for the given Drag Drop object.
394
- * @param {String} id the element id to check
395
- * @return {Boolean} true if this element is a DragDrop handle, false
396
- * otherwise
397
- */
398
- isHandle: function(sDDId, sHandleId) {
399
- return ( this.handleIds[sDDId] &&
400
- this.handleIds[sDDId][sHandleId] );
401
- },
402
-
403
- /**
404
- * Returns the DragDrop instance for a given id
405
- * @param {String} id the id of the DragDrop object
406
- * @return {Ext.dd.DragDrop} the drag drop object, null if it is not found
407
- */
408
- getDDById: function(id) {
409
- var me = this,
410
- i, dd;
411
- for (i in this.ids) {
412
- dd = this.ids[i][id];
413
- if (dd instanceof Ext.dd.DDTarget) {
414
- return dd;
415
- }
416
- }
417
- return null;
418
- },
419
-
420
- /**
421
- * Fired after a registered DragDrop object gets the mousedown event.
422
- * Sets up the events required to track the object being dragged
423
- * @param {Event} e the event
424
- * @param {Ext.dd.DragDrop} oDD the DragDrop object being dragged
425
- * @private
426
- */
427
- handleMouseDown: function(e, oDD) {
428
- if(Ext.tip.QuickTipManager){
429
- Ext.tip.QuickTipManager.ddDisable();
430
- }
431
- if(this.dragCurrent){
432
- // the original browser mouseup wasn't handled (e.g. outside FF browser window)
433
- // so clean up first to avoid breaking the next drag
434
- this.handleMouseUp(e);
435
- }
436
-
437
- this.currentTarget = e.getTarget();
438
- this.dragCurrent = oDD;
439
-
440
- var el = oDD.getEl();
441
-
442
- // track start position
443
- this.startX = e.getPageX();
444
- this.startY = e.getPageY();
445
-
446
- this.deltaX = this.startX - el.offsetLeft;
447
- this.deltaY = this.startY - el.offsetTop;
448
-
449
- this.dragThreshMet = false;
450
-
451
- this.clickTimeout = setTimeout(
452
- function() {
453
- var DDM = Ext.dd.DragDropManager;
454
- DDM.startDrag(DDM.startX, DDM.startY);
455
- },
456
- this.clickTimeThresh );
457
- },
458
-
459
- /**
460
- * Fired when either the drag pixel threshol or the mousedown hold
461
- * time threshold has been met.
462
- * @param {Number} x the X position of the original mousedown
463
- * @param {Number} y the Y position of the original mousedown
464
- */
465
- startDrag: function(x, y) {
466
- clearTimeout(this.clickTimeout);
467
- if (this.dragCurrent) {
468
- this.dragCurrent.b4StartDrag(x, y);
469
- this.dragCurrent.startDrag(x, y);
470
- }
471
- this.dragThreshMet = true;
472
- },
473
-
474
- /**
475
- * Internal function to handle the mouseup event. Will be invoked
476
- * from the context of the document.
477
- * @param {Event} e the event
478
- * @private
479
- */
480
- handleMouseUp: function(e) {
481
-
482
- if(Ext.tip && Ext.tip.QuickTipManager){
483
- Ext.tip.QuickTipManager.ddEnable();
484
- }
485
- if (! this.dragCurrent) {
486
- return;
487
- }
488
-
489
- clearTimeout(this.clickTimeout);
490
-
491
- if (this.dragThreshMet) {
492
- this.fireEvents(e, true);
493
- }
494
-
495
- this.stopDrag(e);
496
-
497
- this.stopEvent(e);
498
- },
499
-
500
- /**
501
- * Utility to stop event propagation and event default, if these
502
- * features are turned on.
503
- * @param {Event} e the event as returned by this.getEvent()
504
- */
505
- stopEvent: function(e){
506
- if(this.stopPropagation) {
507
- e.stopPropagation();
508
- }
509
-
510
- if (this.preventDefault) {
511
- e.preventDefault();
512
- }
513
- },
514
-
515
- /**
516
- * Internal function to clean up event handlers after the drag
517
- * operation is complete
518
- * @param {Event} e the event
519
- * @private
520
- */
521
- stopDrag: function(e) {
522
- // Fire the drag end event for the item that was dragged
523
- if (this.dragCurrent) {
524
- if (this.dragThreshMet) {
525
- this.dragCurrent.b4EndDrag(e);
526
- this.dragCurrent.endDrag(e);
527
- }
528
-
529
- this.dragCurrent.onMouseUp(e);
530
- }
531
-
532
- this.dragCurrent = null;
533
- this.dragOvers = {};
534
- },
535
-
536
- /**
537
- * Internal function to handle the mousemove event. Will be invoked
538
- * from the context of the html element.
539
- *
540
- * @TODO figure out what we can do about mouse events lost when the
541
- * user drags objects beyond the window boundary. Currently we can
542
- * detect this in internet explorer by verifying that the mouse is
543
- * down during the mousemove event. Firefox doesn't give us the
544
- * button state on the mousemove event.
545
- *
546
- * @param {Event} e the event
547
- * @private
548
- */
549
- handleMouseMove: function(e) {
550
- if (! this.dragCurrent) {
551
- return true;
552
- }
553
- // var button = e.which || e.button;
554
-
555
- // check for IE mouseup outside of page boundary
556
- if (Ext.isIE && (e.button !== 0 && e.button !== 1 && e.button !== 2)) {
557
- this.stopEvent(e);
558
- return this.handleMouseUp(e);
559
- }
560
-
561
- var diffX, diffY;
562
-
563
- if (!this.dragThreshMet) {
564
- diffX = Math.abs(this.startX - e.getPageX());
565
- diffY = Math.abs(this.startY - e.getPageY());
566
- if (diffX > this.clickPixelThresh ||
567
- diffY > this.clickPixelThresh) {
568
- this.startDrag(this.startX, this.startY);
569
- }
570
- }
571
-
572
- if (this.dragThreshMet) {
573
- this.dragCurrent.b4Drag(e);
574
- this.dragCurrent.onDrag(e);
575
- if(!this.dragCurrent.moveOnly){
576
- this.fireEvents(e, false);
577
- }
578
- }
579
-
580
- this.stopEvent(e);
581
-
582
- return true;
583
- },
584
-
585
- /**
586
- * Iterates over all of the DragDrop elements to find ones we are
587
- * hovering over or dropping on
588
- * @param {Event} e the event
589
- * @param {Boolean} isDrop is this a drop op or a mouseover op?
590
- * @private
591
- */
592
- fireEvents: function(e, isDrop) {
593
- var me = this,
594
- dragCurrent = me.dragCurrent,
595
- mousePoint = e.getPoint(),
596
- overTarget,
597
- overTargetEl,
598
- allTargets = [],
599
- oldOvers = [], // cache the previous dragOver array
600
- outEvts = [],
601
- overEvts = [],
602
- dropEvts = [],
603
- enterEvts = [],
604
- needsSort,
605
- i,
606
- len,
607
- sGroup;
608
-
609
- // If the user did the mouse up outside of the window, we could
610
- // get here even though we have ended the drag.
611
- if (!dragCurrent || dragCurrent.isLocked()) {
612
- return;
613
- }
614
-
615
- // Check to see if the object(s) we were hovering over is no longer
616
- // being hovered over so we can fire the onDragOut event
617
- for (i in me.dragOvers) {
618
-
619
- overTarget = me.dragOvers[i];
620
-
621
- if (! me.isTypeOfDD(overTarget)) {
622
- continue;
623
- }
624
-
625
- if (! this.isOverTarget(mousePoint, overTarget, me.mode)) {
626
- outEvts.push( overTarget );
627
- }
628
-
629
- oldOvers[i] = true;
630
- delete me.dragOvers[i];
631
- }
632
-
633
- // Collect all targets which are members of the same ddGoups that the dragCurrent is a member of, and which may recieve mouseover and drop notifications.
634
- // This is preparatory to seeing which one(s) we are currently over
635
- // Begin by iterating through the ddGroups of which the dragCurrent is a member
636
- for (sGroup in dragCurrent.groups) {
637
-
638
- if ("string" != typeof sGroup) {
639
- continue;
640
- }
641
-
642
- // Loop over the registered members of each group, testing each as a potential target
643
- for (i in me.ids[sGroup]) {
644
- overTarget = me.ids[sGroup][i];
645
-
646
- // The target is valid if it is a DD type
647
- // And it's got a DOM element
648
- // And it's configured to be a drop target
649
- // And it's not locked
650
- // And the DOM element is fully visible with no hidden ancestors
651
- // And it's either not the dragCurrent, or, if it is, tha dragCurrent is configured to not ignore itself.
652
- if (me.isTypeOfDD(overTarget) &&
653
- (overTargetEl = overTarget.getEl()) &&
654
- (overTarget.isTarget) &&
655
- (!overTarget.isLocked()) &&
656
- (Ext.fly(overTargetEl).isVisible(true)) &&
657
- ((overTarget != dragCurrent) || (dragCurrent.ignoreSelf === false))) {
658
-
659
- // Only sort by zIndex if there were some which had a floating zIndex value
660
- if ((overTarget.zIndex = me.getZIndex(overTargetEl)) !== -1) {
661
- needsSort = true;
662
- }
663
- allTargets.push(overTarget);
664
- }
665
- }
666
- }
667
-
668
- // If there were floating targets, sort the highest zIndex to the top
669
- if (needsSort) {
670
- Ext.Array.sort(allTargets, me.byZIndex);
671
- }
672
-
673
- // Loop through possible targets, notifying the one(s) we are over.
674
- // Usually we only deliver events to the topmost.
675
- for (i = 0, len = allTargets.length; i < len; i++) {
676
- overTarget = allTargets[i];
677
-
678
- // If we are over the overTarget, queue it up to recieve an event of whatever type we are handling
679
- if (me.isOverTarget(mousePoint, overTarget, me.mode)) {
680
- // look for drop interactions
681
- if (isDrop) {
682
- dropEvts.push( overTarget );
683
- // look for drag enter and drag over interactions
684
- } else {
685
-
686
- // initial drag over: dragEnter fires
687
- if (!oldOvers[overTarget.id]) {
688
- enterEvts.push( overTarget );
689
- // subsequent drag overs: dragOver fires
690
- } else {
691
- overEvts.push( overTarget );
692
- }
693
- me.dragOvers[overTarget.id] = overTarget;
694
- }
695
-
696
- // Unless this DragDropManager has been explicitly configured to deliver events to multiple targets, then we are done.
697
- if (!me.notifyOccluded) {
698
- break;
699
- }
700
- }
701
- }
702
-
703
- if (me.mode) {
704
- if (outEvts.length) {
705
- dragCurrent.b4DragOut(e, outEvts);
706
- dragCurrent.onDragOut(e, outEvts);
707
- }
708
-
709
- if (enterEvts.length) {
710
- dragCurrent.onDragEnter(e, enterEvts);
711
- }
712
-
713
- if (overEvts.length) {
714
- dragCurrent.b4DragOver(e, overEvts);
715
- dragCurrent.onDragOver(e, overEvts);
716
- }
717
-
718
- if (dropEvts.length) {
719
- dragCurrent.b4DragDrop(e, dropEvts);
720
- dragCurrent.onDragDrop(e, dropEvts);
721
- }
722
-
723
- } else {
724
- // fire dragout events
725
- for (i=0, len=outEvts.length; i<len; ++i) {
726
- dragCurrent.b4DragOut(e, outEvts[i].id);
727
- dragCurrent.onDragOut(e, outEvts[i].id);
728
- }
729
-
730
- // fire enter events
731
- for (i=0,len=enterEvts.length; i<len; ++i) {
732
- // dc.b4DragEnter(e, oDD.id);
733
- dragCurrent.onDragEnter(e, enterEvts[i].id);
734
- }
735
-
736
- // fire over events
737
- for (i=0,len=overEvts.length; i<len; ++i) {
738
- dragCurrent.b4DragOver(e, overEvts[i].id);
739
- dragCurrent.onDragOver(e, overEvts[i].id);
740
- }
741
-
742
- // fire drop events
743
- for (i=0, len=dropEvts.length; i<len; ++i) {
744
- dragCurrent.b4DragDrop(e, dropEvts[i].id);
745
- dragCurrent.onDragDrop(e, dropEvts[i].id);
746
- }
747
-
748
- }
749
-
750
- // notify about a drop that did not find a target
751
- if (isDrop && !dropEvts.length) {
752
- dragCurrent.onInvalidDrop(e);
753
- }
754
-
755
- },
756
-
757
- /**
758
- * @private
759
- * Collects the z-index of the passed element, looking up the parentNode axis to find an absolutely positioned ancestor
760
- * which is able to yield a z-index. If found to be not absolutely positionedm returns -1.
761
- *
762
- * This is used when sorting potential drop targets into z-index order so that only the topmost receives `over` and `drop` events.
763
- *
764
- * @return {Number} The z-index of the element, or of its topmost absolutely positioned ancestor. Returns -1 if the element is not
765
- * absolutely positioned.
766
- */
767
- getZIndex: function(element) {
768
- var body = document.body,
769
- z,
770
- zIndex = -1;
771
-
772
- element = Ext.getDom(element);
773
- while (element !== body) {
774
- if (!isNaN(z = Number(Ext.fly(element).getStyle('zIndex')))) {
775
- zIndex = z;
776
- }
777
- element = element.parentNode;
778
- }
779
- return zIndex;
780
- },
781
-
782
- /**
783
- * @private
784
- * Utility method to pass to {@link Ext.Array#sort} when sorting potential drop targets by z-index.
785
- */
786
- byZIndex: function(d1, d2) {
787
- return d1.zIndex < d2.zIndex;
788
- },
789
-
790
- /**
791
- * Helper function for getting the best match from the list of drag
792
- * and drop objects returned by the drag and drop events when we are
793
- * in INTERSECT mode. It returns either the first object that the
794
- * cursor is over, or the object that has the greatest overlap with
795
- * the dragged element.
796
- * @param {Ext.dd.DragDrop[]} dds The array of drag and drop objects
797
- * targeted
798
- * @return {Ext.dd.DragDrop} The best single match
799
- */
800
- getBestMatch: function(dds) {
801
- var winner = null,
802
- len = dds.length,
803
- i, dd;
804
- // Return null if the input is not what we expect
805
- //if (!dds || !dds.length || dds.length == 0) {
806
- // winner = null;
807
- // If there is only one item, it wins
808
- //} else if (dds.length == 1) {
809
-
810
-
811
- if (len == 1) {
812
- winner = dds[0];
813
- } else {
814
- // Loop through the targeted items
815
- for (i=0; i<len; ++i) {
816
- dd = dds[i];
817
- // If the cursor is over the object, it wins. If the
818
- // cursor is over multiple matches, the first one we come
819
- // to wins.
820
- if (dd.cursorIsOver) {
821
- winner = dd;
822
- break;
823
- // Otherwise the object with the most overlap wins
824
- } else {
825
- if (!winner ||
826
- winner.overlap.getArea() < dd.overlap.getArea()) {
827
- winner = dd;
828
- }
829
- }
830
- }
831
- }
832
-
833
- return winner;
834
- },
835
-
836
- /**
837
- * Refreshes the cache of the top-left and bottom-right points of the
838
- * drag and drop objects in the specified group(s). This is in the
839
- * format that is stored in the drag and drop instance, so typical
840
- * usage is:
841
- *
842
- * Ext.dd.DragDropManager.refreshCache(ddinstance.groups);
843
- *
844
- * Alternatively:
845
- *
846
- * Ext.dd.DragDropManager.refreshCache({group1:true, group2:true});
847
- *
848
- * @TODO this really should be an indexed array. Alternatively this
849
- * method could accept both.
850
- *
851
- * @param {Object} groups an associative array of groups to refresh
852
- */
853
- refreshCache: function(groups) {
854
- var sGroup, i, oDD, loc;
855
- for (sGroup in groups) {
856
- if ("string" != typeof sGroup) {
857
- continue;
858
- }
859
- for (i in this.ids[sGroup]) {
860
- oDD = this.ids[sGroup][i];
861
-
862
- if (this.isTypeOfDD(oDD)) {
863
- // if (this.isTypeOfDD(oDD) && oDD.isTarget) {
864
- loc = this.getLocation(oDD);
865
- if (loc) {
866
- this.locationCache[oDD.id] = loc;
867
- } else {
868
- delete this.locationCache[oDD.id];
869
- // this will unregister the drag and drop object if
870
- // the element is not in a usable state
871
- // oDD.unreg();
872
- }
873
- }
874
- }
875
- }
876
- },
877
-
878
- /**
879
- * This checks to make sure an element exists and is in the DOM. The
880
- * main purpose is to handle cases where innerHTML is used to remove
881
- * drag and drop objects from the DOM. IE provides an 'unspecified
882
- * error' when trying to access the offsetParent of such an element
883
- * @param {HTMLElement} el the element to check
884
- * @return {Boolean} true if the element looks usable
885
- */
886
- verifyEl: function(el) {
887
- if (el) {
888
- var parent;
889
- if(Ext.isIE){
890
- try{
891
- parent = el.offsetParent;
892
- }catch(e){}
893
- }else{
894
- parent = el.offsetParent;
895
- }
896
- if (parent) {
897
- return true;
898
- }
899
- }
900
-
901
- return false;
902
- },
903
-
904
- /**
905
- * Returns a Region object containing the drag and drop element's position
906
- * and size, including the padding configured for it
907
- * @param {Ext.dd.DragDrop} oDD the drag and drop object to get the location for.
908
- * @return {Ext.util.Region} a Region object representing the total area
909
- * the element occupies, including any padding
910
- * the instance is configured for.
911
- */
912
- getLocation: function(oDD) {
913
- if (! this.isTypeOfDD(oDD)) {
914
- return null;
915
- }
916
-
917
- //delegate getLocation method to the
918
- //drag and drop target.
919
- if (oDD.getRegion) {
920
- return oDD.getRegion();
921
- }
922
-
923
- var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l;
924
-
925
- try {
926
- pos= Ext.Element.getXY(el);
927
- } catch (e) { }
928
-
929
- if (!pos) {
930
- return null;
931
- }
932
-
933
- x1 = pos[0];
934
- x2 = x1 + el.offsetWidth;
935
- y1 = pos[1];
936
- y2 = y1 + el.offsetHeight;
937
-
938
- t = y1 - oDD.padding[0];
939
- r = x2 + oDD.padding[1];
940
- b = y2 + oDD.padding[2];
941
- l = x1 - oDD.padding[3];
942
-
943
- return new Ext.util.Region(t, r, b, l);
944
- },
945
-
946
- /**
947
- * Checks the cursor location to see if it over the target
948
- * @param {Ext.util.Point} pt The point to evaluate
949
- * @param {Ext.dd.DragDrop} oTarget the DragDrop object we are inspecting
950
- * @return {Boolean} true if the mouse is over the target
951
- * @private
952
- */
953
- isOverTarget: function(pt, oTarget, intersect) {
954
- // use cache if available
955
- var loc = this.locationCache[oTarget.id],
956
- dc, pos, el, curRegion, overlap;
957
- if (!loc || !this.useCache) {
958
- loc = this.getLocation(oTarget);
959
- this.locationCache[oTarget.id] = loc;
960
-
961
- }
962
-
963
- if (!loc) {
964
- return false;
965
- }
966
-
967
- oTarget.cursorIsOver = loc.contains( pt );
968
-
969
- // DragDrop is using this as a sanity check for the initial mousedown
970
- // in this case we are done. In POINT mode, if the drag obj has no
971
- // contraints, we are also done. Otherwise we need to evaluate the
972
- // location of the target as related to the actual location of the
973
- // dragged element.
974
- dc = this.dragCurrent;
975
- if (!dc || !dc.getTargetCoord ||
976
- (!intersect && !dc.constrainX && !dc.constrainY)) {
977
- return oTarget.cursorIsOver;
978
- }
979
-
980
- oTarget.overlap = null;
981
-
982
- // Get the current location of the drag element, this is the
983
- // location of the mouse event less the delta that represents
984
- // where the original mousedown happened on the element. We
985
- // need to consider constraints and ticks as well.
986
- pos = dc.getTargetCoord(pt.x, pt.y);
987
-
988
- el = dc.getDragEl();
989
- curRegion = new Ext.util.Region(pos.y,
990
- pos.x + el.offsetWidth,
991
- pos.y + el.offsetHeight,
992
- pos.x );
993
-
994
- overlap = curRegion.intersect(loc);
995
-
996
- if (overlap) {
997
- oTarget.overlap = overlap;
998
- return (intersect) ? true : oTarget.cursorIsOver;
999
- } else {
1000
- return false;
1001
- }
1002
- },
1003
-
1004
- /**
1005
- * unload event handler
1006
- * @private
1007
- */
1008
- _onUnload: function(e, me) {
1009
- Ext.dd.DragDropManager.unregAll();
1010
- },
1011
-
1012
- /**
1013
- * Cleans up the drag and drop events and objects.
1014
- * @private
1015
- */
1016
- unregAll: function() {
1017
-
1018
- if (this.dragCurrent) {
1019
- this.stopDrag();
1020
- this.dragCurrent = null;
1021
- }
1022
-
1023
- this._execOnAll("unreg", []);
1024
-
1025
- for (var i in this.elementCache) {
1026
- delete this.elementCache[i];
1027
- }
1028
-
1029
- this.elementCache = {};
1030
- this.ids = {};
1031
- },
1032
-
1033
- /**
1034
- * @property {Object} elementCache
1035
- * A cache of DOM elements
1036
- * @private
1037
- */
1038
- elementCache: {},
1039
-
1040
- /**
1041
- * Get the wrapper for the DOM element specified
1042
- * @param {String} id the id of the element to get
1043
- * @return {Ext.dd.DragDropManager.ElementWrapper} the wrapped element
1044
- * @private
1045
- * @deprecated This wrapper isn't that useful
1046
- */
1047
- getElWrapper: function(id) {
1048
- var oWrapper = this.elementCache[id];
1049
- if (!oWrapper || !oWrapper.el) {
1050
- oWrapper = this.elementCache[id] =
1051
- new this.ElementWrapper(Ext.getDom(id));
1052
- }
1053
- return oWrapper;
1054
- },
1055
-
1056
- /**
1057
- * Returns the actual DOM element
1058
- * @param {String} id the id of the elment to get
1059
- * @return {Object} The element
1060
- * @deprecated use Ext.lib.Ext.getDom instead
1061
- */
1062
- getElement: function(id) {
1063
- return Ext.getDom(id);
1064
- },
1065
-
1066
- /**
1067
- * Returns the style property for the DOM element (i.e.,
1068
- * document.getElById(id).style)
1069
- * @param {String} id the id of the elment to get
1070
- * @return {Object} The style property of the element
1071
- */
1072
- getCss: function(id) {
1073
- var el = Ext.getDom(id);
1074
- return (el) ? el.style : null;
1075
- },
1076
-
1077
- /**
1078
- * @class Ext.dd.DragDropManager.ElementWrapper
1079
- * Deprecated inner class for cached elements.
1080
- * @private
1081
- * @deprecated This wrapper isn't that useful
1082
- */
1083
- ElementWrapper: function(el) {
1084
- /** The element */
1085
- this.el = el || null;
1086
- /** The element id */
1087
- this.id = this.el && el.id;
1088
- /** A reference to the style property */
1089
- this.css = this.el && el.style;
1090
- },
1091
-
1092
- // Continue class docs
1093
- /** @class Ext.dd.DragDropElement */
1094
-
1095
- /**
1096
- * Returns the X position of an html element
1097
- * @param {HTMLElement} el the element for which to get the position
1098
- * @return {Number} the X coordinate
1099
- */
1100
- getPosX: function(el) {
1101
- return Ext.Element.getX(el);
1102
- },
1103
-
1104
- /**
1105
- * Returns the Y position of an html element
1106
- * @param {HTMLElement} el the element for which to get the position
1107
- * @return {Number} the Y coordinate
1108
- */
1109
- getPosY: function(el) {
1110
- return Ext.Element.getY(el);
1111
- },
1112
-
1113
- /**
1114
- * Swap two nodes. In IE, we use the native method, for others we
1115
- * emulate the IE behavior
1116
- * @param {HTMLElement} n1 the first node to swap
1117
- * @param {HTMLElement} n2 the other node to swap
1118
- */
1119
- swapNode: function(n1, n2) {
1120
- if (n1.swapNode) {
1121
- n1.swapNode(n2);
1122
- } else {
1123
- var p = n2.parentNode,
1124
- s = n2.nextSibling;
1125
-
1126
- if (s == n1) {
1127
- p.insertBefore(n1, n2);
1128
- } else if (n2 == n1.nextSibling) {
1129
- p.insertBefore(n2, n1);
1130
- } else {
1131
- n1.parentNode.replaceChild(n2, n1);
1132
- p.insertBefore(n1, s);
1133
- }
1134
- }
1135
- },
1136
-
1137
- /**
1138
- * Returns the current scroll position
1139
- * @private
1140
- */
1141
- getScroll: function () {
1142
- var doc = window.document,
1143
- docEl = doc.documentElement,
1144
- body = doc.body,
1145
- top = 0,
1146
- left = 0;
1147
-
1148
- if (Ext.isGecko4) {
1149
- top = window.scrollYOffset;
1150
- left = window.scrollXOffset;
1151
- } else {
1152
- if (docEl && (docEl.scrollTop || docEl.scrollLeft)) {
1153
- top = docEl.scrollTop;
1154
- left = docEl.scrollLeft;
1155
- } else if (body) {
1156
- top = body.scrollTop;
1157
- left = body.scrollLeft;
1158
- }
1159
- }
1160
- return {
1161
- top: top,
1162
- left: left
1163
- };
1164
- },
1165
-
1166
- /**
1167
- * Returns the specified element style property
1168
- * @param {HTMLElement} el the element
1169
- * @param {String} styleProp the style property
1170
- * @return {String} The value of the style property
1171
- */
1172
- getStyle: function(el, styleProp) {
1173
- return Ext.fly(el).getStyle(styleProp);
1174
- },
1175
-
1176
- /**
1177
- * Gets the scrollTop
1178
- * @return {Number} the document's scrollTop
1179
- */
1180
- getScrollTop: function () {
1181
- return this.getScroll().top;
1182
- },
1183
-
1184
- /**
1185
- * Gets the scrollLeft
1186
- * @return {Number} the document's scrollTop
1187
- */
1188
- getScrollLeft: function () {
1189
- return this.getScroll().left;
1190
- },
1191
-
1192
- /**
1193
- * Sets the x/y position of an element to the location of the
1194
- * target element.
1195
- * @param {HTMLElement} moveEl The element to move
1196
- * @param {HTMLElement} targetEl The position reference element
1197
- */
1198
- moveToEl: function (moveEl, targetEl) {
1199
- var aCoord = Ext.Element.getXY(targetEl);
1200
- Ext.Element.setXY(moveEl, aCoord);
1201
- },
1202
-
1203
- /**
1204
- * Numeric array sort function
1205
- * @param {Number} a
1206
- * @param {Number} b
1207
- * @returns {Number} positive, negative or 0
1208
- */
1209
- numericSort: function(a, b) {
1210
- return (a - b);
1211
- },
1212
-
1213
- /**
1214
- * @property {Number} _timeoutCount
1215
- * Internal counter
1216
- * @private
1217
- */
1218
- _timeoutCount: 0,
1219
-
1220
- /**
1221
- * Trying to make the load order less important. Without this we get
1222
- * an error if this file is loaded before the Event Utility.
1223
- * @private
1224
- */
1225
- _addListeners: function() {
1226
- if ( document ) {
1227
- this._onLoad();
1228
- } else {
1229
- if (this._timeoutCount <= 2000) {
1230
- setTimeout(this._addListeners, 10);
1231
- if (document && document.body) {
1232
- this._timeoutCount += 1;
1233
- }
1234
- }
1235
- }
1236
- },
1237
-
1238
- /**
1239
- * Recursively searches the immediate parent and all child nodes for
1240
- * the handle element in order to determine wheter or not it was
1241
- * clicked.
1242
- * @param {HTMLElement} node the html element to inspect
1243
- */
1244
- handleWasClicked: function(node, id) {
1245
- if (this.isHandle(id, node.id)) {
1246
- return true;
1247
- } else {
1248
- // check to see if this is a text node child of the one we want
1249
- var p = node.parentNode;
1250
-
1251
- while (p) {
1252
- if (this.isHandle(id, p.id)) {
1253
- return true;
1254
- } else {
1255
- p = p.parentNode;
1256
- }
1257
- }
1258
- }
1259
-
1260
- return false;
1261
- }
1262
- }, function() {
1263
- this._addListeners();
1264
- });