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,1550 +0,0 @@
1
- describe("Ext", function() {
2
-
3
- describe("Ext.global", function() {
4
- it("should return the global scope", function() {
5
- expect(Ext.global).toBe((function(){ return this;}).call());
6
- });
7
- });
8
-
9
- describe("Ext.apply", function() {
10
- var origin, o;
11
-
12
- beforeEach(function() {
13
- origin = {
14
- name: 'value',
15
- something: 'cool',
16
- items: [1,2,3],
17
- method: function() {
18
- this.myMethodCalled = true;
19
- },
20
- toString: function() {
21
- this.myToStringCalled = true;
22
- }
23
- };
24
- });
25
-
26
- it("should copy normal properties", function() {
27
- Ext.apply(origin, {
28
- name: 'newName',
29
- items: [4,5,6],
30
- otherThing: 'not cool',
31
- isCool: false
32
- });
33
-
34
- expect(origin.name).toEqual('newName');
35
- expect(origin.items).toEqual([4,5,6]);
36
- expect(origin.something).toEqual('cool');
37
- expect(origin.otherThing).toEqual('not cool');
38
- expect(origin.isCool).toEqual(false);
39
- });
40
-
41
- it("should copy functions", function() {
42
- Ext.apply(origin, {
43
- method: function() {
44
- this.newMethodCalled = true;
45
- }
46
- });
47
-
48
- origin.method();
49
-
50
- expect(origin.myMethodCalled).not.toBeDefined();
51
- expect(origin.newMethodCalled).toBeTruthy();
52
- });
53
-
54
- it("should copy non-enumerables", function() {
55
- Ext.apply(origin, {
56
- toString: function() {
57
- this.newToStringCalled = true;
58
- }
59
- });
60
-
61
- origin.toString();
62
-
63
- expect(origin.myToStringCalled).not.toBeDefined();
64
- expect(origin.newToStringCalled).toBeTruthy();
65
- });
66
-
67
- it("should apply properties and return an object", function() {
68
- o = Ext.apply({}, {
69
- foo: 1,
70
- bar: 2
71
- });
72
-
73
- expect(o).toEqual({
74
- foo: 1,
75
- bar: 2
76
- });
77
- });
78
-
79
- it("should change the reference of the object", function() {
80
- o = {};
81
- Ext.apply(o, {
82
- opt1: 'x',
83
- opt2: 'y'
84
- });
85
-
86
- expect(o).toEqual({
87
- opt1: 'x',
88
- opt2: 'y'
89
- });
90
- });
91
-
92
- it("should overwrite properties", function() {
93
- o = Ext.apply({
94
- foo: 1,
95
- baz: 4
96
- }, {
97
- foo: 2,
98
- bar: 3
99
- });
100
-
101
- expect(o).toEqual({
102
- foo: 2,
103
- bar: 3,
104
- baz: 4
105
- });
106
- });
107
-
108
- it("should use default", function() {
109
- o = {};
110
-
111
- Ext.apply(o, {
112
- foo: 'new',
113
- exist: true
114
- }, {
115
- foo: 'old',
116
- def: true
117
- });
118
-
119
- expect(o).toEqual({
120
- foo: 'new',
121
- def: true,
122
- exist: true
123
- });
124
- });
125
-
126
- it("should override all defaults", function() {
127
- o = Ext.apply({}, {
128
- foo: 'foo',
129
- bar: 'bar'
130
- }, {
131
- foo: 'oldFoo',
132
- bar: 'oldBar'
133
- });
134
-
135
- expect(o).toEqual( {
136
- foo: 'foo',
137
- bar: 'bar'
138
- });
139
- });
140
-
141
- it("should return null if null is passed as first argument", function() {
142
- expect(Ext.apply(null, {})).toBeNull();
143
- });
144
-
145
- it("should return the object if second argument is not defined", function() {
146
- o = {
147
- foo: 1
148
- };
149
- expect(Ext.apply(o)).toEqual(o);
150
- });
151
-
152
- it("should override valueOf", function() {
153
- o = Ext.apply({}, {valueOf: 1});
154
-
155
- expect(o.valueOf).toEqual(1);
156
- });
157
-
158
- it("should override toString", function() {
159
- o = Ext.apply({}, {toString: 3});
160
-
161
- expect(o.toString).toEqual(3);
162
-
163
- });
164
- });
165
-
166
- describe("Ext.emptyFn", function() {
167
- it("should return undefined without params", function() {
168
- expect(Ext.emptyFn()).toBeUndefined();
169
- });
170
-
171
- it("should return undefined if you pass params", function() {
172
- expect(Ext.emptyFn('aaaa', 'bbbbb')).toBeUndefined();
173
- });
174
- });
175
-
176
- describe("Ext.iterate", function() {
177
- var itFn;
178
-
179
- beforeEach(function() {
180
- itFn = jasmine.createSpy();
181
- });
182
-
183
- describe("iterate object", function() {
184
- var o;
185
-
186
- beforeEach(function() {
187
- o = {
188
- n1: 11,
189
- n2: 13,
190
- n3: 18
191
- };
192
- });
193
-
194
- describe("if itFn does not return false", function() {
195
- beforeEach(function() {
196
- Ext.iterate(o, itFn);
197
- });
198
-
199
- it("should call the iterate function 3 times", function () {
200
- expect(itFn.callCount).toEqual(3);
201
- });
202
-
203
- it("should call the iterate function with correct arguments", function () {
204
- expect(itFn.calls[0].args).toEqual(["n1", 11, o]);
205
- expect(itFn.calls[1].args).toEqual(["n2", 13, o]);
206
- expect(itFn.calls[2].args).toEqual(["n3", 18, o]);
207
- });
208
- });
209
-
210
- describe("if itFn return false", function() {
211
- beforeEach(function() {
212
- itFn.andReturn(false);
213
- Ext.iterate(o, itFn);
214
- });
215
-
216
- it("should stop iteration if function return false", function() {
217
- itFn.andReturn(false);
218
-
219
- expect(itFn.calls.length).toEqual(1);
220
- });
221
- });
222
- });
223
-
224
- describe("do nothing on an empty object", function() {
225
- var o;
226
-
227
- beforeEach(function() {
228
- o = {};
229
- Ext.iterate(o, itFn);
230
- });
231
-
232
- it("should not call the iterate function", function () {
233
- expect(itFn).not.toHaveBeenCalled();
234
- });
235
-
236
- });
237
-
238
- describe("iterate array", function() {
239
- var arr;
240
-
241
- beforeEach(function() {
242
- arr = [6, 7, 8, 9];
243
- });
244
-
245
- describe("if itFn does not return false", function() {
246
- beforeEach(function() {
247
- Ext.iterate(arr, itFn);
248
- });
249
-
250
- it("should call the iterate function 4 times", function () {
251
- expect(itFn.callCount).toEqual(4);
252
- });
253
-
254
- it("should call the iterate function with correct arguments", function () {
255
- expect(itFn.calls[0].args).toEqual([6, 0, arr]);
256
- expect(itFn.calls[1].args).toEqual([7, 1, arr]);
257
- expect(itFn.calls[2].args).toEqual([8, 2, arr]);
258
- expect(itFn.calls[3].args).toEqual([9, 3, arr]);
259
- });
260
- });
261
-
262
- describe("if itFn return false", function() {
263
- beforeEach(function() {
264
- itFn.andReturn(false);
265
- Ext.iterate(arr, itFn);
266
- });
267
-
268
- it("should stop iteration if function return false", function() {
269
- itFn.andReturn(false);
270
-
271
- expect(itFn.calls.length).toEqual(1);
272
- });
273
- });
274
- });
275
-
276
- describe("do nothing on an empty array", function() {
277
- var arr;
278
-
279
- beforeEach(function() {
280
- arr = [];
281
- Ext.iterate(arr, itFn);
282
- });
283
-
284
- it("should not call the iterate function", function () {
285
- expect(itFn).not.toHaveBeenCalled();
286
- });
287
-
288
- });
289
- });
290
-
291
- describe("Ext.applyIf", function(){
292
- var o;
293
-
294
- it("should apply properties and return an object with an empty destination object", function() {
295
- o = Ext.applyIf({}, {
296
- foo: 'foo',
297
- bar: 'bar'
298
- });
299
-
300
- expect(o).toEqual( {
301
- foo: 'foo',
302
- bar: 'bar'
303
- });
304
- });
305
-
306
- it("should not override default properties", function() {
307
- o = Ext.applyIf({
308
- foo: 'foo'
309
- }, {
310
- foo: 'oldFoo'
311
- });
312
-
313
- expect(o).toEqual({
314
- foo: 'foo'
315
- });
316
- });
317
-
318
- it("should not override default properties with mixing properties", function() {
319
- o = Ext.applyIf({
320
- foo: 1,
321
- bar: 2
322
- }, {
323
- bar: 3,
324
- baz: 4
325
- });
326
-
327
- expect(o).toEqual({
328
- foo: 1,
329
- bar: 2,
330
- baz: 4
331
- });
332
- });
333
-
334
- it("should change the reference of the object", function() {
335
- o = {};
336
- Ext.applyIf(o, {
337
- foo: 2
338
- }, {
339
- foo: 1
340
- });
341
-
342
- expect(o).toEqual({
343
- foo: 2
344
- });
345
- });
346
-
347
- it("should return null if null is passed as first argument", function() {
348
- expect(Ext.applyIf(null, {})).toBeNull();
349
- });
350
-
351
- it("should return the object if second argument is no defined", function() {
352
- o = {
353
- foo: 1
354
- };
355
-
356
- expect(Ext.applyIf(o)).toEqual(o);
357
- });
358
- });
359
-
360
-
361
- describe("Ext.extend", function() {
362
- var Dude, Awesome, david;
363
-
364
- beforeEach(function() {
365
- Dude = Ext.extend(Object, {
366
- constructor: function(config){
367
- Ext.apply(this, config);
368
- this.isBadass = false;
369
- }
370
- });
371
-
372
- Awesome = Ext.extend(Dude, {
373
- constructor: function(){
374
- Awesome.superclass.constructor.apply(this, arguments);
375
- this.isBadass = true;
376
- }
377
- });
378
-
379
- david = new Awesome({
380
- davis: 'isAwesome'
381
- });
382
- });
383
-
384
- it("should throw an error if superclass isn't defined", function() {
385
- expect(function() {
386
- Ext.extend(undefined, {});
387
- }).toThrow("Attempting to extend from a class which has not been loaded on the page.");
388
- });
389
-
390
- it("should create a superclass that return the original classe", function() {
391
- expect(david.superclass).toEqual(Dude.prototype);
392
- });
393
-
394
- it("should add override method", function() {
395
- expect(typeof david.override === 'function').toBe(true);
396
- });
397
-
398
- it("should override redefined methods", function() {
399
- expect(david.isBadass).toBe(true);
400
- });
401
-
402
- it("should keep new properties", function() {
403
- expect(david.davis).toEqual('isAwesome');
404
- });
405
- });
406
-
407
- describe("Ext.override", function(){
408
- var Dude,
409
- extApplySpy;
410
-
411
- beforeEach(function(){
412
- Dude = function(){}; // avoid to directly override Object class
413
- extApplySpy = spyOn(Ext, "apply");
414
- });
415
-
416
- it("should apply override", function(){
417
- var override = {foo: true};
418
-
419
- Ext.override(Dude, override);
420
-
421
- expect(extApplySpy).toHaveBeenCalledWith(Dude.prototype, override);
422
- });
423
- });
424
-
425
- describe("Ext.valueFrom", function() {
426
- var value, defaultValue;
427
-
428
- describe("with allowBlank", function() {
429
- describe("and an empty string", function() {
430
- it("should return the value", function() {
431
- expect(Ext.valueFrom('', 'aaa', true)).toBe('');
432
- });
433
- });
434
-
435
- describe("and a string", function() {
436
- it("should return the value", function() {
437
- expect(Ext.valueFrom('bbb', 'aaa', true)).toBe('bbb');
438
- });
439
- });
440
-
441
- describe("and an undefined value", function() {
442
- it("should return the default value", function() {
443
- expect(Ext.valueFrom(undefined, 'aaa', true)).toBe('aaa');
444
- });
445
- });
446
-
447
- describe("and a null value", function() {
448
- it("should return the default value", function() {
449
- expect(Ext.valueFrom(null, 'aaa', true)).toBe('aaa');
450
- });
451
- });
452
-
453
- describe("and a 0 value", function() {
454
- it("should return the value", function() {
455
- expect(Ext.valueFrom(0, 'aaa', true)).toBe(0);
456
- });
457
- });
458
- });
459
-
460
- describe("without allowBlank", function() {
461
- describe("and an empty string", function() {
462
- it("should return the default value", function() {
463
- expect(Ext.valueFrom('', 'aaa')).toBe('aaa');
464
- });
465
- });
466
-
467
- describe("and a string", function() {
468
- it("should return the value", function() {
469
- expect(Ext.valueFrom('bbb', 'aaa')).toBe('bbb');
470
- });
471
- });
472
-
473
- describe("and an undefined value", function() {
474
- it("should return the default value", function() {
475
- expect(Ext.valueFrom(undefined, 'aaa')).toBe('aaa');
476
- });
477
- });
478
-
479
- describe("and a null value", function() {
480
- it("should return the default value", function() {
481
- expect(Ext.valueFrom(null, 'aaa')).toBe('aaa');
482
- });
483
- });
484
-
485
- describe("and a 0 value", function() {
486
- it("should return the value", function() {
487
- expect(Ext.valueFrom(0, 'aaa')).toBe(0);
488
- });
489
- });
490
- });
491
- });
492
-
493
- describe("Ext.typeOf", function() {
494
-
495
- it("should return null", function() {
496
- expect(Ext.typeOf(null)).toEqual('null');
497
- });
498
-
499
- it("should return undefined", function() {
500
- expect(Ext.typeOf(undefined)).toEqual('undefined');
501
- expect(Ext.typeOf(window.someWeirdPropertyThatDoesntExist)).toEqual('undefined');
502
- });
503
-
504
-
505
- it("should return string", function() {
506
- expect(Ext.typeOf('')).toEqual('string');
507
- expect(Ext.typeOf('something')).toEqual('string');
508
- expect(Ext.typeOf('1.2')).toEqual('string');
509
- });
510
-
511
- it("should return number", function() {
512
- expect(Ext.typeOf(1)).toEqual('number');
513
- expect(Ext.typeOf(1.2)).toEqual('number');
514
- expect(Ext.typeOf(new Number(1.2))).toEqual('number');
515
- });
516
-
517
-
518
- it("should return boolean", function() {
519
- expect(Ext.typeOf(true)).toEqual('boolean');
520
- expect(Ext.typeOf(false)).toEqual('boolean');
521
- expect(Ext.typeOf(new Boolean(true))).toEqual('boolean');
522
- });
523
-
524
-
525
- it("should return array", function() {
526
- expect(Ext.typeOf([1,2,3])).toEqual('array');
527
- expect(Ext.typeOf(new Array(1,2,3))).toEqual('array');
528
- });
529
-
530
- it("should return function", function() {
531
- expect(Ext.typeOf(function(){})).toEqual('function');
532
- expect(Ext.typeOf(new Function())).toEqual('function');
533
- expect(Ext.typeOf(Object)).toEqual('function');
534
- expect(Ext.typeOf(Array)).toEqual('function');
535
- expect(Ext.typeOf(Number)).toEqual('function');
536
- expect(Ext.typeOf(Function)).toEqual('function');
537
- expect(Ext.typeOf(Boolean)).toEqual('function');
538
- expect(Ext.typeOf(String)).toEqual('function');
539
- expect(Ext.typeOf(Date)).toEqual('function');
540
- expect(Ext.typeOf(Ext.typeOf)).toEqual('function');
541
-
542
- // In IE certain native functions come back as objects, e.g. alert, prompt and document.getElementById. It
543
- // isn't clear exactly what correct behaviour should be in those cases as attempting to treat them like
544
- // normal functions can causes various problems. Some, like document.getElementBy, have call and apply
545
- // methods so in most cases will behave like any other function. It might be possible to detect them by
546
- // using something like this:
547
- //
548
- // if (typeof obj === 'object' && !obj.toString && obj.call && obj.apply && (obj + '')) {...}
549
- });
550
-
551
- it("should return regexp", function() {
552
- expect(Ext.typeOf(/test/)).toEqual('regexp');
553
- expect(Ext.typeOf(new RegExp('test'))).toEqual('regexp');
554
- });
555
-
556
- it("should return date", function() {
557
- expect(Ext.typeOf(new Date())).toEqual('date');
558
- });
559
-
560
- it("should return textnode", function() {
561
- expect(Ext.typeOf(document.createTextNode('tada'))).toEqual('textnode');
562
- expect(Ext.typeOf(document.createTextNode(' '))).toEqual('whitespace');
563
- expect(Ext.typeOf(document.createTextNode(' '))).toEqual('whitespace');
564
- });
565
-
566
- it("should return element", function() {
567
- expect(Ext.typeOf(document.getElementsByTagName('body')[0])).toEqual('element');
568
- expect(Ext.typeOf(document.createElement('button'))).toEqual('element');
569
- expect(Ext.typeOf(new Image())).toEqual('element');
570
- });
571
-
572
- it("should return object", function() {
573
- expect(Ext.typeOf({some: 'stuff'})).toEqual('object');
574
- expect(Ext.typeOf(new Object())).toEqual('object');
575
- expect(Ext.typeOf(window)).toEqual('object');
576
- });
577
-
578
- });
579
-
580
- describe("Ext.isIterable", function() {
581
- it("should return true with empty array", function() {
582
- expect(Ext.isIterable([])).toBe(true);
583
- });
584
-
585
- it("should return true with filled array", function() {
586
- expect(Ext.isIterable([1, 2, 3, 4])).toBe(true);
587
- });
588
-
589
- it("should return false with boolean true", function() {
590
- expect(Ext.isIterable(true)).toBe(false);
591
- });
592
-
593
- it("should return false with boolean false", function() {
594
- expect(Ext.isIterable(false)).toBe(false);
595
- });
596
-
597
- it("should return false with string", function() {
598
- expect(Ext.isIterable("foo")).toBe(false);
599
- });
600
-
601
- it("should return false with empty string", function() {
602
- expect(Ext.isIterable("")).toBe(false);
603
- });
604
-
605
- it("should return false with number", function() {
606
- expect(Ext.isIterable(1)).toBe(false);
607
- });
608
-
609
- it("should return false with null", function() {
610
- expect(Ext.isIterable(null)).toBe(false);
611
- });
612
-
613
- it("should return false with undefined", function() {
614
- expect(Ext.isIterable(undefined)).toBe(false);
615
- });
616
-
617
- it("should return false with date", function() {
618
- expect(Ext.isIterable(new Date())).toBe(false);
619
- });
620
-
621
- it("should return false with empty object", function() {
622
- expect(Ext.isIterable({})).toBe(false);
623
- });
624
-
625
- it("should return true with node list", function() {
626
- expect(Ext.isIterable(document.getElementsByTagName('body'))).toBe(true);
627
- });
628
-
629
- it("should return true with html collection", function() {
630
- expect(Ext.isIterable(document.images)).toBe(true);
631
- });
632
-
633
- it("should return false for a function", function(){
634
- expect(Ext.isIterable(function(){})).toBe(false);
635
- });
636
- });
637
-
638
- describe("Ext.isArray", function() {
639
- it("should return true with empty array", function() {
640
- expect(Ext.isArray([])).toBe(true);
641
- });
642
-
643
- it("should return true with filled array", function() {
644
- expect(Ext.isArray([1, 2, 3, 4])).toBe(true);
645
- });
646
-
647
- it("should return false with boolean true", function() {
648
- expect(Ext.isArray(true)).toBe(false);
649
- });
650
-
651
- it("should return false with boolean false", function() {
652
- expect(Ext.isArray(false)).toBe(false);
653
- });
654
-
655
- it("should return false with string", function() {
656
- expect(Ext.isArray("foo")).toBe(false);
657
- });
658
-
659
- it("should return false with empty string", function() {
660
- expect(Ext.isArray("")).toBe(false);
661
- });
662
-
663
- it("should return false with number", function() {
664
- expect(Ext.isArray(1)).toBe(false);
665
- });
666
-
667
- it("should return false with null", function() {
668
- expect(Ext.isArray(null)).toBe(false);
669
- });
670
-
671
- it("should return false with undefined", function() {
672
- expect(Ext.isArray(undefined)).toBe(false);
673
- });
674
-
675
- it("should return false with date", function() {
676
- expect(Ext.isArray(new Date())).toBe(false);
677
- });
678
-
679
- it("should return false with empty object", function() {
680
- expect(Ext.isArray({})).toBe(false);
681
- });
682
-
683
- it("should return false with node list", function() {
684
- expect(Ext.isArray(document.getElementsByTagName('body'))).toBe(false);
685
- });
686
-
687
- it("should return false with custom class that has a length property", function() {
688
- var C = Ext.extend(Object, {
689
- length: 1
690
- });
691
- expect(Ext.isArray(new C())).toBe(false);
692
- });
693
-
694
- it("should return false with element", function() {
695
- expect(Ext.isArray(Ext.getBody().dom)).toBe(false);
696
- });
697
- });
698
-
699
- describe("Ext.isBoolean", function() {
700
- it("should return false with empty array", function() {
701
- expect(Ext.isBoolean([])).toBe(false);
702
- });
703
-
704
- it("should return false with filled array", function() {
705
- expect(Ext.isBoolean([1, 2, 3, 4])).toBe(false);
706
- });
707
-
708
- it("should return true with boolean true", function() {
709
- expect(Ext.isBoolean(true)).toBe(true);
710
- });
711
-
712
- it("should return true with boolean false", function() {
713
- expect(Ext.isBoolean(false)).toBe(true);
714
- });
715
-
716
- it("should return false with string", function() {
717
- expect(Ext.isBoolean("foo")).toBe(false);
718
- });
719
-
720
- it("should return false with empty string", function() {
721
- expect(Ext.isBoolean("")).toBe(false);
722
- });
723
-
724
- it("should return false with number", function() {
725
- expect(Ext.isBoolean(1)).toBe(false);
726
- });
727
-
728
- it("should return false with null", function() {
729
- expect(Ext.isBoolean(null)).toBe(false);
730
- });
731
-
732
- it("should return false with undefined", function() {
733
- expect(Ext.isBoolean(undefined)).toBe(false);
734
- });
735
-
736
- it("should return false with date", function() {
737
- expect(Ext.isBoolean(new Date())).toBe(false);
738
- });
739
-
740
- it("should return false with empty object", function() {
741
- expect(Ext.isBoolean({})).toBe(false);
742
- });
743
-
744
- it("should return false with node list", function() {
745
- expect(Ext.isBoolean(document.getElementsByTagName('body'))).toBe(false);
746
- });
747
-
748
- it("should return false with element", function() {
749
- expect(Ext.isArray(Ext.getBody().dom)).toBe(false);
750
- });
751
- });
752
-
753
- describe("Ext.isDate", function() {
754
- it("should return false with empty array", function() {
755
- expect(Ext.isDate([])).toBe(false);
756
- });
757
-
758
- it("should return false with filled array", function() {
759
- expect(Ext.isDate([1, 2, 3, 4])).toBe(false);
760
- });
761
-
762
- it("should return false with boolean true", function() {
763
- expect(Ext.isDate(true)).toBe(false);
764
- });
765
-
766
- it("should return false with boolean false", function() {
767
- expect(Ext.isDate(false)).toBe(false);
768
- });
769
-
770
- it("should return false with string", function() {
771
- expect(Ext.isDate("foo")).toBe(false);
772
- });
773
-
774
- it("should return false with empty string", function() {
775
- expect(Ext.isDate("")).toBe(false);
776
- });
777
-
778
- it("should return false with number", function() {
779
- expect(Ext.isDate(1)).toBe(false);
780
- });
781
-
782
- it("should return false with null", function() {
783
- expect(Ext.isDate(null)).toBe(false);
784
- });
785
-
786
- it("should return false with undefined", function() {
787
- expect(Ext.isDate(undefined)).toBe(false);
788
- });
789
-
790
- it("should return true with date", function() {
791
- expect(Ext.isDate(new Date())).toBe(true);
792
- });
793
-
794
- it("should return false with empty object", function() {
795
- expect(Ext.isDate({})).toBe(false);
796
- });
797
-
798
- it("should return false with node list", function() {
799
- expect(Ext.isDate(document.getElementsByTagName('body'))).toBe(false);
800
- });
801
-
802
- it("should return false with element", function() {
803
- expect(Ext.isDate(Ext.getBody().dom)).toBe(false);
804
- });
805
- });
806
-
807
- describe("Ext.isDefined", function() {
808
- it("should return true with empty array", function() {
809
- expect(Ext.isDefined([])).toBe(true);
810
- });
811
-
812
- it("should return true with filled array", function() {
813
- expect(Ext.isDefined([1, 2, 3, 4])).toBe(true);
814
- });
815
-
816
- it("should return true with boolean true", function() {
817
- expect(Ext.isDefined(true)).toBe(true);
818
- });
819
-
820
- it("should return true with boolean false", function() {
821
- expect(Ext.isDefined(false)).toBe(true);
822
- });
823
-
824
- it("should return true with string", function() {
825
- expect(Ext.isDefined("foo")).toBe(true);
826
- });
827
-
828
- it("should return true with empty string", function() {
829
- expect(Ext.isDefined("")).toBe(true);
830
- });
831
-
832
- it("should return true with number", function() {
833
- expect(Ext.isDefined(1)).toBe(true);
834
- });
835
-
836
- it("should return true with null", function() {
837
- expect(Ext.isDefined(null)).toBe(true);
838
- });
839
-
840
- it("should return false with undefined", function() {
841
- expect(Ext.isDefined(undefined)).toBe(false);
842
- });
843
-
844
- it("should return true with date", function() {
845
- expect(Ext.isDefined(new Date())).toBe(true);
846
- });
847
-
848
- it("should return true with empty object", function() {
849
- expect(Ext.isDefined({})).toBe(true);
850
- });
851
-
852
- it("should return true with node list", function() {
853
- expect(Ext.isDefined(document.getElementsByTagName('body'))).toBe(true);
854
- });
855
-
856
- it("should return true with element", function() {
857
- expect(Ext.isDefined(Ext.getBody().dom)).toBe(true);
858
- });
859
- });
860
-
861
- describe("Ext.isElement", function() {
862
- it("should return false with empty array", function() {
863
- expect(Ext.isElement([])).toBe(false);
864
- });
865
-
866
- it("should return false with filled array", function() {
867
- expect(Ext.isElement([1, 2, 3, 4])).toBe(false);
868
- });
869
-
870
- it("should return false with boolean true", function() {
871
- expect(Ext.isElement(true)).toBe(false);
872
- });
873
-
874
- it("should return false with boolean false", function() {
875
- expect(Ext.isElement(false)).toBe(false);
876
- });
877
-
878
- it("should return false with string", function() {
879
- expect(Ext.isElement("foo")).toBe(false);
880
- });
881
-
882
- it("should return false with empty string", function() {
883
- expect(Ext.isElement("")).toBe(false);
884
- });
885
-
886
- it("should return false with number", function() {
887
- expect(Ext.isElement(1)).toBe(false);
888
- });
889
-
890
- it("should return false with null", function() {
891
- expect(Ext.isElement(null)).toBe(false);
892
- });
893
-
894
- it("should return false with undefined", function() {
895
- expect(Ext.isElement(undefined)).toBe(false);
896
- });
897
-
898
- it("should return false with date", function() {
899
- expect(Ext.isElement(new Date())).toBe(false);
900
- });
901
-
902
- it("should return false with empty object", function() {
903
- expect(Ext.isElement({})).toBe(false);
904
- });
905
-
906
- it("should return false with node list", function() {
907
- expect(Ext.isElement(document.getElementsByTagName('body'))).toBe(false);
908
- });
909
-
910
- it("should return true with element", function() {
911
- expect(Ext.isElement(Ext.getBody().dom)).toBe(true);
912
- });
913
-
914
- it("should return false with Ext.Element", function() {
915
- expect(Ext.isElement(Ext.getBody())).toBe(false);
916
- });
917
-
918
- it("should return false with TextNode", function() {
919
- var textNode = document.createTextNode('foobar');
920
- document.body.appendChild(textNode);
921
- expect(Ext.isElement(textNode)).toBe(false);
922
- document.body.removeChild(textNode);
923
- });
924
- });
925
-
926
- describe("Ext.isEmpty", function() {
927
- it("should return true with empty array", function() {
928
- expect(Ext.isEmpty([])).toBe(true);
929
- });
930
-
931
- it("should return false with filled array", function() {
932
- expect(Ext.isEmpty([1, 2, 3, 4])).toBe(false);
933
- });
934
-
935
- it("should return false with boolean true", function() {
936
- expect(Ext.isEmpty(true)).toBe(false);
937
- });
938
-
939
- it("should return false with boolean false", function() {
940
- expect(Ext.isEmpty(false)).toBe(false);
941
- });
942
-
943
- it("should return false with string", function() {
944
- expect(Ext.isEmpty("foo")).toBe(false);
945
- });
946
-
947
- it("should return true with empty string", function() {
948
- expect(Ext.isEmpty("")).toBe(true);
949
- });
950
-
951
- it("should return true with empty string with allowBlank", function() {
952
- expect(Ext.isEmpty("", true)).toBe(false);
953
- });
954
-
955
- it("should return false with number", function() {
956
- expect(Ext.isEmpty(1)).toBe(false);
957
- });
958
-
959
- it("should return true with null", function() {
960
- expect(Ext.isEmpty(null)).toBe(true);
961
- });
962
-
963
- it("should return true with undefined", function() {
964
- expect(Ext.isEmpty(undefined)).toBe(true);
965
- });
966
-
967
- it("should return false with date", function() {
968
- expect(Ext.isEmpty(new Date())).toBe(false);
969
- });
970
-
971
- it("should return false with empty object", function() {
972
- expect(Ext.isEmpty({})).toBe(false);
973
- });
974
- });
975
-
976
- describe("Ext.isFunction", function() {
977
- beforeEach(function() {
978
- // add global variable in whitelist
979
- addGlobal("ExtBox1");
980
- });
981
-
982
- it("should return true with anonymous function", function() {
983
- expect(Ext.isFunction(function(){})).toBe(true);
984
- });
985
-
986
- it("should return true with new Function syntax", function() {
987
- expect(Ext.isFunction(Ext.functionFactory('return "";'))).toBe(true);
988
- });
989
-
990
- it("should return true with static function", function() {
991
- expect(Ext.isFunction(Ext.emptyFn)).toBe(true);
992
- });
993
-
994
- it("should return true with instance function", function() {
995
- var stupidClass = function() {},
996
- testObject;
997
- stupidClass.prototype.testMe = function() {};
998
- testObject = new stupidClass();
999
-
1000
- expect(Ext.isFunction(testObject.testMe)).toBe(true);
1001
- });
1002
-
1003
- it("should return true with function on object", function() {
1004
- var o = {
1005
- fn: function() {
1006
- }
1007
- };
1008
-
1009
- expect(Ext.isFunction(o.fn)).toBe(true);
1010
- });
1011
-
1012
- it("should return false with empty array", function() {
1013
- expect(Ext.isFunction([])).toBe(false);
1014
- });
1015
-
1016
- it("should return false with filled array", function() {
1017
- expect(Ext.isFunction([1, 2, 3, 4])).toBe(false);
1018
- });
1019
-
1020
- it("should return false with boolean true", function() {
1021
- expect(Ext.isFunction(true)).toBe(false);
1022
- });
1023
-
1024
- it("should return false with boolean false", function() {
1025
- expect(Ext.isFunction(false)).toBe(false);
1026
- });
1027
-
1028
- it("should return false with string", function() {
1029
- expect(Ext.isFunction("foo")).toBe(false);
1030
- });
1031
-
1032
- it("should return false with empty string", function() {
1033
- expect(Ext.isFunction("")).toBe(false);
1034
- });
1035
-
1036
- it("should return false with number", function() {
1037
- expect(Ext.isFunction(1)).toBe(false);
1038
- });
1039
-
1040
- it("should return false with null", function() {
1041
- expect(Ext.isFunction(null)).toBe(false);
1042
- });
1043
-
1044
- it("should return false with undefined", function() {
1045
- expect(Ext.isFunction(undefined)).toBe(false);
1046
- });
1047
-
1048
- it("should return false with date", function() {
1049
- expect(Ext.isFunction(new Date())).toBe(false);
1050
- });
1051
-
1052
- it("should return false with empty object", function() {
1053
- expect(Ext.isFunction({})).toBe(false);
1054
- });
1055
-
1056
- it("should return false with node list", function() {
1057
- expect(Ext.isFunction(document.getElementsByTagName('body'))).toBe(false);
1058
- });
1059
- });
1060
-
1061
- describe("Ext.isNumber", function() {
1062
- it("should return true with zero", function() {
1063
- expect(Ext.isNumber(0)).toBe(true);
1064
- });
1065
-
1066
- it("should return true with non zero", function() {
1067
- expect(Ext.isNumber(4)).toBe(true);
1068
- });
1069
-
1070
- it("should return true with negative integer", function() {
1071
- expect(Ext.isNumber(-3)).toBe(true);
1072
- });
1073
-
1074
- it("should return true with float", function() {
1075
- expect(Ext.isNumber(1.75)).toBe(true);
1076
- });
1077
-
1078
- it("should return true with negative float", function() {
1079
- expect(Ext.isNumber(-4.75)).toBe(true);
1080
- });
1081
-
1082
- it("should return true with Number.MAX_VALUE", function() {
1083
- expect(Ext.isNumber(Number.MAX_VALUE)).toBe(true);
1084
- });
1085
-
1086
- it("should return true with Number.MIN_VALUE", function() {
1087
- expect(Ext.isNumber(Number.MIN_VALUE)).toBe(true);
1088
- });
1089
-
1090
- it("should return true with Math.PI", function() {
1091
- expect(Ext.isNumber(Math.PI)).toBe(true);
1092
- });
1093
-
1094
- it("should return true with Number() contructor", function() {
1095
- expect(Ext.isNumber(Number('3.1'))).toBe(true);
1096
- });
1097
-
1098
- it("should return false with NaN", function() {
1099
- expect(Ext.isNumber(Number.NaN)).toBe(false);
1100
- });
1101
-
1102
- it("should return false with Number.POSITIVE_INFINITY", function() {
1103
- expect(Ext.isNumber(Number.POSITIVE_INFINITY)).toBe(false);
1104
- });
1105
-
1106
- it("should return false with Number.NEGATIVE_INFINITY", function() {
1107
- expect(Ext.isNumber(Number.NEGATIVE_INFINITY)).toBe(false);
1108
- });
1109
-
1110
- it("should return false with empty array", function() {
1111
- expect(Ext.isNumber([])).toBe(false);
1112
- });
1113
-
1114
- it("should return false with filled array", function() {
1115
- expect(Ext.isNumber([1, 2, 3, 4])).toBe(false);
1116
- });
1117
-
1118
- it("should return false with boolean true", function() {
1119
- expect(Ext.isNumber(true)).toBe(false);
1120
- });
1121
-
1122
- it("should return false with boolean false", function() {
1123
- expect(Ext.isNumber(false)).toBe(false);
1124
- });
1125
-
1126
- it("should return false with string", function() {
1127
- expect(Ext.isNumber("foo")).toBe(false);
1128
- });
1129
-
1130
- it("should return false with empty string", function() {
1131
- expect(Ext.isNumber("")).toBe(false);
1132
- });
1133
-
1134
- it("should return false with string containing a number", function() {
1135
- expect(Ext.isNumber("1.0")).toBe(false);
1136
- });
1137
-
1138
- it("should return false with undefined", function() {
1139
- expect(Ext.isNumber(undefined)).toBe(false);
1140
- });
1141
-
1142
- it("should return false with date", function() {
1143
- expect(Ext.isNumber(new Date())).toBe(false);
1144
- });
1145
-
1146
- it("should return false with empty object", function() {
1147
- expect(Ext.isNumber({})).toBe(false);
1148
- });
1149
-
1150
- it("should return false with node list", function() {
1151
- expect(Ext.isNumber(document.getElementsByTagName('body'))).toBe(false);
1152
- });
1153
- });
1154
-
1155
- describe("Ext.isNumeric", function() {
1156
- it("should return true with zero", function() {
1157
- expect(Ext.isNumeric(0)).toBe(true);
1158
- });
1159
-
1160
- it("should return true with non zero", function() {
1161
- expect(Ext.isNumeric(4)).toBe(true);
1162
- });
1163
-
1164
- it("should return true with negative integer", function() {
1165
- expect(Ext.isNumeric(-3)).toBe(true);
1166
- });
1167
-
1168
- it("should return true with float", function() {
1169
- expect(Ext.isNumeric(1.75)).toBe(true);
1170
- });
1171
-
1172
- it("should return true with negative float", function() {
1173
- expect(Ext.isNumeric(-4.75)).toBe(true);
1174
- });
1175
-
1176
- it("should return true with Number.MAX_VALUE", function() {
1177
- expect(Ext.isNumeric(Number.MAX_VALUE)).toBe(true);
1178
- });
1179
-
1180
- it("should return true with Number.MIN_VALUE", function() {
1181
- expect(Ext.isNumeric(Number.MIN_VALUE)).toBe(true);
1182
- });
1183
-
1184
- it("should return true with Math.PI", function() {
1185
- expect(Ext.isNumeric(Math.PI)).toBe(true);
1186
- });
1187
-
1188
- it("should return true with Number() contructor", function() {
1189
- expect(Ext.isNumeric(Number('3.1'))).toBe(true);
1190
- });
1191
-
1192
- it("should return false with NaN", function() {
1193
- expect(Ext.isNumeric(Number.NaN)).toBe(false);
1194
- });
1195
-
1196
- it("should return false with Number.POSITIVE_INFINITY", function() {
1197
- expect(Ext.isNumeric(Number.POSITIVE_INFINITY)).toBe(false);
1198
- });
1199
-
1200
- it("should return false with Number.NEGATIVE_INFINITY", function() {
1201
- expect(Ext.isNumeric(Number.NEGATIVE_INFINITY)).toBe(false);
1202
- });
1203
-
1204
- it("should return false with empty array", function() {
1205
- expect(Ext.isNumeric([])).toBe(false);
1206
- });
1207
-
1208
- it("should return false with filled array", function() {
1209
- expect(Ext.isNumeric([1, 2, 3, 4])).toBe(false);
1210
- });
1211
-
1212
- it("should return false with boolean true", function() {
1213
- expect(Ext.isNumeric(true)).toBe(false);
1214
- });
1215
-
1216
- it("should return false with boolean false", function() {
1217
- expect(Ext.isNumeric(false)).toBe(false);
1218
- });
1219
-
1220
- it("should return false with string", function() {
1221
- expect(Ext.isNumeric("foo")).toBe(false);
1222
- });
1223
-
1224
- it("should return false with empty string", function() {
1225
- expect(Ext.isNumeric("")).toBe(false);
1226
- });
1227
-
1228
- it("should return true with string containing a number", function() {
1229
- expect(Ext.isNumeric("1.0")).toBe(true);
1230
- });
1231
-
1232
- it("should return false with undefined", function() {
1233
- expect(Ext.isNumeric(undefined)).toBe(false);
1234
- });
1235
-
1236
- it("should return false with date", function() {
1237
- expect(Ext.isNumeric(new Date())).toBe(false);
1238
- });
1239
-
1240
- it("should return false with empty object", function() {
1241
- expect(Ext.isNumeric({})).toBe(false);
1242
- });
1243
-
1244
- it("should return false with node list", function() {
1245
- expect(Ext.isNumeric(document.getElementsByTagName('body'))).toBe(false);
1246
- });
1247
- });
1248
-
1249
- describe("Ext.isObject", function() {
1250
- it("should return false with empty array", function() {
1251
- expect(Ext.isObject([])).toBe(false);
1252
- });
1253
-
1254
- it("should return false with filled array", function() {
1255
- expect(Ext.isObject([1, 2, 3, 4])).toBe(false);
1256
- });
1257
-
1258
- it("should return false with boolean true", function() {
1259
- expect(Ext.isObject(true)).toBe(false);
1260
- });
1261
-
1262
- it("should return false with boolean false", function() {
1263
- expect(Ext.isObject(false)).toBe(false);
1264
- });
1265
-
1266
- it("should return false with string", function() {
1267
- expect(Ext.isObject("foo")).toBe(false);
1268
- });
1269
-
1270
- it("should return false with empty string", function() {
1271
- expect(Ext.isObject("")).toBe(false);
1272
- });
1273
-
1274
- it("should return false with number", function() {
1275
- expect(Ext.isObject(1)).toBe(false);
1276
- });
1277
-
1278
- it("should return false with null", function() {
1279
- expect(Ext.isObject(null)).toBe(false);
1280
- });
1281
-
1282
- it("should return false with undefined", function() {
1283
- expect(Ext.isObject(undefined)).toBe(false);
1284
- });
1285
-
1286
- it("should return false with date", function() {
1287
- expect(Ext.isObject(new Date())).toBe(false);
1288
- });
1289
-
1290
- it("should return true with empty object", function() {
1291
- expect(Ext.isObject({})).toBe(true);
1292
- });
1293
-
1294
- it("should return false with a DOM node", function() {
1295
- expect(Ext.isObject(document.body)).toBe(false);
1296
- });
1297
-
1298
- it("should return false with a Text node", function() {
1299
- expect(Ext.isObject(document.createTextNode('test'))).toBe(false);
1300
- });
1301
-
1302
- it("should return true with object with properties", function() {
1303
- expect(Ext.isObject({
1304
- foo: 1
1305
- })).toBe(true);
1306
- });
1307
-
1308
- it("should return true with object instance", function() {
1309
- var stupidClass = function() {};
1310
-
1311
- expect(Ext.isObject(new stupidClass())).toBe(true);
1312
- });
1313
-
1314
- it("should return true with new Object syntax", function() {
1315
- expect(Ext.isObject(new Object())).toBe(true);
1316
- });
1317
-
1318
- it("should return false with dom element", function() {
1319
- expect(Ext.isObject(document.body)).toBe(false);
1320
- });
1321
- });
1322
-
1323
- describe("Ext.isPrimitive", function() {
1324
- it("should return true with integer", function() {
1325
- expect(Ext.isPrimitive(1)).toBe(true);
1326
- });
1327
-
1328
- it("should return true with negative integer", function() {
1329
- expect(Ext.isPrimitive(-21)).toBe(true);
1330
- });
1331
-
1332
- it("should return true with float", function() {
1333
- expect(Ext.isPrimitive(2.1)).toBe(true);
1334
- });
1335
-
1336
- it("should return true with negative float", function() {
1337
- expect(Ext.isPrimitive(-12.1)).toBe(true);
1338
- });
1339
-
1340
- it("should return true with Number.MAX_VALUE", function() {
1341
- expect(Ext.isPrimitive(Number.MAX_VALUE)).toBe(true);
1342
- });
1343
-
1344
- it("should return true with Math.PI", function() {
1345
- expect(Ext.isPrimitive(Math.PI)).toBe(true);
1346
- });
1347
-
1348
- it("should return true with empty string", function() {
1349
- expect(Ext.isPrimitive("")).toBe(true);
1350
- });
1351
-
1352
- it("should return true with non empty string", function() {
1353
- expect(Ext.isPrimitive("foo")).toBe(true);
1354
- });
1355
-
1356
- it("should return true with boolean true", function() {
1357
- expect(Ext.isPrimitive(true)).toBe(true);
1358
- });
1359
-
1360
- it("should return true with boolean false", function() {
1361
- expect(Ext.isPrimitive(false)).toBe(true);
1362
- });
1363
-
1364
- it("should return false with null", function() {
1365
- expect(Ext.isPrimitive(null)).toBe(false);
1366
- });
1367
-
1368
- it("should return false with undefined", function() {
1369
- expect(Ext.isPrimitive(undefined)).toBe(false);
1370
- });
1371
-
1372
- it("should return false with object", function() {
1373
- expect(Ext.isPrimitive({})).toBe(false);
1374
- });
1375
-
1376
- it("should return false with object instance", function() {
1377
- var stupidClass = function() {};
1378
- expect(Ext.isPrimitive(new stupidClass())).toBe(false);
1379
- });
1380
-
1381
- it("should return false with array", function() {
1382
- expect(Ext.isPrimitive([])).toBe(false);
1383
- });
1384
- });
1385
-
1386
- describe("Ext.isString", function() {
1387
- it("should return true with empty string", function() {
1388
- expect(Ext.isString("")).toBe(true);
1389
- });
1390
-
1391
- it("should return true with non empty string", function() {
1392
- expect(Ext.isString("foo")).toBe(true);
1393
- });
1394
-
1395
- it("should return true with String() syntax", function() {
1396
- expect(Ext.isString(String(""))).toBe(true);
1397
- });
1398
-
1399
- it("should return false with new String() syntax", function() { //should return an object that wraps the primitive
1400
- expect(Ext.isString(new String(""))).toBe(false);
1401
- });
1402
-
1403
- it("should return false with number", function() {
1404
- expect(Ext.isString(1)).toBe(false);
1405
- });
1406
-
1407
- it("should return false with boolean", function() {
1408
- expect(Ext.isString(true)).toBe(false);
1409
- });
1410
-
1411
- it("should return false with null", function() {
1412
- expect(Ext.isString(null)).toBe(false);
1413
- });
1414
-
1415
- it("should return false with undefined", function() {
1416
- expect(Ext.isString(undefined)).toBe(false);
1417
- });
1418
-
1419
- it("should return false with array", function() {
1420
- expect(Ext.isString([])).toBe(false);
1421
- });
1422
-
1423
- it("should return false with object", function() {
1424
- expect(Ext.isString({})).toBe(false);
1425
- });
1426
- });
1427
-
1428
- describe("Ext.isTextNode", function() {
1429
- it("should return false with empty array", function() {
1430
- expect(Ext.isTextNode([])).toBe(false);
1431
- });
1432
-
1433
- it("should return false with filled array", function() {
1434
- expect(Ext.isTextNode([1, 2, 3, 4])).toBe(false);
1435
- });
1436
-
1437
- it("should return false with boolean true", function() {
1438
- expect(Ext.isTextNode(true)).toBe(false);
1439
- });
1440
-
1441
- it("should return false with boolean false", function() {
1442
- expect(Ext.isTextNode(false)).toBe(false);
1443
- });
1444
-
1445
- it("should return false with string", function() {
1446
- expect(Ext.isTextNode("foo")).toBe(false);
1447
- });
1448
-
1449
- it("should return false with empty string", function() {
1450
- expect(Ext.isTextNode("")).toBe(false);
1451
- });
1452
-
1453
- it("should return false with number", function() {
1454
- expect(Ext.isTextNode(1)).toBe(false);
1455
- });
1456
-
1457
- it("should return false with null", function() {
1458
- expect(Ext.isTextNode(null)).toBe(false);
1459
- });
1460
-
1461
- it("should return false with undefined", function() {
1462
- expect(Ext.isTextNode(undefined)).toBe(false);
1463
- });
1464
-
1465
- it("should return false with date", function() {
1466
- expect(Ext.isTextNode(new Date())).toBe(false);
1467
- });
1468
-
1469
- it("should return false with empty object", function() {
1470
- expect(Ext.isTextNode({})).toBe(false);
1471
- });
1472
-
1473
- it("should return false with node list", function() {
1474
- expect(Ext.isTextNode(document.getElementsByTagName('body'))).toBe(false);
1475
- });
1476
-
1477
- it("should return false with element", function() {
1478
- expect(Ext.isTextNode(Ext.getBody().dom)).toBe(false);
1479
- });
1480
-
1481
- it("should return false with Ext.Element", function() {
1482
- expect(Ext.isTextNode(Ext.getBody())).toBe(false);
1483
- });
1484
-
1485
- it("should return true with TextNode", function() {
1486
- var textNode = document.createTextNode('foobar');
1487
- document.body.appendChild(textNode);
1488
- expect(Ext.isTextNode(textNode)).toBe(true);
1489
- document.body.removeChild(textNode);
1490
- });
1491
- });
1492
-
1493
- describe("Ext.clone", function() {
1494
- var clone;
1495
-
1496
- afterEach(function() {
1497
- clone = null;
1498
- });
1499
-
1500
- it("should clone an array", function() {
1501
- var array = [2,'5',[1,3,4]];
1502
- clone = Ext.clone(array);
1503
- expect(clone).toEqual(array);
1504
- expect(clone).not.toBe(array);
1505
- });
1506
-
1507
- it("should clone an object", function() {
1508
- var object = {
1509
- fn: function() {
1510
- return 1;
1511
- },
1512
- b: 2
1513
- };
1514
- clone = Ext.clone(object);
1515
- expect(clone).toEqual(object);
1516
- expect(clone).not.toBe(object);
1517
- });
1518
-
1519
- it("should clone a date", function(){
1520
- var date = new Date();
1521
- clone = Ext.clone(date);
1522
- expect(clone).toEqual(date);
1523
- expect(clone).not.toBe(date);
1524
- });
1525
-
1526
- it("should clone a dom node", function(){
1527
- var node = document.createElement('DIV');
1528
- document.body.appendChild(node);
1529
- clone = Ext.clone(node);
1530
- expect(clone.tagName).toEqual(clone.tagName);
1531
- expect(clone.innerHTML).toEqual(clone.innerHTML);
1532
- expect(clone).not.toBe(node);
1533
- document.body.removeChild(node);
1534
- });
1535
-
1536
- it("should return null for null items", function() {
1537
- expect(Ext.clone(null)).toBeNull();
1538
- });
1539
-
1540
- it("should return undefined for undefined items", function() {
1541
- expect(Ext.clone(undefined)).toBeUndefined();
1542
- });
1543
- });
1544
-
1545
- describe('getUniqueGlobalNamespace', function() {
1546
- it("should return an unique global namespace", function() {
1547
- expect(Ext.getUniqueGlobalNamespace()).toBe("ExtBox1");
1548
- });
1549
- });
1550
- });