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,25 +0,0 @@
|
|
1
|
-
Ext.define('Sample.CTO', {
|
2
|
-
extend: 'Sample.Developer',
|
3
|
-
|
4
|
-
statics: {
|
5
|
-
averageIQ: 140
|
6
|
-
},
|
7
|
-
|
8
|
-
constructor: function(config) {
|
9
|
-
this.callParent(arguments);
|
10
|
-
|
11
|
-
this.isSuperGeek = true;
|
12
|
-
},
|
13
|
-
|
14
|
-
hireNewDeveloperLike: function(developer) {
|
15
|
-
return developer.clone();
|
16
|
-
},
|
17
|
-
|
18
|
-
clone: function() {
|
19
|
-
var self = this.statics(),
|
20
|
-
cloned = new self(this.config);
|
21
|
-
|
22
|
-
alert(Ext.getClassName(this.callParent()));
|
23
|
-
return cloned;
|
24
|
-
}
|
25
|
-
});
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Ext.define('Sample.CoolGuy', {
|
2
|
-
extend: 'Sample.Person',
|
3
|
-
|
4
|
-
mixins: {
|
5
|
-
guitar: 'Sample.ability.CanPlayGuitar',
|
6
|
-
sing: 'Sample.ability.CanSing'
|
7
|
-
},
|
8
|
-
|
9
|
-
constructor: function() {
|
10
|
-
this.config.knownSongs.push("Love Me or Die");
|
11
|
-
|
12
|
-
return this.callParent(arguments);
|
13
|
-
},
|
14
|
-
|
15
|
-
sing: function() {
|
16
|
-
alert("Ahem...");
|
17
|
-
|
18
|
-
return this.mixins.sing.sing.apply(this, arguments);
|
19
|
-
}
|
20
|
-
});
|
@@ -1,43 +0,0 @@
|
|
1
|
-
Ext.define('Sample.Developer', {
|
2
|
-
extend: 'Sample.Person',
|
3
|
-
|
4
|
-
statics: {
|
5
|
-
averageIQ: 120
|
6
|
-
},
|
7
|
-
|
8
|
-
config: {
|
9
|
-
languages: ['JavaScript', 'C++', 'Python']
|
10
|
-
},
|
11
|
-
|
12
|
-
constructor: function(config) {
|
13
|
-
this.isGeek = true;
|
14
|
-
|
15
|
-
// Apply a method from the parent class' prototype
|
16
|
-
return this.callParent(arguments);
|
17
|
-
},
|
18
|
-
|
19
|
-
canCode: function(language) {
|
20
|
-
return Ext.Array.contains(this.getLanguages(), language);
|
21
|
-
},
|
22
|
-
|
23
|
-
code: function(language) {
|
24
|
-
if (!this.canCode(language)) {
|
25
|
-
alert("I can't code in: " + language);
|
26
|
-
|
27
|
-
return this;
|
28
|
-
}
|
29
|
-
|
30
|
-
alert("I'm coding in: " + language);
|
31
|
-
|
32
|
-
this.eat("Bugs");
|
33
|
-
|
34
|
-
return this;
|
35
|
-
},
|
36
|
-
|
37
|
-
clone: function() {
|
38
|
-
var self = this.statics(),
|
39
|
-
cloned = new self(this.config);
|
40
|
-
|
41
|
-
return cloned;
|
42
|
-
}
|
43
|
-
});
|
@@ -1,23 +0,0 @@
|
|
1
|
-
Ext.define('Sample.HumanResource', {
|
2
|
-
|
3
|
-
requires: 'Sample.Developer',
|
4
|
-
|
5
|
-
singleton: true,
|
6
|
-
|
7
|
-
developers: [],
|
8
|
-
|
9
|
-
recruit: function(developer) {
|
10
|
-
if (!developer.canCode('JavaScript')) {
|
11
|
-
alert(developer.getName() + " doesn't know JavaScript, no point recruiting!");
|
12
|
-
}
|
13
|
-
else {
|
14
|
-
this.developers.push(developer);
|
15
|
-
}
|
16
|
-
|
17
|
-
return this;
|
18
|
-
},
|
19
|
-
|
20
|
-
getDevelopersCount: function() {
|
21
|
-
return this.developers.length;
|
22
|
-
}
|
23
|
-
});
|
@@ -1,20 +0,0 @@
|
|
1
|
-
Ext.define('Sample.Musician', {
|
2
|
-
extend: 'Sample.Person',
|
3
|
-
|
4
|
-
statics: {
|
5
|
-
clone: function(musician) {
|
6
|
-
return new this({
|
7
|
-
name: musician.getName(),
|
8
|
-
height: musician.getHeight(),
|
9
|
-
isCool: musician.getIsCool(),
|
10
|
-
gender: musician.getGender()
|
11
|
-
});
|
12
|
-
}
|
13
|
-
},
|
14
|
-
|
15
|
-
mixins: {
|
16
|
-
guitar: 'Sample.ability.CanPlayGuitar',
|
17
|
-
compose: 'Sample.ability.CanComposeSongs',
|
18
|
-
sing: 'Sample.ability.CanSing'
|
19
|
-
}
|
20
|
-
});
|
@@ -1,50 +0,0 @@
|
|
1
|
-
Ext.define('Sample.Person', {
|
2
|
-
uses: 'Sample.Gun',
|
3
|
-
|
4
|
-
statics: {
|
5
|
-
averageIQ: 100
|
6
|
-
},
|
7
|
-
|
8
|
-
config: {
|
9
|
-
name: 'Unknown',
|
10
|
-
gender: 'unknown',
|
11
|
-
isCool: false,
|
12
|
-
height: 5.8
|
13
|
-
},
|
14
|
-
|
15
|
-
constructor: function(config) {
|
16
|
-
this.initConfig(config);
|
17
|
-
|
18
|
-
return this;
|
19
|
-
},
|
20
|
-
|
21
|
-
eat: function(foodType) {
|
22
|
-
alert("I'm eating: " + foodType);
|
23
|
-
|
24
|
-
return this;
|
25
|
-
},
|
26
|
-
|
27
|
-
applyScroller: function(scroller) {
|
28
|
-
return new Ext.util.Scroller(scroller);
|
29
|
-
},
|
30
|
-
|
31
|
-
applyHeight: function(height) {
|
32
|
-
return parseFloat(height);
|
33
|
-
},
|
34
|
-
|
35
|
-
applyName: function(name) {
|
36
|
-
return name || 'Unknown';
|
37
|
-
},
|
38
|
-
|
39
|
-
applyGender: function(gender) {
|
40
|
-
if (!/^(male|female|gay|lesbian)$/.test(gender)) {
|
41
|
-
return 'unknown';
|
42
|
-
}
|
43
|
-
|
44
|
-
return gender;
|
45
|
-
},
|
46
|
-
|
47
|
-
getAverageIQ: function() {
|
48
|
-
return this.self.averageIQ;
|
49
|
-
}
|
50
|
-
});
|
@@ -1,18 +0,0 @@
|
|
1
|
-
Ext.define('Sample.ability.CanSing', {
|
2
|
-
config: {
|
3
|
-
knownSongs: ['Yesterday', 'Happy New Year', 'Jingle Bells']
|
4
|
-
},
|
5
|
-
|
6
|
-
canSing: true,
|
7
|
-
|
8
|
-
sing: function(songName) {
|
9
|
-
if (!Ext.Array.contains(this.getKnownSongs(), songName)) {
|
10
|
-
alert("Sorry! I can't sing " + songName);
|
11
|
-
}
|
12
|
-
else {
|
13
|
-
alert("I'm singing " + songName);
|
14
|
-
}
|
15
|
-
|
16
|
-
return this;
|
17
|
-
}
|
18
|
-
});
|
@@ -1,1167 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @class Ext.EventManager
|
3
|
-
* Registers event handlers that want to receive a normalized EventObject instead of the standard browser event and provides
|
4
|
-
* several useful events directly.
|
5
|
-
* See {@link Ext.EventObject} for more details on normalized event objects.
|
6
|
-
* @singleton
|
7
|
-
*/
|
8
|
-
Ext.EventManager = new function() {
|
9
|
-
var EventManager = this,
|
10
|
-
doc = document,
|
11
|
-
win = window,
|
12
|
-
initExtCss = function() {
|
13
|
-
// find the body element
|
14
|
-
var bd = doc.body || doc.getElementsByTagName('body')[0],
|
15
|
-
baseCSSPrefix = Ext.baseCSSPrefix,
|
16
|
-
cls = [baseCSSPrefix + 'body'],
|
17
|
-
htmlCls = [],
|
18
|
-
html;
|
19
|
-
|
20
|
-
if (!bd) {
|
21
|
-
return false;
|
22
|
-
}
|
23
|
-
|
24
|
-
html = bd.parentNode;
|
25
|
-
|
26
|
-
function add (c) {
|
27
|
-
cls.push(baseCSSPrefix + c);
|
28
|
-
}
|
29
|
-
|
30
|
-
//Let's keep this human readable!
|
31
|
-
if (Ext.isIE) {
|
32
|
-
add('ie');
|
33
|
-
|
34
|
-
// very often CSS needs to do checks like "IE7+" or "IE6 or 7". To help
|
35
|
-
// reduce the clutter (since CSS/SCSS cannot do these tests), we add some
|
36
|
-
// additional classes:
|
37
|
-
//
|
38
|
-
// x-ie7p : IE7+ : 7 <= ieVer
|
39
|
-
// x-ie7m : IE7- : ieVer <= 7
|
40
|
-
// x-ie8p : IE8+ : 8 <= ieVer
|
41
|
-
// x-ie8m : IE8- : ieVer <= 8
|
42
|
-
// x-ie9p : IE9+ : 9 <= ieVer
|
43
|
-
// x-ie78 : IE7 or 8 : 7 <= ieVer <= 8
|
44
|
-
//
|
45
|
-
if (Ext.isIE6) {
|
46
|
-
add('ie6');
|
47
|
-
} else { // ignore pre-IE6 :)
|
48
|
-
add('ie7p');
|
49
|
-
|
50
|
-
if (Ext.isIE7) {
|
51
|
-
add('ie7');
|
52
|
-
} else {
|
53
|
-
add('ie8p');
|
54
|
-
|
55
|
-
if (Ext.isIE8) {
|
56
|
-
add('ie8');
|
57
|
-
} else {
|
58
|
-
add('ie9p');
|
59
|
-
|
60
|
-
if (Ext.isIE9) {
|
61
|
-
add('ie9');
|
62
|
-
}
|
63
|
-
}
|
64
|
-
}
|
65
|
-
}
|
66
|
-
|
67
|
-
if (Ext.isIE6 || Ext.isIE7) {
|
68
|
-
add('ie7m');
|
69
|
-
}
|
70
|
-
if (Ext.isIE6 || Ext.isIE7 || Ext.isIE8) {
|
71
|
-
add('ie8m');
|
72
|
-
}
|
73
|
-
if (Ext.isIE7 || Ext.isIE8) {
|
74
|
-
add('ie78');
|
75
|
-
}
|
76
|
-
}
|
77
|
-
if (Ext.isGecko) {
|
78
|
-
add('gecko');
|
79
|
-
if (Ext.isGecko3) {
|
80
|
-
add('gecko3');
|
81
|
-
}
|
82
|
-
if (Ext.isGecko4) {
|
83
|
-
add('gecko4');
|
84
|
-
}
|
85
|
-
if (Ext.isGecko5) {
|
86
|
-
add('gecko5');
|
87
|
-
}
|
88
|
-
}
|
89
|
-
if (Ext.isOpera) {
|
90
|
-
add('opera');
|
91
|
-
}
|
92
|
-
if (Ext.isWebKit) {
|
93
|
-
add('webkit');
|
94
|
-
}
|
95
|
-
if (Ext.isSafari) {
|
96
|
-
add('safari');
|
97
|
-
if (Ext.isSafari2) {
|
98
|
-
add('safari2');
|
99
|
-
}
|
100
|
-
if (Ext.isSafari3) {
|
101
|
-
add('safari3');
|
102
|
-
}
|
103
|
-
if (Ext.isSafari4) {
|
104
|
-
add('safari4');
|
105
|
-
}
|
106
|
-
if (Ext.isSafari5) {
|
107
|
-
add('safari5');
|
108
|
-
}
|
109
|
-
if (Ext.isSafari5_0) {
|
110
|
-
add('safari5_0')
|
111
|
-
}
|
112
|
-
}
|
113
|
-
if (Ext.isChrome) {
|
114
|
-
add('chrome');
|
115
|
-
}
|
116
|
-
if (Ext.isMac) {
|
117
|
-
add('mac');
|
118
|
-
}
|
119
|
-
if (Ext.isLinux) {
|
120
|
-
add('linux');
|
121
|
-
}
|
122
|
-
if (!Ext.supports.CSS3BorderRadius) {
|
123
|
-
add('nbr');
|
124
|
-
}
|
125
|
-
if (!Ext.supports.CSS3LinearGradient) {
|
126
|
-
add('nlg');
|
127
|
-
}
|
128
|
-
if (!Ext.scopeResetCSS) {
|
129
|
-
add('reset');
|
130
|
-
}
|
131
|
-
|
132
|
-
// add to the parent to allow for selectors x-strict x-border-box, also set the isBorderBox property correctly
|
133
|
-
if (html) {
|
134
|
-
if (Ext.isStrict && (Ext.isIE6 || Ext.isIE7)) {
|
135
|
-
Ext.isBorderBox = false;
|
136
|
-
}
|
137
|
-
else {
|
138
|
-
Ext.isBorderBox = true;
|
139
|
-
}
|
140
|
-
|
141
|
-
if(Ext.isBorderBox) {
|
142
|
-
htmlCls.push(baseCSSPrefix + 'border-box');
|
143
|
-
}
|
144
|
-
if (Ext.isStrict) {
|
145
|
-
htmlCls.push(baseCSSPrefix + 'strict');
|
146
|
-
} else {
|
147
|
-
htmlCls.push(baseCSSPrefix + 'quirks');
|
148
|
-
}
|
149
|
-
Ext.fly(html, '_internal').addCls(htmlCls);
|
150
|
-
}
|
151
|
-
|
152
|
-
Ext.fly(bd, '_internal').addCls(cls);
|
153
|
-
return true;
|
154
|
-
};
|
155
|
-
|
156
|
-
Ext.apply(EventManager, {
|
157
|
-
/**
|
158
|
-
* Check if we have bound our global onReady listener
|
159
|
-
* @private
|
160
|
-
*/
|
161
|
-
hasBoundOnReady: false,
|
162
|
-
|
163
|
-
/**
|
164
|
-
* Check if fireDocReady has been called
|
165
|
-
* @private
|
166
|
-
*/
|
167
|
-
hasFiredReady: false,
|
168
|
-
|
169
|
-
/**
|
170
|
-
* Additionally, allow the 'DOM' listener thread to complete (usually desirable with mobWebkit, Gecko)
|
171
|
-
* before firing the entire onReady chain (high stack load on Loader) by specifying a delay value
|
172
|
-
* @default 1ms
|
173
|
-
* @private
|
174
|
-
*/
|
175
|
-
deferReadyEvent : 1,
|
176
|
-
|
177
|
-
/*
|
178
|
-
* diags: a list of event names passed to onReadyEvent (in chron order)
|
179
|
-
* @private
|
180
|
-
*/
|
181
|
-
onReadyChain : [],
|
182
|
-
|
183
|
-
/**
|
184
|
-
* Holds references to any onReady functions
|
185
|
-
* @private
|
186
|
-
*/
|
187
|
-
readyEvent:
|
188
|
-
(function () {
|
189
|
-
var event = new Ext.util.Event();
|
190
|
-
event.fire = function () {
|
191
|
-
Ext._beforeReadyTime = Ext._beforeReadyTime || new Date().getTime();
|
192
|
-
event.self.prototype.fire.apply(event, arguments);
|
193
|
-
Ext._afterReadytime = new Date().getTime();
|
194
|
-
};
|
195
|
-
return event;
|
196
|
-
}()),
|
197
|
-
|
198
|
-
/**
|
199
|
-
* Fires when a DOM event handler finishes its run, just before returning to browser control.
|
200
|
-
* This can be useful for performing cleanup, or upfdate tasks which need to happen only
|
201
|
-
* after all code in an event handler has been run, but which should not be executed in a timer
|
202
|
-
* due to the intervening browser reflow/repaint which would take place.
|
203
|
-
*
|
204
|
-
*/
|
205
|
-
idleEvent: new Ext.util.Event(),
|
206
|
-
|
207
|
-
/**
|
208
|
-
* detects whether the EventManager has been placed in a paused state for synchronization
|
209
|
-
* with external debugging / perf tools (PageAnalyzer)
|
210
|
-
* @private
|
211
|
-
*/
|
212
|
-
isReadyPaused: function(){
|
213
|
-
return (/[?&]ext-pauseReadyFire\b/i.test(location.search) && !Ext._continueFireReady);
|
214
|
-
},
|
215
|
-
|
216
|
-
/**
|
217
|
-
* Binds the appropriate browser event for checking if the DOM has loaded.
|
218
|
-
* @private
|
219
|
-
*/
|
220
|
-
bindReadyEvent: function() {
|
221
|
-
if (EventManager.hasBoundOnReady) {
|
222
|
-
return;
|
223
|
-
}
|
224
|
-
|
225
|
-
// Test scenario where Core is dynamically loaded AFTER window.load
|
226
|
-
if ( doc.readyState == 'complete' ) { // Firefox4+ got support for this state, others already do.
|
227
|
-
EventManager.onReadyEvent({
|
228
|
-
type: doc.readyState || 'body'
|
229
|
-
});
|
230
|
-
} else {
|
231
|
-
document.addEventListener('DOMContentLoaded', EventManager.onReadyEvent, false);
|
232
|
-
window.addEventListener('load', EventManager.onReadyEvent, false);
|
233
|
-
EventManager.hasBoundOnReady = true;
|
234
|
-
}
|
235
|
-
},
|
236
|
-
|
237
|
-
onReadyEvent : function(e) {
|
238
|
-
if (e && e.type) {
|
239
|
-
EventManager.onReadyChain.push(e.type);
|
240
|
-
}
|
241
|
-
|
242
|
-
if (EventManager.hasBoundOnReady) {
|
243
|
-
document.removeEventListener('DOMContentLoaded', EventManager.onReadyEvent, false);
|
244
|
-
window.removeEventListener('load', EventManager.onReadyEvent, false);
|
245
|
-
}
|
246
|
-
|
247
|
-
if (!Ext.isReady) {
|
248
|
-
EventManager.fireDocReady();
|
249
|
-
}
|
250
|
-
},
|
251
|
-
|
252
|
-
/**
|
253
|
-
* We know the document is loaded, so trigger any onReady events.
|
254
|
-
* @private
|
255
|
-
*/
|
256
|
-
fireDocReady: function() {
|
257
|
-
if (!Ext.isReady) {
|
258
|
-
Ext._readyTime = new Date().getTime();
|
259
|
-
Ext.isReady = true;
|
260
|
-
|
261
|
-
Ext.supports.init();
|
262
|
-
EventManager.onWindowUnload();
|
263
|
-
EventManager.readyEvent.onReadyChain = EventManager.onReadyChain; //diags report
|
264
|
-
|
265
|
-
if (Ext.isNumber(EventManager.deferReadyEvent)) {
|
266
|
-
Ext.Function.defer(EventManager.fireReadyEvent, EventManager.deferReadyEvent);
|
267
|
-
EventManager.hasDocReadyTimer = true;
|
268
|
-
} else {
|
269
|
-
EventManager.fireReadyEvent();
|
270
|
-
}
|
271
|
-
}
|
272
|
-
},
|
273
|
-
|
274
|
-
/**
|
275
|
-
* Fires the ready event
|
276
|
-
* @private
|
277
|
-
*/
|
278
|
-
fireReadyEvent: function(){
|
279
|
-
var readyEvent = EventManager.readyEvent;
|
280
|
-
|
281
|
-
// Unset the timer flag here since other onReady events may be
|
282
|
-
// added during the fire() call and we don't want to block them
|
283
|
-
EventManager.hasDocReadyTimer = false;
|
284
|
-
EventManager.isFiring = true;
|
285
|
-
|
286
|
-
// Ready events are all single: true, if we get to the end
|
287
|
-
// & there are more listeners, it means they were added
|
288
|
-
// inside some other ready event
|
289
|
-
while (readyEvent.listeners.length && !EventManager.isReadyPaused()) {
|
290
|
-
readyEvent.fire();
|
291
|
-
}
|
292
|
-
EventManager.isFiring = false;
|
293
|
-
EventManager.hasFiredReady = true;
|
294
|
-
},
|
295
|
-
|
296
|
-
/**
|
297
|
-
* Adds a listener to be notified when the document is ready (before onload and before images are loaded). Can be
|
298
|
-
* accessed shorthanded as Ext.onReady().
|
299
|
-
* @param {Function} fn The method the event invokes.
|
300
|
-
* @param {Object} scope (optional) The scope (<code>this</code> reference) in which the handler function executes. Defaults to the browser window.
|
301
|
-
* @param {Boolean} options (optional) Options object as passed to {@link Ext.Element#addListener}.
|
302
|
-
*/
|
303
|
-
onDocumentReady: function(fn, scope, options) {
|
304
|
-
options = options || {};
|
305
|
-
// force single, only ever fire it once
|
306
|
-
options.single = true;
|
307
|
-
EventManager.readyEvent.addListener(fn, scope, options);
|
308
|
-
|
309
|
-
// If we're in the middle of firing, or we have a deferred timer
|
310
|
-
// pending, drop out since the event will be fired later
|
311
|
-
if (!(EventManager.isFiring || EventManager.hasDocReadyTimer)) {
|
312
|
-
if (Ext.isReady) {
|
313
|
-
EventManager.fireReadyEvent();
|
314
|
-
} else {
|
315
|
-
EventManager.bindReadyEvent();
|
316
|
-
}
|
317
|
-
}
|
318
|
-
},
|
319
|
-
|
320
|
-
// --------------------- event binding ---------------------
|
321
|
-
|
322
|
-
/**
|
323
|
-
* Contains a list of all document mouse downs, so we can ensure they fire even when stopEvent is called.
|
324
|
-
* @private
|
325
|
-
*/
|
326
|
-
stoppedMouseDownEvent: new Ext.util.Event(),
|
327
|
-
|
328
|
-
/**
|
329
|
-
* Options to parse for the 4th argument to addListener.
|
330
|
-
* @private
|
331
|
-
*/
|
332
|
-
propRe: /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate|freezeEvent)$/,
|
333
|
-
|
334
|
-
/**
|
335
|
-
* Get the id of the element. If one has not been assigned, automatically assign it.
|
336
|
-
* @param {HTMLElement/Ext.Element} element The element to get the id for.
|
337
|
-
* @return {String} id
|
338
|
-
*/
|
339
|
-
getId : function(element) {
|
340
|
-
var id;
|
341
|
-
|
342
|
-
element = Ext.getDom(element);
|
343
|
-
|
344
|
-
if (element === doc || element === win) {
|
345
|
-
id = element === doc ? Ext.documentId : Ext.windowId;
|
346
|
-
}
|
347
|
-
else {
|
348
|
-
id = Ext.id(element);
|
349
|
-
}
|
350
|
-
|
351
|
-
if (!Ext.cache[id]) {
|
352
|
-
Ext.addCacheEntry(id, null, element);
|
353
|
-
}
|
354
|
-
|
355
|
-
return id;
|
356
|
-
},
|
357
|
-
|
358
|
-
/**
|
359
|
-
* Convert a "config style" listener into a set of flat arguments so they can be passed to addListener
|
360
|
-
* @private
|
361
|
-
* @param {Object} element The element the event is for
|
362
|
-
* @param {Object} event The event configuration
|
363
|
-
* @param {Object} isRemove True if a removal should be performed, otherwise an add will be done.
|
364
|
-
*/
|
365
|
-
prepareListenerConfig: function(element, config, isRemove) {
|
366
|
-
var propRe = EventManager.propRe,
|
367
|
-
key, value, args;
|
368
|
-
|
369
|
-
// loop over all the keys in the object
|
370
|
-
for (key in config) {
|
371
|
-
if (config.hasOwnProperty(key)) {
|
372
|
-
// if the key is something else then an event option
|
373
|
-
if (!propRe.test(key)) {
|
374
|
-
value = config[key];
|
375
|
-
// if the value is a function it must be something like click: function() {}, scope: this
|
376
|
-
// which means that there might be multiple event listeners with shared options
|
377
|
-
if (typeof value == 'function') {
|
378
|
-
// shared options
|
379
|
-
args = [element, key, value, config.scope, config];
|
380
|
-
} else {
|
381
|
-
// if its not a function, it must be an object like click: {fn: function() {}, scope: this}
|
382
|
-
args = [element, key, value.fn, value.scope, value];
|
383
|
-
}
|
384
|
-
|
385
|
-
if (isRemove) {
|
386
|
-
EventManager.removeListener.apply(EventManager, args);
|
387
|
-
} else {
|
388
|
-
EventManager.addListener.apply(EventManager, args);
|
389
|
-
}
|
390
|
-
}
|
391
|
-
}
|
392
|
-
}
|
393
|
-
},
|
394
|
-
|
395
|
-
mouseEnterLeaveRe: /mouseenter|mouseleave/,
|
396
|
-
|
397
|
-
/**
|
398
|
-
* Normalize cross browser event differences
|
399
|
-
* @private
|
400
|
-
* @param {Object} eventName The event name
|
401
|
-
* @param {Object} fn The function to execute
|
402
|
-
* @return {Object} The new event name/function
|
403
|
-
*/
|
404
|
-
normalizeEvent: function(eventName, fn) {
|
405
|
-
if (EventManager.mouseEnterLeaveRe.test(eventName) && !Ext.supports.MouseEnterLeave) {
|
406
|
-
if (fn) {
|
407
|
-
fn = Ext.Function.createInterceptor(fn, EventManager.contains);
|
408
|
-
}
|
409
|
-
eventName = eventName == 'mouseenter' ? 'mouseover' : 'mouseout';
|
410
|
-
} else if (eventName == 'mousewheel' && !Ext.supports.MouseWheel && !Ext.isOpera) {
|
411
|
-
eventName = 'DOMMouseScroll';
|
412
|
-
}
|
413
|
-
return {
|
414
|
-
eventName: eventName,
|
415
|
-
fn: fn
|
416
|
-
};
|
417
|
-
},
|
418
|
-
|
419
|
-
/**
|
420
|
-
* Checks whether the event's relatedTarget is contained inside (or <b>is</b>) the element.
|
421
|
-
* @private
|
422
|
-
* @param {Object} event
|
423
|
-
*/
|
424
|
-
contains: function(event) {
|
425
|
-
var parent = event.browserEvent.currentTarget,
|
426
|
-
child = EventManager.getRelatedTarget(event);
|
427
|
-
|
428
|
-
if (parent && parent.firstChild) {
|
429
|
-
while (child) {
|
430
|
-
if (child === parent) {
|
431
|
-
return false;
|
432
|
-
}
|
433
|
-
child = child.parentNode;
|
434
|
-
if (child && (child.nodeType != 1)) {
|
435
|
-
child = null;
|
436
|
-
}
|
437
|
-
}
|
438
|
-
}
|
439
|
-
return true;
|
440
|
-
},
|
441
|
-
|
442
|
-
/**
|
443
|
-
* Appends an event handler to an element. The shorthand version {@link #on} is equivalent. Typically you will
|
444
|
-
* use {@link Ext.Element#addListener} directly on an Element in favor of calling this version.
|
445
|
-
* @param {String/HTMLElement} el The html element or id to assign the event handler to.
|
446
|
-
* @param {String} eventName The name of the event to listen for.
|
447
|
-
* @param {Function} handler The handler function the event invokes. This function is passed
|
448
|
-
* the following parameters:<ul>
|
449
|
-
* <li>evt : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li>
|
450
|
-
* <li>t : Element<div class="sub-desc">The {@link Ext.Element Element} which was the target of the event.
|
451
|
-
* Note that this may be filtered by using the <tt>delegate</tt> option.</div></li>
|
452
|
-
* <li>o : Object<div class="sub-desc">The options object from the addListener call.</div></li>
|
453
|
-
* </ul>
|
454
|
-
* @param {Object} scope (optional) The scope (<b><code>this</code></b> reference) in which the handler function is executed. <b>Defaults to the Element</b>.
|
455
|
-
* @param {Object} options (optional) An object containing handler configuration properties.
|
456
|
-
* This may contain any of the following properties:<ul>
|
457
|
-
* <li>scope : Object<div class="sub-desc">The scope (<b><code>this</code></b> reference) in which the handler function is executed. <b>Defaults to the Element</b>.</div></li>
|
458
|
-
* <li>delegate : String<div class="sub-desc">A simple selector to filter the target or look for a descendant of the target</div></li>
|
459
|
-
* <li>stopEvent : Boolean<div class="sub-desc">True to stop the event. That is stop propagation, and prevent the default action.</div></li>
|
460
|
-
* <li>preventDefault : Boolean<div class="sub-desc">True to prevent the default action</div></li>
|
461
|
-
* <li>stopPropagation : Boolean<div class="sub-desc">True to prevent event propagation</div></li>
|
462
|
-
* <li>normalized : Boolean<div class="sub-desc">False to pass a browser event to the handler function instead of an Ext.EventObject</div></li>
|
463
|
-
* <li>delay : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after te event fires.</div></li>
|
464
|
-
* <li>single : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
|
465
|
-
* <li>buffer : Number<div class="sub-desc">Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed
|
466
|
-
* by the specified number of milliseconds. If the event fires again within that time, the original
|
467
|
-
* handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
|
468
|
-
* <li>target : Element<div class="sub-desc">Only call the handler if the event was fired on the target Element, <i>not</i> if the event was bubbled up from a child node.</div></li>
|
469
|
-
* </ul><br>
|
470
|
-
* <p>See {@link Ext.Element#addListener} for examples of how to use these options.</p>
|
471
|
-
*/
|
472
|
-
addListener: function(element, eventName, fn, scope, options) {
|
473
|
-
// Check if we've been passed a "config style" event.
|
474
|
-
if (typeof eventName !== 'string') {
|
475
|
-
EventManager.prepareListenerConfig(element, eventName);
|
476
|
-
return;
|
477
|
-
}
|
478
|
-
|
479
|
-
var dom = element.dom || Ext.getDom(element),
|
480
|
-
bind, wrap;
|
481
|
-
|
482
|
-
//<debug>
|
483
|
-
if (!fn) {
|
484
|
-
Ext.Error.raise({
|
485
|
-
sourceClass: 'Ext.EventManager',
|
486
|
-
sourceMethod: 'addListener',
|
487
|
-
targetElement: element,
|
488
|
-
eventName: eventName,
|
489
|
-
msg: 'Error adding "' + eventName + '\" listener. The handler function is undefined.'
|
490
|
-
});
|
491
|
-
}
|
492
|
-
//</debug>
|
493
|
-
|
494
|
-
// create the wrapper function
|
495
|
-
options = options || {};
|
496
|
-
|
497
|
-
bind = EventManager.normalizeEvent(eventName, fn);
|
498
|
-
wrap = EventManager.createListenerWrap(dom, eventName, bind.fn, scope, options);
|
499
|
-
|
500
|
-
if (dom.attachEvent) {
|
501
|
-
dom.attachEvent('on' + bind.eventName, wrap);
|
502
|
-
} else {
|
503
|
-
dom.addEventListener(bind.eventName, wrap, options.capture || false);
|
504
|
-
}
|
505
|
-
|
506
|
-
if (dom == doc && eventName == 'mousedown') {
|
507
|
-
EventManager.stoppedMouseDownEvent.addListener(wrap);
|
508
|
-
}
|
509
|
-
|
510
|
-
// add all required data into the event cache
|
511
|
-
EventManager.getEventListenerCache(element.dom ? element : dom, eventName).push({
|
512
|
-
fn: fn,
|
513
|
-
wrap: wrap,
|
514
|
-
scope: scope
|
515
|
-
});
|
516
|
-
},
|
517
|
-
|
518
|
-
/**
|
519
|
-
* Removes an event handler from an element. The shorthand version {@link #un} is equivalent. Typically
|
520
|
-
* you will use {@link Ext.Element#removeListener} directly on an Element in favor of calling this version.
|
521
|
-
* @param {String/HTMLElement} el The id or html element from which to remove the listener.
|
522
|
-
* @param {String} eventName The name of the event.
|
523
|
-
* @param {Function} fn The handler function to remove. <b>This must be a reference to the function passed into the {@link #addListener} call.</b>
|
524
|
-
* @param {Object} scope If a scope (<b><code>this</code></b> reference) was specified when the listener was added,
|
525
|
-
* then this must refer to the same object.
|
526
|
-
*/
|
527
|
-
removeListener : function(element, eventName, fn, scope) {
|
528
|
-
// handle our listener config object syntax
|
529
|
-
if (typeof eventName !== 'string') {
|
530
|
-
EventManager.prepareListenerConfig(element, eventName, true);
|
531
|
-
return;
|
532
|
-
}
|
533
|
-
|
534
|
-
var dom = Ext.getDom(element),
|
535
|
-
el = element.dom ? element : Ext.get(dom),
|
536
|
-
cache = EventManager.getEventListenerCache(el, eventName),
|
537
|
-
bindName = EventManager.normalizeEvent(eventName).eventName,
|
538
|
-
i = cache.length, j,
|
539
|
-
listener, wrap, tasks;
|
540
|
-
|
541
|
-
|
542
|
-
while (i--) {
|
543
|
-
listener = cache[i];
|
544
|
-
|
545
|
-
if (listener && (!fn || listener.fn == fn) && (!scope || listener.scope === scope)) {
|
546
|
-
wrap = listener.wrap;
|
547
|
-
|
548
|
-
// clear buffered calls
|
549
|
-
if (wrap.task) {
|
550
|
-
clearTimeout(wrap.task);
|
551
|
-
delete wrap.task;
|
552
|
-
}
|
553
|
-
|
554
|
-
// clear delayed calls
|
555
|
-
j = wrap.tasks && wrap.tasks.length;
|
556
|
-
if (j) {
|
557
|
-
while (j--) {
|
558
|
-
clearTimeout(wrap.tasks[j]);
|
559
|
-
}
|
560
|
-
delete wrap.tasks;
|
561
|
-
}
|
562
|
-
|
563
|
-
if (dom.detachEvent) {
|
564
|
-
dom.detachEvent('on' + bindName, wrap);
|
565
|
-
} else {
|
566
|
-
dom.removeEventListener(bindName, wrap, false);
|
567
|
-
}
|
568
|
-
|
569
|
-
if (wrap && dom == doc && eventName == 'mousedown') {
|
570
|
-
EventManager.stoppedMouseDownEvent.removeListener(wrap);
|
571
|
-
}
|
572
|
-
|
573
|
-
// remove listener from cache
|
574
|
-
Ext.Array.erase(cache, i, 1);
|
575
|
-
}
|
576
|
-
}
|
577
|
-
},
|
578
|
-
|
579
|
-
/**
|
580
|
-
* Removes all event handers from an element. Typically you will use {@link Ext.Element#removeAllListeners}
|
581
|
-
* directly on an Element in favor of calling this version.
|
582
|
-
* @param {String/HTMLElement} el The id or html element from which to remove all event handlers.
|
583
|
-
*/
|
584
|
-
removeAll : function(element) {
|
585
|
-
var el = element.dom ? element : Ext.get(element),
|
586
|
-
cache, events, eventName;
|
587
|
-
|
588
|
-
if (!el) {
|
589
|
-
return;
|
590
|
-
}
|
591
|
-
cache = (el.$cache || el.getCache());
|
592
|
-
events = cache.events;
|
593
|
-
|
594
|
-
for (eventName in events) {
|
595
|
-
if (events.hasOwnProperty(eventName)) {
|
596
|
-
EventManager.removeListener(el, eventName);
|
597
|
-
}
|
598
|
-
}
|
599
|
-
cache.events = {};
|
600
|
-
},
|
601
|
-
|
602
|
-
/**
|
603
|
-
* Recursively removes all previous added listeners from an element and its children. Typically you will use {@link Ext.Element#purgeAllListeners}
|
604
|
-
* directly on an Element in favor of calling this version.
|
605
|
-
* @param {String/HTMLElement} el The id or html element from which to remove all event handlers.
|
606
|
-
* @param {String} eventName (optional) The name of the event.
|
607
|
-
*/
|
608
|
-
purgeElement : function(element, eventName) {
|
609
|
-
var dom = Ext.getDom(element),
|
610
|
-
i = 0, len;
|
611
|
-
|
612
|
-
if (eventName) {
|
613
|
-
EventManager.removeListener(element, eventName);
|
614
|
-
}
|
615
|
-
else {
|
616
|
-
EventManager.removeAll(element);
|
617
|
-
}
|
618
|
-
|
619
|
-
if (dom && dom.childNodes) {
|
620
|
-
for (len = element.childNodes.length; i < len; i++) {
|
621
|
-
EventManager.purgeElement(element.childNodes[i], eventName);
|
622
|
-
}
|
623
|
-
}
|
624
|
-
},
|
625
|
-
|
626
|
-
/**
|
627
|
-
* Create the wrapper function for the event
|
628
|
-
* @private
|
629
|
-
* @param {HTMLElement} dom The dom element
|
630
|
-
* @param {String} ename The event name
|
631
|
-
* @param {Function} fn The function to execute
|
632
|
-
* @param {Object} scope The scope to execute callback in
|
633
|
-
* @param {Object} options The options
|
634
|
-
* @return {Function} the wrapper function
|
635
|
-
*/
|
636
|
-
createListenerWrap : function(dom, ename, fn, scope, options) {
|
637
|
-
options = options || {};
|
638
|
-
|
639
|
-
var f, gen, escapeRx = /\\/g, wrap = function(e, args) {
|
640
|
-
// Compile the implementation upon first firing
|
641
|
-
if (!gen) {
|
642
|
-
f = ['if(!' + Ext.name + ') {return;}'];
|
643
|
-
|
644
|
-
if(options.buffer || options.delay || options.freezeEvent) {
|
645
|
-
f.push('e = new X.EventObjectImpl(e, ' + (options.freezeEvent ? 'true' : 'false' ) + ');');
|
646
|
-
} else {
|
647
|
-
f.push('e = X.EventObject.setEvent(e);');
|
648
|
-
}
|
649
|
-
|
650
|
-
if (options.delegate) {
|
651
|
-
// double up '\' characters so escape sequences survive the
|
652
|
-
// string-literal translation
|
653
|
-
f.push('var t = e.getTarget("' + (options.delegate + '').replace(escapeRx, '\\\\') + '", this);');
|
654
|
-
f.push('if(!t) {return;}');
|
655
|
-
} else {
|
656
|
-
f.push('var t = e.target;');
|
657
|
-
}
|
658
|
-
|
659
|
-
if (options.target) {
|
660
|
-
f.push('if(e.target !== options.target) {return;}');
|
661
|
-
}
|
662
|
-
|
663
|
-
if(options.stopEvent) {
|
664
|
-
f.push('e.stopEvent();');
|
665
|
-
} else {
|
666
|
-
if(options.preventDefault) {
|
667
|
-
f.push('e.preventDefault();');
|
668
|
-
}
|
669
|
-
if(options.stopPropagation) {
|
670
|
-
f.push('e.stopPropagation();');
|
671
|
-
}
|
672
|
-
}
|
673
|
-
|
674
|
-
if(options.normalized === false) {
|
675
|
-
f.push('e = e.browserEvent;');
|
676
|
-
}
|
677
|
-
|
678
|
-
if(options.buffer) {
|
679
|
-
f.push('(wrap.task && clearTimeout(wrap.task));');
|
680
|
-
f.push('wrap.task = setTimeout(function() {');
|
681
|
-
}
|
682
|
-
|
683
|
-
if(options.delay) {
|
684
|
-
f.push('wrap.tasks = wrap.tasks || [];');
|
685
|
-
f.push('wrap.tasks.push(setTimeout(function() {');
|
686
|
-
}
|
687
|
-
|
688
|
-
// finally call the actual handler fn
|
689
|
-
f.push('fn.call(scope || dom, e, t, options);');
|
690
|
-
|
691
|
-
if(options.single) {
|
692
|
-
f.push('evtMgr.removeListener(dom, ename, fn, scope);');
|
693
|
-
}
|
694
|
-
|
695
|
-
// Fire the global idle event for all events except mousemove which is too common, and
|
696
|
-
// fires too frequently and fast to be use in tiggering onIdle processing.
|
697
|
-
if (ename !== 'mousemove') {
|
698
|
-
f.push('if (evtMgr.idleEvent.listeners.length) {');
|
699
|
-
f.push('evtMgr.idleEvent.fire();');
|
700
|
-
f.push('}');
|
701
|
-
}
|
702
|
-
|
703
|
-
if(options.delay) {
|
704
|
-
f.push('}, ' + options.delay + '));');
|
705
|
-
}
|
706
|
-
|
707
|
-
if(options.buffer) {
|
708
|
-
f.push('}, ' + options.buffer + ');');
|
709
|
-
}
|
710
|
-
|
711
|
-
gen = Ext.cacheableFunctionFactory('e', 'options', 'fn', 'scope', 'ename', 'dom', 'wrap', 'args', 'X', 'evtMgr', f.join('\n'));
|
712
|
-
}
|
713
|
-
|
714
|
-
gen.call(dom, e, options, fn, scope, ename, dom, wrap, args, Ext, EventManager);
|
715
|
-
};
|
716
|
-
return wrap;
|
717
|
-
},
|
718
|
-
|
719
|
-
/**
|
720
|
-
* Get the event cache for a particular element for a particular event
|
721
|
-
* @private
|
722
|
-
* @param {HTMLElement} element The element
|
723
|
-
* @param {Object} eventName The event name
|
724
|
-
* @return {Array} The events for the element
|
725
|
-
*/
|
726
|
-
getEventListenerCache : function(element, eventName) {
|
727
|
-
var elementCache, eventCache;
|
728
|
-
if (!element) {
|
729
|
-
return [];
|
730
|
-
}
|
731
|
-
|
732
|
-
if (element.$cache) {
|
733
|
-
elementCache = element.$cache;
|
734
|
-
} else {
|
735
|
-
// getId will populate the cache for this element if it isn't already present
|
736
|
-
elementCache = Ext.cache[EventManager.getId(element)];
|
737
|
-
}
|
738
|
-
eventCache = elementCache.events || (elementCache.events = {});
|
739
|
-
|
740
|
-
return eventCache[eventName] || (eventCache[eventName] = []);
|
741
|
-
},
|
742
|
-
|
743
|
-
// --------------------- utility methods ---------------------
|
744
|
-
mouseLeaveRe: /(mouseout|mouseleave)/,
|
745
|
-
mouseEnterRe: /(mouseover|mouseenter)/,
|
746
|
-
|
747
|
-
/**
|
748
|
-
* Stop the event (preventDefault and stopPropagation)
|
749
|
-
* @param {Event} The event to stop
|
750
|
-
*/
|
751
|
-
stopEvent: function(event) {
|
752
|
-
EventManager.stopPropagation(event);
|
753
|
-
EventManager.preventDefault(event);
|
754
|
-
},
|
755
|
-
|
756
|
-
/**
|
757
|
-
* Cancels bubbling of the event.
|
758
|
-
* @param {Event} The event to stop bubbling.
|
759
|
-
*/
|
760
|
-
stopPropagation: function(event) {
|
761
|
-
event = event.browserEvent || event;
|
762
|
-
if (event.stopPropagation) {
|
763
|
-
event.stopPropagation();
|
764
|
-
} else {
|
765
|
-
event.cancelBubble = true;
|
766
|
-
}
|
767
|
-
},
|
768
|
-
|
769
|
-
/**
|
770
|
-
* Prevents the browsers default handling of the event.
|
771
|
-
* @param {Event} The event to prevent the default
|
772
|
-
*/
|
773
|
-
preventDefault: function(event) {
|
774
|
-
event = event.browserEvent || event;
|
775
|
-
if (event.preventDefault) {
|
776
|
-
event.preventDefault();
|
777
|
-
} else {
|
778
|
-
event.returnValue = false;
|
779
|
-
// Some keys events require setting the keyCode to -1 to be prevented
|
780
|
-
try {
|
781
|
-
// all ctrl + X and F1 -> F12
|
782
|
-
if (event.ctrlKey || event.keyCode > 111 && event.keyCode < 124) {
|
783
|
-
event.keyCode = -1;
|
784
|
-
}
|
785
|
-
} catch (e) {
|
786
|
-
// see this outdated document http://support.microsoft.com/kb/934364/en-us for more info
|
787
|
-
}
|
788
|
-
}
|
789
|
-
},
|
790
|
-
|
791
|
-
/**
|
792
|
-
* Gets the related target from the event.
|
793
|
-
* @param {Object} event The event
|
794
|
-
* @return {HTMLElement} The related target.
|
795
|
-
*/
|
796
|
-
getRelatedTarget: function(event) {
|
797
|
-
event = event.browserEvent || event;
|
798
|
-
var target = event.relatedTarget;
|
799
|
-
if (!target) {
|
800
|
-
if (EventManager.mouseLeaveRe.test(event.type)) {
|
801
|
-
target = event.toElement;
|
802
|
-
} else if (EventManager.mouseEnterRe.test(event.type)) {
|
803
|
-
target = event.fromElement;
|
804
|
-
}
|
805
|
-
}
|
806
|
-
return EventManager.resolveTextNode(target);
|
807
|
-
},
|
808
|
-
|
809
|
-
/**
|
810
|
-
* Gets the x coordinate from the event
|
811
|
-
* @param {Object} event The event
|
812
|
-
* @return {Number} The x coordinate
|
813
|
-
*/
|
814
|
-
getPageX: function(event) {
|
815
|
-
return EventManager.getPageXY(event)[0];
|
816
|
-
},
|
817
|
-
|
818
|
-
/**
|
819
|
-
* Gets the y coordinate from the event
|
820
|
-
* @param {Object} event The event
|
821
|
-
* @return {Number} The y coordinate
|
822
|
-
*/
|
823
|
-
getPageY: function(event) {
|
824
|
-
return EventManager.getPageXY(event)[1];
|
825
|
-
},
|
826
|
-
|
827
|
-
/**
|
828
|
-
* Gets the x & y coordinate from the event
|
829
|
-
* @param {Object} event The event
|
830
|
-
* @return {Number[]} The x/y coordinate
|
831
|
-
*/
|
832
|
-
getPageXY: function(event) {
|
833
|
-
event = event.browserEvent || event;
|
834
|
-
var x = event.pageX,
|
835
|
-
y = event.pageY,
|
836
|
-
docEl = doc.documentElement,
|
837
|
-
body = doc.body;
|
838
|
-
|
839
|
-
// pageX/pageY not available (undefined, not null), use clientX/clientY instead
|
840
|
-
if (!x && x !== 0) {
|
841
|
-
x = event.clientX + (docEl && docEl.scrollLeft || body && body.scrollLeft || 0) - (docEl && docEl.clientLeft || body && body.clientLeft || 0);
|
842
|
-
y = event.clientY + (docEl && docEl.scrollTop || body && body.scrollTop || 0) - (docEl && docEl.clientTop || body && body.clientTop || 0);
|
843
|
-
}
|
844
|
-
return [x, y];
|
845
|
-
},
|
846
|
-
|
847
|
-
/**
|
848
|
-
* Gets the target of the event.
|
849
|
-
* @param {Object} event The event
|
850
|
-
* @return {HTMLElement} target
|
851
|
-
*/
|
852
|
-
getTarget: function(event) {
|
853
|
-
event = event.browserEvent || event;
|
854
|
-
return EventManager.resolveTextNode(event.target || event.srcElement);
|
855
|
-
},
|
856
|
-
|
857
|
-
// technically no need to browser sniff this, however it makes
|
858
|
-
// no sense to check this every time, for every event, whether
|
859
|
-
// the string is equal.
|
860
|
-
/**
|
861
|
-
* Resolve any text nodes accounting for browser differences.
|
862
|
-
* @private
|
863
|
-
* @param {HTMLElement} node The node
|
864
|
-
* @return {HTMLElement} The resolved node
|
865
|
-
*/
|
866
|
-
resolveTextNode: Ext.isGecko ?
|
867
|
-
function(node) {
|
868
|
-
if (!node) {
|
869
|
-
return;
|
870
|
-
}
|
871
|
-
// work around firefox bug, https://bugzilla.mozilla.org/show_bug.cgi?id=101197
|
872
|
-
var s = HTMLElement.prototype.toString.call(node);
|
873
|
-
if (s == '[xpconnect wrapped native prototype]' || s == '[object XULElement]') {
|
874
|
-
return;
|
875
|
-
}
|
876
|
-
return node.nodeType == 3 ? node.parentNode: node;
|
877
|
-
}: function(node) {
|
878
|
-
return node && node.nodeType == 3 ? node.parentNode: node;
|
879
|
-
},
|
880
|
-
|
881
|
-
// --------------------- custom event binding ---------------------
|
882
|
-
|
883
|
-
// Keep track of the current width/height
|
884
|
-
curWidth: 0,
|
885
|
-
curHeight: 0,
|
886
|
-
|
887
|
-
/**
|
888
|
-
* Adds a listener to be notified when the browser window is resized and provides resize event buffering (100 milliseconds),
|
889
|
-
* passes new viewport width and height to handlers.
|
890
|
-
* @param {Function} fn The handler function the window resize event invokes.
|
891
|
-
* @param {Object} scope The scope (<code>this</code> reference) in which the handler function executes. Defaults to the browser window.
|
892
|
-
* @param {Boolean} options Options object as passed to {@link Ext.Element#addListener}
|
893
|
-
*/
|
894
|
-
onWindowResize: function(fn, scope, options) {
|
895
|
-
var resize = EventManager.resizeEvent;
|
896
|
-
|
897
|
-
if (!resize) {
|
898
|
-
EventManager.resizeEvent = resize = new Ext.util.Event();
|
899
|
-
EventManager.on(win, 'resize', EventManager.fireResize, null, {buffer: 100});
|
900
|
-
}
|
901
|
-
resize.addListener(fn, scope, options);
|
902
|
-
},
|
903
|
-
|
904
|
-
/**
|
905
|
-
* Fire the resize event.
|
906
|
-
* @private
|
907
|
-
*/
|
908
|
-
fireResize: function() {
|
909
|
-
var w = Ext.Element.getViewWidth(),
|
910
|
-
h = Ext.Element.getViewHeight();
|
911
|
-
|
912
|
-
//whacky problem in IE where the resize event will sometimes fire even though the w/h are the same.
|
913
|
-
if (EventManager.curHeight != h || EventManager.curWidth != w) {
|
914
|
-
EventManager.curHeight = h;
|
915
|
-
EventManager.curWidth = w;
|
916
|
-
EventManager.resizeEvent.fire(w, h);
|
917
|
-
}
|
918
|
-
},
|
919
|
-
|
920
|
-
/**
|
921
|
-
* Removes the passed window resize listener.
|
922
|
-
* @param {Function} fn The method the event invokes
|
923
|
-
* @param {Object} scope The scope of handler
|
924
|
-
*/
|
925
|
-
removeResizeListener: function(fn, scope) {
|
926
|
-
var resize = EventManager.resizeEvent;
|
927
|
-
if (resize) {
|
928
|
-
resize.removeListener(fn, scope);
|
929
|
-
}
|
930
|
-
},
|
931
|
-
|
932
|
-
/**
|
933
|
-
* Adds a listener to be notified when the browser window is unloaded.
|
934
|
-
* @param {Function} fn The handler function the window unload event invokes.
|
935
|
-
* @param {Object} scope The scope (<code>this</code> reference) in which the handler function executes. Defaults to the browser window.
|
936
|
-
* @param {Boolean} options Options object as passed to {@link Ext.Element#addListener}
|
937
|
-
*/
|
938
|
-
onWindowUnload: function(fn, scope, options) {
|
939
|
-
var unload = EventManager.unloadEvent;
|
940
|
-
|
941
|
-
if (!unload) {
|
942
|
-
EventManager.unloadEvent = unload = new Ext.util.Event();
|
943
|
-
EventManager.addListener(win, 'unload', EventManager.fireUnload);
|
944
|
-
}
|
945
|
-
if (fn) {
|
946
|
-
unload.addListener(fn, scope, options);
|
947
|
-
}
|
948
|
-
},
|
949
|
-
|
950
|
-
/**
|
951
|
-
* Fires the unload event for items bound with onWindowUnload
|
952
|
-
* @private
|
953
|
-
*/
|
954
|
-
fireUnload: function() {
|
955
|
-
// wrap in a try catch, could have some problems during unload
|
956
|
-
try {
|
957
|
-
// relinquish references.
|
958
|
-
doc = win = undefined;
|
959
|
-
|
960
|
-
var gridviews, i, ln,
|
961
|
-
el, cache;
|
962
|
-
|
963
|
-
EventManager.unloadEvent.fire();
|
964
|
-
// Work around FF3 remembering the last scroll position when refreshing the grid and then losing grid view
|
965
|
-
if (Ext.isGecko3) {
|
966
|
-
gridviews = Ext.ComponentQuery.query('gridview');
|
967
|
-
i = 0;
|
968
|
-
ln = gridviews.length;
|
969
|
-
for (; i < ln; i++) {
|
970
|
-
gridviews[i].scrollToTop();
|
971
|
-
}
|
972
|
-
}
|
973
|
-
// Purge all elements in the cache
|
974
|
-
cache = Ext.cache;
|
975
|
-
|
976
|
-
for (el in cache) {
|
977
|
-
if (cache.hasOwnProperty(el)) {
|
978
|
-
EventManager.removeAll(el);
|
979
|
-
}
|
980
|
-
}
|
981
|
-
} catch(e) {
|
982
|
-
}
|
983
|
-
},
|
984
|
-
|
985
|
-
/**
|
986
|
-
* Removes the passed window unload listener.
|
987
|
-
* @param {Function} fn The method the event invokes
|
988
|
-
* @param {Object} scope The scope of handler
|
989
|
-
*/
|
990
|
-
removeUnloadListener: function(fn, scope) {
|
991
|
-
var unload = EventManager.unloadEvent;
|
992
|
-
if (unload) {
|
993
|
-
unload.removeListener(fn, scope);
|
994
|
-
}
|
995
|
-
},
|
996
|
-
|
997
|
-
/**
|
998
|
-
* note 1: IE fires ONLY the keydown event on specialkey autorepeat
|
999
|
-
* note 2: Safari < 3.1, Gecko (Mac/Linux) & Opera fire only the keypress event on specialkey autorepeat
|
1000
|
-
* (research done by Jan Wolter at http://unixpapa.com/js/key.html)
|
1001
|
-
* @private
|
1002
|
-
*/
|
1003
|
-
useKeyDown: Ext.isWebKit ?
|
1004
|
-
parseInt(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1], 10) >= 525 :
|
1005
|
-
!((Ext.isGecko && !Ext.isWindows) || Ext.isOpera),
|
1006
|
-
|
1007
|
-
/**
|
1008
|
-
* Indicates which event to use for getting key presses.
|
1009
|
-
* @return {String} The appropriate event name.
|
1010
|
-
*/
|
1011
|
-
getKeyEvent: function() {
|
1012
|
-
return EventManager.useKeyDown ? 'keydown' : 'keypress';
|
1013
|
-
}
|
1014
|
-
});
|
1015
|
-
|
1016
|
-
// route "< ie9-Standards" to a legacy IE onReady implementation
|
1017
|
-
if(!('addEventListener' in document) && document.attachEvent) {
|
1018
|
-
Ext.apply( EventManager, {
|
1019
|
-
/* Customized implementation for Legacy IE. The default implementation is configured for use
|
1020
|
-
* with all other 'standards compliant' agents.
|
1021
|
-
* References: http://javascript.nwbox.com/IEContentLoaded/
|
1022
|
-
* licensed courtesy of http://developer.yahoo.com/yui/license.html
|
1023
|
-
*/
|
1024
|
-
|
1025
|
-
/**
|
1026
|
-
* This strategy has minimal benefits for Sencha solutions that build themselves (ie. minimal initial page markup).
|
1027
|
-
* However, progressively-enhanced pages (with image content and/or embedded frames) will benefit the most from it.
|
1028
|
-
* Browser timer resolution is too poor to ensure a doScroll check more than once on a page loaded with minimal
|
1029
|
-
* assets (the readystatechange event 'complete' usually beats the doScroll timer on a 'lightly-loaded' initial document).
|
1030
|
-
*/
|
1031
|
-
pollScroll : function() {
|
1032
|
-
var scrollable = true;
|
1033
|
-
|
1034
|
-
try {
|
1035
|
-
document.documentElement.doScroll('left');
|
1036
|
-
} catch(e) {
|
1037
|
-
scrollable = false;
|
1038
|
-
}
|
1039
|
-
|
1040
|
-
if (scrollable) {
|
1041
|
-
EventManager.onReadyEvent({
|
1042
|
-
type:'doScroll'
|
1043
|
-
});
|
1044
|
-
} else {
|
1045
|
-
/*
|
1046
|
-
* minimize thrashing --
|
1047
|
-
* adjusted for setTimeout's close-to-minimums (not too low),
|
1048
|
-
* as this method SHOULD always be called once initially
|
1049
|
-
*/
|
1050
|
-
EventManager.scrollTimeout = setTimeout(EventManager.pollScroll, 20);
|
1051
|
-
}
|
1052
|
-
|
1053
|
-
return scrollable;
|
1054
|
-
},
|
1055
|
-
|
1056
|
-
/**
|
1057
|
-
* Timer for doScroll polling
|
1058
|
-
* @private
|
1059
|
-
*/
|
1060
|
-
scrollTimeout: null,
|
1061
|
-
|
1062
|
-
/* @private
|
1063
|
-
*/
|
1064
|
-
readyStatesRe : /complete/i,
|
1065
|
-
|
1066
|
-
/* @private
|
1067
|
-
*/
|
1068
|
-
checkReadyState: function() {
|
1069
|
-
var state = document.readyState;
|
1070
|
-
|
1071
|
-
if (EventManager.readyStatesRe.test(state)) {
|
1072
|
-
EventManager.onReadyEvent({
|
1073
|
-
type: state
|
1074
|
-
});
|
1075
|
-
}
|
1076
|
-
},
|
1077
|
-
|
1078
|
-
bindReadyEvent: function() {
|
1079
|
-
var topContext = true;
|
1080
|
-
|
1081
|
-
if (EventManager.hasBoundOnReady) {
|
1082
|
-
return;
|
1083
|
-
}
|
1084
|
-
|
1085
|
-
//are we in an IFRAME? (doScroll ineffective here)
|
1086
|
-
try {
|
1087
|
-
topContext = !window.frameElement;
|
1088
|
-
} catch(e) {
|
1089
|
-
}
|
1090
|
-
|
1091
|
-
if (!topContext || !doc.documentElement.doScroll) {
|
1092
|
-
EventManager.pollScroll = Ext.emptyFn; //then noop this test altogether
|
1093
|
-
}
|
1094
|
-
|
1095
|
-
// starts doScroll polling if necessary
|
1096
|
-
if (EventManager.pollScroll() === true) {
|
1097
|
-
return;
|
1098
|
-
}
|
1099
|
-
|
1100
|
-
// Core is loaded AFTER initial document write/load ?
|
1101
|
-
if (doc.readyState == 'complete' ) {
|
1102
|
-
EventManager.onReadyEvent({type: 'already ' + (doc.readyState || 'body') });
|
1103
|
-
} else {
|
1104
|
-
doc.attachEvent('onreadystatechange', EventManager.checkReadyState);
|
1105
|
-
window.attachEvent('onload', EventManager.onReadyEvent);
|
1106
|
-
EventManager.hasBoundOnReady = true;
|
1107
|
-
}
|
1108
|
-
},
|
1109
|
-
|
1110
|
-
onReadyEvent : function(e) {
|
1111
|
-
if (e && e.type) {
|
1112
|
-
EventManager.onReadyChain.push(e.type);
|
1113
|
-
}
|
1114
|
-
|
1115
|
-
if (EventManager.hasBoundOnReady) {
|
1116
|
-
document.detachEvent('onreadystatechange', EventManager.checkReadyState);
|
1117
|
-
window.detachEvent('onload', EventManager.onReadyEvent);
|
1118
|
-
}
|
1119
|
-
|
1120
|
-
if (Ext.isNumber(EventManager.scrollTimeout)) {
|
1121
|
-
clearTimeout(EventManager.scrollTimeout);
|
1122
|
-
delete EventManager.scrollTimeout;
|
1123
|
-
}
|
1124
|
-
|
1125
|
-
if (!Ext.isReady) {
|
1126
|
-
EventManager.fireDocReady();
|
1127
|
-
}
|
1128
|
-
},
|
1129
|
-
|
1130
|
-
//diags: a list of event types passed to onReadyEvent (in chron order)
|
1131
|
-
onReadyChain : []
|
1132
|
-
});
|
1133
|
-
}
|
1134
|
-
|
1135
|
-
|
1136
|
-
/**
|
1137
|
-
* Alias for {@link Ext.Loader#onReady Ext.Loader.onReady} with withDomReady set to true
|
1138
|
-
* @member Ext
|
1139
|
-
* @method onReady
|
1140
|
-
*/
|
1141
|
-
Ext.onReady = function(fn, scope, options) {
|
1142
|
-
Ext.Loader.onReady(fn, scope, true, options);
|
1143
|
-
};
|
1144
|
-
|
1145
|
-
/**
|
1146
|
-
* Alias for {@link Ext.EventManager#onDocumentReady Ext.EventManager.onDocumentReady}
|
1147
|
-
* @member Ext
|
1148
|
-
* @method onDocumentReady
|
1149
|
-
*/
|
1150
|
-
Ext.onDocumentReady = EventManager.onDocumentReady;
|
1151
|
-
|
1152
|
-
/**
|
1153
|
-
* Alias for {@link Ext.EventManager#addListener Ext.EventManager.addListener}
|
1154
|
-
* @member Ext.EventManager
|
1155
|
-
* @method on
|
1156
|
-
*/
|
1157
|
-
EventManager.on = EventManager.addListener;
|
1158
|
-
|
1159
|
-
/**
|
1160
|
-
* Alias for {@link Ext.EventManager#removeListener Ext.EventManager.removeListener}
|
1161
|
-
* @member Ext.EventManager
|
1162
|
-
* @method un
|
1163
|
-
*/
|
1164
|
-
EventManager.un = EventManager.removeListener;
|
1165
|
-
|
1166
|
-
Ext.onReady(initExtCss);
|
1167
|
-
};
|