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,697 +0,0 @@
1
- describe("Ext.Date", function() {
2
- var dateSave,
3
- dateValue = 0,
4
- increment = 3,
5
- OriginalDate = Date,
6
- PredictableDate = function() {
7
- return {
8
- getTime: function() {
9
- },
10
- valueOf: function() {
11
- dateValue = dateValue + increment;
12
- return dateValue;
13
- }
14
- };
15
- };
16
-
17
- function mockDate() {
18
- Date = PredictableDate;
19
- };
20
-
21
- afterEach(function() {
22
- Date = OriginalDate;
23
- increment += 16;
24
- });
25
-
26
- it("should get time elapsed in millisecond between date instantiation", function() {
27
- mockDate();
28
- var dateA = new PredictableDate();
29
- expect(Ext.Date.getElapsed(dateA)).toEqual(3);
30
- });
31
-
32
- it("should get time elapsed in millisecond between two dates", function() {
33
- mockDate();
34
- var dateA = new PredictableDate(),
35
- dateB = new PredictableDate();
36
-
37
- expect(Ext.Date.getElapsed(dateA)).toEqual(19);
38
- });
39
-
40
- describe("now", function() {
41
- it("should return the current timestamp", function() {
42
- var
43
- millisBeforeCall = +new Date(),
44
- millisAtCall = Ext.Date.now(),
45
- millisAfterCall = +new Date();
46
-
47
- expect(millisAtCall).not.toBeLessThan(millisBeforeCall);
48
- expect(millisAtCall).not.toBeGreaterThan(millisAfterCall);
49
- });
50
- });
51
-
52
- describe("getShortMonthName", function() {
53
- it("should return 3 letter abbreviation for the corresponding month [0-11]", function() {
54
- expect(Ext.Date.getShortMonthName(0)).toBe("Jan");
55
- expect(Ext.Date.getShortMonthName(1)).toBe("Feb");
56
- expect(Ext.Date.getShortMonthName(2)).toBe("Mar");
57
- expect(Ext.Date.getShortMonthName(3)).toBe("Apr");
58
- expect(Ext.Date.getShortMonthName(4)).toBe("May");
59
- expect(Ext.Date.getShortMonthName(5)).toBe("Jun");
60
- expect(Ext.Date.getShortMonthName(6)).toBe("Jul");
61
- expect(Ext.Date.getShortMonthName(7)).toBe("Aug");
62
- expect(Ext.Date.getShortMonthName(8)).toBe("Sep");
63
- expect(Ext.Date.getShortMonthName(9)).toBe("Oct");
64
- expect(Ext.Date.getShortMonthName(10)).toBe("Nov");
65
- expect(Ext.Date.getShortMonthName(11)).toBe("Dec");
66
- });
67
- });
68
-
69
- describe("getShortDayName", function() {
70
- it("should return 3 letter abbreviation for the corresponding weekday [0-6]", function() {
71
- expect(Ext.Date.getShortDayName(0)).toBe("Sun");
72
- expect(Ext.Date.getShortDayName(1)).toBe("Mon");
73
- expect(Ext.Date.getShortDayName(2)).toBe("Tue");
74
- expect(Ext.Date.getShortDayName(3)).toBe("Wed");
75
- expect(Ext.Date.getShortDayName(4)).toBe("Thu");
76
- expect(Ext.Date.getShortDayName(5)).toBe("Fri");
77
- expect(Ext.Date.getShortDayName(6)).toBe("Sat");
78
-
79
- });
80
- });
81
-
82
- describe("getMonthNumber", function() {
83
- it("should return the month number [0-11] for the corresponding short month name", function() {
84
- expect(Ext.Date.getMonthNumber("jan")).toBe(0);
85
- expect(Ext.Date.getMonthNumber("feb")).toBe(1);
86
- expect(Ext.Date.getMonthNumber("mar")).toBe(2);
87
- expect(Ext.Date.getMonthNumber("apr")).toBe(3);
88
- expect(Ext.Date.getMonthNumber("MAY")).toBe(4);
89
- expect(Ext.Date.getMonthNumber("JUN")).toBe(5);
90
- expect(Ext.Date.getMonthNumber("JUL")).toBe(6);
91
- expect(Ext.Date.getMonthNumber("AUG")).toBe(7);
92
- expect(Ext.Date.getMonthNumber("Sep")).toBe(8);
93
- expect(Ext.Date.getMonthNumber("Oct")).toBe(9);
94
- expect(Ext.Date.getMonthNumber("Nov")).toBe(10);
95
- expect(Ext.Date.getMonthNumber("Dec")).toBe(11);
96
- });
97
- it("should return the month number [0-11] for the corresponding full month name", function() {
98
- expect(Ext.Date.getMonthNumber("january")).toBe(0);
99
- expect(Ext.Date.getMonthNumber("february")).toBe(1);
100
- expect(Ext.Date.getMonthNumber("march")).toBe(2);
101
- expect(Ext.Date.getMonthNumber("april")).toBe(3);
102
- expect(Ext.Date.getMonthNumber("MAY")).toBe(4);
103
- expect(Ext.Date.getMonthNumber("JUNE")).toBe(5);
104
- expect(Ext.Date.getMonthNumber("JULY")).toBe(6);
105
- expect(Ext.Date.getMonthNumber("AUGUST")).toBe(7);
106
- expect(Ext.Date.getMonthNumber("September")).toBe(8);
107
- expect(Ext.Date.getMonthNumber("October")).toBe(9);
108
- expect(Ext.Date.getMonthNumber("November")).toBe(10);
109
- expect(Ext.Date.getMonthNumber("December")).toBe(11);
110
- });
111
- });
112
-
113
- describe("formatContainsHourInfo", function() {
114
- it("should return true when format contains hour info", function() {
115
- expect(Ext.Date.formatContainsHourInfo("d/m/Y H:i:s")).toBeTruthy();
116
- });
117
- it("should return false when format doesn't contains hour info", function() {
118
- expect(Ext.Date.formatContainsHourInfo("d/m/Y")).toBeFalsy();
119
- });
120
- });
121
-
122
- describe("formatContainsDateInfo", function() {
123
- it("should return true when format contains date info", function() {
124
- expect(Ext.Date.formatContainsDateInfo("d/m/Y H:i:s")).toBeTruthy();
125
- });
126
- it("should return false when format doesn't contains date info", function() {
127
- expect(Ext.Date.formatContainsDateInfo("H:i:s")).toBeFalsy();
128
- });
129
- });
130
-
131
- describe("isValid", function() {
132
- it("should return true for valid dates", function() {
133
- expect(Ext.Date.isValid(1981, 10, 15, 16, 30, 1, 2)).toBeTruthy();
134
- });
135
- it("should return false for invalid dates", function() {
136
- expect(Ext.Date.isValid(999999, 10, 15, 16, 30, 1, 2)).toBeFalsy();
137
- expect(Ext.Date.isValid(1981, 13, 15, 16, 30, 1, 2)).toBeFalsy();
138
- expect(Ext.Date.isValid(1981, 10, 32, 16, 30, 1, 2)).toBeFalsy();
139
- expect(Ext.Date.isValid(1981, 10, 15, 25, 30, 1, 2)).toBeFalsy();
140
- expect(Ext.Date.isValid(1981, 10, 15, 16, 60, 1, 2)).toBeFalsy();
141
- expect(Ext.Date.isValid(1981, 10, 15, 16, 30, 60, 2)).toBeFalsy();
142
- expect(Ext.Date.isValid(1981, 10, 15, 16, 30, 1, 100000)).toBeFalsy();
143
- });
144
- });
145
-
146
- describe("parse", function() {
147
- it("should parse year-only", function() {
148
- var date = Ext.Date.parse("2011", "Y"),
149
- expectedDate = new Date();
150
- expectedDate.setFullYear(2011);
151
- expectedDate.setHours(0);
152
- expectedDate.setMinutes(0);
153
- expectedDate.setSeconds(0);
154
- expectedDate.setMilliseconds(0);
155
- expect(date).toEqual(expectedDate);
156
- });
157
-
158
- it("should parse year-month-date", function() {
159
- var date = Ext.Date.parse("2011-01-20", "Y-m-d"),
160
- expectedDate = new Date();
161
- expectedDate.setFullYear(2011);
162
- expectedDate.setMonth(0);
163
- expectedDate.setDate(20);
164
- expectedDate.setHours(0);
165
- expectedDate.setMinutes(0);
166
- expectedDate.setSeconds(0);
167
- expectedDate.setMilliseconds(0);
168
- expect(date).toEqual(expectedDate);
169
- });
170
-
171
- it("should parse year-month-date hour:minute:second am/pm", function() {
172
- var date = Ext.Date.parse("2011-01-20 6:28:33 PM", "Y-m-d g:i:s A"),
173
- expectedDate = new Date();
174
- expectedDate.setFullYear(2011);
175
- expectedDate.setMonth(0);
176
- expectedDate.setDate(20);
177
- expectedDate.setHours(18);
178
- expectedDate.setMinutes(28);
179
- expectedDate.setSeconds(33);
180
- expectedDate.setMilliseconds(0);
181
- expect(date).toEqual(expectedDate);
182
- });
183
-
184
- it("should return null when parsing an invalid date like Feb 31st in stric mode", function() {
185
- expect(Ext.Date.parse("2011-02-31", "Y-m-d", true)).toBeNull();
186
- });
187
-
188
-
189
- it("should read am/pm", function() {
190
- var date = Ext.Date.parse('2010/01/01 12:45 am', 'Y/m/d G:i a'),
191
- expectedDate = new Date();
192
-
193
- expectedDate.setFullYear(2010);
194
- expectedDate.setMonth(0);
195
- expectedDate.setDate(1);
196
- expectedDate.setHours(0);
197
- expectedDate.setMinutes(45);
198
- expectedDate.setSeconds(0);
199
- expectedDate.setMilliseconds(0);
200
- expect(date).toEqual(expectedDate);
201
- });
202
-
203
- it("should allow am/pm before minutes", function() {
204
- var date = Ext.Date.parse('2010/01/01 am 12:45', 'Y/m/d a G:i'),
205
- expectedDate = new Date();
206
-
207
- expectedDate.setFullYear(2010);
208
- expectedDate.setMonth(0);
209
- expectedDate.setDate(1);
210
- expectedDate.setHours(0);
211
- expectedDate.setMinutes(45);
212
- expectedDate.setSeconds(0);
213
- expectedDate.setMilliseconds(0);
214
- expect(date).toEqual(expectedDate);
215
- });
216
-
217
- it("should correctly parse ISO format", function() {
218
- var date = Ext.Date.parse('2012-01-13T01:00:00', 'c'),
219
- expectedDate = new Date();
220
-
221
- expectedDate.setFullYear(2012);
222
- expectedDate.setMonth(0);
223
- expectedDate.setDate(13);
224
- expectedDate.setHours(1);
225
- expectedDate.setMinutes(0);
226
- expectedDate.setSeconds(0);
227
- expectedDate.setMilliseconds(0);
228
- expect(date).toEqual(expectedDate);
229
-
230
- date = Ext.Date.parse('2012-01-13T13:00:00', 'c');
231
- expectedDate.setFullYear(2012);
232
- expectedDate.setMonth(0);
233
- expectedDate.setDate(13);
234
- expectedDate.setHours(13);
235
- expectedDate.setMinutes(0);
236
- expectedDate.setSeconds(0);
237
- expectedDate.setMilliseconds(0);
238
- expect(date).toEqual(expectedDate);
239
- });
240
-
241
- describe("using separators", function(){
242
- it("should work with hyphen separators", function() {
243
- var date = Ext.Date.parse('2010-03-04', 'Y-m-d'),
244
- expectedDate = new Date();
245
-
246
- expectedDate.setFullYear(2010);
247
- expectedDate.setMonth(2);
248
- expectedDate.setDate(4);
249
- expectedDate.setHours(0);
250
- expectedDate.setMinutes(0);
251
- expectedDate.setSeconds(0);
252
- expectedDate.setMilliseconds(0);
253
- expect(date).toEqual(expectedDate);
254
-
255
- });
256
-
257
- it("should work with slash separators", function() {
258
- var date = Ext.Date.parse('2010/03/04', 'Y/m/d'),
259
- expectedDate = new Date();
260
-
261
- expectedDate.setFullYear(2010);
262
- expectedDate.setMonth(2);
263
- expectedDate.setDate(4);
264
- expectedDate.setHours(0);
265
- expectedDate.setMinutes(0);
266
- expectedDate.setSeconds(0);
267
- expectedDate.setMilliseconds(0);
268
- expect(date).toEqual(expectedDate);
269
-
270
- });
271
-
272
- it("should work with space separators", function() {
273
- var date = Ext.Date.parse('2010 03 04', 'Y m d'),
274
- expectedDate = new Date();
275
-
276
- expectedDate.setFullYear(2010);
277
- expectedDate.setMonth(2);
278
- expectedDate.setDate(4);
279
- expectedDate.setHours(0);
280
- expectedDate.setMinutes(0);
281
- expectedDate.setSeconds(0);
282
- expectedDate.setMilliseconds(0);
283
- expect(date).toEqual(expectedDate);
284
- });
285
- });
286
-
287
-
288
- });
289
-
290
- describe("isEqual", function() {
291
- it("should return true if both dates are exactly the same", function() {
292
- var date1 = new Date(2011, 0, 20, 18, 37, 15, 0),
293
- date2 = new Date(2011, 0, 20, 18, 37, 15, 0);
294
- expect(Ext.Date.isEqual(date1, date2)).toBeTruthy();
295
- });
296
- it("should return true if there is at least 1 millisecond difference between both dates", function() {
297
- var date1 = new Date(2011, 0, 20, 18, 37, 15, 0),
298
- date2 = new Date(2011, 0, 20, 18, 37, 15, 1);
299
- expect(Ext.Date.isEqual(date1, date2)).toBeFalsy();
300
- });
301
- it("should return false if one one of the dates is null/undefined", function() {
302
- expect(Ext.Date.isEqual(new Date(), undefined)).toBeFalsy();
303
- expect(Ext.Date.isEqual(new Date(), null)).toBeFalsy();
304
- expect(Ext.Date.isEqual(undefined, new Date())).toBeFalsy();
305
- expect(Ext.Date.isEqual(null, new Date())).toBeFalsy();
306
- });
307
- it("should return true if both dates are null/undefined", function() {
308
- expect(Ext.Date.isEqual(null, null)).toBeTruthy();
309
- expect(Ext.Date.isEqual(null, undefined)).toBeTruthy();
310
- expect(Ext.Date.isEqual(undefined, null)).toBeTruthy();
311
- expect(Ext.Date.isEqual(undefined, undefined)).toBeTruthy();
312
- });
313
- });
314
-
315
- describe("getDayOfYear", function() {
316
- it("should return the day of year between 0 and 364 for non-leap years", function() {
317
- expect(Ext.Date.getDayOfYear(new Date(2001, 0, 1))).toBe(0);
318
- expect(Ext.Date.getDayOfYear(new Date(2001, 11, 31))).toBe(364);
319
- });
320
- it("should return the day of year between 0 and 365 for leap years", function() {
321
- expect(Ext.Date.getDayOfYear(new Date(2000, 0, 1))).toBe(0);
322
- expect(Ext.Date.getDayOfYear(new Date(2000, 11, 31))).toBe(365);
323
- });
324
- });
325
-
326
- describe("getFirstDayOfMonth", function() {
327
- it("should return the number [0-6] of the first day of month of the given date", function() {
328
- expect(Ext.Date.getFirstDayOfMonth(new Date(2007, 0, 1))).toBe(1);
329
- expect(Ext.Date.getFirstDayOfMonth(new Date(2000, 0, 2))).toBe(6);
330
- expect(Ext.Date.getFirstDayOfMonth(new Date(2011, 0, 3))).toBe(6);
331
- expect(Ext.Date.getFirstDayOfMonth(new Date(2011, 6, 4))).toBe(5);
332
- expect(Ext.Date.getFirstDayOfMonth(new Date(2011, 11, 5))).toBe(4);
333
- });
334
- });
335
-
336
- describe("getLastDayOfMonth", function() {
337
- it("should return the number [0-6] of the last day of month of the given date", function() {
338
- expect(Ext.Date.getLastDayOfMonth(new Date(2007, 0, 1))).toBe(3);
339
- expect(Ext.Date.getLastDayOfMonth(new Date(2000, 0, 2))).toBe(1);
340
- expect(Ext.Date.getLastDayOfMonth(new Date(2011, 0, 3))).toBe(1);
341
- expect(Ext.Date.getLastDayOfMonth(new Date(2011, 6, 4))).toBe(0);
342
- expect(Ext.Date.getLastDayOfMonth(new Date(2011, 11, 5))).toBe(6);
343
- });
344
- });
345
-
346
- describe("getFirstDateOfMonth", function() {
347
- it("should return the date corresponding to the first day of month of the given date", function() {
348
- expect(Ext.Date.getFirstDateOfMonth(new Date(2007, 0, 1))).toEqual(new Date(2007, 0, 1));
349
- expect(Ext.Date.getFirstDateOfMonth(new Date(2000, 0, 2))).toEqual(new Date(2000, 0, 1));
350
- expect(Ext.Date.getFirstDateOfMonth(new Date(2011, 0, 3))).toEqual(new Date(2011, 0, 1));
351
- expect(Ext.Date.getFirstDateOfMonth(new Date(2011, 6, 4))).toEqual(new Date(2011, 6, 1));
352
- expect(Ext.Date.getFirstDateOfMonth(new Date(2011, 11, 5))).toEqual(new Date(2011, 11, 1));
353
- });
354
- });
355
-
356
- describe("getLastDateOfMonth", function() {
357
- it("should return the date corresponding to the last day of month of the given date", function() {
358
- expect(Ext.Date.getLastDateOfMonth(new Date(2007, 1, 1))).toEqual(new Date(2007, 1, 28));
359
- expect(Ext.Date.getLastDateOfMonth(new Date(2000, 1, 2))).toEqual(new Date(2000, 1, 29));
360
- expect(Ext.Date.getLastDateOfMonth(new Date(2011, 0, 3))).toEqual(new Date(2011, 0, 31));
361
- expect(Ext.Date.getLastDateOfMonth(new Date(2011, 5, 4))).toEqual(new Date(2011, 5, 30));
362
- expect(Ext.Date.getLastDateOfMonth(new Date(2011, 11, 5))).toEqual(new Date(2011, 11, 31));
363
- });
364
- });
365
-
366
- describe("getSuffix", function() {
367
- it("should return st for 1, 21 and 31", function() {
368
- expect(Ext.Date.getSuffix(new Date(2011, 0, 1))).toBe("st");
369
- expect(Ext.Date.getSuffix(new Date(2011, 0, 21))).toBe("st");
370
- expect(Ext.Date.getSuffix(new Date(2011, 0, 31))).toBe("st");
371
- });
372
- it("should return nd for 2 and, 22", function() {
373
- expect(Ext.Date.getSuffix(new Date(2011, 0, 2))).toBe("nd");
374
- expect(Ext.Date.getSuffix(new Date(2011, 0, 22))).toBe("nd");
375
- });
376
- it("should return rd for 3 and, 23", function() {
377
- expect(Ext.Date.getSuffix(new Date(2011, 0, 3))).toBe("rd");
378
- expect(Ext.Date.getSuffix(new Date(2011, 0, 23))).toBe("rd");
379
- });
380
- it("should return th for days [11-13] and days ending in [4-0]", function() {
381
- expect(Ext.Date.getSuffix(new Date(2011, 0, 4))).toBe("th");
382
- expect(Ext.Date.getSuffix(new Date(2011, 0, 5))).toBe("th");
383
- expect(Ext.Date.getSuffix(new Date(2011, 0, 6))).toBe("th");
384
- expect(Ext.Date.getSuffix(new Date(2011, 0, 7))).toBe("th");
385
- expect(Ext.Date.getSuffix(new Date(2011, 0, 8))).toBe("th");
386
- expect(Ext.Date.getSuffix(new Date(2011, 0, 9))).toBe("th");
387
- expect(Ext.Date.getSuffix(new Date(2011, 0, 10))).toBe("th");
388
- expect(Ext.Date.getSuffix(new Date(2011, 0, 11))).toBe("th");
389
- expect(Ext.Date.getSuffix(new Date(2011, 0, 12))).toBe("th");
390
- expect(Ext.Date.getSuffix(new Date(2011, 0, 13))).toBe("th");
391
- expect(Ext.Date.getSuffix(new Date(2011, 0, 14))).toBe("th");
392
- expect(Ext.Date.getSuffix(new Date(2011, 0, 15))).toBe("th");
393
- expect(Ext.Date.getSuffix(new Date(2011, 0, 16))).toBe("th");
394
- expect(Ext.Date.getSuffix(new Date(2011, 0, 17))).toBe("th");
395
- expect(Ext.Date.getSuffix(new Date(2011, 0, 18))).toBe("th");
396
- expect(Ext.Date.getSuffix(new Date(2011, 0, 19))).toBe("th");
397
- expect(Ext.Date.getSuffix(new Date(2011, 0, 20))).toBe("th");
398
- expect(Ext.Date.getSuffix(new Date(2011, 0, 24))).toBe("th");
399
- expect(Ext.Date.getSuffix(new Date(2011, 0, 25))).toBe("th");
400
- expect(Ext.Date.getSuffix(new Date(2011, 0, 26))).toBe("th");
401
- expect(Ext.Date.getSuffix(new Date(2011, 0, 27))).toBe("th");
402
- expect(Ext.Date.getSuffix(new Date(2011, 0, 28))).toBe("th");
403
- expect(Ext.Date.getSuffix(new Date(2011, 0, 29))).toBe("th");
404
- expect(Ext.Date.getSuffix(new Date(2011, 0, 30))).toBe("th");
405
- });
406
- });
407
-
408
- describe("clone", function() {
409
- it("should return a copy of the given date", function() {
410
- var originalDate = new Date(),
411
- clonedDate;
412
- clonedDate = Ext.Date.clone(originalDate);
413
- expect(clonedDate).not.toBe(originalDate);
414
- expect(clonedDate).toEqual(originalDate);
415
- });
416
- });
417
-
418
- describe("isDST", function() {
419
- // DST detection relies on the locale of the browser running the test as different countries having different
420
- // versions of DST. Most countries don't observe it at all. Europe has standardized dates for switching times
421
- // but it differs from the dates used in the USA and Canada.
422
- //
423
- // These tests are quite loose but should pass in Europe and North America. Other countries may vary.
424
- //
425
- // Early March - USA & Canada enter DST
426
- // Late March - EU enters DST
427
- // Late October - EU leaves DST
428
- // Early November - USA & Canada leave DST
429
-
430
- // This test is disabled because it fails on the Eye but it should pass on most developer machines
431
- xit("should return true from the end of March till the middle of October", function() {
432
- expect(Ext.Date.isDST(new Date(2010, 2, 31))).toBeTruthy();
433
- expect(Ext.Date.isDST(new Date(2010, 3, 15))).toBeTruthy();
434
- expect(Ext.Date.isDST(new Date(2010, 4, 15))).toBeTruthy();
435
- expect(Ext.Date.isDST(new Date(2010, 5, 15))).toBeTruthy();
436
- expect(Ext.Date.isDST(new Date(2010, 6, 15))).toBeTruthy();
437
- expect(Ext.Date.isDST(new Date(2010, 7, 15))).toBeTruthy();
438
- expect(Ext.Date.isDST(new Date(2010, 8, 15))).toBeTruthy();
439
- expect(Ext.Date.isDST(new Date(2010, 9, 15))).toBeTruthy();
440
- });
441
-
442
- it("should return false from the middle of November till the start of March", function() {
443
- expect(Ext.Date.isDST(new Date(2010, 10, 15))).toBeFalsy();
444
- expect(Ext.Date.isDST(new Date(2010, 11, 15))).toBeFalsy();
445
- expect(Ext.Date.isDST(new Date(2010, 0, 15))).toBeFalsy();
446
- expect(Ext.Date.isDST(new Date(2010, 1, 15))).toBeFalsy();
447
- expect(Ext.Date.isDST(new Date(2010, 2, 1))).toBeFalsy();
448
- });
449
- });
450
-
451
- describe("clearTime", function() {
452
- it("should reset hrs/mins/secs/millis to 0", function() {
453
- var date = new Date(2012, 11, 21, 21, 21, 21, 21);
454
- Ext.Date.clearTime(date);
455
- expect(date.getHours()).toBe(0);
456
- expect(date.getMinutes()).toBe(0);
457
- expect(date.getSeconds()).toBe(0);
458
- expect(date.getMilliseconds()).toBe(0);
459
- });
460
- it("should return a clone with hrs/mins/secs/millis reseted to 0 when clone option is selected", function() {
461
- var date = new Date(2012, 11, 21, 21, 21, 21, 21),
462
- clearedTimeDate;
463
- clearedTimeDate = Ext.Date.clearTime(date, true);
464
- expect(date.getHours()).toBe(21);
465
- expect(date.getMinutes()).toBe(21);
466
- expect(date.getSeconds()).toBe(21);
467
- expect(date.getMilliseconds()).toBe(21);
468
- expect(clearedTimeDate.getHours()).toBe(0);
469
- expect(clearedTimeDate.getMinutes()).toBe(0);
470
- expect(clearedTimeDate.getSeconds()).toBe(0);
471
- expect(clearedTimeDate.getMilliseconds()).toBe(0);
472
- });
473
- });
474
-
475
- describe("add", function() {
476
- var date = new Date(2000, 0, 1, 0, 0, 0, 0);
477
- it("should add milliseconds", function() {
478
- expect(Ext.Date.add(date, Ext.Date.MILLI, 1)).toEqual(new Date(2000, 0, 1, 0, 0, 0, 1));
479
- });
480
- it("should add seconds", function() {
481
- expect(Ext.Date.add(date, Ext.Date.SECOND, 1)).toEqual(new Date(2000, 0, 1, 0, 0, 1, 0));
482
- });
483
- it("should add minutes", function() {
484
- expect(Ext.Date.add(date, Ext.Date.MINUTE, 1)).toEqual(new Date(2000, 0, 1, 0, 1, 0, 0));
485
- });
486
- it("should add hours", function() {
487
- expect(Ext.Date.add(date, Ext.Date.HOUR, 1)).toEqual(new Date(2000, 0, 1, 1, 0, 0, 0));
488
- });
489
- it("should add days", function() {
490
- expect(Ext.Date.add(date, Ext.Date.DAY, 1)).toEqual(new Date(2000, 0, 2, 0, 0, 0, 0));
491
- });
492
- it("should add months", function() {
493
- expect(Ext.Date.add(date, Ext.Date.MONTH, 1)).toEqual(new Date(2000, 1, 1, 0, 0, 0, 0));
494
- });
495
- it("should add years", function() {
496
- expect(Ext.Date.add(date, Ext.Date.YEAR, 1)).toEqual(new Date(2001, 0, 1, 0, 0, 0, 0));
497
- });
498
- it("should consider last day of month when adding months", function() {
499
- expect(Ext.Date.add(new Date(2001, 0, 29), Ext.Date.MONTH, 1)).toEqual(new Date(2001, 1, 28));
500
- expect(Ext.Date.add(new Date(2001, 0, 30), Ext.Date.MONTH, 1)).toEqual(new Date(2001, 1, 28));
501
- expect(Ext.Date.add(new Date(2001, 0, 31), Ext.Date.MONTH, 1)).toEqual(new Date(2001, 1, 28));
502
- expect(Ext.Date.add(new Date(2000, 0, 29), Ext.Date.MONTH, 1)).toEqual(new Date(2000, 1, 29));
503
- expect(Ext.Date.add(new Date(2000, 0, 30), Ext.Date.MONTH, 1)).toEqual(new Date(2000, 1, 29));
504
- expect(Ext.Date.add(new Date(2000, 0, 31), Ext.Date.MONTH, 1)).toEqual(new Date(2000, 1, 29));
505
- });
506
- it("should consider last day of month when adding years", function() {
507
- expect(Ext.Date.add(new Date(2000, 1, 29), Ext.Date.YEAR, 1)).toEqual(new Date(2001, 1, 28));
508
- });
509
- });
510
-
511
- describe("between", function() {
512
- var startDate = new Date(2000, 0, 1),
513
- endDate = new Date(2000, 0, 31);
514
- it("should return true if the date is equal to the start date", function() {
515
- expect(Ext.Date.between(new Date(2000, 0, 1), startDate, endDate)).toBeTruthy();
516
- });
517
- it("should return true if the date is equal to the end date", function() {
518
- expect(Ext.Date.between(new Date(2000, 0, 31), startDate, endDate)).toBeTruthy();
519
- });
520
- it("should return true if date is between start and end dates", function() {
521
- expect(Ext.Date.between(new Date(2000, 0, 15), startDate, endDate)).toBeTruthy();
522
- });
523
- it("should return false if date is before start date", function() {
524
- expect(Ext.Date.between(new Date(1999, 11, 31, 23, 59, 59), startDate, endDate)).toBeFalsy();
525
- });
526
- it("should return false if date is after end date", function() {
527
- expect(Ext.Date.between(new Date(2000, 0, 31, 0, 0, 1), startDate, endDate)).toBeFalsy();
528
- });
529
- });
530
-
531
- describe("formatting", function(){
532
- var date = new Date(2010, 0, 1, 13, 45, 32, 4),
533
- format = Ext.Date.format;
534
-
535
- it("should format with the d option", function(){
536
- expect(format(date, 'd')).toBe('01');
537
- });
538
-
539
- it("should format with the D option", function(){
540
- expect(format(date, 'D')).toBe('Fri');
541
- });
542
-
543
- it("should format with the j option", function(){
544
- expect(format(date, 'j')).toBe('1');
545
- });
546
-
547
- it("should format with the l option", function(){
548
- expect(format(date, 'l')).toBe('Friday');
549
- });
550
-
551
- it("should format with the N option", function(){
552
- expect(format(date, 'N')).toBe('5');
553
- });
554
-
555
- it("should format with the S option", function(){
556
- expect(format(date, 'S')).toBe('st');
557
- });
558
-
559
- it("should format with the w option", function(){
560
- expect(format(date, 'w')).toBe('5');
561
- });
562
-
563
- it("should format with the z option", function(){
564
- expect(format(date, 'z')).toBe('0');
565
- });
566
-
567
- it("should format with the W option", function(){
568
- expect(format(date, 'W')).toBe('53');
569
- });
570
-
571
- it("should format with the F option", function(){
572
- expect(format(date, 'F')).toBe('January');
573
- });
574
-
575
- it("should format with the m option", function(){
576
- expect(format(date, 'm')).toBe('01');
577
- });
578
-
579
- it("should format with the M option", function(){
580
- expect(format(date, 'M')).toBe('Jan');
581
- });
582
-
583
- it("should format with the n option", function(){
584
- expect(format(date, 'n')).toBe('1');
585
- });
586
-
587
- it("should format with the t option", function(){
588
- expect(format(date, 't')).toBe('31');
589
- });
590
-
591
- it("should format with the L option", function(){
592
- expect(format(date, 'L')).toBe('0');
593
- });
594
-
595
- it("should format with the o option", function(){
596
- expect(format(date, 'o')).toBe('2009');
597
- });
598
-
599
- it("should format with the Y option", function(){
600
- expect(format(date, 'Y')).toBe('2010');
601
- });
602
-
603
- it("should format with the y option", function(){
604
- expect(format(date, 'y')).toBe('10');
605
- });
606
-
607
- it("should format with the a option", function(){
608
- expect(format(date, 'a')).toBe('pm');
609
- });
610
-
611
- it("should format with the A option", function(){
612
- expect(format(date, 'A')).toBe('PM');
613
- });
614
-
615
- it("should format with the g option", function(){
616
- expect(format(date, 'g')).toBe('1');
617
- });
618
-
619
- it("should format with the G option", function(){
620
- expect(format(date, 'G')).toBe('13');
621
- });
622
-
623
- it("should format with the h option", function(){
624
- expect(format(date, 'h')).toBe('01');
625
- });
626
-
627
- it("should format with the H option", function(){
628
- expect(format(date, 'H')).toBe('13');
629
- });
630
-
631
- it("should format with the i option", function(){
632
- expect(format(date, 'i')).toBe('45');
633
- });
634
-
635
- it("should format with the s option", function(){
636
- expect(format(date, 's')).toBe('32');
637
- });
638
-
639
- it("should format with the u option", function(){
640
- expect(format(date, 'u')).toBe('004');
641
- });
642
-
643
- // can't be static, relies on TZ
644
- it("should format with the O option", function(){
645
- var value = Ext.Date.getGMTOffset(date, false);
646
- expect(format(date, 'O')).toBe(value);
647
- });
648
-
649
- // can't be static, relies on TZ
650
- it("should format with the P option", function(){
651
- var value = Ext.Date.getGMTOffset(date, true);
652
- expect(format(date, 'P')).toBe(value);
653
- });
654
-
655
- // can't be static, relies on TZ
656
- it("should format with the T option", function(){
657
- var value = Ext.Date.getTimezone(date);
658
- expect(format(date, 'T')).toBe(value);
659
- });
660
-
661
- // can't be static, relies on TZ
662
- it("should format with the Z option", function(){
663
- var value = (date.getTimezoneOffset() * -60) + '';
664
- expect(format(date, 'Z')).toBe(value);
665
- });
666
-
667
- // can't be static, relies on TZ
668
- it("should format with the c option", function(){
669
- var value = '2010-01-01T13:45:32' + Ext.Date.getGMTOffset(date, true);
670
- expect(format(date, 'c')).toBe(value);
671
- });
672
-
673
- it("should format with the U option", function(){
674
- var value = Math.round((date.getTime() / 1000)) + '';
675
- expect(format(date, 'U')).toBe(value);
676
- });
677
-
678
- it("should format with the MS option", function(){
679
- var value = '\\/Date(' + date.getTime() + ')\\/'
680
- expect(format(date, 'MS')).toBe(value);
681
- });
682
-
683
- it("should return an empty string", function(){
684
- expect(format(undefined, 'd')).toBe('');
685
- expect(format(null, 'd')).toBe('');
686
- expect(format({}, 'd')).toBe('');
687
- expect(format([], 'd')).toBe('');
688
- expect(format('', 'd')).toBe('');
689
- expect(format(true, 'd')).toBe('');
690
- expect(format(1992, 'd')).toBe('');
691
- });
692
-
693
- it("should not return an empty string", function(){
694
- expect(format(new Date(), 'd')).not.toBe('');
695
- });
696
- });
697
- });