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,727 +0,0 @@
1
- /**
2
- * @docauthor Jason Johnston <jason@sencha.com>
3
- *
4
- * A basic text field. Can be used as a direct replacement for traditional text inputs,
5
- * or as the base class for more sophisticated input controls (like {@link Ext.form.field.TextArea}
6
- * and {@link Ext.form.field.ComboBox}). Has support for empty-field placeholder values (see {@link #emptyText}).
7
- *
8
- * # Validation
9
- *
10
- * The Text field has a useful set of validations built in:
11
- *
12
- * - {@link #allowBlank} for making the field required
13
- * - {@link #minLength} for requiring a minimum value length
14
- * - {@link #maxLength} for setting a maximum value length (with {@link #enforceMaxLength} to add it
15
- * as the `maxlength` attribute on the input element)
16
- * - {@link #regex} to specify a custom regular expression for validation
17
- *
18
- * In addition, custom validations may be added:
19
- *
20
- * - {@link #vtype} specifies a virtual type implementation from {@link Ext.form.field.VTypes} which can contain
21
- * custom validation logic
22
- * - {@link #validator} allows a custom arbitrary function to be called during validation
23
- *
24
- * The details around how and when each of these validation options get used are described in the
25
- * documentation for {@link #getErrors}.
26
- *
27
- * By default, the field value is checked for validity immediately while the user is typing in the
28
- * field. This can be controlled with the {@link #validateOnChange}, {@link #checkChangeEvents}, and
29
- * {@link #checkChangeBuffer} configurations. Also see the details on Form Validation in the
30
- * {@link Ext.form.Panel} class documentation.
31
- *
32
- * # Masking and Character Stripping
33
- *
34
- * Text fields can be configured with custom regular expressions to be applied to entered values before
35
- * validation: see {@link #maskRe} and {@link #stripCharsRe} for details.
36
- *
37
- * # Example usage
38
- *
39
- * @example
40
- * Ext.create('Ext.form.Panel', {
41
- * title: 'Contact Info',
42
- * width: 300,
43
- * bodyPadding: 10,
44
- * renderTo: Ext.getBody(),
45
- * items: [{
46
- * xtype: 'textfield',
47
- * name: 'name',
48
- * fieldLabel: 'Name',
49
- * allowBlank: false // requires a non-empty value
50
- * }, {
51
- * xtype: 'textfield',
52
- * name: 'email',
53
- * fieldLabel: 'Email Address',
54
- * vtype: 'email' // requires value to be a valid email address format
55
- * }]
56
- * });
57
- */
58
- Ext.define('Ext.form.field.Text', {
59
- extend:'Ext.form.field.Base',
60
- alias: 'widget.textfield',
61
- requires: ['Ext.form.field.VTypes', 'Ext.layout.component.field.Text'],
62
- alternateClassName: ['Ext.form.TextField', 'Ext.form.Text'],
63
-
64
- /**
65
- * @cfg {String} vtypeText
66
- * A custom error message to display in place of the default message provided for the **`{@link #vtype}`** currently
67
- * set for this field. **Note**: only applies if **`{@link #vtype}`** is set, else ignored.
68
- */
69
-
70
- /**
71
- * @cfg {RegExp} stripCharsRe
72
- * A JavaScript RegExp object used to strip unwanted content from the value
73
- * during input. If `stripCharsRe` is specified,
74
- * every *character sequence* matching `stripCharsRe` will be removed.
75
- */
76
-
77
- /**
78
- * @cfg {Number} size
79
- * An initial value for the 'size' attribute on the text input element. This is only used if the field has no
80
- * configured {@link #width} and is not given a width by its container's layout. Defaults to 20.
81
- */
82
- size: 20,
83
-
84
- /**
85
- * @cfg {Boolean} [grow=false]
86
- * true if this field should automatically grow and shrink to its content
87
- */
88
-
89
- /**
90
- * @cfg {Number} growMin
91
- * The minimum width to allow when `{@link #grow} = true`
92
- */
93
- growMin : 30,
94
-
95
- /**
96
- * @cfg {Number} growMax
97
- * The maximum width to allow when `{@link #grow} = true`
98
- */
99
- growMax : 800,
100
-
101
- /**
102
- * @cfg {String} growAppend
103
- * A string that will be appended to the field's current value for the purposes of calculating the target field
104
- * size. Only used when the {@link #grow} config is true. Defaults to a single capital "W" (the widest character in
105
- * common fonts) to leave enough space for the next typed character and avoid the field value shifting before the
106
- * width is adjusted.
107
- */
108
- //<locale>
109
- growAppend: 'W',
110
- //</locale>
111
-
112
- /**
113
- * @cfg {String} vtype
114
- * A validation type name as defined in {@link Ext.form.field.VTypes}
115
- */
116
-
117
- /**
118
- * @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes (character being
119
- * typed) that do not match.
120
- * Note: It dose not filter characters already in the input.
121
- */
122
-
123
- /**
124
- * @cfg {Boolean} [disableKeyFilter=false]
125
- * Specify true to disable input keystroke filtering
126
- */
127
-
128
- /**
129
- * @cfg {Boolean} allowBlank
130
- * Specify false to validate that the value's length is > 0
131
- */
132
- allowBlank : true,
133
-
134
- /**
135
- * @cfg {Number} minLength
136
- * Minimum input field length required
137
- */
138
- minLength : 0,
139
-
140
- /**
141
- * @cfg {Number} maxLength
142
- * Maximum input field length allowed by validation. This behavior is intended to
143
- * provide instant feedback to the user by improving usability to allow pasting and editing or overtyping and back
144
- * tracking. To restrict the maximum number of characters that can be entered into the field use the
145
- * **{@link Ext.form.field.Text#enforceMaxLength enforceMaxLength}** option.
146
- *
147
- * Defaults to Number.MAX_VALUE.
148
- */
149
- maxLength : Number.MAX_VALUE,
150
-
151
- /**
152
- * @cfg {Boolean} enforceMaxLength
153
- * True to set the maxLength property on the underlying input field. Defaults to false
154
- */
155
-
156
- /**
157
- * @cfg {String} minLengthText
158
- * Error text to display if the **{@link #minLength minimum length}** validation fails.
159
- */
160
- //<locale>
161
- minLengthText : 'The minimum length for this field is {0}',
162
- //</locale>
163
-
164
- /**
165
- * @cfg {String} maxLengthText
166
- * Error text to display if the **{@link #maxLength maximum length}** validation fails
167
- */
168
- //<locale>
169
- maxLengthText : 'The maximum length for this field is {0}',
170
- //</locale>
171
-
172
- /**
173
- * @cfg {Boolean} [selectOnFocus=false]
174
- * true to automatically select any existing field text when the field receives input focus
175
- */
176
-
177
- /**
178
- * @cfg {String} blankText
179
- * The error text to display if the **{@link #allowBlank}** validation fails
180
- */
181
- //<locale>
182
- blankText : 'This field is required',
183
- //</locale>
184
-
185
- /**
186
- * @cfg {Function} validator
187
- * A custom validation function to be called during field validation ({@link #getErrors}).
188
- * If specified, this function will be called first, allowing the developer to override the default validation
189
- * process.
190
- *
191
- * This function will be passed the following parameters:
192
- *
193
- * @cfg {Object} validator.value The current field value
194
- * @cfg {Boolean/String} validator.return
195
- *
196
- * - True if the value is valid
197
- * - An error message if the value is invalid
198
- */
199
-
200
- /**
201
- * @cfg {RegExp} regex
202
- * A JavaScript RegExp object to be tested against the field value during validation.
203
- * If the test fails, the field will be marked invalid using
204
- * either **{@link #regexText}** or **{@link #invalidText}**.
205
- */
206
-
207
- /**
208
- * @cfg {String} regexText
209
- * The error text to display if **{@link #regex}** is used and the test fails during validation
210
- */
211
- regexText : '',
212
-
213
- /**
214
- * @cfg {String} emptyText
215
- * The default text to place into an empty field.
216
- *
217
- * Note that normally this value will be submitted to the server if this field is enabled; to prevent this you can
218
- * set the {@link Ext.form.action.Action#submitEmptyText submitEmptyText} option of {@link Ext.form.Basic#submit} to
219
- * false.
220
- *
221
- * Also note that if you use {@link #inputType inputType}:'file', {@link #emptyText} is not supported and should be
222
- * avoided.
223
- *
224
- * Note that for browsers that support it, setting this property will use the HTML 5 placeholder attribute, and for
225
- * older browsers that don't support the HTML 5 placeholder attribute the value will be placed directly into the input
226
- * element itself as the raw value. This means that older browsers will obfuscate the {@link #emptyText} value for
227
- * password input fields.
228
- */
229
-
230
- /**
231
- * @cfg {String} [emptyCls='x-form-empty-field']
232
- * The CSS class to apply to an empty field to style the **{@link #emptyText}**.
233
- * This class is automatically added and removed as needed depending on the current field value.
234
- */
235
- emptyCls : Ext.baseCSSPrefix + 'form-empty-field',
236
-
237
- /**
238
- * @cfg {Boolean} [enableKeyEvents=false]
239
- * true to enable the proxying of key events for the HTML input field
240
- */
241
-
242
- componentLayout: 'textfield',
243
-
244
- initComponent: function () {
245
- var me = this;
246
-
247
- me.callParent();
248
-
249
- me.addEvents(
250
- /**
251
- * @event autosize
252
- * Fires when the **{@link #autoSize}** function is triggered and the field is resized according to the
253
- * {@link #grow}/{@link #growMin}/{@link #growMax} configs as a result. This event provides a hook for the
254
- * developer to apply additional logic at runtime to resize the field if needed.
255
- * @param {Ext.form.field.Text} this This text field
256
- * @param {Number} width The new field width
257
- */
258
- 'autosize',
259
-
260
- /**
261
- * @event keydown
262
- * Keydown input field event. This event only fires if **{@link #enableKeyEvents}** is set to true.
263
- * @param {Ext.form.field.Text} this This text field
264
- * @param {Ext.EventObject} e
265
- */
266
- 'keydown',
267
- /**
268
- * @event keyup
269
- * Keyup input field event. This event only fires if **{@link #enableKeyEvents}** is set to true.
270
- * @param {Ext.form.field.Text} this This text field
271
- * @param {Ext.EventObject} e
272
- */
273
- 'keyup',
274
- /**
275
- * @event keypress
276
- * Keypress input field event. This event only fires if **{@link #enableKeyEvents}** is set to true.
277
- * @param {Ext.form.field.Text} this This text field
278
- * @param {Ext.EventObject} e
279
- */
280
- 'keypress'
281
- );
282
- me.addStateEvents('change');
283
- me.setGrowSizePolicy();
284
- },
285
-
286
- setGrowSizePolicy: function(){
287
- if (this.grow) {
288
- this.shrinkWrap |= 1; // width must shrinkWrap
289
- }
290
- },
291
-
292
- // private
293
- initEvents : function(){
294
- var me = this,
295
- el = me.inputEl;
296
-
297
- me.callParent();
298
- if(me.selectOnFocus || me.emptyText){
299
- me.mon(el, 'mousedown', me.onMouseDown, me);
300
- }
301
- if(me.maskRe || (me.vtype && me.disableKeyFilter !== true && (me.maskRe = Ext.form.field.VTypes[me.vtype+'Mask']))){
302
- me.mon(el, 'keypress', me.filterKeys, me);
303
- }
304
-
305
- if (me.enableKeyEvents) {
306
- me.mon(el, {
307
- scope: me,
308
- keyup: me.onKeyUp,
309
- keydown: me.onKeyDown,
310
- keypress: me.onKeyPress
311
- });
312
- }
313
- },
314
-
315
- /**
316
- * @private
317
- * Override. Treat undefined and null values as equal to an empty string value.
318
- */
319
- isEqual: function(value1, value2) {
320
- return this.isEqualAsString(value1, value2);
321
- },
322
-
323
- /**
324
- * @private
325
- * If grow=true, invoke the autoSize method when the field's value is changed.
326
- */
327
- onChange: function() {
328
- this.callParent();
329
- this.autoSize();
330
- },
331
-
332
- getSubTplData: function() {
333
- var me = this,
334
- value = me.getRawValue(),
335
- isEmpty = me.emptyText && value.length < 1,
336
- placeholder;
337
-
338
- if (isEmpty) {
339
- if (Ext.supports.Placeholder) {
340
- placeholder = me.emptyText;
341
- } else {
342
- value = me.emptyText;
343
- }
344
- }
345
-
346
- return Ext.apply(me.callParent(), {
347
- maxLength : me.enforceMaxLength ? me.maxLength : undefined,
348
- readOnly : me.readOnly,
349
- placeholder : placeholder,
350
- value : value,
351
- fieldCls : me.fieldCls + ((isEmpty && (placeholder || value)) ? ' ' + me.emptyCls : '')
352
- });
353
- },
354
-
355
- afterRender: function(){
356
- this.autoSize();
357
- this.callParent();
358
- },
359
-
360
- onMouseDown: function(e){
361
- var me = this;
362
- if(!me.hasFocus){
363
- me.mon(me.inputEl, 'mouseup', Ext.emptyFn, me, { single: true, preventDefault: true });
364
- }
365
- },
366
-
367
- /**
368
- * Performs any necessary manipulation of a raw String value to prepare it for conversion and/or
369
- * {@link #validate validation}. For text fields this applies the configured {@link #stripCharsRe}
370
- * to the raw value.
371
- * @param {String} value The unprocessed string value
372
- * @return {String} The processed string value
373
- */
374
- processRawValue: function(value) {
375
- var me = this,
376
- stripRe = me.stripCharsRe,
377
- newValue;
378
-
379
- if (stripRe) {
380
- newValue = value.replace(stripRe, '');
381
- if (newValue !== value) {
382
- me.setRawValue(newValue);
383
- value = newValue;
384
- }
385
- }
386
- return value;
387
- },
388
-
389
- //private
390
- onDisable: function(){
391
- this.callParent();
392
- if (Ext.isIE) {
393
- this.inputEl.dom.unselectable = 'on';
394
- }
395
- },
396
-
397
- //private
398
- onEnable: function(){
399
- this.callParent();
400
- if (Ext.isIE) {
401
- this.inputEl.dom.unselectable = '';
402
- }
403
- },
404
-
405
- onKeyDown: function(e) {
406
- this.fireEvent('keydown', this, e);
407
- },
408
-
409
- onKeyUp: function(e) {
410
- this.fireEvent('keyup', this, e);
411
- },
412
-
413
- onKeyPress: function(e) {
414
- this.fireEvent('keypress', this, e);
415
- },
416
-
417
- /**
418
- * Resets the current field value to the originally-loaded value and clears any validation messages.
419
- * Also adds **{@link #emptyText}** and **{@link #emptyCls}** if the original value was blank.
420
- */
421
- reset : function(){
422
- this.callParent();
423
- this.applyEmptyText();
424
- },
425
-
426
- applyEmptyText : function(){
427
- var me = this,
428
- emptyText = me.emptyText,
429
- isEmpty;
430
-
431
- if (me.rendered && emptyText) {
432
- isEmpty = me.getRawValue().length < 1 && !me.hasFocus;
433
-
434
- if (Ext.supports.Placeholder) {
435
- me.inputEl.dom.placeholder = emptyText;
436
- } else if (isEmpty) {
437
- me.setRawValue(emptyText);
438
- }
439
-
440
- //all browsers need this because of a styling issue with chrome + placeholders.
441
- //the text isnt vertically aligned when empty (and using the placeholder)
442
- if (isEmpty) {
443
- me.inputEl.addCls(me.emptyCls);
444
- }
445
-
446
- me.autoSize();
447
- }
448
- },
449
-
450
- afterFirstLayout: function() {
451
- this.callParent();
452
- if (Ext.isIE && this.disabled) {
453
- var el = this.inputEl;
454
- if (el) {
455
- el.dom.unselectable = 'on';
456
- }
457
- }
458
- },
459
-
460
- // private
461
- preFocus : function(){
462
- var me = this,
463
- inputEl = me.inputEl,
464
- emptyText = me.emptyText,
465
- isEmpty;
466
-
467
- me.callParent(arguments);
468
- if (emptyText && !Ext.supports.Placeholder && inputEl.dom.value === emptyText) {
469
- me.setRawValue('');
470
- isEmpty = true;
471
- inputEl.removeCls(me.emptyCls);
472
- } else if (Ext.supports.Placeholder) {
473
- me.inputEl.removeCls(me.emptyCls);
474
- }
475
- if (me.selectOnFocus || isEmpty) {
476
- inputEl.dom.select();
477
- }
478
- },
479
-
480
- onFocus: function() {
481
- var me = this;
482
- me.callParent(arguments);
483
- if (me.emptyText) {
484
- me.autoSize();
485
- }
486
- },
487
-
488
- // private
489
- postBlur : function(){
490
- this.callParent(arguments);
491
- this.applyEmptyText();
492
- },
493
-
494
- // private
495
- filterKeys : function(e){
496
- /*
497
- * On European keyboards, the right alt key, Alt Gr, is used to type certain special characters.
498
- * JS detects a keypress of this as ctrlKey & altKey. As such, we check that alt isn't pressed
499
- * so we can still process these special characters.
500
- */
501
- if (e.ctrlKey && !e.altKey) {
502
- return;
503
- }
504
- var key = e.getKey(),
505
- charCode = String.fromCharCode(e.getCharCode());
506
-
507
- if(Ext.isGecko && (e.isNavKeyPress() || key === e.BACKSPACE || (key === e.DELETE && e.button === -1))){
508
- return;
509
- }
510
-
511
- if(!Ext.isGecko && e.isSpecialKey() && !charCode){
512
- return;
513
- }
514
- if(!this.maskRe.test(charCode)){
515
- e.stopEvent();
516
- }
517
- },
518
-
519
- getState: function() {
520
- return this.addPropertyToState(this.callParent(), 'value');
521
- },
522
-
523
- applyState: function(state) {
524
- this.callParent(arguments);
525
- if(state.hasOwnProperty('value')) {
526
- this.setValue(state.value);
527
- }
528
- },
529
-
530
- /**
531
- * Returns the raw String value of the field, without performing any normalization, conversion, or validation. Gets
532
- * the current value of the input element if the field has been rendered, ignoring the value if it is the
533
- * {@link #emptyText}. To get a normalized and converted value see {@link #getValue}.
534
- * @return {String} The raw String value of the field
535
- */
536
- getRawValue: function() {
537
- var me = this,
538
- v = me.callParent();
539
- if (v === me.emptyText) {
540
- v = '';
541
- }
542
- return v;
543
- },
544
-
545
- /**
546
- * Sets a data value into the field and runs the change detection and validation. Also applies any configured
547
- * {@link #emptyText} for text fields. To set the value directly without these inspections see {@link #setRawValue}.
548
- * @param {Object} value The value to set
549
- * @return {Ext.form.field.Text} this
550
- */
551
- setValue: function(value) {
552
- var me = this,
553
- inputEl = me.inputEl;
554
-
555
- if (inputEl && me.emptyText && !Ext.isEmpty(value)) {
556
- inputEl.removeCls(me.emptyCls);
557
- }
558
-
559
- me.callParent(arguments);
560
-
561
- me.applyEmptyText();
562
- return me;
563
- },
564
-
565
- /**
566
- * Validates a value according to the field's validation rules and returns an array of errors
567
- * for any failing validations. Validation rules are processed in the following order:
568
- *
569
- * 1. **Field specific validator**
570
- *
571
- * A validator offers a way to customize and reuse a validation specification.
572
- * If a field is configured with a `{@link #validator}`
573
- * function, it will be passed the current field value. The `{@link #validator}`
574
- * function is expected to return either:
575
- *
576
- * - Boolean `true` if the value is valid (validation continues).
577
- * - a String to represent the invalid message if invalid (validation halts).
578
- *
579
- * 2. **Basic Validation**
580
- *
581
- * If the `{@link #validator}` has not halted validation,
582
- * basic validation proceeds as follows:
583
- *
584
- * - `{@link #allowBlank}` : (Invalid message = `{@link #emptyText}`)
585
- *
586
- * Depending on the configuration of `{@link #allowBlank}`, a
587
- * blank field will cause validation to halt at this step and return
588
- * Boolean true or false accordingly.
589
- *
590
- * - `{@link #minLength}` : (Invalid message = `{@link #minLengthText}`)
591
- *
592
- * If the passed value does not satisfy the `{@link #minLength}`
593
- * specified, validation halts.
594
- *
595
- * - `{@link #maxLength}` : (Invalid message = `{@link #maxLengthText}`)
596
- *
597
- * If the passed value does not satisfy the `{@link #maxLength}`
598
- * specified, validation halts.
599
- *
600
- * 3. **Preconfigured Validation Types (VTypes)**
601
- *
602
- * If none of the prior validation steps halts validation, a field
603
- * configured with a `{@link #vtype}` will utilize the
604
- * corresponding {@link Ext.form.field.VTypes VTypes} validation function.
605
- * If invalid, either the field's `{@link #vtypeText}` or
606
- * the VTypes vtype Text property will be used for the invalid message.
607
- * Keystrokes on the field will be filtered according to the VTypes
608
- * vtype Mask property.
609
- *
610
- * 4. **Field specific regex test**
611
- *
612
- * If none of the prior validation steps halts validation, a field's
613
- * configured `{@link #regex}` test will be processed.
614
- * The invalid message for this test is configured with `{@link #regexText}`
615
- *
616
- * @param {Object} value The value to validate. The processed raw value will be used if nothing is passed.
617
- * @return {String[]} Array of any validation errors
618
- */
619
- getErrors: function(value) {
620
- var me = this,
621
- errors = me.callParent(arguments),
622
- validator = me.validator,
623
- emptyText = me.emptyText,
624
- allowBlank = me.allowBlank,
625
- vtype = me.vtype,
626
- vtypes = Ext.form.field.VTypes,
627
- regex = me.regex,
628
- format = Ext.String.format,
629
- msg;
630
-
631
- value = value || me.processRawValue(me.getRawValue());
632
-
633
- if (Ext.isFunction(validator)) {
634
- msg = validator.call(me, value);
635
- if (msg !== true) {
636
- errors.push(msg);
637
- }
638
- }
639
-
640
- if (value.length < 1 || value === emptyText) {
641
- if (!allowBlank) {
642
- errors.push(me.blankText);
643
- }
644
- //if value is blank, there cannot be any additional errors
645
- return errors;
646
- }
647
-
648
- if (value.length < me.minLength) {
649
- errors.push(format(me.minLengthText, me.minLength));
650
- }
651
-
652
- if (value.length > me.maxLength) {
653
- errors.push(format(me.maxLengthText, me.maxLength));
654
- }
655
-
656
- if (vtype) {
657
- if(!vtypes[vtype](value, me)){
658
- errors.push(me.vtypeText || vtypes[vtype +'Text']);
659
- }
660
- }
661
-
662
- if (regex && !regex.test(value)) {
663
- errors.push(me.regexText || me.invalidText);
664
- }
665
-
666
- return errors;
667
- },
668
-
669
- /**
670
- * Selects text in this field
671
- * @param {Number} [start=0] The index where the selection should start
672
- * @param {Number} [end] The index where the selection should end (defaults to the text length)
673
- */
674
- selectText : function(start, end){
675
- var me = this,
676
- v = me.getRawValue(),
677
- doFocus = true,
678
- el = me.inputEl.dom,
679
- undef,
680
- range;
681
-
682
- if (v.length > 0) {
683
- start = start === undef ? 0 : start;
684
- end = end === undef ? v.length : end;
685
- if (el.setSelectionRange) {
686
- el.setSelectionRange(start, end);
687
- }
688
- else if(el.createTextRange) {
689
- range = el.createTextRange();
690
- range.moveStart('character', start);
691
- range.moveEnd('character', end - v.length);
692
- range.select();
693
- }
694
- doFocus = Ext.isGecko || Ext.isOpera;
695
- }
696
- if (doFocus) {
697
- me.focus();
698
- }
699
- },
700
-
701
- /**
702
- * Automatically grows the field to accomodate the width of the text up to the maximum field width allowed. This
703
- * only takes effect if {@link #grow} = true, and fires the {@link #autosize} event if the width changes.
704
- */
705
- autoSize: function() {
706
- var me = this;
707
- if (me.grow && me.rendered) {
708
- me.autoSizing = true;
709
- me.updateLayout();
710
- }
711
- },
712
-
713
- afterComponentLayout: function() {
714
- var me = this,
715
- width;
716
-
717
- me.callParent(arguments);
718
- if (me.autoSizing) {
719
- width = me.inputEl.getWidth();
720
- if (width !== me.lastInputWidth) {
721
- me.fireEvent('autosize', me, width);
722
- me.lastInputWidth = width;
723
- delete me.autoSizing;
724
- }
725
- }
726
- }
727
- });