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.
- data/app/assets/javascripts/extjs-rails.js +95613 -11000
- data/lib/extjs-rails/version.rb +1 -1
- metadata +2 -509
- data/app/assets/javascripts/src/AbstractComponent.js +0 -3290
- data/app/assets/javascripts/src/AbstractManager.js +0 -144
- data/app/assets/javascripts/src/AbstractPlugin.js +0 -72
- data/app/assets/javascripts/src/Action.js +0 -276
- data/app/assets/javascripts/src/Ajax.js +0 -99
- data/app/assets/javascripts/src/Component.js +0 -1344
- data/app/assets/javascripts/src/ComponentLoader.js +0 -202
- data/app/assets/javascripts/src/ComponentManager.js +0 -47
- data/app/assets/javascripts/src/ComponentQuery.js +0 -521
- data/app/assets/javascripts/src/Editor.js +0 -494
- data/app/assets/javascripts/src/ElementLoader.js +0 -404
- data/app/assets/javascripts/src/FocusManager.js +0 -712
- data/app/assets/javascripts/src/Img.js +0 -111
- data/app/assets/javascripts/src/Layer.js +0 -543
- data/app/assets/javascripts/src/LoadMask.js +0 -432
- data/app/assets/javascripts/src/ModelManager.js +0 -186
- data/app/assets/javascripts/src/PluginManager.js +0 -110
- data/app/assets/javascripts/src/ProgressBar.js +0 -336
- data/app/assets/javascripts/src/Shadow.js +0 -233
- data/app/assets/javascripts/src/ShadowPool.js +0 -43
- data/app/assets/javascripts/src/Template.js +0 -331
- data/app/assets/javascripts/src/XTemplate.js +0 -365
- data/app/assets/javascripts/src/XTemplateCompiler.js +0 -450
- data/app/assets/javascripts/src/XTemplateParser.js +0 -249
- data/app/assets/javascripts/src/ZIndexManager.js +0 -519
- data/app/assets/javascripts/src/app/Application.js +0 -271
- data/app/assets/javascripts/src/app/Controller.js +0 -458
- data/app/assets/javascripts/src/app/EventBus.js +0 -112
- data/app/assets/javascripts/src/button/Button.js +0 -1483
- data/app/assets/javascripts/src/button/Cycle.js +0 -215
- data/app/assets/javascripts/src/button/Split.js +0 -99
- data/app/assets/javascripts/src/chart/Callout.js +0 -140
- data/app/assets/javascripts/src/chart/Chart.js +0 -966
- data/app/assets/javascripts/src/chart/Highlight.js +0 -172
- data/app/assets/javascripts/src/chart/Label.js +0 -241
- data/app/assets/javascripts/src/chart/Legend.js +0 -474
- data/app/assets/javascripts/src/chart/LegendItem.js +0 -217
- data/app/assets/javascripts/src/chart/Mask.js +0 -230
- data/app/assets/javascripts/src/chart/MaskLayer.js +0 -48
- data/app/assets/javascripts/src/chart/Navigation.js +0 -79
- data/app/assets/javascripts/src/chart/Shape.js +0 -106
- data/app/assets/javascripts/src/chart/Tip.js +0 -98
- data/app/assets/javascripts/src/chart/TipSurface.js +0 -42
- data/app/assets/javascripts/src/chart/axis/Abstract.js +0 -73
- data/app/assets/javascripts/src/chart/axis/Axis.js +0 -961
- data/app/assets/javascripts/src/chart/axis/Category.js +0 -130
- data/app/assets/javascripts/src/chart/axis/Gauge.js +0 -203
- data/app/assets/javascripts/src/chart/axis/Numeric.js +0 -235
- data/app/assets/javascripts/src/chart/axis/Radial.js +0 -204
- data/app/assets/javascripts/src/chart/axis/Time.js +0 -135
- data/app/assets/javascripts/src/chart/series/Area.js +0 -803
- data/app/assets/javascripts/src/chart/series/Bar.js +0 -853
- data/app/assets/javascripts/src/chart/series/Cartesian.js +0 -328
- data/app/assets/javascripts/src/chart/series/Column.js +0 -104
- data/app/assets/javascripts/src/chart/series/Gauge.js +0 -490
- data/app/assets/javascripts/src/chart/series/Line.js +0 -1104
- data/app/assets/javascripts/src/chart/series/Pie.js +0 -1072
- data/app/assets/javascripts/src/chart/series/Radar.js +0 -440
- data/app/assets/javascripts/src/chart/series/Scatter.js +0 -668
- data/app/assets/javascripts/src/chart/series/Series.js +0 -443
- data/app/assets/javascripts/src/chart/theme/Base.js +0 -175
- data/app/assets/javascripts/src/chart/theme/Theme.js +0 -253
- data/app/assets/javascripts/src/container/AbstractContainer.js +0 -1062
- data/app/assets/javascripts/src/container/ButtonGroup.js +0 -143
- data/app/assets/javascripts/src/container/Container.js +0 -212
- data/app/assets/javascripts/src/container/DockingContainer.js +0 -265
- data/app/assets/javascripts/src/container/Viewport.js +0 -184
- data/app/assets/javascripts/src/core/dom/Element.form.js +0 -50
- data/app/assets/javascripts/src/core/dom/Element.static-more.js +0 -159
- data/app/assets/javascripts/src/core/examples/index.html +0 -321
- data/app/assets/javascripts/src/core/examples/index.js +0 -6
- data/app/assets/javascripts/src/core/examples/src/Sample/CTO.js +0 -25
- data/app/assets/javascripts/src/core/examples/src/Sample/CoolGuy.js +0 -20
- data/app/assets/javascripts/src/core/examples/src/Sample/Developer.js +0 -43
- data/app/assets/javascripts/src/core/examples/src/Sample/Gun.js +0 -3
- data/app/assets/javascripts/src/core/examples/src/Sample/HumanResource.js +0 -23
- data/app/assets/javascripts/src/core/examples/src/Sample/Musician.js +0 -20
- data/app/assets/javascripts/src/core/examples/src/Sample/Person.js +0 -50
- data/app/assets/javascripts/src/core/examples/src/Sample/ability/CanComposeSongs.js +0 -9
- data/app/assets/javascripts/src/core/examples/src/Sample/ability/CanPlayGuitar.js +0 -9
- data/app/assets/javascripts/src/core/examples/src/Sample/ability/CanSing.js +0 -18
- data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/A.js +0 -3
- data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/B.js +0 -3
- data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/C.js +0 -3
- data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/D.js +0 -3
- data/app/assets/javascripts/src/core/examples/src/Sample/deadlock/E.js +0 -3
- data/app/assets/javascripts/src/core/examples/src/Sample/notdeadlock/A.js +0 -3
- data/app/assets/javascripts/src/core/examples/src/Sample/notdeadlock/B.js +0 -4
- data/app/assets/javascripts/src/core/examples/src/Sample/notdeadlock/C.js +0 -3
- data/app/assets/javascripts/src/core/src/EventManager.js +0 -1167
- data/app/assets/javascripts/src/core/src/EventObject.js +0 -883
- data/app/assets/javascripts/src/core/src/Ext-more.js +0 -1283
- data/app/assets/javascripts/src/core/src/Ext.js +0 -736
- data/app/assets/javascripts/src/core/src/Support.js +0 -662
- data/app/assets/javascripts/src/core/src/class/Base.js +0 -1085
- data/app/assets/javascripts/src/core/src/class/Class.js +0 -676
- data/app/assets/javascripts/src/core/src/class/ClassManager.js +0 -1591
- data/app/assets/javascripts/src/core/src/class/Loader.js +0 -1423
- data/app/assets/javascripts/src/core/src/dom/AbstractElement.alignment.js +0 -173
- data/app/assets/javascripts/src/core/src/dom/AbstractElement.insertion.js +0 -193
- data/app/assets/javascripts/src/core/src/dom/AbstractElement.js +0 -681
- data/app/assets/javascripts/src/core/src/dom/AbstractElement.position.js +0 -356
- data/app/assets/javascripts/src/core/src/dom/AbstractElement.static.js +0 -474
- data/app/assets/javascripts/src/core/src/dom/AbstractElement.style.js +0 -851
- data/app/assets/javascripts/src/core/src/dom/AbstractElement.traversal.js +0 -180
- data/app/assets/javascripts/src/core/src/dom/AbstractHelper.js +0 -291
- data/app/assets/javascripts/src/core/src/dom/AbstractQuery.js +0 -72
- data/app/assets/javascripts/src/core/src/dom/CompositeElement.js +0 -75
- data/app/assets/javascripts/src/core/src/dom/CompositeElementLite.js +0 -436
- data/app/assets/javascripts/src/core/src/dom/DomQuery-aria.js +0 -1049
- data/app/assets/javascripts/src/core/src/env/Browser.js +0 -186
- data/app/assets/javascripts/src/core/src/env/FeatureDetector.js +0 -274
- data/app/assets/javascripts/src/core/src/env/OS.js +0 -141
- data/app/assets/javascripts/src/core/src/lang/Array.js +0 -1205
- data/app/assets/javascripts/src/core/src/lang/Date.js +0 -1463
- data/app/assets/javascripts/src/core/src/lang/Error.js +0 -326
- data/app/assets/javascripts/src/core/src/lang/Function.js +0 -485
- data/app/assets/javascripts/src/core/src/lang/Number.js +0 -175
- data/app/assets/javascripts/src/core/src/lang/Object.js +0 -606
- data/app/assets/javascripts/src/core/src/lang/String.js +0 -333
- data/app/assets/javascripts/src/core/src/misc/JSON.js +0 -236
- data/app/assets/javascripts/src/core/src/perf/Accumulator.js +0 -244
- data/app/assets/javascripts/src/core/src/perf/Monitor.js +0 -197
- data/app/assets/javascripts/src/core/src/util/DelayedTask.js +0 -71
- data/app/assets/javascripts/src/core/src/util/Event.js +0 -215
- data/app/assets/javascripts/src/core/src/util/Format.js +0 -551
- data/app/assets/javascripts/src/core/src/util/TaskManager.js +0 -417
- data/app/assets/javascripts/src/core/src/version/Version.js +0 -364
- data/app/assets/javascripts/src/core/test/unit/README.MD +0 -91
- data/app/assets/javascripts/src/core/test/unit/bootstrap.js +0 -39
- data/app/assets/javascripts/src/core/test/unit/build/build-data.js +0 -34
- data/app/assets/javascripts/src/core/test/unit/build/build.sh +0 -2
- data/app/assets/javascripts/src/core/test/unit/data.js +0 -27
- data/app/assets/javascripts/src/core/test/unit/index.html +0 -15
- data/app/assets/javascripts/src/core/test/unit/other_specs/dom.html +0 -40
- data/app/assets/javascripts/src/core/test/unit/other_specs/dom/extjs-api.js +0 -12
- data/app/assets/javascripts/src/core/test/unit/other_specs/dom/platform-api.js +0 -134
- data/app/assets/javascripts/src/core/test/unit/other_specs/dom/sanity.js +0 -4
- data/app/assets/javascripts/src/core/test/unit/other_specs/dom/touch-api-out.js +0 -128
- data/app/assets/javascripts/src/core/test/unit/other_specs/dom/touch-api.js +0 -89
- data/app/assets/javascripts/src/core/test/unit/other_specs/env/Environment.js +0 -357
- data/app/assets/javascripts/src/core/test/unit/resources/APITest.js +0 -37
- data/app/assets/javascripts/src/core/test/unit/resources/jsb3.js +0 -14
- data/app/assets/javascripts/src/core/test/unit/resources/test-setup.js +0 -137
- data/app/assets/javascripts/src/core/test/unit/spec/EventManager.js +0 -629
- data/app/assets/javascripts/src/core/test/unit/spec/Ext-mess.backup +0 -198
- data/app/assets/javascripts/src/core/test/unit/spec/Ext-more.js +0 -520
- data/app/assets/javascripts/src/core/test/unit/spec/Ext.js +0 -1550
- data/app/assets/javascripts/src/core/test/unit/spec/Support.js +0 -250
- data/app/assets/javascripts/src/core/test/unit/spec/class/Base.js +0 -47
- data/app/assets/javascripts/src/core/test/unit/spec/class/Class.js +0 -561
- data/app/assets/javascripts/src/core/test/unit/spec/class/ClassManager.js +0 -555
- data/app/assets/javascripts/src/core/test/unit/spec/dom/CompositeElementLite.js +0 -409
- data/app/assets/javascripts/src/core/test/unit/spec/dom/DomHelper.js +0 -444
- data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.insertion.js +0 -342
- data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.js +0 -731
- data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.static.js +0 -201
- data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.style.js +0 -118
- data/app/assets/javascripts/src/core/test/unit/spec/dom/Element.traversal.js +0 -336
- data/app/assets/javascripts/src/core/test/unit/spec/lang/Array.js +0 -1229
- data/app/assets/javascripts/src/core/test/unit/spec/lang/Date.js +0 -697
- data/app/assets/javascripts/src/core/test/unit/spec/lang/Error.js +0 -277
- data/app/assets/javascripts/src/core/test/unit/spec/lang/Function.js +0 -536
- data/app/assets/javascripts/src/core/test/unit/spec/lang/Number.js +0 -323
- data/app/assets/javascripts/src/core/test/unit/spec/lang/Object.js +0 -591
- data/app/assets/javascripts/src/core/test/unit/spec/lang/String.js +0 -451
- data/app/assets/javascripts/src/core/test/unit/spec/misc/JSON.js +0 -252
- data/app/assets/javascripts/src/core/test/unit/spec/util/Format.js +0 -521
- data/app/assets/javascripts/src/core/test/unit/spec/version/Version.js +0 -148
- data/app/assets/javascripts/src/core/test/unit/specs.html +0 -19
- data/app/assets/javascripts/src/data/AbstractStore.js +0 -887
- data/app/assets/javascripts/src/data/ArrayStore.js +0 -74
- data/app/assets/javascripts/src/data/Batch.js +0 -236
- data/app/assets/javascripts/src/data/BufferStore.js +0 -13
- data/app/assets/javascripts/src/data/Connection.js +0 -969
- data/app/assets/javascripts/src/data/DirectStore.js +0 -50
- data/app/assets/javascripts/src/data/Errors.js +0 -52
- data/app/assets/javascripts/src/data/Field.js +0 -341
- data/app/assets/javascripts/src/data/IdGenerator.js +0 -198
- data/app/assets/javascripts/src/data/JsonP.js +0 -253
- data/app/assets/javascripts/src/data/JsonPStore.js +0 -51
- data/app/assets/javascripts/src/data/JsonStore.js +0 -60
- data/app/assets/javascripts/src/data/Model.js +0 -1673
- data/app/assets/javascripts/src/data/NodeInterface.js +0 -1294
- data/app/assets/javascripts/src/data/NodeStore.js +0 -254
- data/app/assets/javascripts/src/data/Operation.js +0 -331
- data/app/assets/javascripts/src/data/Request.js +0 -40
- data/app/assets/javascripts/src/data/ResultSet.js +0 -56
- data/app/assets/javascripts/src/data/SequentialIdGenerator.js +0 -61
- data/app/assets/javascripts/src/data/SortTypes.js +0 -125
- data/app/assets/javascripts/src/data/Store.js +0 -2609
- data/app/assets/javascripts/src/data/StoreManager.js +0 -156
- data/app/assets/javascripts/src/data/Tree.js +0 -290
- data/app/assets/javascripts/src/data/TreeStore.js +0 -655
- data/app/assets/javascripts/src/data/Types.js +0 -190
- data/app/assets/javascripts/src/data/UuidGenerator.js +0 -215
- data/app/assets/javascripts/src/data/XmlStore.js +0 -76
- data/app/assets/javascripts/src/data/association/Association.js +0 -243
- data/app/assets/javascripts/src/data/association/BelongsTo.js +0 -291
- data/app/assets/javascripts/src/data/association/HasMany.js +0 -289
- data/app/assets/javascripts/src/data/association/HasOne.js +0 -304
- data/app/assets/javascripts/src/data/proxy/Ajax.js +0 -282
- data/app/assets/javascripts/src/data/proxy/Client.js +0 -21
- data/app/assets/javascripts/src/data/proxy/Direct.js +0 -181
- data/app/assets/javascripts/src/data/proxy/JsonP.js +0 -313
- data/app/assets/javascripts/src/data/proxy/LocalStorage.js +0 -69
- data/app/assets/javascripts/src/data/proxy/Memory.js +0 -156
- data/app/assets/javascripts/src/data/proxy/Proxy.js +0 -433
- data/app/assets/javascripts/src/data/proxy/Rest.js +0 -173
- data/app/assets/javascripts/src/data/proxy/Server.js +0 -460
- data/app/assets/javascripts/src/data/proxy/SessionStorage.js +0 -39
- data/app/assets/javascripts/src/data/proxy/WebStorage.js +0 -546
- data/app/assets/javascripts/src/data/reader/Array.js +0 -68
- data/app/assets/javascripts/src/data/reader/Json.js +0 -383
- data/app/assets/javascripts/src/data/reader/Reader.js +0 -735
- data/app/assets/javascripts/src/data/reader/Xml.js +0 -292
- data/app/assets/javascripts/src/data/validations.js +0 -149
- data/app/assets/javascripts/src/data/writer/Json.js +0 -81
- data/app/assets/javascripts/src/data/writer/Writer.js +0 -147
- data/app/assets/javascripts/src/data/writer/Xml.js +0 -88
- data/app/assets/javascripts/src/dd/DD.js +0 -300
- data/app/assets/javascripts/src/dd/DDProxy.js +0 -204
- data/app/assets/javascripts/src/dd/DDTarget.js +0 -171
- data/app/assets/javascripts/src/dd/DragDrop.js +0 -1101
- data/app/assets/javascripts/src/dd/DragDropManager.js +0 -1264
- data/app/assets/javascripts/src/dd/DragSource.js +0 -392
- data/app/assets/javascripts/src/dd/DragTracker.js +0 -562
- data/app/assets/javascripts/src/dd/DragZone.js +0 -137
- data/app/assets/javascripts/src/dd/DropTarget.js +0 -118
- data/app/assets/javascripts/src/dd/DropZone.js +0 -254
- data/app/assets/javascripts/src/dd/Registry.js +0 -117
- data/app/assets/javascripts/src/dd/ScrollManager.js +0 -218
- data/app/assets/javascripts/src/dd/StatusProxy.js +0 -179
- data/app/assets/javascripts/src/diag/layout/Context.js +0 -523
- data/app/assets/javascripts/src/diag/layout/ContextItem.js +0 -179
- data/app/assets/javascripts/src/direct/Event.js +0 -35
- data/app/assets/javascripts/src/direct/ExceptionEvent.js +0 -16
- data/app/assets/javascripts/src/direct/JsonProvider.js +0 -82
- data/app/assets/javascripts/src/direct/Manager.js +0 -263
- data/app/assets/javascripts/src/direct/PollingProvider.js +0 -156
- data/app/assets/javascripts/src/direct/Provider.js +0 -96
- data/app/assets/javascripts/src/direct/RemotingEvent.js +0 -24
- data/app/assets/javascripts/src/direct/RemotingMethod.js +0 -100
- data/app/assets/javascripts/src/direct/RemotingProvider.js +0 -510
- data/app/assets/javascripts/src/direct/Transaction.js +0 -41
- data/app/assets/javascripts/src/dom/Element.alignment.js +0 -378
- data/app/assets/javascripts/src/dom/Element.anim.js +0 -962
- data/app/assets/javascripts/src/dom/Element.dd.js +0 -40
- data/app/assets/javascripts/src/dom/Element.fx.js +0 -194
- data/app/assets/javascripts/src/dom/Element.js +0 -1407
- data/app/assets/javascripts/src/dom/Element.position.js +0 -501
- data/app/assets/javascripts/src/dom/Element.scroll.js +0 -214
- data/app/assets/javascripts/src/dom/Element.style.js +0 -792
- data/app/assets/javascripts/src/dom/Element.traversal.js +0 -8
- data/app/assets/javascripts/src/dom/Helper.js +0 -466
- data/app/assets/javascripts/src/dom/Query.js +0 -1067
- data/app/assets/javascripts/src/draw/Color.js +0 -303
- data/app/assets/javascripts/src/draw/Component.js +0 -245
- data/app/assets/javascripts/src/draw/CompositeSprite.js +0 -299
- data/app/assets/javascripts/src/draw/Draw.js +0 -1217
- data/app/assets/javascripts/src/draw/Matrix.js +0 -183
- data/app/assets/javascripts/src/draw/Sprite.js +0 -554
- data/app/assets/javascripts/src/draw/SpriteDD.js +0 -87
- data/app/assets/javascripts/src/draw/Surface.js +0 -1001
- data/app/assets/javascripts/src/draw/Text.js +0 -175
- data/app/assets/javascripts/src/draw/engine/ImageExporter.js +0 -106
- data/app/assets/javascripts/src/draw/engine/Svg.js +0 -734
- data/app/assets/javascripts/src/draw/engine/SvgExporter.js +0 -280
- data/app/assets/javascripts/src/draw/engine/Vml.js +0 -916
- data/app/assets/javascripts/src/flash/Component.js +0 -248
- data/app/assets/javascripts/src/form/Basic.js +0 -1018
- data/app/assets/javascripts/src/form/CheckboxGroup.js +0 -441
- data/app/assets/javascripts/src/form/CheckboxManager.js +0 -26
- data/app/assets/javascripts/src/form/FieldAncestor.js +0 -210
- data/app/assets/javascripts/src/form/FieldContainer.js +0 -290
- data/app/assets/javascripts/src/form/FieldSet.js +0 -506
- data/app/assets/javascripts/src/form/Label.js +0 -110
- data/app/assets/javascripts/src/form/Labelable.js +0 -764
- data/app/assets/javascripts/src/form/Panel.js +0 -335
- data/app/assets/javascripts/src/form/RadioGroup.js +0 -124
- data/app/assets/javascripts/src/form/RadioManager.js +0 -26
- data/app/assets/javascripts/src/form/action/Action.js +0 -307
- data/app/assets/javascripts/src/form/action/DirectLoad.js +0 -107
- data/app/assets/javascripts/src/form/action/DirectSubmit.js +0 -119
- data/app/assets/javascripts/src/form/action/Load.js +0 -120
- data/app/assets/javascripts/src/form/action/StandardSubmit.js +0 -34
- data/app/assets/javascripts/src/form/action/Submit.js +0 -257
- data/app/assets/javascripts/src/form/field/Base.js +0 -813
- data/app/assets/javascripts/src/form/field/Checkbox.js +0 -505
- data/app/assets/javascripts/src/form/field/ComboBox.js +0 -1427
- data/app/assets/javascripts/src/form/field/Date.js +0 -578
- data/app/assets/javascripts/src/form/field/Display.js +0 -155
- data/app/assets/javascripts/src/form/field/Field.js +0 -430
- data/app/assets/javascripts/src/form/field/File.js +0 -265
- data/app/assets/javascripts/src/form/field/Hidden.js +0 -75
- data/app/assets/javascripts/src/form/field/HtmlEditor.js +0 -1439
- data/app/assets/javascripts/src/form/field/Number.js +0 -380
- data/app/assets/javascripts/src/form/field/Picker.js +0 -321
- data/app/assets/javascripts/src/form/field/Radio.js +0 -279
- data/app/assets/javascripts/src/form/field/Spinner.js +0 -321
- data/app/assets/javascripts/src/form/field/Text.js +0 -727
- data/app/assets/javascripts/src/form/field/TextArea.js +0 -228
- data/app/assets/javascripts/src/form/field/Time.js +0 -459
- data/app/assets/javascripts/src/form/field/Trigger.js +0 -469
- data/app/assets/javascripts/src/form/field/VTypes.js +0 -172
- data/app/assets/javascripts/src/fx/Anim.js +0 -472
- data/app/assets/javascripts/src/fx/Animator.js +0 -410
- data/app/assets/javascripts/src/fx/CubicBezier.js +0 -77
- data/app/assets/javascripts/src/fx/Easing.js +0 -136
- data/app/assets/javascripts/src/fx/Manager.js +0 -353
- data/app/assets/javascripts/src/fx/PropertyHandler.js +0 -381
- data/app/assets/javascripts/src/fx/Queue.js +0 -123
- data/app/assets/javascripts/src/fx/target/Component.js +0 -118
- data/app/assets/javascripts/src/fx/target/CompositeElement.js +0 -46
- data/app/assets/javascripts/src/fx/target/CompositeElementCSS.js +0 -22
- data/app/assets/javascripts/src/fx/target/CompositeSprite.js +0 -34
- data/app/assets/javascripts/src/fx/target/Element.js +0 -83
- data/app/assets/javascripts/src/fx/target/ElementCSS.js +0 -77
- data/app/assets/javascripts/src/fx/target/Sprite.js +0 -128
- data/app/assets/javascripts/src/fx/target/Target.js +0 -36
- data/app/assets/javascripts/src/grid/CellEditor.js +0 -172
- data/app/assets/javascripts/src/grid/ColumnComponentLayout.js +0 -34
- data/app/assets/javascripts/src/grid/ColumnLayout.js +0 -201
- data/app/assets/javascripts/src/grid/Lockable.js +0 -863
- data/app/assets/javascripts/src/grid/LockingView.js +0 -169
- data/app/assets/javascripts/src/grid/PagingScroller.js +0 -539
- data/app/assets/javascripts/src/grid/Panel.js +0 -393
- data/app/assets/javascripts/src/grid/RowEditor.js +0 -731
- data/app/assets/javascripts/src/grid/RowNumberer.js +0 -76
- data/app/assets/javascripts/src/grid/Scroller.js +0 -5
- data/app/assets/javascripts/src/grid/View.js +0 -44
- data/app/assets/javascripts/src/grid/ViewDropZone.js +0 -41
- data/app/assets/javascripts/src/grid/column/Action.js +0 -318
- data/app/assets/javascripts/src/grid/column/Boolean.js +0 -82
- data/app/assets/javascripts/src/grid/column/Column.js +0 -835
- data/app/assets/javascripts/src/grid/column/Date.js +0 -63
- data/app/assets/javascripts/src/grid/column/Number.js +0 -52
- data/app/assets/javascripts/src/grid/column/Template.js +0 -58
- data/app/assets/javascripts/src/grid/feature/AbstractSummary.js +0 -154
- data/app/assets/javascripts/src/grid/feature/Chunking.js +0 -77
- data/app/assets/javascripts/src/grid/feature/Feature.js +0 -158
- data/app/assets/javascripts/src/grid/feature/Grouping.js +0 -822
- data/app/assets/javascripts/src/grid/feature/GroupingSummary.js +0 -243
- data/app/assets/javascripts/src/grid/feature/RowBody.js +0 -116
- data/app/assets/javascripts/src/grid/feature/RowWrap.js +0 -120
- data/app/assets/javascripts/src/grid/feature/Summary.js +0 -167
- data/app/assets/javascripts/src/grid/header/Container.js +0 -965
- data/app/assets/javascripts/src/grid/header/DragZone.js +0 -69
- data/app/assets/javascripts/src/grid/header/DropZone.js +0 -265
- data/app/assets/javascripts/src/grid/plugin/CellEditing.js +0 -453
- data/app/assets/javascripts/src/grid/plugin/DragDrop.js +0 -254
- data/app/assets/javascripts/src/grid/plugin/Editing.js +0 -561
- data/app/assets/javascripts/src/grid/plugin/HeaderReorderer.js +0 -49
- data/app/assets/javascripts/src/grid/plugin/HeaderResizer.js +0 -292
- data/app/assets/javascripts/src/grid/plugin/RowEditing.js +0 -339
- data/app/assets/javascripts/src/grid/property/Grid.js +0 -351
- data/app/assets/javascripts/src/grid/property/HeaderContainer.js +0 -109
- data/app/assets/javascripts/src/grid/property/Property.js +0 -36
- data/app/assets/javascripts/src/grid/property/Store.js +0 -141
- data/app/assets/javascripts/src/layout/ClassList.js +0 -90
- data/app/assets/javascripts/src/layout/Context.js +0 -1232
- data/app/assets/javascripts/src/layout/ContextItem.js +0 -1470
- data/app/assets/javascripts/src/layout/Layout.js +0 -761
- data/app/assets/javascripts/src/layout/component/Auto.js +0 -220
- data/app/assets/javascripts/src/layout/component/Body.js +0 -80
- data/app/assets/javascripts/src/layout/component/BoundList.js +0 -95
- data/app/assets/javascripts/src/layout/component/Button.js +0 -261
- data/app/assets/javascripts/src/layout/component/Component.js +0 -427
- data/app/assets/javascripts/src/layout/component/Dock.js +0 -1132
- data/app/assets/javascripts/src/layout/component/Draw.js +0 -79
- data/app/assets/javascripts/src/layout/component/FieldSet.js +0 -62
- data/app/assets/javascripts/src/layout/component/ProgressBar.js +0 -54
- data/app/assets/javascripts/src/layout/component/Tab.js +0 -23
- data/app/assets/javascripts/src/layout/component/field/ComboBox.js +0 -52
- data/app/assets/javascripts/src/layout/component/field/Field.js +0 -372
- data/app/assets/javascripts/src/layout/component/field/FieldContainer.js +0 -48
- data/app/assets/javascripts/src/layout/component/field/HtmlEditor.js +0 -54
- data/app/assets/javascripts/src/layout/component/field/Slider.js +0 -58
- data/app/assets/javascripts/src/layout/component/field/Text.js +0 -75
- data/app/assets/javascripts/src/layout/component/field/TextArea.js +0 -51
- data/app/assets/javascripts/src/layout/component/field/Trigger.js +0 -132
- data/app/assets/javascripts/src/layout/container/Absolute.js +0 -121
- data/app/assets/javascripts/src/layout/container/Accordion.js +0 -308
- data/app/assets/javascripts/src/layout/container/Anchor.js +0 -403
- data/app/assets/javascripts/src/layout/container/Auto.js +0 -70
- data/app/assets/javascripts/src/layout/container/Border-old-js +0 -1079
- data/app/assets/javascripts/src/layout/container/Border.js +0 -816
- data/app/assets/javascripts/src/layout/container/Box.js +0 -929
- data/app/assets/javascripts/src/layout/container/Card.js +0 -361
- data/app/assets/javascripts/src/layout/container/CheckboxGroup.js +0 -376
- data/app/assets/javascripts/src/layout/container/Column.js +0 -234
- data/app/assets/javascripts/src/layout/container/Container.js +0 -961
- data/app/assets/javascripts/src/layout/container/Editor.js +0 -74
- data/app/assets/javascripts/src/layout/container/Fit.js +0 -287
- data/app/assets/javascripts/src/layout/container/Form.js +0 -157
- data/app/assets/javascripts/src/layout/container/HBox.js +0 -134
- data/app/assets/javascripts/src/layout/container/Table.js +0 -412
- data/app/assets/javascripts/src/layout/container/VBox.js +0 -139
- data/app/assets/javascripts/src/layout/container/boxOverflow/Menu.js +0 -365
- data/app/assets/javascripts/src/layout/container/boxOverflow/None.js +0 -83
- data/app/assets/javascripts/src/layout/container/boxOverflow/Scroller.js +0 -475
- data/app/assets/javascripts/src/menu/CheckItem.js +0 -169
- data/app/assets/javascripts/src/menu/ColorPicker.js +0 -110
- data/app/assets/javascripts/src/menu/DatePicker.js +0 -100
- data/app/assets/javascripts/src/menu/Item.js +0 -553
- data/app/assets/javascripts/src/menu/KeyNav.js +0 -134
- data/app/assets/javascripts/src/menu/Manager.js +0 -219
- data/app/assets/javascripts/src/menu/Menu.js +0 -579
- data/app/assets/javascripts/src/menu/Separator.js +0 -126
- data/app/assets/javascripts/src/panel/AbstractPanel.js +0 -323
- data/app/assets/javascripts/src/panel/DD.js +0 -99
- data/app/assets/javascripts/src/panel/Header.js +0 -518
- data/app/assets/javascripts/src/panel/Panel.js +0 -2150
- data/app/assets/javascripts/src/panel/Proxy.js +0 -131
- data/app/assets/javascripts/src/panel/Table.js +0 -1018
- data/app/assets/javascripts/src/panel/Tool.js +0 -304
- data/app/assets/javascripts/src/picker/Color.js +0 -219
- data/app/assets/javascripts/src/picker/Date.js +0 -1140
- data/app/assets/javascripts/src/picker/Month.js +0 -490
- data/app/assets/javascripts/src/picker/Time.js +0 -165
- data/app/assets/javascripts/src/resizer/BorderSplitter.js +0 -22
- data/app/assets/javascripts/src/resizer/BorderSplitterTracker.js +0 -210
- data/app/assets/javascripts/src/resizer/Handle.js +0 -29
- data/app/assets/javascripts/src/resizer/ResizeTracker.js +0 -346
- data/app/assets/javascripts/src/resizer/Resizer.js +0 -477
- data/app/assets/javascripts/src/resizer/Splitter.js +0 -242
- data/app/assets/javascripts/src/resizer/SplitterTracker.js +0 -230
- data/app/assets/javascripts/src/selection/CellModel.js +0 -395
- data/app/assets/javascripts/src/selection/CheckboxModel.js +0 -234
- data/app/assets/javascripts/src/selection/DataViewModel.js +0 -160
- data/app/assets/javascripts/src/selection/Model.js +0 -646
- data/app/assets/javascripts/src/selection/RowModel.js +0 -499
- data/app/assets/javascripts/src/selection/TreeModel.js +0 -78
- data/app/assets/javascripts/src/slider/Multi.js +0 -835
- data/app/assets/javascripts/src/slider/Single.js +0 -56
- data/app/assets/javascripts/src/slider/Thumb.js +0 -259
- data/app/assets/javascripts/src/slider/Tip.js +0 -130
- data/app/assets/javascripts/src/state/CookieProvider.js +0 -120
- data/app/assets/javascripts/src/state/LocalStorageProvider.js +0 -72
- data/app/assets/javascripts/src/state/Manager.js +0 -70
- data/app/assets/javascripts/src/state/Provider.js +0 -182
- data/app/assets/javascripts/src/state/Stateful.js +0 -364
- data/app/assets/javascripts/src/tab/Bar.js +0 -258
- data/app/assets/javascripts/src/tab/Panel.js +0 -654
- data/app/assets/javascripts/src/tab/Tab.js +0 -358
- data/app/assets/javascripts/src/tail.js +0 -10
- data/app/assets/javascripts/src/tip/QuickTip.js +0 -335
- data/app/assets/javascripts/src/tip/QuickTipManager.js +0 -239
- data/app/assets/javascripts/src/tip/Tip.js +0 -160
- data/app/assets/javascripts/src/tip/ToolTip.js +0 -691
- data/app/assets/javascripts/src/toolbar/Fill.js +0 -28
- data/app/assets/javascripts/src/toolbar/Item.js +0 -16
- data/app/assets/javascripts/src/toolbar/Paging.js +0 -600
- data/app/assets/javascripts/src/toolbar/Separator.js +0 -23
- data/app/assets/javascripts/src/toolbar/Spacer.js +0 -33
- data/app/assets/javascripts/src/toolbar/TextItem.js +0 -57
- data/app/assets/javascripts/src/toolbar/Toolbar-legacy.js +0 -123
- data/app/assets/javascripts/src/toolbar/Toolbar.js +0 -447
- data/app/assets/javascripts/src/tree/Column.js +0 -90
- data/app/assets/javascripts/src/tree/Panel.js +0 -505
- data/app/assets/javascripts/src/tree/View.js +0 -658
- data/app/assets/javascripts/src/tree/ViewDragZone.js +0 -49
- data/app/assets/javascripts/src/tree/ViewDropZone.js +0 -287
- data/app/assets/javascripts/src/tree/plugin/TreeViewDragDrop.js +0 -244
- data/app/assets/javascripts/src/util/AbstractMixedCollection.js +0 -772
- data/app/assets/javascripts/src/util/Animate.js +0 -426
- data/app/assets/javascripts/src/util/Bindable.js +0 -102
- data/app/assets/javascripts/src/util/CSS.js +0 -185
- data/app/assets/javascripts/src/util/ClickRepeater.js +0 -238
- data/app/assets/javascripts/src/util/ComponentDragger.js +0 -126
- data/app/assets/javascripts/src/util/Cookies.js +0 -91
- data/app/assets/javascripts/src/util/ElementContainer.js +0 -293
- data/app/assets/javascripts/src/util/Filter.js +0 -159
- data/app/assets/javascripts/src/util/Floating.js +0 -321
- data/app/assets/javascripts/src/util/Grouper.js +0 -26
- data/app/assets/javascripts/src/util/HashMap.js +0 -356
- data/app/assets/javascripts/src/util/History.js +0 -285
- data/app/assets/javascripts/src/util/Inflector.js +0 -297
- data/app/assets/javascripts/src/util/KeyMap.js +0 -427
- data/app/assets/javascripts/src/util/KeyNav.js +0 -239
- data/app/assets/javascripts/src/util/LruCache.js +0 -257
- data/app/assets/javascripts/src/util/Memento.js +0 -131
- data/app/assets/javascripts/src/util/MixedCollection.js +0 -239
- data/app/assets/javascripts/src/util/Observable.js +0 -1003
- data/app/assets/javascripts/src/util/Offset.js +0 -60
- data/app/assets/javascripts/src/util/Point.js +0 -93
- data/app/assets/javascripts/src/util/ProtoElement.js +0 -205
- data/app/assets/javascripts/src/util/Queue.js +0 -76
- data/app/assets/javascripts/src/util/Region.js +0 -388
- data/app/assets/javascripts/src/util/Renderable.js +0 -1079
- data/app/assets/javascripts/src/util/Sortable.js +0 -248
- data/app/assets/javascripts/src/util/Sorter.js +0 -179
- data/app/assets/javascripts/src/util/TextMetrics.js +0 -148
- data/app/assets/javascripts/src/view/AbstractView.js +0 -1103
- data/app/assets/javascripts/src/view/BoundList.js +0 -207
- data/app/assets/javascripts/src/view/BoundListKeyNav.js +0 -92
- data/app/assets/javascripts/src/view/DragZone.js +0 -106
- data/app/assets/javascripts/src/view/DropZone.js +0 -240
- data/app/assets/javascripts/src/view/Table.js +0 -1229
- data/app/assets/javascripts/src/view/TableChunker.js +0 -139
- data/app/assets/javascripts/src/view/View.js +0 -636
- data/app/assets/javascripts/src/window/MessageBox.js +0 -880
- data/app/assets/javascripts/src/window/Window-legacy.js +0 -56
- data/app/assets/javascripts/src/window/Window.js +0 -793
@@ -1,1003 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Base class that provides a common interface for publishing events. Subclasses are expected to to have a property
|
3
|
-
* "events" with all the events defined, and, optionally, a property "listeners" with configured listeners defined.
|
4
|
-
*
|
5
|
-
* For example:
|
6
|
-
*
|
7
|
-
* Ext.define('Employee', {
|
8
|
-
* mixins: {
|
9
|
-
* observable: 'Ext.util.Observable'
|
10
|
-
* },
|
11
|
-
*
|
12
|
-
* constructor: function (config) {
|
13
|
-
* // The Observable constructor copies all of the properties of `config` on
|
14
|
-
* // to `this` using {@link Ext#apply}. Further, the `listeners` property is
|
15
|
-
* // processed to add listeners.
|
16
|
-
* //
|
17
|
-
* this.mixins.observable.constructor.call(this, config);
|
18
|
-
*
|
19
|
-
* this.addEvents(
|
20
|
-
* 'fired',
|
21
|
-
* 'quit'
|
22
|
-
* );
|
23
|
-
* }
|
24
|
-
* });
|
25
|
-
*
|
26
|
-
* This could then be used like this:
|
27
|
-
*
|
28
|
-
* var newEmployee = new Employee({
|
29
|
-
* name: employeeName,
|
30
|
-
* listeners: {
|
31
|
-
* quit: function() {
|
32
|
-
* // By default, "this" will be the object that fired the event.
|
33
|
-
* alert(this.name + " has quit!");
|
34
|
-
* }
|
35
|
-
* }
|
36
|
-
* });
|
37
|
-
*/
|
38
|
-
Ext.define('Ext.util.Observable', {
|
39
|
-
|
40
|
-
/* Begin Definitions */
|
41
|
-
|
42
|
-
requires: ['Ext.util.Event'],
|
43
|
-
|
44
|
-
statics: {
|
45
|
-
/**
|
46
|
-
* Removes **all** added captures from the Observable.
|
47
|
-
*
|
48
|
-
* @param {Ext.util.Observable} o The Observable to release
|
49
|
-
* @static
|
50
|
-
*/
|
51
|
-
releaseCapture: function(o) {
|
52
|
-
o.fireEvent = this.prototype.fireEvent;
|
53
|
-
},
|
54
|
-
|
55
|
-
/**
|
56
|
-
* Starts capture on the specified Observable. All events will be passed to the supplied function with the event
|
57
|
-
* name + standard signature of the event **before** the event is fired. If the supplied function returns false,
|
58
|
-
* the event will not fire.
|
59
|
-
*
|
60
|
-
* @param {Ext.util.Observable} o The Observable to capture events from.
|
61
|
-
* @param {Function} fn The function to call when an event is fired.
|
62
|
-
* @param {Object} scope (optional) The scope (`this` reference) in which the function is executed. Defaults to
|
63
|
-
* the Observable firing the event.
|
64
|
-
* @static
|
65
|
-
*/
|
66
|
-
capture: function(o, fn, scope) {
|
67
|
-
o.fireEvent = Ext.Function.createInterceptor(o.fireEvent, fn, scope);
|
68
|
-
},
|
69
|
-
|
70
|
-
/**
|
71
|
-
* Sets observability on the passed class constructor.
|
72
|
-
*
|
73
|
-
* This makes any event fired on any instance of the passed class also fire a single event through
|
74
|
-
* the **class** allowing for central handling of events on many instances at once.
|
75
|
-
*
|
76
|
-
* Usage:
|
77
|
-
*
|
78
|
-
* Ext.util.Observable.observe(Ext.data.Connection);
|
79
|
-
* Ext.data.Connection.on('beforerequest', function(con, options) {
|
80
|
-
* console.log('Ajax request made to ' + options.url);
|
81
|
-
* });
|
82
|
-
*
|
83
|
-
* @param {Function} c The class constructor to make observable.
|
84
|
-
* @param {Object} listeners An object containing a series of listeners to add. See {@link #addListener}.
|
85
|
-
* @static
|
86
|
-
*/
|
87
|
-
observe: function(cls, listeners) {
|
88
|
-
if (cls) {
|
89
|
-
if (!cls.isObservable) {
|
90
|
-
Ext.applyIf(cls, new this());
|
91
|
-
this.capture(cls.prototype, cls.fireEvent, cls);
|
92
|
-
}
|
93
|
-
if (Ext.isObject(listeners)) {
|
94
|
-
cls.on(listeners);
|
95
|
-
}
|
96
|
-
}
|
97
|
-
return cls;
|
98
|
-
},
|
99
|
-
|
100
|
-
/**
|
101
|
-
* Prepares a given class for observable instances. This method is called when a
|
102
|
-
* class derives from this class or uses this class as a mixin.
|
103
|
-
* @param {Function} T The class constructor to prepare.
|
104
|
-
* @private
|
105
|
-
*/
|
106
|
-
prepareClass: function (T, mixin) {
|
107
|
-
// T.hasListeners is the object to track listeners on class T. This object's
|
108
|
-
// prototype (__proto__) is the "hasListeners" of T.superclass.
|
109
|
-
|
110
|
-
// Instances of T will create "hasListeners" that have T.hasListeners as their
|
111
|
-
// immediate prototype (__proto__).
|
112
|
-
|
113
|
-
if (!T.HasListeners) {
|
114
|
-
// We create a HasListeners "class" for this class. The "prototype" of the
|
115
|
-
// HasListeners class is an instance of the HasListeners class associated
|
116
|
-
// with this class's super class (or with Observable).
|
117
|
-
var Observable = Ext.util.Observable,
|
118
|
-
HasListeners = function () {},
|
119
|
-
SuperHL = T.superclass.HasListeners || (mixin && mixin.HasListeners) ||
|
120
|
-
Observable.HasListeners;
|
121
|
-
|
122
|
-
// Make the HasListener class available on the class and its prototype:
|
123
|
-
T.prototype.HasListeners = T.HasListeners = HasListeners;
|
124
|
-
|
125
|
-
// And connect its "prototype" to the new HasListeners of our super class
|
126
|
-
// (which is also the class-level "hasListeners" instance).
|
127
|
-
HasListeners.prototype = T.hasListeners = new SuperHL();
|
128
|
-
}
|
129
|
-
}
|
130
|
-
},
|
131
|
-
|
132
|
-
/* End Definitions */
|
133
|
-
|
134
|
-
/**
|
135
|
-
* @cfg {Object} listeners
|
136
|
-
*
|
137
|
-
* A config object containing one or more event handlers to be added to this object during initialization. This
|
138
|
-
* should be a valid listeners config object as specified in the {@link #addListener} example for attaching multiple
|
139
|
-
* handlers at once.
|
140
|
-
*
|
141
|
-
* **DOM events from Ext JS {@link Ext.Component Components}**
|
142
|
-
*
|
143
|
-
* While _some_ Ext JS Component classes export selected DOM events (e.g. "click", "mouseover" etc), this is usually
|
144
|
-
* only done when extra value can be added. For example the {@link Ext.view.View DataView}'s **`{@link
|
145
|
-
* Ext.view.View#itemclick itemclick}`** event passing the node clicked on. To access DOM events directly from a
|
146
|
-
* child element of a Component, we need to specify the `element` option to identify the Component property to add a
|
147
|
-
* DOM listener to:
|
148
|
-
*
|
149
|
-
* new Ext.panel.Panel({
|
150
|
-
* width: 400,
|
151
|
-
* height: 200,
|
152
|
-
* dockedItems: [{
|
153
|
-
* xtype: 'toolbar'
|
154
|
-
* }],
|
155
|
-
* listeners: {
|
156
|
-
* click: {
|
157
|
-
* element: 'el', //bind to the underlying el property on the panel
|
158
|
-
* fn: function(){ console.log('click el'); }
|
159
|
-
* },
|
160
|
-
* dblclick: {
|
161
|
-
* element: 'body', //bind to the underlying body property on the panel
|
162
|
-
* fn: function(){ console.log('dblclick body'); }
|
163
|
-
* }
|
164
|
-
* }
|
165
|
-
* });
|
166
|
-
*/
|
167
|
-
|
168
|
-
/**
|
169
|
-
* @property {Boolean} isObservable
|
170
|
-
* `true` in this class to identify an object as an instantiated Observable, or subclass thereof.
|
171
|
-
*/
|
172
|
-
isObservable: true,
|
173
|
-
|
174
|
-
/**
|
175
|
-
* @property {Object} hasListeners
|
176
|
-
* @readonly
|
177
|
-
* This object holds a key for any event that has a listener. The listener may be set
|
178
|
-
* directly on the instance, or on its class or a super class (via {@link #observe}) or
|
179
|
-
* on the {@link Ext.app.EventBus MVC EventBus}. The values of this object are truthy
|
180
|
-
* (a non-zero number) and falsy (0 or undefined). They do not represent an exact count
|
181
|
-
* of listeners. The value for an event is truthy if the event must be fired and is
|
182
|
-
* falsy if there is no need to fire the event.
|
183
|
-
*
|
184
|
-
* The intended use of this property is to avoid the expense of fireEvent calls when
|
185
|
-
* there are no listeners. This can be particularly helpful when one would otherwise
|
186
|
-
* have to call fireEvent hundreds or thousands of times. It is used like this:
|
187
|
-
*
|
188
|
-
* if (this.hasListeners.foo) {
|
189
|
-
* this.fireEvent('foo', this, arg1);
|
190
|
-
* }
|
191
|
-
*/
|
192
|
-
|
193
|
-
constructor: function(config) {
|
194
|
-
var me = this;
|
195
|
-
|
196
|
-
Ext.apply(me, config);
|
197
|
-
|
198
|
-
// The subclass may have already initialized it.
|
199
|
-
if (!me.hasListeners) {
|
200
|
-
me.hasListeners = new me.HasListeners();
|
201
|
-
}
|
202
|
-
|
203
|
-
me.events = me.events || {};
|
204
|
-
if (me.listeners) {
|
205
|
-
me.on(me.listeners);
|
206
|
-
me.listeners = null; //Set as an instance property to pre-empt the prototype in case any are set there.
|
207
|
-
}
|
208
|
-
|
209
|
-
if (me.bubbleEvents) {
|
210
|
-
me.enableBubble(me.bubbleEvents);
|
211
|
-
}
|
212
|
-
},
|
213
|
-
|
214
|
-
onClassExtended: function (T) {
|
215
|
-
if (!T.HasListeners) {
|
216
|
-
// Some classes derive from us and some others derive from those classes. All
|
217
|
-
// of these are passed to this method.
|
218
|
-
Ext.util.Observable.prepareClass(T);
|
219
|
-
}
|
220
|
-
},
|
221
|
-
|
222
|
-
// @private
|
223
|
-
eventOptionsRe : /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|element|vertical|horizontal|freezeEvent)$/,
|
224
|
-
|
225
|
-
/**
|
226
|
-
* Adds listeners to any Observable object (or Ext.Element) which are automatically removed when this Component is
|
227
|
-
* destroyed.
|
228
|
-
*
|
229
|
-
* @param {Ext.util.Observable/Ext.Element} item The item to which to add a listener/listeners.
|
230
|
-
* @param {Object/String} ename The event name, or an object containing event name properties.
|
231
|
-
* @param {Function} fn (optional) If the `ename` parameter was an event name, this is the handler function.
|
232
|
-
* @param {Object} scope (optional) If the `ename` parameter was an event name, this is the scope (`this` reference)
|
233
|
-
* in which the handler function is executed.
|
234
|
-
* @param {Object} opt (optional) If the `ename` parameter was an event name, this is the
|
235
|
-
* {@link Ext.util.Observable#addListener addListener} options.
|
236
|
-
*/
|
237
|
-
addManagedListener : function(item, ename, fn, scope, options) {
|
238
|
-
var me = this,
|
239
|
-
managedListeners = me.managedListeners = me.managedListeners || [],
|
240
|
-
config;
|
241
|
-
|
242
|
-
if (typeof ename !== 'string') {
|
243
|
-
options = ename;
|
244
|
-
for (ename in options) {
|
245
|
-
if (options.hasOwnProperty(ename)) {
|
246
|
-
config = options[ename];
|
247
|
-
if (!me.eventOptionsRe.test(ename)) {
|
248
|
-
me.addManagedListener(item, ename, config.fn || config, config.scope || options.scope, config.fn ? config : options);
|
249
|
-
}
|
250
|
-
}
|
251
|
-
}
|
252
|
-
}
|
253
|
-
else {
|
254
|
-
managedListeners.push({
|
255
|
-
item: item,
|
256
|
-
ename: ename,
|
257
|
-
fn: fn,
|
258
|
-
scope: scope,
|
259
|
-
options: options
|
260
|
-
});
|
261
|
-
|
262
|
-
item.on(ename, fn, scope, options);
|
263
|
-
}
|
264
|
-
},
|
265
|
-
|
266
|
-
/**
|
267
|
-
* Removes listeners that were added by the {@link #mon} method.
|
268
|
-
*
|
269
|
-
* @param {Ext.util.Observable/Ext.Element} item The item from which to remove a listener/listeners.
|
270
|
-
* @param {Object/String} ename The event name, or an object containing event name properties.
|
271
|
-
* @param {Function} fn (optional) If the `ename` parameter was an event name, this is the handler function.
|
272
|
-
* @param {Object} scope (optional) If the `ename` parameter was an event name, this is the scope (`this` reference)
|
273
|
-
* in which the handler function is executed.
|
274
|
-
*/
|
275
|
-
removeManagedListener : function(item, ename, fn, scope) {
|
276
|
-
var me = this,
|
277
|
-
options,
|
278
|
-
config,
|
279
|
-
managedListeners,
|
280
|
-
length,
|
281
|
-
i;
|
282
|
-
|
283
|
-
if (typeof ename !== 'string') {
|
284
|
-
options = ename;
|
285
|
-
for (ename in options) {
|
286
|
-
if (options.hasOwnProperty(ename)) {
|
287
|
-
config = options[ename];
|
288
|
-
if (!me.eventOptionsRe.test(ename)) {
|
289
|
-
me.removeManagedListener(item, ename, config.fn || config, config.scope || options.scope);
|
290
|
-
}
|
291
|
-
}
|
292
|
-
}
|
293
|
-
}
|
294
|
-
|
295
|
-
managedListeners = me.managedListeners ? me.managedListeners.slice() : [];
|
296
|
-
|
297
|
-
for (i = 0, length = managedListeners.length; i < length; i++) {
|
298
|
-
me.removeManagedListenerItem(false, managedListeners[i], item, ename, fn, scope);
|
299
|
-
}
|
300
|
-
},
|
301
|
-
|
302
|
-
/**
|
303
|
-
* Fires the specified event with the passed parameters (minus the event name, plus the `options` object passed
|
304
|
-
* to {@link #addListener}).
|
305
|
-
*
|
306
|
-
* An event may be set to bubble up an Observable parent hierarchy (See {@link Ext.Component#getBubbleTarget}) by
|
307
|
-
* calling {@link #enableBubble}.
|
308
|
-
*
|
309
|
-
* @param {String} eventName The name of the event to fire.
|
310
|
-
* @param {Object...} args Variable number of parameters are passed to handlers.
|
311
|
-
* @return {Boolean} returns false if any of the handlers return false otherwise it returns true.
|
312
|
-
*/
|
313
|
-
fireEvent: function(eventName) {
|
314
|
-
eventName = eventName.toLowerCase();
|
315
|
-
var me = this,
|
316
|
-
events = me.events,
|
317
|
-
event = events && events[eventName],
|
318
|
-
ret = true;
|
319
|
-
|
320
|
-
// Only continue firing the event if there are listeners to be informed.
|
321
|
-
// Bubbled events will always have a listener count, so will be fired.
|
322
|
-
if (event && me.hasListeners[eventName]) {
|
323
|
-
ret = me.continueFireEvent(eventName, Ext.Array.slice(arguments, 1), event.bubble);
|
324
|
-
}
|
325
|
-
return ret;
|
326
|
-
},
|
327
|
-
|
328
|
-
/**
|
329
|
-
* Continue to fire event.
|
330
|
-
* @private
|
331
|
-
*
|
332
|
-
* @param {String} eventName
|
333
|
-
* @param {Array} args
|
334
|
-
* @param {Boolean} bubbles
|
335
|
-
*/
|
336
|
-
continueFireEvent: function(eventName, args, bubbles) {
|
337
|
-
var target = this,
|
338
|
-
queue, event,
|
339
|
-
ret = true;
|
340
|
-
|
341
|
-
do {
|
342
|
-
if (target.eventsSuspended) {
|
343
|
-
if ((queue = target.eventQueue)) {
|
344
|
-
queue.push([eventName, args, bubbles]);
|
345
|
-
}
|
346
|
-
return ret;
|
347
|
-
} else {
|
348
|
-
event = target.events[eventName];
|
349
|
-
// Continue bubbling if event exists and it is `true` or the handler didn't returns false and it
|
350
|
-
// configure to bubble.
|
351
|
-
if (event && event != true) {
|
352
|
-
if ((ret = event.fire.apply(event, args)) === false) {
|
353
|
-
break;
|
354
|
-
}
|
355
|
-
}
|
356
|
-
}
|
357
|
-
} while (bubbles && (target = target.getBubbleParent()));
|
358
|
-
return ret;
|
359
|
-
},
|
360
|
-
|
361
|
-
/**
|
362
|
-
* Gets the bubbling parent for an Observable
|
363
|
-
* @private
|
364
|
-
* @return {Ext.util.Observable} The bubble parent. null is returned if no bubble target exists
|
365
|
-
*/
|
366
|
-
getBubbleParent: function(){
|
367
|
-
var me = this, parent = me.getBubbleTarget && me.getBubbleTarget();
|
368
|
-
if (parent && parent.isObservable) {
|
369
|
-
return parent;
|
370
|
-
}
|
371
|
-
return null;
|
372
|
-
},
|
373
|
-
|
374
|
-
/**
|
375
|
-
* Appends an event handler to this object. For example:
|
376
|
-
*
|
377
|
-
* myGridPanel.on("mouseover", this.onMouseOver, this);
|
378
|
-
*
|
379
|
-
* The method also allows for a single argument to be passed which is a config object
|
380
|
-
* containing properties which specify multiple events. For example:
|
381
|
-
*
|
382
|
-
* myGridPanel.on({
|
383
|
-
* cellClick: this.onCellClick,
|
384
|
-
* mouseover: this.onMouseOver,
|
385
|
-
* mouseout: this.onMouseOut,
|
386
|
-
* scope: this // Important. Ensure "this" is correct during handler execution
|
387
|
-
* });
|
388
|
-
*
|
389
|
-
* One can also specify options for each event handler separately:
|
390
|
-
*
|
391
|
-
* myGridPanel.on({
|
392
|
-
* cellClick: {fn: this.onCellClick, scope: this, single: true},
|
393
|
-
* mouseover: {fn: panel.onMouseOver, scope: panel}
|
394
|
-
* });
|
395
|
-
*
|
396
|
-
* *Names* of methods in a specified scope may also be used. Note that
|
397
|
-
* `scope` MUST be specified to use this option:
|
398
|
-
*
|
399
|
-
* myGridPanel.on({
|
400
|
-
* cellClick: {fn: 'onCellClick', scope: this, single: true},
|
401
|
-
* mouseover: {fn: 'onMouseOver', scope: panel}
|
402
|
-
* });
|
403
|
-
*
|
404
|
-
* @param {String/Object} eventName The name of the event to listen for.
|
405
|
-
* May also be an object who's property names are event names.
|
406
|
-
*
|
407
|
-
* @param {Function} [fn] The method the event invokes, or *if `scope` is specified, the *name* of the method within
|
408
|
-
* the specified `scope`. Will be called with arguments
|
409
|
-
* given to {@link #fireEvent} plus the `options` parameter described below.
|
410
|
-
*
|
411
|
-
* @param {Object} [scope] The scope (`this` reference) in which the handler function is
|
412
|
-
* executed. **If omitted, defaults to the object which fired the event.**
|
413
|
-
*
|
414
|
-
* @param {Object} [options] An object containing handler configuration.
|
415
|
-
*
|
416
|
-
* **Note:** Unlike in ExtJS 3.x, the options object will also be passed as the last
|
417
|
-
* argument to every event handler.
|
418
|
-
*
|
419
|
-
* This object may contain any of the following properties:
|
420
|
-
*
|
421
|
-
* @param {Object} options.scope
|
422
|
-
* The scope (`this` reference) in which the handler function is executed. **If omitted,
|
423
|
-
* defaults to the object which fired the event.**
|
424
|
-
*
|
425
|
-
* @param {Number} options.delay
|
426
|
-
* The number of milliseconds to delay the invocation of the handler after the event fires.
|
427
|
-
*
|
428
|
-
* @param {Boolean} options.single
|
429
|
-
* True to add a handler to handle just the next firing of the event, and then remove itself.
|
430
|
-
*
|
431
|
-
* @param {Number} options.buffer
|
432
|
-
* Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
|
433
|
-
* by the specified number of milliseconds. If the event fires again within that time,
|
434
|
-
* the original handler is _not_ invoked, but the new handler is scheduled in its place.
|
435
|
-
*
|
436
|
-
* @param {Ext.util.Observable} options.target
|
437
|
-
* Only call the handler if the event was fired on the target Observable, _not_ if the event
|
438
|
-
* was bubbled up from a child Observable.
|
439
|
-
*
|
440
|
-
* @param {String} options.element
|
441
|
-
* **This option is only valid for listeners bound to {@link Ext.Component Components}.**
|
442
|
-
* The name of a Component property which references an element to add a listener to.
|
443
|
-
*
|
444
|
-
* This option is useful during Component construction to add DOM event listeners to elements of
|
445
|
-
* {@link Ext.Component Components} which will exist only after the Component is rendered.
|
446
|
-
* For example, to add a click listener to a Panel's body:
|
447
|
-
*
|
448
|
-
* new Ext.panel.Panel({
|
449
|
-
* title: 'The title',
|
450
|
-
* listeners: {
|
451
|
-
* click: this.handlePanelClick,
|
452
|
-
* element: 'body'
|
453
|
-
* }
|
454
|
-
* });
|
455
|
-
*
|
456
|
-
* **Combining Options**
|
457
|
-
*
|
458
|
-
* Using the options argument, it is possible to combine different types of listeners:
|
459
|
-
*
|
460
|
-
* A delayed, one-time listener.
|
461
|
-
*
|
462
|
-
* myPanel.on('hide', this.handleClick, this, {
|
463
|
-
* single: true,
|
464
|
-
* delay: 100
|
465
|
-
* });
|
466
|
-
*
|
467
|
-
*/
|
468
|
-
addListener: function(ename, fn, scope, options) {
|
469
|
-
var me = this,
|
470
|
-
config, event, hasListeners;
|
471
|
-
|
472
|
-
if (typeof ename !== 'string') {
|
473
|
-
options = ename;
|
474
|
-
for (ename in options) {
|
475
|
-
if (options.hasOwnProperty(ename)) {
|
476
|
-
config = options[ename];
|
477
|
-
if (!me.eventOptionsRe.test(ename)) {
|
478
|
-
me.addListener(ename, config.fn || config, config.scope || options.scope, config.fn ? config : options);
|
479
|
-
}
|
480
|
-
}
|
481
|
-
}
|
482
|
-
} else {
|
483
|
-
ename = ename.toLowerCase();
|
484
|
-
me.events[ename] = me.events[ename] || true;
|
485
|
-
event = me.events[ename] || true;
|
486
|
-
if (Ext.isBoolean(event)) {
|
487
|
-
me.events[ename] = event = new Ext.util.Event(me, ename);
|
488
|
-
}
|
489
|
-
|
490
|
-
// Allow listeners: { click: 'onClick', scope: myObject }
|
491
|
-
if (typeof fn === 'string') {
|
492
|
-
//<debug>
|
493
|
-
if (!(scope[fn] || me[fn])) {
|
494
|
-
Ext.Error.raise('No method named "' + fn + '"');
|
495
|
-
}
|
496
|
-
//</debug>
|
497
|
-
fn = scope[fn] || me[fn];
|
498
|
-
}
|
499
|
-
event.addListener(fn, scope, Ext.isObject(options) ? options : {});
|
500
|
-
|
501
|
-
hasListeners = me.hasListeners;
|
502
|
-
if (hasListeners.hasOwnProperty(ename)) {
|
503
|
-
// if we already have listeners at this level, just increment the count...
|
504
|
-
++hasListeners[ename];
|
505
|
-
} else {
|
506
|
-
// otherwise, start the count at 1 (which hides whatever is in our prototype
|
507
|
-
// chain)...
|
508
|
-
hasListeners[ename] = 1;
|
509
|
-
}
|
510
|
-
}
|
511
|
-
},
|
512
|
-
|
513
|
-
/**
|
514
|
-
* Removes an event handler.
|
515
|
-
*
|
516
|
-
* @param {String} eventName The type of event the handler was associated with.
|
517
|
-
* @param {Function} fn The handler to remove. **This must be a reference to the function passed into the
|
518
|
-
* {@link #addListener} call.**
|
519
|
-
* @param {Object} scope (optional) The scope originally specified for the handler. It must be the same as the
|
520
|
-
* scope argument specified in the original call to {@link #addListener} or the listener will not be removed.
|
521
|
-
*/
|
522
|
-
removeListener: function(ename, fn, scope) {
|
523
|
-
var me = this,
|
524
|
-
config,
|
525
|
-
event,
|
526
|
-
options;
|
527
|
-
|
528
|
-
if (typeof ename !== 'string') {
|
529
|
-
options = ename;
|
530
|
-
for (ename in options) {
|
531
|
-
if (options.hasOwnProperty(ename)) {
|
532
|
-
config = options[ename];
|
533
|
-
if (!me.eventOptionsRe.test(ename)) {
|
534
|
-
me.removeListener(ename, config.fn || config, config.scope || options.scope);
|
535
|
-
}
|
536
|
-
}
|
537
|
-
}
|
538
|
-
} else {
|
539
|
-
ename = ename.toLowerCase();
|
540
|
-
event = me.events[ename];
|
541
|
-
if (event && event.isEvent) {
|
542
|
-
event.removeListener(fn, scope);
|
543
|
-
|
544
|
-
if (! --me.hasListeners[ename]) {
|
545
|
-
// Delete this entry, since 0 does not mean no one is listening, just
|
546
|
-
// that no one is *directly& listening. This allows the eventBus or
|
547
|
-
// class observers to "poke" through and expose their presence.
|
548
|
-
delete me.hasListeners[ename];
|
549
|
-
}
|
550
|
-
}
|
551
|
-
}
|
552
|
-
},
|
553
|
-
|
554
|
-
/**
|
555
|
-
* Removes all listeners for this object including the managed listeners
|
556
|
-
*/
|
557
|
-
clearListeners: function() {
|
558
|
-
var events = this.events,
|
559
|
-
event,
|
560
|
-
key;
|
561
|
-
|
562
|
-
for (key in events) {
|
563
|
-
if (events.hasOwnProperty(key)) {
|
564
|
-
event = events[key];
|
565
|
-
if (event.isEvent) {
|
566
|
-
event.clearListeners();
|
567
|
-
}
|
568
|
-
}
|
569
|
-
}
|
570
|
-
|
571
|
-
this.clearManagedListeners();
|
572
|
-
},
|
573
|
-
|
574
|
-
//<debug>
|
575
|
-
purgeListeners : function() {
|
576
|
-
if (Ext.global.console) {
|
577
|
-
Ext.global.console.warn('Observable: purgeListeners has been deprecated. Please use clearListeners.');
|
578
|
-
}
|
579
|
-
return this.clearListeners.apply(this, arguments);
|
580
|
-
},
|
581
|
-
//</debug>
|
582
|
-
|
583
|
-
/**
|
584
|
-
* Removes all managed listeners for this object.
|
585
|
-
*/
|
586
|
-
clearManagedListeners : function() {
|
587
|
-
var managedListeners = this.managedListeners || [],
|
588
|
-
i = 0,
|
589
|
-
len = managedListeners.length;
|
590
|
-
|
591
|
-
for (; i < len; i++) {
|
592
|
-
this.removeManagedListenerItem(true, managedListeners[i]);
|
593
|
-
}
|
594
|
-
|
595
|
-
this.managedListeners = [];
|
596
|
-
},
|
597
|
-
|
598
|
-
/**
|
599
|
-
* Remove a single managed listener item
|
600
|
-
* @private
|
601
|
-
* @param {Boolean} isClear True if this is being called during a clear
|
602
|
-
* @param {Object} managedListener The managed listener item
|
603
|
-
* See removeManagedListener for other args
|
604
|
-
*/
|
605
|
-
removeManagedListenerItem: function(isClear, managedListener, item, ename, fn, scope){
|
606
|
-
if (isClear || (managedListener.item === item && managedListener.ename === ename && (!fn || managedListener.fn === fn) && (!scope || managedListener.scope === scope))) {
|
607
|
-
managedListener.item.un(managedListener.ename, managedListener.fn, managedListener.scope);
|
608
|
-
if (!isClear) {
|
609
|
-
Ext.Array.remove(this.managedListeners, managedListener);
|
610
|
-
}
|
611
|
-
}
|
612
|
-
},
|
613
|
-
|
614
|
-
//<debug>
|
615
|
-
purgeManagedListeners : function() {
|
616
|
-
if (Ext.global.console) {
|
617
|
-
Ext.global.console.warn('Observable: purgeManagedListeners has been deprecated. Please use clearManagedListeners.');
|
618
|
-
}
|
619
|
-
return this.clearManagedListeners.apply(this, arguments);
|
620
|
-
},
|
621
|
-
//</debug>
|
622
|
-
|
623
|
-
/**
|
624
|
-
* Adds the specified events to the list of events which this Observable may fire.
|
625
|
-
*
|
626
|
-
* @param {Object/String...} eventNames Either an object with event names as properties with
|
627
|
-
* a value of `true`. For example:
|
628
|
-
*
|
629
|
-
* this.addEvents({
|
630
|
-
* storeloaded: true,
|
631
|
-
* storecleared: true
|
632
|
-
* });
|
633
|
-
*
|
634
|
-
* Or any number of event names as separate parameters. For example:
|
635
|
-
*
|
636
|
-
* this.addEvents('storeloaded', 'storecleared');
|
637
|
-
*
|
638
|
-
*/
|
639
|
-
addEvents: function(o) {
|
640
|
-
var me = this,
|
641
|
-
events = me.events || (me.events = {}),
|
642
|
-
arg, args, i;
|
643
|
-
|
644
|
-
if (typeof o == 'string') {
|
645
|
-
for (args = arguments, i = args.length; i--; ) {
|
646
|
-
arg = args[i];
|
647
|
-
if (!events[arg]) {
|
648
|
-
events[arg] = true;
|
649
|
-
}
|
650
|
-
}
|
651
|
-
} else {
|
652
|
-
Ext.applyIf(me.events, o);
|
653
|
-
}
|
654
|
-
},
|
655
|
-
|
656
|
-
/**
|
657
|
-
* Checks to see if this object has any listeners for a specified event, or whether the event bubbles. The answer
|
658
|
-
* indicates whether the event needs firing or not.
|
659
|
-
*
|
660
|
-
* @param {String} eventName The name of the event to check for
|
661
|
-
* @return {Boolean} `true` if the event is being listened for or bubbles, else `false`
|
662
|
-
*/
|
663
|
-
hasListener: function(ename) {
|
664
|
-
return !!this.hasListeners[ename.toLowerCase()];
|
665
|
-
},
|
666
|
-
|
667
|
-
/**
|
668
|
-
* Suspends the firing of all events. (see {@link #resumeEvents})
|
669
|
-
*
|
670
|
-
* @param {Boolean} queueSuspended Pass as true to queue up suspended events to be fired
|
671
|
-
* after the {@link #resumeEvents} call instead of discarding all suspended events.
|
672
|
-
*/
|
673
|
-
suspendEvents: function(queueSuspended) {
|
674
|
-
this.eventsSuspended = true;
|
675
|
-
if (queueSuspended && !this.eventQueue) {
|
676
|
-
this.eventQueue = [];
|
677
|
-
}
|
678
|
-
},
|
679
|
-
|
680
|
-
/**
|
681
|
-
* Resumes firing events (see {@link #suspendEvents}).
|
682
|
-
*
|
683
|
-
* If events were suspended using the `queueSuspended` parameter, then all events fired
|
684
|
-
* during event suspension will be sent to any listeners now.
|
685
|
-
*/
|
686
|
-
resumeEvents: function() {
|
687
|
-
var me = this,
|
688
|
-
queued = me.eventQueue,
|
689
|
-
qLen, q;
|
690
|
-
|
691
|
-
me.eventsSuspended = false;
|
692
|
-
delete me.eventQueue;
|
693
|
-
|
694
|
-
if (queued) {
|
695
|
-
qLen = queued.length;
|
696
|
-
for (q = 0; q < qLen; q++) {
|
697
|
-
me.continueFireEvent.apply(me, queued[q]);
|
698
|
-
}
|
699
|
-
}
|
700
|
-
},
|
701
|
-
|
702
|
-
/**
|
703
|
-
* Relays selected events from the specified Observable as if the events were fired by `this`.
|
704
|
-
*
|
705
|
-
* For example if you are extending Grid, you might decide to forward some events from store.
|
706
|
-
* So you can do this inside your initComponent:
|
707
|
-
*
|
708
|
-
* this.relayEvents(this.getStore(), ['load']);
|
709
|
-
*
|
710
|
-
* The grid instance will then have an observable 'load' event which will be passed the
|
711
|
-
* parameters of the store's load event and any function fired with the grid's load event
|
712
|
-
* would have access to the grid using the `this` keyword.
|
713
|
-
*
|
714
|
-
* @param {Object} origin The Observable whose events this object is to relay.
|
715
|
-
* @param {String[]} events Array of event names to relay.
|
716
|
-
* @param {String} [prefix] A common prefix to attach to the event names. For example:
|
717
|
-
*
|
718
|
-
* this.relayEvents(this.getStore(), ['load', 'clear'], 'store');
|
719
|
-
*
|
720
|
-
* Now the grid will forward 'load' and 'clear' events of store as 'storeload' and 'storeclear'.
|
721
|
-
*/
|
722
|
-
relayEvents : function(origin, events, prefix) {
|
723
|
-
prefix = prefix || '';
|
724
|
-
var me = this,
|
725
|
-
len = events.length,
|
726
|
-
i = 0,
|
727
|
-
oldName,
|
728
|
-
newName;
|
729
|
-
|
730
|
-
for (; i < len; i++) {
|
731
|
-
oldName = events[i];
|
732
|
-
newName = prefix + oldName;
|
733
|
-
me.events[newName] = me.events[newName] || true;
|
734
|
-
origin.on(oldName, me.createRelayer(newName));
|
735
|
-
}
|
736
|
-
},
|
737
|
-
|
738
|
-
/**
|
739
|
-
* @private
|
740
|
-
* Creates an event handling function which refires the event from this object as the passed event name.
|
741
|
-
* @param newName
|
742
|
-
* @param {Array} beginEnd (optional) The caller can specify on which indices to slice
|
743
|
-
* @returns {Function}
|
744
|
-
*/
|
745
|
-
createRelayer: function(newName, beginEnd){
|
746
|
-
var me = this;
|
747
|
-
return function(){
|
748
|
-
return me.fireEvent.apply(me, [newName].concat(Array.prototype.slice.apply(arguments, beginEnd || [0, -1])));
|
749
|
-
};
|
750
|
-
},
|
751
|
-
|
752
|
-
/**
|
753
|
-
* Enables events fired by this Observable to bubble up an owner hierarchy by calling `this.getBubbleTarget()` if
|
754
|
-
* present. There is no implementation in the Observable base class.
|
755
|
-
*
|
756
|
-
* This is commonly used by Ext.Components to bubble events to owner Containers.
|
757
|
-
* See {@link Ext.Component#getBubbleTarget}. The default implementation in Ext.Component returns the
|
758
|
-
* Component's immediate owner. But if a known target is required, this can be overridden to access the
|
759
|
-
* required target more quickly.
|
760
|
-
*
|
761
|
-
* Example:
|
762
|
-
*
|
763
|
-
* Ext.override(Ext.form.field.Base, {
|
764
|
-
* // Add functionality to Field's initComponent to enable the change event to bubble
|
765
|
-
* initComponent : Ext.Function.createSequence(Ext.form.field.Base.prototype.initComponent, function() {
|
766
|
-
* this.enableBubble('change');
|
767
|
-
* }),
|
768
|
-
*
|
769
|
-
* // We know that we want Field's events to bubble directly to the FormPanel.
|
770
|
-
* getBubbleTarget : function() {
|
771
|
-
* if (!this.formPanel) {
|
772
|
-
* this.formPanel = this.findParentByType('form');
|
773
|
-
* }
|
774
|
-
* return this.formPanel;
|
775
|
-
* }
|
776
|
-
* });
|
777
|
-
*
|
778
|
-
* var myForm = new Ext.formPanel({
|
779
|
-
* title: 'User Details',
|
780
|
-
* items: [{
|
781
|
-
* ...
|
782
|
-
* }],
|
783
|
-
* listeners: {
|
784
|
-
* change: function() {
|
785
|
-
* // Title goes red if form has been modified.
|
786
|
-
* myForm.header.setStyle('color', 'red');
|
787
|
-
* }
|
788
|
-
* }
|
789
|
-
* });
|
790
|
-
*
|
791
|
-
* @param {String/String[]} eventNames The event name to bubble, or an Array of event names.
|
792
|
-
*/
|
793
|
-
enableBubble: function(eventNames) {
|
794
|
-
if (eventNames) {
|
795
|
-
var me = this,
|
796
|
-
names = (typeof eventNames == 'string') ? arguments : eventNames,
|
797
|
-
length = names.length,
|
798
|
-
events = me.events,
|
799
|
-
ename, event, i;
|
800
|
-
|
801
|
-
for (i = 0; i < length; ++i) {
|
802
|
-
ename = names[i].toLowerCase();
|
803
|
-
event = events[ename];
|
804
|
-
|
805
|
-
if (!event || typeof event == 'boolean') {
|
806
|
-
events[ename] = event = new Ext.util.Event(me, ename);
|
807
|
-
}
|
808
|
-
|
809
|
-
// Event must fire if it bubbles (We don't know if anyone up the bubble hierarchy has listeners added)
|
810
|
-
me.hasListeners[ename] = (me.hasListeners[ename]||0) + 1;
|
811
|
-
|
812
|
-
event.bubble = true;
|
813
|
-
}
|
814
|
-
}
|
815
|
-
}
|
816
|
-
}, function() {
|
817
|
-
var Observable = this,
|
818
|
-
proto = Observable.prototype,
|
819
|
-
HasListeners = function () {},
|
820
|
-
prepareMixin = function (T) {
|
821
|
-
if (!T.HasListeners) {
|
822
|
-
var proto = T.prototype;
|
823
|
-
|
824
|
-
// Classes that use us as a mixin (best practice) need to be prepared.
|
825
|
-
Observable.prepareClass(T, this);
|
826
|
-
|
827
|
-
// Now that we are mixed in to class T, we need to watch T for derivations
|
828
|
-
// and prepare them also.
|
829
|
-
T.onExtended(function (U) {
|
830
|
-
Observable.prepareClass(U);
|
831
|
-
});
|
832
|
-
|
833
|
-
// Also, if a class uses us as a mixin and that class is then used as
|
834
|
-
// a mixin, we need to be notified of that as well.
|
835
|
-
if (proto.onClassMixedIn) {
|
836
|
-
// play nice with other potential overrides...
|
837
|
-
Ext.override(T, {
|
838
|
-
onClassMixedIn: function (U) {
|
839
|
-
prepareMixin.call(this, U);
|
840
|
-
this.callParent(arguments);
|
841
|
-
}
|
842
|
-
});
|
843
|
-
} else {
|
844
|
-
// just us chickens, so add the method...
|
845
|
-
proto.onClassMixedIn = function (U) {
|
846
|
-
prepareMixin.call(this, U);
|
847
|
-
};
|
848
|
-
}
|
849
|
-
}
|
850
|
-
};
|
851
|
-
|
852
|
-
HasListeners.prototype = {
|
853
|
-
//$$: 42 // to make sure we have a proper prototype
|
854
|
-
};
|
855
|
-
|
856
|
-
proto.HasListeners = Observable.HasListeners = HasListeners;
|
857
|
-
|
858
|
-
Observable.createAlias({
|
859
|
-
/**
|
860
|
-
* @method
|
861
|
-
* Shorthand for {@link #addListener}.
|
862
|
-
* @inheritdoc Ext.util.Observable#addListener
|
863
|
-
*/
|
864
|
-
on: 'addListener',
|
865
|
-
/**
|
866
|
-
* @method
|
867
|
-
* Shorthand for {@link #removeListener}.
|
868
|
-
* @inheritdoc Ext.util.Observable#removeListener
|
869
|
-
*/
|
870
|
-
un: 'removeListener',
|
871
|
-
/**
|
872
|
-
* @method
|
873
|
-
* Shorthand for {@link #addManagedListener}.
|
874
|
-
* @inheritdoc Ext.util.Observable#addManagedListener
|
875
|
-
*/
|
876
|
-
mon: 'addManagedListener',
|
877
|
-
/**
|
878
|
-
* @method
|
879
|
-
* Shorthand for {@link #removeManagedListener}.
|
880
|
-
* @inheritdoc Ext.util.Observable#removeManagedListener
|
881
|
-
*/
|
882
|
-
mun: 'removeManagedListener'
|
883
|
-
});
|
884
|
-
|
885
|
-
//deprecated, will be removed in 5.0
|
886
|
-
Observable.observeClass = Observable.observe;
|
887
|
-
|
888
|
-
// this is considered experimental (along with beforeMethod, afterMethod, removeMethodListener?)
|
889
|
-
// allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call
|
890
|
-
// private
|
891
|
-
function getMethodEvent(method){
|
892
|
-
var e = (this.methodEvents = this.methodEvents || {})[method],
|
893
|
-
returnValue,
|
894
|
-
v,
|
895
|
-
cancel,
|
896
|
-
obj = this,
|
897
|
-
makeCall;
|
898
|
-
|
899
|
-
if (!e) {
|
900
|
-
this.methodEvents[method] = e = {};
|
901
|
-
e.originalFn = this[method];
|
902
|
-
e.methodName = method;
|
903
|
-
e.before = [];
|
904
|
-
e.after = [];
|
905
|
-
|
906
|
-
makeCall = function(fn, scope, args){
|
907
|
-
if((v = fn.apply(scope || obj, args)) !== undefined){
|
908
|
-
if (typeof v == 'object') {
|
909
|
-
if(v.returnValue !== undefined){
|
910
|
-
returnValue = v.returnValue;
|
911
|
-
}else{
|
912
|
-
returnValue = v;
|
913
|
-
}
|
914
|
-
cancel = !!v.cancel;
|
915
|
-
}
|
916
|
-
else
|
917
|
-
if (v === false) {
|
918
|
-
cancel = true;
|
919
|
-
}
|
920
|
-
else {
|
921
|
-
returnValue = v;
|
922
|
-
}
|
923
|
-
}
|
924
|
-
};
|
925
|
-
|
926
|
-
this[method] = function(){
|
927
|
-
var args = Array.prototype.slice.call(arguments, 0),
|
928
|
-
b, i, len;
|
929
|
-
returnValue = v = undefined;
|
930
|
-
cancel = false;
|
931
|
-
|
932
|
-
for(i = 0, len = e.before.length; i < len; i++){
|
933
|
-
b = e.before[i];
|
934
|
-
makeCall(b.fn, b.scope, args);
|
935
|
-
if (cancel) {
|
936
|
-
return returnValue;
|
937
|
-
}
|
938
|
-
}
|
939
|
-
|
940
|
-
if((v = e.originalFn.apply(obj, args)) !== undefined){
|
941
|
-
returnValue = v;
|
942
|
-
}
|
943
|
-
|
944
|
-
for(i = 0, len = e.after.length; i < len; i++){
|
945
|
-
b = e.after[i];
|
946
|
-
makeCall(b.fn, b.scope, args);
|
947
|
-
if (cancel) {
|
948
|
-
return returnValue;
|
949
|
-
}
|
950
|
-
}
|
951
|
-
return returnValue;
|
952
|
-
};
|
953
|
-
}
|
954
|
-
return e;
|
955
|
-
}
|
956
|
-
|
957
|
-
Ext.apply(proto, {
|
958
|
-
onClassMixedIn: prepareMixin,
|
959
|
-
|
960
|
-
// these are considered experimental
|
961
|
-
// allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call
|
962
|
-
// adds an 'interceptor' called before the original method
|
963
|
-
beforeMethod : function(method, fn, scope){
|
964
|
-
getMethodEvent.call(this, method).before.push({
|
965
|
-
fn: fn,
|
966
|
-
scope: scope
|
967
|
-
});
|
968
|
-
},
|
969
|
-
|
970
|
-
// adds a 'sequence' called after the original method
|
971
|
-
afterMethod : function(method, fn, scope){
|
972
|
-
getMethodEvent.call(this, method).after.push({
|
973
|
-
fn: fn,
|
974
|
-
scope: scope
|
975
|
-
});
|
976
|
-
},
|
977
|
-
|
978
|
-
removeMethodListener: function(method, fn, scope){
|
979
|
-
var e = this.getMethodEvent(method),
|
980
|
-
i, len;
|
981
|
-
for(i = 0, len = e.before.length; i < len; i++){
|
982
|
-
if(e.before[i].fn == fn && e.before[i].scope == scope){
|
983
|
-
Ext.Array.erase(e.before, i, 1);
|
984
|
-
return;
|
985
|
-
}
|
986
|
-
}
|
987
|
-
for(i = 0, len = e.after.length; i < len; i++){
|
988
|
-
if(e.after[i].fn == fn && e.after[i].scope == scope){
|
989
|
-
Ext.Array.erase(e.after, i, 1);
|
990
|
-
return;
|
991
|
-
}
|
992
|
-
}
|
993
|
-
},
|
994
|
-
|
995
|
-
toggleEventLogging: function(toggle) {
|
996
|
-
Ext.util.Observable[toggle ? 'capture' : 'releaseCapture'](this, function(en) {
|
997
|
-
if (Ext.isDefined(Ext.global.console)) {
|
998
|
-
Ext.global.console.log(en, arguments);
|
999
|
-
}
|
1000
|
-
});
|
1001
|
-
}
|
1002
|
-
});
|
1003
|
-
});
|