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,148 +0,0 @@
1
- describe("Ext.Version", function() {
2
- var version = new Ext.Version("1.2.3beta");
3
-
4
- describe("toString", function() {
5
- it("should cast to string", function() {
6
- expect(version+"").toBe("1.2.3beta");
7
- });
8
- });
9
-
10
- describe("getMajor", function() {
11
- it("should return 1", function() {
12
- expect(version.getMajor()).toBe(1);
13
- });
14
- });
15
-
16
- describe("getMinor", function() {
17
- it("should return 2", function() {
18
- expect(version.getMinor()).toBe(2);
19
- });
20
- });
21
-
22
- describe("getPatch", function() {
23
- it("should return 3", function() {
24
- expect(version.getPatch()).toBe(3);
25
- });
26
- });
27
-
28
- describe("getBuild", function() {
29
- it("should return 0", function() {
30
- expect(version.getBuild()).toBe(0);
31
- });
32
- });
33
-
34
- describe("getRelease", function() {
35
- it("should return beta", function() {
36
- expect(version.getRelease()).toBe("beta");
37
- });
38
- });
39
-
40
- describe("getShortVersion", function() {
41
- it("should return 123", function() {
42
- expect(version.getShortVersion()).toBe("123");
43
- });
44
- });
45
-
46
- describe("toArray", function() {
47
- it("should return [1, 2, 3, 0, 'beta']", function() {
48
- expect(version.toArray()).toEqual([1, 2, 3, 0, 'beta']);
49
- });
50
- });
51
-
52
- describe("isGreaterThan", function() {
53
- it("should be greater than 1.2.3alpha", function() {
54
- expect(version.isGreaterThan("1.2.3alpha")).toBeTruthy();
55
- });
56
- it("should not be greater than 1.2.3RC", function() {
57
- expect(version.isGreaterThan("1.2.3RC")).toBeFalsy();
58
- });
59
- });
60
-
61
- describe("isLessThan", function() {
62
- it("should not be smaller than 1.2.3alpha", function() {
63
- expect(version.isLessThan("1.2.3alpha")).toBeFalsy();
64
- });
65
- it("should be smaller than 1.2.3RC", function() {
66
- expect(version.isLessThan("1.2.3RC")).toBeTruthy();
67
- });
68
- });
69
-
70
- describe("equals", function() {
71
- it("should equals 1.2.3beta", function() {
72
- expect(version.equals("1.2.3beta")).toBeTruthy();
73
- });
74
- });
75
-
76
- describe("match", function() {
77
- it("should match integer 1", function() {
78
- expect(version.match(1)).toBeTruthy();
79
- });
80
- it("should match float 1.2", function() {
81
- expect(version.match(1.2)).toBeTruthy();
82
- });
83
- it("should match string 1.2.3", function() {
84
- expect(version.match("1.2.3")).toBeTruthy();
85
- });
86
- it("should not match string 1.2.3alpha", function() {
87
- expect(version.match("1.2.3alpha")).toBeFalsy();
88
- });
89
- });
90
-
91
- describe("setVersion", function() {
92
- it("should return an instance of Ext.Version", function() {
93
- Ext.setVersion("test", "1.0.1");
94
- expect(Ext.getVersion("test") instanceof Ext.Version).toBe(true);
95
- });
96
- });
97
-
98
- describe("statics", function() {
99
- describe("getComponentValue", function() {
100
- it("should return 0", function() {
101
- expect(Ext.Version.getComponentValue(undefined)).toBe(0);
102
- });
103
-
104
- it("should return -2", function() {
105
- expect(Ext.Version.getComponentValue(-2)).toBe(-2);
106
- });
107
-
108
- it("should return 2", function() {
109
- expect(Ext.Version.getComponentValue("2")).toBe(2);
110
- });
111
-
112
- it("should return -5", function() {
113
- expect(Ext.Version.getComponentValue("alpha")).toBe(-5);
114
- });
115
-
116
- it("should return unknown", function() {
117
- expect(Ext.Version.getComponentValue("unknown")).toBe("unknown");
118
- });
119
- });
120
-
121
- describe("compare", function() {
122
- it("should return 1", function() {
123
- expect(Ext.Version.compare("1.2.3beta", "1.2.2")).toBe(1);
124
- expect(Ext.Version.compare("1.2.3beta", 1)).toBe(1);
125
- expect(Ext.Version.compare("1.2.3beta", "1.2.3dev")).toBe(1);
126
- expect(Ext.Version.compare("1.2.3beta", "1.2.3alpha")).toBe(1);
127
- expect(Ext.Version.compare("1.2.3beta", "1.2.3a")).toBe(1);
128
- expect(Ext.Version.compare("1.2.3beta", "1.2.3alpha")).toBe(1);
129
- });
130
-
131
-
132
- it("should return -1", function() {
133
- expect(Ext.Version.compare("1.2.3beta", 2)).toBe(-1);
134
- expect(Ext.Version.compare("1.2.3beta", "1.2.4")).toBe(-1);
135
- expect(Ext.Version.compare("1.2.3beta", "1.2.3RC")).toBe(-1);
136
- expect(Ext.Version.compare("1.2.3beta", "1.2.3rc")).toBe(-1);
137
- expect(Ext.Version.compare("1.2.3beta", "1.2.3#")).toBe(-1);
138
- expect(Ext.Version.compare("1.2.3beta", "1.2.3pl")).toBe(-1);
139
- expect(Ext.Version.compare("1.2.3beta", "1.2.3p")).toBe(-1);
140
- });
141
-
142
- it("should return 0", function() {
143
- expect(Ext.Version.compare("1.2.3beta", "1.2.3b")).toBe(0);
144
- expect(Ext.Version.compare("1.2.3beta", "1.2.3beta")).toBe(0);
145
- });
146
- });
147
- });
148
- });
@@ -1,19 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
- "http://www.w3.org/TR/html4/loose.dtd">
3
- <html>
4
- <head>
5
- <script type="text/javascript" src="bootstrap.js"></script>
6
- <script type="text/javascript">
7
- Ext.require('*');
8
- Ext.onReady(function() {
9
- TestBootstrap.loadSpecs(function(){
10
- if (parent && parent.Test) {
11
- jasmine.getEnv().addReporter(parent.Test.SandBox.reporter);
12
- }
13
- jasmine.getEnv().execute();
14
- });
15
- });
16
- </script>
17
- </head>
18
- <body></body>
19
- </html>
@@ -1,887 +0,0 @@
1
- /**
2
- * @author Ed Spencer
3
- *
4
- * AbstractStore is a superclass of {@link Ext.data.Store} and {@link Ext.data.TreeStore}. It's never used directly,
5
- * but offers a set of methods used by both of those subclasses.
6
- *
7
- * We've left it here in the docs for reference purposes, but unless you need to make a whole new type of Store, what
8
- * you're probably looking for is {@link Ext.data.Store}. If you're still interested, here's a brief description of what
9
- * AbstractStore is and is not.
10
- *
11
- * AbstractStore provides the basic configuration for anything that can be considered a Store. It expects to be
12
- * given a {@link Ext.data.Model Model} that represents the type of data in the Store. It also expects to be given a
13
- * {@link Ext.data.proxy.Proxy Proxy} that handles the loading of data into the Store.
14
- *
15
- * AbstractStore provides a few helpful methods such as {@link #method-load} and {@link #sync}, which load and save data
16
- * respectively, passing the requests through the configured {@link #proxy}. Both built-in Store subclasses add extra
17
- * behavior to each of these functions. Note also that each AbstractStore subclass has its own way of storing data -
18
- * in {@link Ext.data.Store} the data is saved as a flat {@link Ext.util.MixedCollection MixedCollection}, whereas in
19
- * {@link Ext.data.TreeStore TreeStore} we use a {@link Ext.data.Tree} to maintain the data's hierarchy.
20
- *
21
- * The store provides filtering and sorting support. This sorting/filtering can happen on the client side
22
- * or can be completed on the server. This is controlled by the {@link Ext.data.Store#remoteSort remoteSort} and
23
- * {@link Ext.data.Store#remoteFilter remoteFilter} config options. For more information see the {@link #sort} and
24
- * {@link Ext.data.Store#filter filter} methods.
25
- */
26
- Ext.define('Ext.data.AbstractStore', {
27
- requires: [
28
- 'Ext.util.MixedCollection',
29
- 'Ext.data.proxy.Proxy',
30
- 'Ext.data.Operation',
31
- 'Ext.util.Filter'
32
- ],
33
-
34
- mixins: {
35
- observable: 'Ext.util.Observable',
36
- sortable: 'Ext.util.Sortable'
37
- },
38
-
39
- statics: {
40
- create: function(store) {
41
- if (!store.isStore) {
42
- if (!store.type) {
43
- store.type = 'store';
44
- }
45
- store = Ext.createByAlias('store.' + store.type, store);
46
- }
47
- return store;
48
- }
49
- },
50
-
51
- remoteSort : false,
52
- remoteFilter: false,
53
-
54
- /**
55
- * @cfg {String/Ext.data.proxy.Proxy/Object} proxy
56
- * The Proxy to use for this Store. This can be either a string, a config object or a Proxy instance -
57
- * see {@link #setProxy} for details.
58
- */
59
-
60
- /**
61
- * @cfg {Boolean/Object} autoLoad
62
- * If data is not specified, and if autoLoad is true or an Object, this store's load method is automatically called
63
- * after creation. If the value of autoLoad is an Object, this Object will be passed to the store's load method.
64
- * Defaults to false.
65
- */
66
- autoLoad: undefined,
67
-
68
- /**
69
- * @cfg {Boolean} autoSync
70
- * True to automatically sync the Store with its Proxy after every edit to one of its Records. Defaults to false.
71
- */
72
- autoSync: false,
73
-
74
- /**
75
- * @property {String} batchUpdateMode
76
- * Sets the updating behavior based on batch synchronization. 'operation' (the default) will update the Store's
77
- * internal representation of the data after each operation of the batch has completed, 'complete' will wait until
78
- * the entire batch has been completed before updating the Store's data. 'complete' is a good choice for local
79
- * storage proxies, 'operation' is better for remote proxies, where there is a comparatively high latency.
80
- */
81
- batchUpdateMode: 'operation',
82
-
83
- /**
84
- * @property {Boolean} filterOnLoad
85
- * If true, any filters attached to this Store will be run after loading data, before the datachanged event is fired.
86
- * Defaults to true, ignored if {@link Ext.data.Store#remoteFilter remoteFilter} is true
87
- */
88
- filterOnLoad: true,
89
-
90
- /**
91
- * @property {Boolean} sortOnLoad
92
- * If true, any sorters attached to this Store will be run after loading data, before the datachanged event is fired.
93
- * Defaults to true, igored if {@link Ext.data.Store#remoteSort remoteSort} is true
94
- */
95
- sortOnLoad: true,
96
-
97
- /**
98
- * @property {Boolean} implicitModel
99
- * True if a model was created implicitly for this Store. This happens if a fields array is passed to the Store's
100
- * constructor instead of a model constructor or name.
101
- * @private
102
- */
103
- implicitModel: false,
104
-
105
- /**
106
- * @property {String} defaultProxyType
107
- * The string type of the Proxy to create if none is specified. This defaults to creating a
108
- * {@link Ext.data.proxy.Memory memory proxy}.
109
- */
110
- defaultProxyType: 'memory',
111
-
112
- /**
113
- * @property {Boolean} isDestroyed
114
- * True if the Store has already been destroyed. If this is true, the reference to Store should be deleted
115
- * as it will not function correctly any more.
116
- */
117
- isDestroyed: false,
118
-
119
- /**
120
- * @property {Boolean} isStore
121
- * `true` in this class to identify an object as an instantiated Store, or subclass thereof.
122
- */
123
- isStore: true,
124
-
125
- /**
126
- * @cfg {String} storeId
127
- * Unique identifier for this store. If present, this Store will be registered with the {@link Ext.data.StoreManager},
128
- * making it easy to reuse elsewhere.
129
- *
130
- * Note that when store is instatiated by Controller, the storeId will be overridden by the name of the store.
131
- */
132
-
133
- /**
134
- * @cfg {Object[]} fields
135
- * This may be used in place of specifying a {@link #model} configuration. The fields should be a
136
- * set of {@link Ext.data.Field} configuration objects. The store will automatically create a {@link Ext.data.Model}
137
- * with these fields. In general this configuration option should be avoided, it exists for the purposes of
138
- * backwards compatibility. For anything more complicated, such as specifying a particular id property or
139
- * associations, a {@link Ext.data.Model} should be defined and specified for the {@link #model}
140
- * config.
141
- */
142
-
143
- /**
144
- * @cfg {String} model
145
- * Name of the {@link Ext.data.Model Model} associated with this store.
146
- * The string is used as an argument for {@link Ext.ModelManager#getModel}.
147
- */
148
-
149
- /**
150
- * @cfg {Object[]} filters
151
- * Array of {@link Ext.util.Filter Filters} for this store.
152
- */
153
-
154
- sortRoot: 'data',
155
-
156
- //documented above
157
- constructor: function(config) {
158
- var me = this,
159
- filters;
160
-
161
- /**
162
- * @event add
163
- * Fired when a Model instance has been added to this Store
164
- * @param {Ext.data.Store} store The store
165
- * @param {Ext.data.Model[]} records The Model instances that were added
166
- * @param {Number} index The index at which the instances were inserted
167
- */
168
-
169
- /**
170
- * @event remove
171
- * Fired when a Model instance has been removed from this Store
172
- * @param {Ext.data.Store} store The Store object
173
- * @param {Ext.data.Model} record The record that was removed
174
- * @param {Number} index The index of the record that was removed
175
- */
176
-
177
- /**
178
- * @event update
179
- * Fires when a Model instance has been updated
180
- * @param {Ext.data.Store} this
181
- * @param {Ext.data.Model} record The Model instance that was updated
182
- * @param {String} operation The update operation being performed. Value may be one of:
183
- *
184
- * Ext.data.Model.EDIT
185
- * Ext.data.Model.REJECT
186
- * Ext.data.Model.COMMIT
187
- * @param {String[]} modifiedFieldNames Array of field names changed during edit.
188
- */
189
-
190
- /**
191
- * @event datachanged
192
- * Fires whenever the records in the Store have changed in some way - this could include adding or removing
193
- * records, or updating the data in existing records
194
- * @param {Ext.data.Store} this The data store
195
- */
196
-
197
- /**
198
- * @event refresh
199
- * Fires when the data cache has changed in a bulk manner (e.g., it has been sorted, filtered, etc.) and a
200
- * widget that is using this Store as a Record cache should refresh its view.
201
- * @param {Ext.data.Store} this The data store
202
- */
203
-
204
- /**
205
- * @event beforeload
206
- * Fires before a request is made for a new data object. If the beforeload handler returns false the load
207
- * action will be canceled.
208
- * @param {Ext.data.Store} store This Store
209
- * @param {Ext.data.Operation} operation The Ext.data.Operation object that will be passed to the Proxy to
210
- * load the Store
211
- */
212
-
213
- /**
214
- * @event load
215
- * Fires whenever the store reads data from a remote data source.
216
- * @param {Ext.data.Store} this
217
- * @param {Ext.data.Model[]} records An array of records
218
- * @param {Boolean} successful True if the operation was successful.
219
- */
220
-
221
- /**
222
- * @event write
223
- * Fires whenever a successful write has been made via the configured {@link #proxy Proxy}
224
- * @param {Ext.data.Store} store This Store
225
- * @param {Ext.data.Operation} operation The {@link Ext.data.Operation Operation} object that was used in
226
- * the write
227
- */
228
-
229
- /**
230
- * @event beforesync
231
- * Fired before a call to {@link #sync} is executed. Return false from any listener to cancel the sync
232
- * @param {Object} options Hash of all records to be synchronized, broken down into create, update and destroy
233
- */
234
- /**
235
- * @event clear
236
- * Fired after the {@link #removeAll} method is called.
237
- * @param {Ext.data.Store} this
238
- */
239
- /**
240
- * @event metachange
241
- * Fires when this store's underlying reader (available via the proxy) provides new metadata.
242
- * Metadata usually consists of new field definitions, but can include any configuration data
243
- * required by an application, and can be processed as needed in the event handler.
244
- * This event is currently only fired for JsonReaders.
245
- * @param {Ext.data.Store} this
246
- * @param {Object} meta The JSON metadata
247
- */
248
-
249
- Ext.apply(me, config);
250
- // don't use *config* anymore from here on... use *me* instead...
251
-
252
- /**
253
- * Temporary cache in which removed model instances are kept until successfully synchronised with a Proxy,
254
- * at which point this is cleared.
255
- * @protected
256
- * @property {Ext.data.Model[]} removed
257
- */
258
- me.removed = [];
259
-
260
- me.mixins.observable.constructor.apply(me, arguments);
261
- me.model = Ext.ModelManager.getModel(me.model);
262
-
263
- /**
264
- * @property {Object} modelDefaults
265
- * @private
266
- * A set of default values to be applied to every model instance added via {@link #insert} or created via {@link #create}.
267
- * This is used internally by associations to set foreign keys and other fields. See the Association classes source code
268
- * for examples. This should not need to be used by application developers.
269
- */
270
- Ext.applyIf(me, {
271
- modelDefaults: {}
272
- });
273
-
274
- //Supports the 3.x style of simply passing an array of fields to the store, implicitly creating a model
275
- if (!me.model && me.fields) {
276
- me.model = Ext.define('Ext.data.Store.ImplicitModel-' + (me.storeId || Ext.id()), {
277
- extend: 'Ext.data.Model',
278
- fields: me.fields,
279
- proxy: me.proxy || me.defaultProxyType
280
- });
281
-
282
- delete me.fields;
283
-
284
- me.implicitModel = true;
285
- }
286
-
287
- // <debug>
288
- if (!me.model && me.useModelWarning !== false) {
289
- if (Ext.isDefined(Ext.global.console)) {
290
- Ext.global.console.warn('Store defined with no model. You may have mistyped the model name.');
291
- }
292
- }
293
- // </debug>
294
-
295
- //ensures that the Proxy is instantiated correctly
296
- me.setProxy(me.proxy || me.model.getProxy());
297
-
298
- me.proxy.on('metachange', me.onMetaChange, me);
299
-
300
- if (me.id && !me.storeId) {
301
- me.storeId = me.id;
302
- delete me.id;
303
- }
304
-
305
- if (me.storeId) {
306
- Ext.data.StoreManager.register(me);
307
- }
308
-
309
- me.mixins.sortable.initSortable.call(me);
310
-
311
- /**
312
- * @property {Ext.util.MixedCollection} filters
313
- * The collection of {@link Ext.util.Filter Filters} currently applied to this Store
314
- */
315
- filters = me.decodeFilters(me.filters);
316
- me.filters = new Ext.util.MixedCollection();
317
- me.filters.addAll(filters);
318
- },
319
-
320
- /**
321
- * Sets the Store's Proxy by string, config object or Proxy instance
322
- * @param {String/Object/Ext.data.proxy.Proxy} proxy The new Proxy, which can be either a type string, a configuration object
323
- * or an Ext.data.proxy.Proxy instance
324
- * @return {Ext.data.proxy.Proxy} The attached Proxy object
325
- */
326
- setProxy: function(proxy) {
327
- var me = this;
328
-
329
- if (proxy instanceof Ext.data.proxy.Proxy) {
330
- proxy.setModel(me.model);
331
- } else {
332
- if (Ext.isString(proxy)) {
333
- proxy = {
334
- type: proxy
335
- };
336
- }
337
- Ext.applyIf(proxy, {
338
- model: me.model
339
- });
340
-
341
- proxy = Ext.createByAlias('proxy.' + proxy.type, proxy);
342
- }
343
-
344
- me.proxy = proxy;
345
-
346
- return me.proxy;
347
- },
348
-
349
- /**
350
- * Returns the proxy currently attached to this proxy instance
351
- * @return {Ext.data.proxy.Proxy} The Proxy instance
352
- */
353
- getProxy: function() {
354
- return this.proxy;
355
- },
356
-
357
- // private
358
- onMetaChange: function(proxy, meta) {
359
- this.fireEvent('metachange', this, meta);
360
- },
361
-
362
- //saves any phantom records
363
- create: function(data, options) {
364
- var me = this,
365
- instance = Ext.ModelManager.create(Ext.applyIf(data, me.modelDefaults), me.model.modelName),
366
- operation;
367
-
368
- options = options || {};
369
-
370
- Ext.applyIf(options, {
371
- action : 'create',
372
- records: [instance]
373
- });
374
-
375
- operation = new Ext.data.Operation(options);
376
-
377
- me.proxy.create(operation, me.onProxyWrite, me);
378
-
379
- return instance;
380
- },
381
-
382
- read: function() {
383
- return this.load.apply(this, arguments);
384
- },
385
-
386
- update: function(options) {
387
- var me = this,
388
- operation;
389
- options = options || {};
390
-
391
- Ext.applyIf(options, {
392
- action : 'update',
393
- records: me.getUpdatedRecords()
394
- });
395
-
396
- operation = new Ext.data.Operation(options);
397
-
398
- return me.proxy.update(operation, me.onProxyWrite, me);
399
- },
400
-
401
- /**
402
- * @private
403
- * Callback for any write Operation over the Proxy. Updates the Store's MixedCollection to reflect
404
- * the updates provided by the Proxy
405
- */
406
- onProxyWrite: function(operation) {
407
- var me = this,
408
- success = operation.wasSuccessful(),
409
- records = operation.getRecords();
410
-
411
- switch (operation.action) {
412
- case 'create':
413
- me.onCreateRecords(records, operation, success);
414
- break;
415
- case 'update':
416
- me.onUpdateRecords(records, operation, success);
417
- break;
418
- case 'destroy':
419
- me.onDestroyRecords(records, operation, success);
420
- break;
421
- }
422
-
423
- if (success) {
424
- me.fireEvent('write', me, operation);
425
- me.fireEvent('datachanged', me);
426
- me.fireEvent('refresh', me);
427
- }
428
- //this is a callback that would have been passed to the 'create', 'update' or 'destroy' function and is optional
429
- Ext.callback(operation.callback, operation.scope || me, [records, operation, success]);
430
- },
431
-
432
- // may be implemented by store subclasses
433
- onCreateRecords: Ext.emptyFn,
434
-
435
- // may be implemented by store subclasses
436
- onUpdateRecords: Ext.emptyFn,
437
-
438
- /**
439
- * Removes any records when a write is returned from the server.
440
- * @private
441
- * @param {Ext.data.Model[]} records The array of removed records
442
- * @param {Ext.data.Operation} operation The operation that just completed
443
- * @param {Boolean} success True if the operation was successful
444
- */
445
- onDestroyRecords: function(records, operation, success) {
446
- if (success) {
447
- this.removed = [];
448
- }
449
- },
450
-
451
- //tells the attached proxy to destroy the given records
452
- destroy: function(options) {
453
- var me = this,
454
- operation;
455
-
456
- options = options || {};
457
-
458
- Ext.applyIf(options, {
459
- action : 'destroy',
460
- records: me.getRemovedRecords()
461
- });
462
-
463
- operation = new Ext.data.Operation(options);
464
-
465
- return me.proxy.destroy(operation, me.onProxyWrite, me);
466
- },
467
-
468
- /**
469
- * @private
470
- * Attached as the 'operationcomplete' event listener to a proxy's Batch object. By default just calls through
471
- * to onProxyWrite.
472
- */
473
- onBatchOperationComplete: function(batch, operation) {
474
- return this.onProxyWrite(operation);
475
- },
476
-
477
- /**
478
- * @private
479
- * Attached as the 'complete' event listener to a proxy's Batch object. Iterates over the batch operations
480
- * and updates the Store's internal data MixedCollection.
481
- */
482
- onBatchComplete: function(batch, operation) {
483
- var me = this,
484
- operations = batch.operations,
485
- length = operations.length,
486
- i;
487
-
488
- me.suspendEvents();
489
-
490
- for (i = 0; i < length; i++) {
491
- me.onProxyWrite(operations[i]);
492
- }
493
-
494
- me.resumeEvents();
495
-
496
- me.fireEvent('datachanged', me);
497
- me.fireEvent('refresh', me);
498
- },
499
-
500
- onBatchException: function(batch, operation) {
501
- // //decide what to do... could continue with the next operation
502
- // batch.start();
503
- //
504
- // //or retry the last operation
505
- // batch.retry();
506
- },
507
-
508
- /**
509
- * @private
510
- * Filter function for new records.
511
- */
512
- filterNew: function(item) {
513
- // only want phantom records that are valid
514
- return item.phantom === true && item.isValid();
515
- },
516
-
517
- /**
518
- * Returns all Model instances that are either currently a phantom (e.g. have no id), or have an ID but have not
519
- * yet been saved on this Store (this happens when adding a non-phantom record from another Store into this one)
520
- * @return {Ext.data.Model[]} The Model instances
521
- */
522
- getNewRecords: function() {
523
- return [];
524
- },
525
-
526
- /**
527
- * Returns all Model instances that have been updated in the Store but not yet synchronized with the Proxy
528
- * @return {Ext.data.Model[]} The updated Model instances
529
- */
530
- getUpdatedRecords: function() {
531
- return [];
532
- },
533
-
534
- /**
535
- * Gets all {@link Ext.data.Model records} added or updated since the last commit. Note that the order of records
536
- * returned is not deterministic and does not indicate the order in which records were modified. Note also that
537
- * removed records are not included (use {@link #getRemovedRecords} for that).
538
- * @return {Ext.data.Model[]} The added and updated Model instances
539
- */
540
- getModifiedRecords : function(){
541
- return [].concat(this.getNewRecords(), this.getUpdatedRecords());
542
- },
543
-
544
- /**
545
- * @private
546
- * Filter function for updated records.
547
- */
548
- filterUpdated: function(item) {
549
- // only want dirty records, not phantoms that are valid
550
- return item.dirty === true && item.phantom !== true && item.isValid();
551
- },
552
-
553
- /**
554
- * Returns any records that have been removed from the store but not yet destroyed on the proxy.
555
- * @return {Ext.data.Model[]} The removed Model instances
556
- */
557
- getRemovedRecords: function() {
558
- return this.removed;
559
- },
560
-
561
- filter: function(filters, value) {
562
-
563
- },
564
-
565
- /**
566
- * @private
567
- * Normalizes an array of filter objects, ensuring that they are all Ext.util.Filter instances
568
- * @param {Object[]} filters The filters array
569
- * @return {Ext.util.Filter[]} Array of Ext.util.Filter objects
570
- */
571
- decodeFilters: function(filters) {
572
- if (!Ext.isArray(filters)) {
573
- if (filters === undefined) {
574
- filters = [];
575
- } else {
576
- filters = [filters];
577
- }
578
- }
579
-
580
- var length = filters.length,
581
- Filter = Ext.util.Filter,
582
- config, i;
583
-
584
- for (i = 0; i < length; i++) {
585
- config = filters[i];
586
-
587
- if (!(config instanceof Filter)) {
588
- Ext.apply(config, {
589
- root: 'data'
590
- });
591
-
592
- //support for 3.x style filters where a function can be defined as 'fn'
593
- if (config.fn) {
594
- config.filterFn = config.fn;
595
- }
596
-
597
- //support a function to be passed as a filter definition
598
- if (typeof config == 'function') {
599
- config = {
600
- filterFn: config
601
- };
602
- }
603
-
604
- filters[i] = new Filter(config);
605
- }
606
- }
607
-
608
- return filters;
609
- },
610
-
611
- clearFilter: function(supressEvent) {
612
-
613
- },
614
-
615
- isFiltered: function() {
616
-
617
- },
618
-
619
- filterBy: function(fn, scope) {
620
-
621
- },
622
-
623
- /**
624
- * Synchronizes the store with its {@link #proxy}. This asks the proxy to batch together any new, updated
625
- * and deleted records in the store, updating the store's internal representation of the records
626
- * as each operation completes.
627
- *
628
- * @param {Object} [options] Object containing one or more properties supported by the sync method (these get
629
- * passed along to the underlying proxy's {@link Ext.data.Proxy#batch batch} method):
630
- *
631
- * @param {Ext.data.Batch/Object} [options.batch] A {@link Ext.data.Batch} object (or batch config to apply
632
- * to the created batch). If unspecified a default batch will be auto-created as needed.
633
- *
634
- * @param {Function} [options.callback] The function to be called upon completion of the sync.
635
- * The callback is called regardless of success or failure and is passed the following parameters:
636
- * @param {Ext.data.Batch} options.callback.batch The {@link Ext.data.Batch batch} that was processed,
637
- * containing all operations in their current state after processing
638
- * @param {Object} options.callback.options The options argument that was originally passed into sync
639
- *
640
- * @param {Function} [options.success] The function to be called upon successful completion of the sync. The
641
- * success function is called only if no exceptions were reported in any operations. If one or more exceptions
642
- * occurred then the failure function will be called instead. The success function is called
643
- * with the following parameters:
644
- * @param {Ext.data.Batch} options.success.batch The {@link Ext.data.Batch batch} that was processed,
645
- * containing all operations in their current state after processing
646
- * @param {Object} options.success.options The options argument that was originally passed into sync
647
- *
648
- * @param {Function} [options.failure] The function to be called upon unsuccessful completion of the sync. The
649
- * failure function is called when one or more operations returns an exception during processing (even if some
650
- * operations were also successful). In this case you can check the batch's {@link Ext.data.Batch#exceptions
651
- * exceptions} array to see exactly which operations had exceptions. The failure function is called with the
652
- * following parameters:
653
- * @param {Ext.data.Batch} options.failure.batch The {@link Ext.data.Batch} that was processed, containing all
654
- * operations in their current state after processing
655
- * @param {Object} options.failure.options The options argument that was originally passed into sync
656
- *
657
- * @param {Object} [options.scope] The scope in which to execute any callbacks (i.e. the `this` object inside
658
- * the callback, success and/or failure functions). Defaults to the store's proxy.
659
- *
660
- * @return {Ext.data.Store} this
661
- */
662
- sync: function(options) {
663
- var me = this,
664
- operations = {},
665
- toCreate = me.getNewRecords(),
666
- toUpdate = me.getUpdatedRecords(),
667
- toDestroy = me.getRemovedRecords(),
668
- needsSync = false;
669
-
670
- if (toCreate.length > 0) {
671
- operations.create = toCreate;
672
- needsSync = true;
673
- }
674
-
675
- if (toUpdate.length > 0) {
676
- operations.update = toUpdate;
677
- needsSync = true;
678
- }
679
-
680
- if (toDestroy.length > 0) {
681
- operations.destroy = toDestroy;
682
- needsSync = true;
683
- }
684
-
685
- if (needsSync && me.fireEvent('beforesync', operations) !== false) {
686
- options = options || {};
687
-
688
- me.proxy.batch(Ext.apply(options, {
689
- operations: operations,
690
- listeners: me.getBatchListeners()
691
- }));
692
- }
693
-
694
- return me;
695
- },
696
-
697
- /**
698
- * @private
699
- * Returns an object which is passed in as the listeners argument to proxy.batch inside this.sync.
700
- * This is broken out into a separate function to allow for customisation of the listeners
701
- * @return {Object} The listeners object
702
- */
703
- getBatchListeners: function() {
704
- var me = this,
705
- listeners = {
706
- scope: me,
707
- exception: me.onBatchException
708
- };
709
-
710
- if (me.batchUpdateMode == 'operation') {
711
- listeners.operationcomplete = me.onBatchOperationComplete;
712
- } else {
713
- listeners.complete = me.onBatchComplete;
714
- }
715
-
716
- return listeners;
717
- },
718
-
719
- /**
720
- * Saves all pending changes via the configured {@link #proxy}. Use {@link #sync} instead.
721
- * @deprecated 4.0.0 Will be removed in the next major version
722
- */
723
- save: function() {
724
- return this.sync.apply(this, arguments);
725
- },
726
-
727
- /**
728
- * Loads the Store using its configured {@link #proxy}.
729
- * @param {Object} options (optional) config object. This is passed into the {@link Ext.data.Operation Operation}
730
- * object that is created and then sent to the proxy's {@link Ext.data.proxy.Proxy#read} function
731
- *
732
- * @return {Ext.data.Store} this
733
- */
734
- load: function(options) {
735
- var me = this,
736
- operation;
737
-
738
- options = options || {};
739
-
740
- options.action = options.action || 'read';
741
- options.filters = options.filters || me.filters.items;
742
- options.sorters = options.sorters || me.getSorters();
743
-
744
- operation = new Ext.data.Operation(options);
745
-
746
- if (me.fireEvent('beforeload', me, operation) !== false) {
747
- me.loading = true;
748
- me.proxy.read(operation, me.onProxyLoad, me);
749
- }
750
-
751
- return me;
752
- },
753
-
754
- /**
755
- * @private
756
- * A model instance should call this method on the Store it has been {@link Ext.data.Model#join joined} to.
757
- * @param {Ext.data.Model} record The model instance that was edited
758
- * @param {String[]} modifiedFieldNames Array of field names changed during edit.
759
- */
760
- afterEdit : function(record, modifiedFieldNames) {
761
- var me = this,
762
- i, shouldSync;
763
-
764
- if (me.autoSync && !me.autoSyncSuspended) {
765
- for(i = modifiedFieldNames.length; i--;) {
766
- // only sync if persistent fields were modified
767
- if(record.fields.get(modifiedFieldNames[i]).persist) {
768
- shouldSync = true;
769
- break;
770
- }
771
- }
772
- if(shouldSync) {
773
- me.sync();
774
- }
775
- }
776
-
777
- me.fireEvent('update', me, record, Ext.data.Model.EDIT, modifiedFieldNames);
778
- },
779
-
780
- /**
781
- * @private
782
- * A model instance should call this method on the Store it has been {@link Ext.data.Model#join joined} to..
783
- * @param {Ext.data.Model} record The model instance that was edited
784
- */
785
- afterReject : function(record) {
786
- // Must pass the 5th param (modifiedFieldNames) as null, otherwise the
787
- // event firing machinery appends the listeners "options" object to the arg list
788
- // which may get used as the modified fields array by a handler.
789
- // This array is used for selective grid cell updating by Grid View.
790
- // Null will be treated as though all cells need updating.
791
- this.fireEvent('update', this, record, Ext.data.Model.REJECT, null);
792
- },
793
-
794
- /**
795
- * @private
796
- * A model instance should call this method on the Store it has been {@link Ext.data.Model#join joined} to.
797
- * @param {Ext.data.Model} record The model instance that was edited
798
- */
799
- afterCommit : function(record) {
800
- // Must pass the 5th param (modifiedFieldNames) as null, otherwise the
801
- // event firing machinery appends the listeners "options" object to the arg list
802
- // which may get used as the modified fields array by a handler.
803
- // This array is used for selective grid cell updating by Grid View.
804
- // Null will be treated as though all cells need updating.
805
- this.fireEvent('update', this, record, Ext.data.Model.COMMIT, null);
806
- },
807
-
808
- // private
809
- destroyStore: function() {
810
- var me = this;
811
-
812
- if (!me.isDestroyed) {
813
- if (me.storeId) {
814
- Ext.data.StoreManager.unregister(me);
815
- }
816
- me.clearData();
817
- me.data = me.tree = me.sorters = me.filters = me.groupers = null;
818
- if (me.reader) {
819
- me.reader.destroyReader();
820
- }
821
- me.proxy = me.reader = me.writer = null;
822
- me.clearListeners();
823
- me.isDestroyed = true;
824
-
825
- if (me.implicitModel) {
826
- Ext.destroy(me.model);
827
- } else {
828
- me.model = null;
829
- }
830
- }
831
- },
832
-
833
- // private
834
- doSort: function(sorterFn) {
835
- var me = this;
836
- if (me.remoteSort) {
837
- //the load function will pick up the new sorters and request the sorted data from the proxy
838
- me.load();
839
- } else {
840
- me.data.sortBy(sorterFn);
841
- me.fireEvent('datachanged', me);
842
- me.fireEvent('refresh', me);
843
- }
844
- },
845
-
846
- // to be implemented by subclasses
847
- clearData: Ext.emptyFn,
848
-
849
- // to be implemented by subclasses
850
- getCount: Ext.emptyFn,
851
-
852
- // to be implemented by subclasses
853
- getById: Ext.emptyFn,
854
-
855
- /**
856
- * Removes all records from the store. This method does a "fast remove",
857
- * individual remove events are not called. The {@link #clear} event is
858
- * fired upon completion.
859
- * @method
860
- */
861
- removeAll: Ext.emptyFn,
862
- // individual store subclasses should implement a "fast" remove
863
- // and fire a clear event afterwards
864
-
865
- /**
866
- * Returns true if the Store is currently performing a load operation
867
- * @return {Boolean} True if the Store is currently loading
868
- */
869
- isLoading: function() {
870
- return !!this.loading;
871
- },
872
-
873
- /**
874
- * Suspends automatically syncing the Store with its Proxy. Only applicable if {@link #autoSync} is `true`
875
- */
876
- suspendAutoSync: function() {
877
- this.autoSyncSuspended = true;
878
- },
879
-
880
- /**
881
- * Resumes automatically syncing the Store with its Proxy. Only applicable if {@link #autoSync} is `true`
882
- */
883
- resumeAutoSync: function() {
884
- this.autoSyncSuspended = false;
885
- }
886
-
887
- });