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,40 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @class Ext.dom.Element
|
3
|
-
*/
|
4
|
-
Ext.dom.Element.override({
|
5
|
-
/**
|
6
|
-
* Initializes a {@link Ext.dd.DD} drag drop object for this element.
|
7
|
-
* @param {String} group The group the DD object is member of
|
8
|
-
* @param {Object} config The DD config object
|
9
|
-
* @param {Object} overrides An object containing methods to override/implement on the DD object
|
10
|
-
* @return {Ext.dd.DD} The DD object
|
11
|
-
*/
|
12
|
-
initDD : function(group, config, overrides){
|
13
|
-
var dd = new Ext.dd.DD(Ext.id(this.dom), group, config);
|
14
|
-
return Ext.apply(dd, overrides);
|
15
|
-
},
|
16
|
-
|
17
|
-
/**
|
18
|
-
* Initializes a {@link Ext.dd.DDProxy} object for this element.
|
19
|
-
* @param {String} group The group the DDProxy object is member of
|
20
|
-
* @param {Object} config The DDProxy config object
|
21
|
-
* @param {Object} overrides An object containing methods to override/implement on the DDProxy object
|
22
|
-
* @return {Ext.dd.DDProxy} The DDProxy object
|
23
|
-
*/
|
24
|
-
initDDProxy : function(group, config, overrides){
|
25
|
-
var dd = new Ext.dd.DDProxy(Ext.id(this.dom), group, config);
|
26
|
-
return Ext.apply(dd, overrides);
|
27
|
-
},
|
28
|
-
|
29
|
-
/**
|
30
|
-
* Initializes a {@link Ext.dd.DDTarget} object for this element.
|
31
|
-
* @param {String} group The group the DDTarget object is member of
|
32
|
-
* @param {Object} config The DDTarget config object
|
33
|
-
* @param {Object} overrides An object containing methods to override/implement on the DDTarget object
|
34
|
-
* @return {Ext.dd.DDTarget} The DDTarget object
|
35
|
-
*/
|
36
|
-
initDDTarget : function(group, config, overrides){
|
37
|
-
var dd = new Ext.dd.DDTarget(Ext.id(this.dom), group, config);
|
38
|
-
return Ext.apply(dd, overrides);
|
39
|
-
}
|
40
|
-
});
|
@@ -1,194 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @class Ext.dom.Element
|
3
|
-
*/
|
4
|
-
(function() {
|
5
|
-
|
6
|
-
var Element = Ext.dom.Element,
|
7
|
-
VISIBILITY = "visibility",
|
8
|
-
DISPLAY = "display",
|
9
|
-
NONE = "none",
|
10
|
-
HIDDEN = 'hidden',
|
11
|
-
VISIBLE = 'visible',
|
12
|
-
OFFSETS = "offsets",
|
13
|
-
ASCLASS = "asclass",
|
14
|
-
NOSIZE = 'nosize',
|
15
|
-
ORIGINALDISPLAY = 'originalDisplay',
|
16
|
-
VISMODE = 'visibilityMode',
|
17
|
-
ISVISIBLE = 'isVisible',
|
18
|
-
OFFSETCLASS = Ext.baseCSSPrefix + 'hide-offsets',
|
19
|
-
getDisplay = function(el) {
|
20
|
-
var data = (el.$cache || el.getCache()).data,
|
21
|
-
display = data[ORIGINALDISPLAY];
|
22
|
-
|
23
|
-
if (display === undefined) {
|
24
|
-
data[ORIGINALDISPLAY] = display = '';
|
25
|
-
}
|
26
|
-
return display;
|
27
|
-
},
|
28
|
-
getVisMode = function(el){
|
29
|
-
var data = (el.$cache || el.getCache()).data,
|
30
|
-
visMode = data[VISMODE];
|
31
|
-
|
32
|
-
if (visMode === undefined) {
|
33
|
-
data[VISMODE] = visMode = Element.VISIBILITY;
|
34
|
-
}
|
35
|
-
return visMode;
|
36
|
-
};
|
37
|
-
|
38
|
-
Element.override({
|
39
|
-
/**
|
40
|
-
* The element's default display mode.
|
41
|
-
*/
|
42
|
-
originalDisplay : "",
|
43
|
-
visibilityMode : 1,
|
44
|
-
|
45
|
-
/**
|
46
|
-
* Sets the visibility of the element (see details). If the visibilityMode is set to Element.DISPLAY, it will use
|
47
|
-
* the display property to hide the element, otherwise it uses visibility. The default is to hide and show using the visibility property.
|
48
|
-
* @param {Boolean} visible Whether the element is visible
|
49
|
-
* @param {Boolean/Object} [animate] True for the default animation, or a standard Element animation config object
|
50
|
-
* @return {Ext.dom.Element} this
|
51
|
-
*/
|
52
|
-
setVisible : function(visible, animate) {
|
53
|
-
var me = this,
|
54
|
-
dom = me.dom,
|
55
|
-
visMode = getVisMode(me);
|
56
|
-
|
57
|
-
// hideMode string override
|
58
|
-
if (typeof animate == 'string') {
|
59
|
-
switch (animate) {
|
60
|
-
case DISPLAY:
|
61
|
-
visMode = Element.DISPLAY;
|
62
|
-
break;
|
63
|
-
case VISIBILITY:
|
64
|
-
visMode = Element.VISIBILITY;
|
65
|
-
break;
|
66
|
-
case OFFSETS:
|
67
|
-
visMode = Element.OFFSETS;
|
68
|
-
break;
|
69
|
-
case NOSIZE:
|
70
|
-
case ASCLASS:
|
71
|
-
visMode = Element.ASCLASS;
|
72
|
-
break;
|
73
|
-
}
|
74
|
-
me.setVisibilityMode(visMode);
|
75
|
-
animate = false;
|
76
|
-
}
|
77
|
-
|
78
|
-
if (!animate || !me.anim) {
|
79
|
-
if (visMode == Element.DISPLAY) {
|
80
|
-
return me.setDisplayed(visible);
|
81
|
-
} else if (visMode == Element.OFFSETS) {
|
82
|
-
me[visible?'removeCls':'addCls'](OFFSETCLASS);
|
83
|
-
} else if (visMode == Element.VISIBILITY) {
|
84
|
-
me.fixDisplay();
|
85
|
-
// Show by clearing visibility style. Explicitly setting to "visible" overrides parent visibility setting
|
86
|
-
dom.style.visibility = visible ? '' : HIDDEN;
|
87
|
-
} else if (visMode == Element.ASCLASS) {
|
88
|
-
me[visible?'removeCls':'addCls'](me.visibilityCls || Element.visibilityCls);
|
89
|
-
}
|
90
|
-
} else {
|
91
|
-
// closure for composites
|
92
|
-
if (visible) {
|
93
|
-
me.setOpacity(0.01);
|
94
|
-
me.setVisible(true);
|
95
|
-
}
|
96
|
-
if (!Ext.isObject(animate)) {
|
97
|
-
animate = {
|
98
|
-
duration: 350,
|
99
|
-
easing: 'ease-in'
|
100
|
-
};
|
101
|
-
}
|
102
|
-
me.animate(Ext.applyIf({
|
103
|
-
callback: function() {
|
104
|
-
if (!visible) {
|
105
|
-
me.setVisible(false).setOpacity(1);
|
106
|
-
}
|
107
|
-
},
|
108
|
-
to: {
|
109
|
-
opacity: (visible) ? 1 : 0
|
110
|
-
}
|
111
|
-
}, animate));
|
112
|
-
}
|
113
|
-
(me.$cache || me.getCache()).data[ISVISIBLE] = visible;
|
114
|
-
return me;
|
115
|
-
},
|
116
|
-
|
117
|
-
/**
|
118
|
-
* @private
|
119
|
-
* Determine if the Element has a relevant height and width available based
|
120
|
-
* upon current logical visibility state
|
121
|
-
*/
|
122
|
-
hasMetrics : function(){
|
123
|
-
var visMode = getVisMode(this);
|
124
|
-
return this.isVisible() || (visMode == Element.OFFSETS) || (visMode == Element.VISIBILITY);
|
125
|
-
},
|
126
|
-
|
127
|
-
/**
|
128
|
-
* Toggles the element's visibility or display, depending on visibility mode.
|
129
|
-
* @param {Boolean/Object} [animate] True for the default animation, or a standard Element animation config object
|
130
|
-
* @return {Ext.dom.Element} this
|
131
|
-
*/
|
132
|
-
toggle : function(animate){
|
133
|
-
var me = this;
|
134
|
-
me.setVisible(!me.isVisible(), me.anim(animate));
|
135
|
-
return me;
|
136
|
-
},
|
137
|
-
|
138
|
-
/**
|
139
|
-
* Sets the CSS display property. Uses originalDisplay if the specified value is a boolean true.
|
140
|
-
* @param {Boolean/String} value Boolean value to display the element using its default display, or a string to set the display directly.
|
141
|
-
* @return {Ext.dom.Element} this
|
142
|
-
*/
|
143
|
-
setDisplayed : function(value) {
|
144
|
-
if(typeof value == "boolean"){
|
145
|
-
value = value ? getDisplay(this) : NONE;
|
146
|
-
}
|
147
|
-
this.setStyle(DISPLAY, value);
|
148
|
-
return this;
|
149
|
-
},
|
150
|
-
|
151
|
-
// private
|
152
|
-
fixDisplay : function(){
|
153
|
-
var me = this;
|
154
|
-
if (me.isStyle(DISPLAY, NONE)) {
|
155
|
-
me.setStyle(VISIBILITY, HIDDEN);
|
156
|
-
me.setStyle(DISPLAY, getDisplay(me)); // first try reverting to default
|
157
|
-
if (me.isStyle(DISPLAY, NONE)) { // if that fails, default to block
|
158
|
-
me.setStyle(DISPLAY, "block");
|
159
|
-
}
|
160
|
-
}
|
161
|
-
},
|
162
|
-
|
163
|
-
/**
|
164
|
-
* Hide this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
|
165
|
-
* @param {Boolean/Object} [animate] true for the default animation or a standard Element animation config object
|
166
|
-
* @return {Ext.dom.Element} this
|
167
|
-
*/
|
168
|
-
hide : function(animate){
|
169
|
-
// hideMode override
|
170
|
-
if (typeof animate == 'string'){
|
171
|
-
this.setVisible(false, animate);
|
172
|
-
return this;
|
173
|
-
}
|
174
|
-
this.setVisible(false, this.anim(animate));
|
175
|
-
return this;
|
176
|
-
},
|
177
|
-
|
178
|
-
/**
|
179
|
-
* Show this element - Uses display mode to determine whether to use "display" or "visibility". See {@link #setVisible}.
|
180
|
-
* @param {Boolean/Object} [animate] true for the default animation or a standard Element animation config object
|
181
|
-
* @return {Ext.dom.Element} this
|
182
|
-
*/
|
183
|
-
show : function(animate){
|
184
|
-
// hideMode override
|
185
|
-
if (typeof animate == 'string'){
|
186
|
-
this.setVisible(true, animate);
|
187
|
-
return this;
|
188
|
-
}
|
189
|
-
this.setVisible(true, this.anim(animate));
|
190
|
-
return this;
|
191
|
-
}
|
192
|
-
});
|
193
|
-
|
194
|
-
}());
|
@@ -1,1407 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @class Ext.dom.Element
|
3
|
-
* @alternateClassName Ext.Element
|
4
|
-
* @alternateClassName Ext.core.Element
|
5
|
-
* @extend Ext.dom.AbstractElement
|
6
|
-
*
|
7
|
-
* Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.
|
8
|
-
*
|
9
|
-
* All instances of this class inherit the methods of {@link Ext.fx.Anim} making visual effects easily available to all
|
10
|
-
* DOM elements.
|
11
|
-
*
|
12
|
-
* Note that the events documented in this class are not Ext events, they encapsulate browser events. Some older browsers
|
13
|
-
* may not support the full range of events. Which events are supported is beyond the control of Ext JS.
|
14
|
-
*
|
15
|
-
* Usage:
|
16
|
-
*
|
17
|
-
* // by id
|
18
|
-
* var el = Ext.get("my-div");
|
19
|
-
*
|
20
|
-
* // by DOM element reference
|
21
|
-
* var el = Ext.get(myDivElement);
|
22
|
-
*
|
23
|
-
* # Animations
|
24
|
-
*
|
25
|
-
* When an element is manipulated, by default there is no animation.
|
26
|
-
*
|
27
|
-
* var el = Ext.get("my-div");
|
28
|
-
*
|
29
|
-
* // no animation
|
30
|
-
* el.setWidth(100);
|
31
|
-
*
|
32
|
-
* Many of the functions for manipulating an element have an optional "animate" parameter. This parameter can be
|
33
|
-
* specified as boolean (true) for default animation effects.
|
34
|
-
*
|
35
|
-
* // default animation
|
36
|
-
* el.setWidth(100, true);
|
37
|
-
*
|
38
|
-
* To configure the effects, an object literal with animation options to use as the Element animation configuration
|
39
|
-
* object can also be specified. Note that the supported Element animation configuration options are a subset of the
|
40
|
-
* {@link Ext.fx.Anim} animation options specific to Fx effects. The supported Element animation configuration options
|
41
|
-
* are:
|
42
|
-
*
|
43
|
-
* Option Default Description
|
44
|
-
* --------- -------- ---------------------------------------------
|
45
|
-
* {@link Ext.fx.Anim#duration duration} .35 The duration of the animation in seconds
|
46
|
-
* {@link Ext.fx.Anim#easing easing} easeOut The easing method
|
47
|
-
* {@link Ext.fx.Anim#callback callback} none A function to execute when the anim completes
|
48
|
-
* {@link Ext.fx.Anim#scope scope} this The scope (this) of the callback function
|
49
|
-
*
|
50
|
-
* Usage:
|
51
|
-
*
|
52
|
-
* // Element animation options object
|
53
|
-
* var opt = {
|
54
|
-
* {@link Ext.fx.Anim#duration duration}: 1,
|
55
|
-
* {@link Ext.fx.Anim#easing easing}: 'elasticIn',
|
56
|
-
* {@link Ext.fx.Anim#callback callback}: this.foo,
|
57
|
-
* {@link Ext.fx.Anim#scope scope}: this
|
58
|
-
* };
|
59
|
-
* // animation with some options set
|
60
|
-
* el.setWidth(100, opt);
|
61
|
-
*
|
62
|
-
* The Element animation object being used for the animation will be set on the options object as "anim", which allows
|
63
|
-
* you to stop or manipulate the animation. Here is an example:
|
64
|
-
*
|
65
|
-
* // using the "anim" property to get the Anim object
|
66
|
-
* if(opt.anim.isAnimated()){
|
67
|
-
* opt.anim.stop();
|
68
|
-
* }
|
69
|
-
*
|
70
|
-
* # Composite (Collections of) Elements
|
71
|
-
*
|
72
|
-
* For working with collections of Elements, see {@link Ext.CompositeElement}
|
73
|
-
*
|
74
|
-
* @constructor
|
75
|
-
* Creates new Element directly.
|
76
|
-
* @param {String/HTMLElement} element
|
77
|
-
* @param {Boolean} [forceNew] By default the constructor checks to see if there is already an instance of this
|
78
|
-
* element in the cache and if there is it returns the same instance. This will skip that check (useful for extending
|
79
|
-
* this class).
|
80
|
-
* @return {Object}
|
81
|
-
*/
|
82
|
-
(function() {
|
83
|
-
|
84
|
-
var HIDDEN = 'hidden',
|
85
|
-
DOC = document,
|
86
|
-
VISIBILITY = "visibility",
|
87
|
-
DISPLAY = "display",
|
88
|
-
NONE = "none",
|
89
|
-
XMASKED = Ext.baseCSSPrefix + "masked",
|
90
|
-
XMASKEDRELATIVE = Ext.baseCSSPrefix + "masked-relative",
|
91
|
-
EXTELMASKMSG = Ext.baseCSSPrefix + "mask-msg",
|
92
|
-
bodyRe = /^body/i,
|
93
|
-
visFly,
|
94
|
-
|
95
|
-
// speedy lookup for elements never to box adjust
|
96
|
-
noBoxAdjust = Ext.isStrict ? {
|
97
|
-
select: 1
|
98
|
-
}: {
|
99
|
-
input: 1,
|
100
|
-
select: 1,
|
101
|
-
textarea: 1
|
102
|
-
},
|
103
|
-
|
104
|
-
// Pseudo for use by cacheScrollValues
|
105
|
-
isScrolled = function(c) {
|
106
|
-
var r = [], ri = -1,
|
107
|
-
i, ci;
|
108
|
-
for (i = 0; ci = c[i]; i++) {
|
109
|
-
if (ci.scrollTop > 0 || ci.scrollLeft > 0) {
|
110
|
-
r[++ri] = ci;
|
111
|
-
}
|
112
|
-
}
|
113
|
-
return r;
|
114
|
-
},
|
115
|
-
|
116
|
-
Element = Ext.define('Ext.dom.Element', {
|
117
|
-
|
118
|
-
extend: 'Ext.dom.AbstractElement',
|
119
|
-
|
120
|
-
alternateClassName: ['Ext.Element', 'Ext.core.Element'],
|
121
|
-
|
122
|
-
addUnits: function() {
|
123
|
-
return this.self.addUnits.apply(this.self, arguments);
|
124
|
-
},
|
125
|
-
|
126
|
-
/**
|
127
|
-
* Tries to focus the element. Any exceptions are caught and ignored.
|
128
|
-
* @param {Number} [defer] Milliseconds to defer the focus
|
129
|
-
* @return {Ext.dom.Element} this
|
130
|
-
*/
|
131
|
-
focus: function(defer, /* private */ dom) {
|
132
|
-
var me = this,
|
133
|
-
scrollTop,
|
134
|
-
body;
|
135
|
-
|
136
|
-
dom = dom || me.dom;
|
137
|
-
body = (dom.ownerDocument || DOC).body || DOC.body;
|
138
|
-
try {
|
139
|
-
if (Number(defer)) {
|
140
|
-
Ext.defer(me.focus, defer, me, [null, dom]);
|
141
|
-
} else {
|
142
|
-
// Focusing a large element, the browser attempts to scroll as much of it into view
|
143
|
-
// as possible. We need to override this behaviour.
|
144
|
-
if (dom.offsetHeight > Element.getViewHeight()) {
|
145
|
-
scrollTop = body.scrollTop;
|
146
|
-
}
|
147
|
-
dom.focus();
|
148
|
-
if (scrollTop !== undefined) {
|
149
|
-
body.scrollTop = scrollTop;
|
150
|
-
}
|
151
|
-
}
|
152
|
-
} catch(e) {
|
153
|
-
}
|
154
|
-
return me;
|
155
|
-
},
|
156
|
-
|
157
|
-
/**
|
158
|
-
* Tries to blur the element. Any exceptions are caught and ignored.
|
159
|
-
* @return {Ext.dom.Element} this
|
160
|
-
*/
|
161
|
-
blur: function() {
|
162
|
-
try {
|
163
|
-
this.dom.blur();
|
164
|
-
} catch(e) {
|
165
|
-
}
|
166
|
-
return this;
|
167
|
-
},
|
168
|
-
|
169
|
-
/**
|
170
|
-
* Tests various css rules/browsers to determine if this element uses a border box
|
171
|
-
* @return {Boolean}
|
172
|
-
*/
|
173
|
-
isBorderBox: function() {
|
174
|
-
var box = Ext.isBorderBox;
|
175
|
-
if (box) {
|
176
|
-
box = !((this.dom.tagName || "").toLowerCase() in noBoxAdjust);
|
177
|
-
}
|
178
|
-
return box;
|
179
|
-
},
|
180
|
-
|
181
|
-
/**
|
182
|
-
* Sets up event handlers to call the passed functions when the mouse is moved into and out of the Element.
|
183
|
-
* @param {Function} overFn The function to call when the mouse enters the Element.
|
184
|
-
* @param {Function} outFn The function to call when the mouse leaves the Element.
|
185
|
-
* @param {Object} [scope] The scope (`this` reference) in which the functions are executed. Defaults
|
186
|
-
* to the Element's DOM element.
|
187
|
-
* @param {Object} [options] Options for the listener. See {@link Ext.util.Observable#addListener the
|
188
|
-
* options parameter}.
|
189
|
-
* @return {Ext.dom.Element} this
|
190
|
-
*/
|
191
|
-
hover: function(overFn, outFn, scope, options) {
|
192
|
-
var me = this;
|
193
|
-
me.on('mouseenter', overFn, scope || me.dom, options);
|
194
|
-
me.on('mouseleave', outFn, scope || me.dom, options);
|
195
|
-
return me;
|
196
|
-
},
|
197
|
-
|
198
|
-
/**
|
199
|
-
* Returns the value of a namespaced attribute from the element's underlying DOM node.
|
200
|
-
* @param {String} namespace The namespace in which to look for the attribute
|
201
|
-
* @param {String} name The attribute name
|
202
|
-
* @return {String} The attribute value
|
203
|
-
*/
|
204
|
-
getAttributeNS: function(ns, name) {
|
205
|
-
return this.getAttribute(name, ns);
|
206
|
-
},
|
207
|
-
|
208
|
-
getAttribute: (Ext.isIE && !(Ext.isIE9 && DOC.documentMode === 9)) ?
|
209
|
-
function(name, ns) {
|
210
|
-
var d = this.dom,
|
211
|
-
type;
|
212
|
-
if (ns) {
|
213
|
-
type = typeof d[ns + ":" + name];
|
214
|
-
if (type != 'undefined' && type != 'unknown') {
|
215
|
-
return d[ns + ":" + name] || null;
|
216
|
-
}
|
217
|
-
return null;
|
218
|
-
}
|
219
|
-
if (name === "for") {
|
220
|
-
name = "htmlFor";
|
221
|
-
}
|
222
|
-
return d[name] || null;
|
223
|
-
} : function(name, ns) {
|
224
|
-
var d = this.dom;
|
225
|
-
if (ns) {
|
226
|
-
return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name);
|
227
|
-
}
|
228
|
-
return d.getAttribute(name) || d[name] || null;
|
229
|
-
},
|
230
|
-
|
231
|
-
/**
|
232
|
-
* When an element is moved around in the DOM, or is hidden using `display:none`, it loses layout, and therefore
|
233
|
-
* all scroll positions of all descendant elements are lost.
|
234
|
-
*
|
235
|
-
* This function caches them, and returns a function, which when run will restore the cached positions.
|
236
|
-
* In the following example, the Panel is moved from one Container to another which will cause it to lose all scroll positions:
|
237
|
-
*
|
238
|
-
* var restoreScroll = myPanel.el.cacheScrollValues();
|
239
|
-
* myOtherContainer.add(myPanel);
|
240
|
-
* restoreScroll();
|
241
|
-
*
|
242
|
-
* @return {Function} A function which will restore all descentant elements of this Element to their scroll
|
243
|
-
* positions recorded when this function was executed. Be aware that the returned function is a closure which has
|
244
|
-
* captured the scope of `cacheScrollValues`, so take care to derefence it as soon as not needed - if is it is a `var`
|
245
|
-
* it will drop out of scope, and the reference will be freed.
|
246
|
-
*/
|
247
|
-
cacheScrollValues: function() {
|
248
|
-
var me = this,
|
249
|
-
scrolledDescendants,
|
250
|
-
el, i,
|
251
|
-
scrollValues = [],
|
252
|
-
result = function() {
|
253
|
-
for (i = 0; i < scrolledDescendants.length; i++) {
|
254
|
-
el = scrolledDescendants[i];
|
255
|
-
el.scrollLeft = scrollValues[i][0];
|
256
|
-
el.scrollTop = scrollValues[i][1];
|
257
|
-
}
|
258
|
-
};
|
259
|
-
|
260
|
-
if (!Ext.DomQuery.pseudos.isScrolled) {
|
261
|
-
Ext.DomQuery.pseudos.isScrolled = isScrolled;
|
262
|
-
}
|
263
|
-
scrolledDescendants = me.query(':isScrolled');
|
264
|
-
for (i = 0; i < scrolledDescendants.length; i++) {
|
265
|
-
el = scrolledDescendants[i];
|
266
|
-
scrollValues[i] = [el.scrollLeft, el.scrollTop];
|
267
|
-
}
|
268
|
-
return result;
|
269
|
-
},
|
270
|
-
|
271
|
-
/**
|
272
|
-
* @property {Boolean} autoBoxAdjust
|
273
|
-
* True to automatically adjust width and height settings for box-model issues.
|
274
|
-
*/
|
275
|
-
autoBoxAdjust: true,
|
276
|
-
|
277
|
-
/**
|
278
|
-
* Checks whether the element is currently visible using both visibility and display properties.
|
279
|
-
* @param {Boolean} [deep=false] True to walk the dom and see if parent elements are hidden.
|
280
|
-
* If false, the function only checks the visibility of the element itself and it may return
|
281
|
-
* `true` even though a parent is not visible.
|
282
|
-
* @return {Boolean} `true` if the element is currently visible, else `false`
|
283
|
-
*/
|
284
|
-
isVisible : function(deep) {
|
285
|
-
var me = this,
|
286
|
-
dom = me.dom,
|
287
|
-
stopNode = dom.ownerDocument.documentElement;
|
288
|
-
|
289
|
-
if (!visFly) {
|
290
|
-
visFly = new Element.Fly();
|
291
|
-
}
|
292
|
-
|
293
|
-
while (dom !== stopNode) {
|
294
|
-
// We're invisible if we hit a nonexistent parentNode or a document
|
295
|
-
// fragment or computed style visibility:hidden or display:none
|
296
|
-
if (!dom || dom.nodeType === 11 || (visFly.attach(dom)).isStyle(VISIBILITY, HIDDEN) || visFly.isStyle(DISPLAY, NONE)) {
|
297
|
-
return false;
|
298
|
-
}
|
299
|
-
// Quit now unless we are being asked to check parent nodes.
|
300
|
-
if (!deep) {
|
301
|
-
break;
|
302
|
-
}
|
303
|
-
dom = dom.parentNode;
|
304
|
-
}
|
305
|
-
return true;
|
306
|
-
},
|
307
|
-
|
308
|
-
/**
|
309
|
-
* Returns true if display is not "none"
|
310
|
-
* @return {Boolean}
|
311
|
-
*/
|
312
|
-
isDisplayed : function() {
|
313
|
-
return !this.isStyle(DISPLAY, NONE);
|
314
|
-
},
|
315
|
-
|
316
|
-
/**
|
317
|
-
* Convenience method for setVisibilityMode(Element.DISPLAY)
|
318
|
-
* @param {String} [display] What to set display to when visible
|
319
|
-
* @return {Ext.dom.Element} this
|
320
|
-
*/
|
321
|
-
enableDisplayMode : function(display) {
|
322
|
-
var me = this;
|
323
|
-
|
324
|
-
me.setVisibilityMode(Element.DISPLAY);
|
325
|
-
|
326
|
-
if (!Ext.isEmpty(display)) {
|
327
|
-
(me.$cache || me.getCache()).data.originalDisplay = display;
|
328
|
-
}
|
329
|
-
|
330
|
-
return me;
|
331
|
-
},
|
332
|
-
|
333
|
-
/**
|
334
|
-
* Puts a mask over this element to disable user interaction. Requires core.css.
|
335
|
-
* This method can only be applied to elements which accept child nodes.
|
336
|
-
* @param {String} [msg] A message to display in the mask
|
337
|
-
* @param {String} [msgCls] A css class to apply to the msg element
|
338
|
-
* @return {Ext.dom.Element} The mask element
|
339
|
-
*/
|
340
|
-
mask : function(msg, msgCls /* private - passed by AbstractComponent.mask to avoid the need to interrogate the DOM to get the height*/, elHeight) {
|
341
|
-
var me = this,
|
342
|
-
dom = me.dom,
|
343
|
-
setExpression = dom.style.setExpression,
|
344
|
-
data = (me.$cache || me.getCache()).data,
|
345
|
-
maskEl = data.maskEl,
|
346
|
-
maskMsg = data.maskMsg;
|
347
|
-
|
348
|
-
if (!(bodyRe.test(dom.tagName) && me.getStyle('position') == 'static')) {
|
349
|
-
me.addCls(XMASKEDRELATIVE);
|
350
|
-
}
|
351
|
-
|
352
|
-
// We always needs to recreate the mask since the DOM element may have been re-created
|
353
|
-
if (maskEl) {
|
354
|
-
maskEl.remove();
|
355
|
-
}
|
356
|
-
|
357
|
-
if (maskMsg) {
|
358
|
-
maskMsg.remove();
|
359
|
-
}
|
360
|
-
|
361
|
-
Ext.DomHelper.append(dom, [{
|
362
|
-
cls : Ext.baseCSSPrefix + "mask"
|
363
|
-
}, {
|
364
|
-
cls : msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG,
|
365
|
-
cn : {
|
366
|
-
tag: 'div',
|
367
|
-
html: msg || ''
|
368
|
-
}
|
369
|
-
}]);
|
370
|
-
|
371
|
-
maskMsg = Ext.get(dom.lastChild);
|
372
|
-
maskEl = Ext.get(maskMsg.dom.previousSibling);
|
373
|
-
data.maskMsg = maskMsg;
|
374
|
-
data.maskEl = maskEl;
|
375
|
-
|
376
|
-
me.addCls(XMASKED);
|
377
|
-
maskEl.setDisplayed(true);
|
378
|
-
|
379
|
-
if (typeof msg == 'string') {
|
380
|
-
maskMsg.setDisplayed(true);
|
381
|
-
maskMsg.center(me);
|
382
|
-
} else {
|
383
|
-
maskMsg.setDisplayed(false);
|
384
|
-
}
|
385
|
-
// NOTE: CSS expressions are resource intensive and to be used only as a last resort
|
386
|
-
// These expressions are removed as soon as they are no longer necessary - in the unmask method.
|
387
|
-
// In normal use cases an element will be masked for a limited period of time.
|
388
|
-
// Fix for https://sencha.jira.com/browse/EXTJSIV-19.
|
389
|
-
// IE6 strict mode and IE6-9 quirks mode takes off left+right padding when calculating width!
|
390
|
-
if (!Ext.supports.IncludePaddingInWidthCalculation && setExpression) {
|
391
|
-
maskEl.dom.style.setExpression('width', 'this.parentNode.clientWidth + "px"');
|
392
|
-
}
|
393
|
-
|
394
|
-
// Some versions and modes of IE subtract top+bottom padding when calculating height.
|
395
|
-
// Different versions from those which make the same error for width!
|
396
|
-
if (!Ext.supports.IncludePaddingInHeightCalculation && setExpression) {
|
397
|
-
maskEl.dom.style.setExpression('height', 'this.parentNode.' + (dom == DOC.body ? 'scrollHeight' : 'offsetHeight') + ' + "px"');
|
398
|
-
}
|
399
|
-
// ie will not expand full height automatically
|
400
|
-
else if (Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto') {
|
401
|
-
maskEl.setSize(undefined, elHeight || me.getHeight());
|
402
|
-
}
|
403
|
-
return maskEl;
|
404
|
-
},
|
405
|
-
|
406
|
-
/**
|
407
|
-
* Hides a previously applied mask.
|
408
|
-
*/
|
409
|
-
unmask : function() {
|
410
|
-
var me = this,
|
411
|
-
data = (me.$cache || me.getCache()).data,
|
412
|
-
maskEl = data.maskEl,
|
413
|
-
maskMsg = data.maskMsg,
|
414
|
-
style;
|
415
|
-
|
416
|
-
if (maskEl) {
|
417
|
-
style = maskEl.dom.style;
|
418
|
-
// Remove resource-intensive CSS expressions as soon as they are not required.
|
419
|
-
if (style.clearExpression) {
|
420
|
-
style.clearExpression('width');
|
421
|
-
style.clearExpression('height');
|
422
|
-
}
|
423
|
-
|
424
|
-
if (maskEl) {
|
425
|
-
maskEl.remove();
|
426
|
-
delete data.maskEl;
|
427
|
-
}
|
428
|
-
|
429
|
-
if (maskMsg) {
|
430
|
-
maskMsg.remove();
|
431
|
-
delete data.maskMsg;
|
432
|
-
}
|
433
|
-
|
434
|
-
me.removeCls([XMASKED, XMASKEDRELATIVE]);
|
435
|
-
}
|
436
|
-
},
|
437
|
-
|
438
|
-
/**
|
439
|
-
* Returns true if this element is masked. Also re-centers any displayed message within the mask.
|
440
|
-
* @return {Boolean}
|
441
|
-
*/
|
442
|
-
isMasked : function() {
|
443
|
-
var me = this,
|
444
|
-
data = (me.$cache || me.getCache()).data,
|
445
|
-
maskEl = data.maskEl,
|
446
|
-
maskMsg = data.maskMsg,
|
447
|
-
hasMask = false;
|
448
|
-
|
449
|
-
if (maskEl && maskEl.isVisible()) {
|
450
|
-
if (maskMsg) {
|
451
|
-
maskMsg.center(me);
|
452
|
-
}
|
453
|
-
hasMask = true;
|
454
|
-
}
|
455
|
-
return hasMask;
|
456
|
-
},
|
457
|
-
|
458
|
-
/**
|
459
|
-
* Creates an iframe shim for this element to keep selects and other windowed objects from
|
460
|
-
* showing through.
|
461
|
-
* @return {Ext.dom.Element} The new shim element
|
462
|
-
*/
|
463
|
-
createShim : function() {
|
464
|
-
var el = DOC.createElement('iframe'),
|
465
|
-
shim;
|
466
|
-
|
467
|
-
el.frameBorder = '0';
|
468
|
-
el.className = Ext.baseCSSPrefix + 'shim';
|
469
|
-
el.src = Ext.SSL_SECURE_URL;
|
470
|
-
shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom));
|
471
|
-
shim.autoBoxAdjust = false;
|
472
|
-
return shim;
|
473
|
-
},
|
474
|
-
|
475
|
-
/**
|
476
|
-
* Convenience method for constructing a KeyMap
|
477
|
-
* @param {String/Number/Number[]/Object} key Either a string with the keys to listen for, the numeric key code,
|
478
|
-
* array of key codes or an object with the following options:
|
479
|
-
* @param {Number/Array} key.key
|
480
|
-
* @param {Boolean} key.shift
|
481
|
-
* @param {Boolean} key.ctrl
|
482
|
-
* @param {Boolean} key.alt
|
483
|
-
* @param {Function} fn The function to call
|
484
|
-
* @param {Object} [scope] The scope (`this` reference) in which the specified function is executed. Defaults to this Element.
|
485
|
-
* @return {Ext.util.KeyMap} The KeyMap created
|
486
|
-
*/
|
487
|
-
addKeyListener : function(key, fn, scope){
|
488
|
-
var config;
|
489
|
-
if(typeof key != 'object' || Ext.isArray(key)){
|
490
|
-
config = {
|
491
|
-
target: this,
|
492
|
-
key: key,
|
493
|
-
fn: fn,
|
494
|
-
scope: scope
|
495
|
-
};
|
496
|
-
}else{
|
497
|
-
config = {
|
498
|
-
target: this,
|
499
|
-
key : key.key,
|
500
|
-
shift : key.shift,
|
501
|
-
ctrl : key.ctrl,
|
502
|
-
alt : key.alt,
|
503
|
-
fn: fn,
|
504
|
-
scope: scope
|
505
|
-
};
|
506
|
-
}
|
507
|
-
return new Ext.util.KeyMap(config);
|
508
|
-
},
|
509
|
-
|
510
|
-
/**
|
511
|
-
* Creates a KeyMap for this element
|
512
|
-
* @param {Object} config The KeyMap config. See {@link Ext.util.KeyMap} for more details
|
513
|
-
* @return {Ext.util.KeyMap} The KeyMap created
|
514
|
-
*/
|
515
|
-
addKeyMap : function(config) {
|
516
|
-
return new Ext.util.KeyMap(Ext.apply({
|
517
|
-
target: this
|
518
|
-
}, config));
|
519
|
-
},
|
520
|
-
|
521
|
-
// Mouse events
|
522
|
-
/**
|
523
|
-
* @event click
|
524
|
-
* Fires when a mouse click is detected within the element.
|
525
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
526
|
-
* @param {HTMLElement} t The target of the event.
|
527
|
-
*/
|
528
|
-
/**
|
529
|
-
* @event contextmenu
|
530
|
-
* Fires when a right click is detected within the element.
|
531
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
532
|
-
* @param {HTMLElement} t The target of the event.
|
533
|
-
*/
|
534
|
-
/**
|
535
|
-
* @event dblclick
|
536
|
-
* Fires when a mouse double click is detected within the element.
|
537
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
538
|
-
* @param {HTMLElement} t The target of the event.
|
539
|
-
*/
|
540
|
-
/**
|
541
|
-
* @event mousedown
|
542
|
-
* Fires when a mousedown is detected within the element.
|
543
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
544
|
-
* @param {HTMLElement} t The target of the event.
|
545
|
-
*/
|
546
|
-
/**
|
547
|
-
* @event mouseup
|
548
|
-
* Fires when a mouseup is detected within the element.
|
549
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
550
|
-
* @param {HTMLElement} t The target of the event.
|
551
|
-
*/
|
552
|
-
/**
|
553
|
-
* @event mouseover
|
554
|
-
* Fires when a mouseover is detected within the element.
|
555
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
556
|
-
* @param {HTMLElement} t The target of the event.
|
557
|
-
*/
|
558
|
-
/**
|
559
|
-
* @event mousemove
|
560
|
-
* Fires when a mousemove is detected with the element.
|
561
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
562
|
-
* @param {HTMLElement} t The target of the event.
|
563
|
-
*/
|
564
|
-
/**
|
565
|
-
* @event mouseout
|
566
|
-
* Fires when a mouseout is detected with the element.
|
567
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
568
|
-
* @param {HTMLElement} t The target of the event.
|
569
|
-
*/
|
570
|
-
/**
|
571
|
-
* @event mouseenter
|
572
|
-
* Fires when the mouse enters the element.
|
573
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
574
|
-
* @param {HTMLElement} t The target of the event.
|
575
|
-
*/
|
576
|
-
/**
|
577
|
-
* @event mouseleave
|
578
|
-
* Fires when the mouse leaves the element.
|
579
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
580
|
-
* @param {HTMLElement} t The target of the event.
|
581
|
-
*/
|
582
|
-
|
583
|
-
// Keyboard events
|
584
|
-
/**
|
585
|
-
* @event keypress
|
586
|
-
* Fires when a keypress is detected within the element.
|
587
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
588
|
-
* @param {HTMLElement} t The target of the event.
|
589
|
-
*/
|
590
|
-
/**
|
591
|
-
* @event keydown
|
592
|
-
* Fires when a keydown is detected within the element.
|
593
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
594
|
-
* @param {HTMLElement} t The target of the event.
|
595
|
-
*/
|
596
|
-
/**
|
597
|
-
* @event keyup
|
598
|
-
* Fires when a keyup is detected within the element.
|
599
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
600
|
-
* @param {HTMLElement} t The target of the event.
|
601
|
-
*/
|
602
|
-
|
603
|
-
// HTML frame/object events
|
604
|
-
/**
|
605
|
-
* @event load
|
606
|
-
* Fires when the user agent finishes loading all content within the element. Only supported by window, frames,
|
607
|
-
* objects and images.
|
608
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
609
|
-
* @param {HTMLElement} t The target of the event.
|
610
|
-
*/
|
611
|
-
/**
|
612
|
-
* @event unload
|
613
|
-
* Fires when the user agent removes all content from a window or frame. For elements, it fires when the target
|
614
|
-
* element or any of its content has been removed.
|
615
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
616
|
-
* @param {HTMLElement} t The target of the event.
|
617
|
-
*/
|
618
|
-
/**
|
619
|
-
* @event abort
|
620
|
-
* Fires when an object/image is stopped from loading before completely loaded.
|
621
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
622
|
-
* @param {HTMLElement} t The target of the event.
|
623
|
-
*/
|
624
|
-
/**
|
625
|
-
* @event error
|
626
|
-
* Fires when an object/image/frame cannot be loaded properly.
|
627
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
628
|
-
* @param {HTMLElement} t The target of the event.
|
629
|
-
*/
|
630
|
-
/**
|
631
|
-
* @event resize
|
632
|
-
* Fires when a document view is resized.
|
633
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
634
|
-
* @param {HTMLElement} t The target of the event.
|
635
|
-
*/
|
636
|
-
/**
|
637
|
-
* @event scroll
|
638
|
-
* Fires when a document view is scrolled.
|
639
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
640
|
-
* @param {HTMLElement} t The target of the event.
|
641
|
-
*/
|
642
|
-
|
643
|
-
// Form events
|
644
|
-
/**
|
645
|
-
* @event select
|
646
|
-
* Fires when a user selects some text in a text field, including input and textarea.
|
647
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
648
|
-
* @param {HTMLElement} t The target of the event.
|
649
|
-
*/
|
650
|
-
/**
|
651
|
-
* @event change
|
652
|
-
* Fires when a control loses the input focus and its value has been modified since gaining focus.
|
653
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
654
|
-
* @param {HTMLElement} t The target of the event.
|
655
|
-
*/
|
656
|
-
/**
|
657
|
-
* @event submit
|
658
|
-
* Fires when a form is submitted.
|
659
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
660
|
-
* @param {HTMLElement} t The target of the event.
|
661
|
-
*/
|
662
|
-
/**
|
663
|
-
* @event reset
|
664
|
-
* Fires when a form is reset.
|
665
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
666
|
-
* @param {HTMLElement} t The target of the event.
|
667
|
-
*/
|
668
|
-
/**
|
669
|
-
* @event focus
|
670
|
-
* Fires when an element receives focus either via the pointing device or by tab navigation.
|
671
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
672
|
-
* @param {HTMLElement} t The target of the event.
|
673
|
-
*/
|
674
|
-
/**
|
675
|
-
* @event blur
|
676
|
-
* Fires when an element loses focus either via the pointing device or by tabbing navigation.
|
677
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
678
|
-
* @param {HTMLElement} t The target of the event.
|
679
|
-
*/
|
680
|
-
|
681
|
-
// User Interface events
|
682
|
-
/**
|
683
|
-
* @event DOMFocusIn
|
684
|
-
* Where supported. Similar to HTML focus event, but can be applied to any focusable element.
|
685
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
686
|
-
* @param {HTMLElement} t The target of the event.
|
687
|
-
*/
|
688
|
-
/**
|
689
|
-
* @event DOMFocusOut
|
690
|
-
* Where supported. Similar to HTML blur event, but can be applied to any focusable element.
|
691
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
692
|
-
* @param {HTMLElement} t The target of the event.
|
693
|
-
*/
|
694
|
-
/**
|
695
|
-
* @event DOMActivate
|
696
|
-
* Where supported. Fires when an element is activated, for instance, through a mouse click or a keypress.
|
697
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
698
|
-
* @param {HTMLElement} t The target of the event.
|
699
|
-
*/
|
700
|
-
|
701
|
-
// DOM Mutation events
|
702
|
-
/**
|
703
|
-
* @event DOMSubtreeModified
|
704
|
-
* Where supported. Fires when the subtree is modified.
|
705
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
706
|
-
* @param {HTMLElement} t The target of the event.
|
707
|
-
*/
|
708
|
-
/**
|
709
|
-
* @event DOMNodeInserted
|
710
|
-
* Where supported. Fires when a node has been added as a child of another node.
|
711
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
712
|
-
* @param {HTMLElement} t The target of the event.
|
713
|
-
*/
|
714
|
-
/**
|
715
|
-
* @event DOMNodeRemoved
|
716
|
-
* Where supported. Fires when a descendant node of the element is removed.
|
717
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
718
|
-
* @param {HTMLElement} t The target of the event.
|
719
|
-
*/
|
720
|
-
/**
|
721
|
-
* @event DOMNodeRemovedFromDocument
|
722
|
-
* Where supported. Fires when a node is being removed from a document.
|
723
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
724
|
-
* @param {HTMLElement} t The target of the event.
|
725
|
-
*/
|
726
|
-
/**
|
727
|
-
* @event DOMNodeInsertedIntoDocument
|
728
|
-
* Where supported. Fires when a node is being inserted into a document.
|
729
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
730
|
-
* @param {HTMLElement} t The target of the event.
|
731
|
-
*/
|
732
|
-
/**
|
733
|
-
* @event DOMAttrModified
|
734
|
-
* Where supported. Fires when an attribute has been modified.
|
735
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
736
|
-
* @param {HTMLElement} t The target of the event.
|
737
|
-
*/
|
738
|
-
/**
|
739
|
-
* @event DOMCharacterDataModified
|
740
|
-
* Where supported. Fires when the character data has been modified.
|
741
|
-
* @param {Ext.EventObject} e The {@link Ext.EventObject} encapsulating the DOM event.
|
742
|
-
* @param {HTMLElement} t The target of the event.
|
743
|
-
*/
|
744
|
-
|
745
|
-
/**
|
746
|
-
* Appends an event handler to this element.
|
747
|
-
*
|
748
|
-
* @param {String} eventName The name of event to handle.
|
749
|
-
*
|
750
|
-
* @param {Function} fn The handler function the event invokes. This function is passed the following parameters:
|
751
|
-
*
|
752
|
-
* - **evt** : EventObject
|
753
|
-
*
|
754
|
-
* The {@link Ext.EventObject EventObject} describing the event.
|
755
|
-
*
|
756
|
-
* - **el** : HtmlElement
|
757
|
-
*
|
758
|
-
* The DOM element which was the target of the event. Note that this may be filtered by using the delegate option.
|
759
|
-
*
|
760
|
-
* - **o** : Object
|
761
|
-
*
|
762
|
-
* The options object from the call that setup the listener.
|
763
|
-
*
|
764
|
-
* @param {Object} scope (optional) The scope (**this** reference) in which the handler function is executed. **If
|
765
|
-
* omitted, defaults to this Element.**
|
766
|
-
*
|
767
|
-
* @param {Object} options (optional) An object containing handler configuration properties. This may contain any of
|
768
|
-
* the following properties:
|
769
|
-
*
|
770
|
-
* - **scope** Object :
|
771
|
-
*
|
772
|
-
* The scope (**this** reference) in which the handler function is executed. **If omitted, defaults to this
|
773
|
-
* Element.**
|
774
|
-
*
|
775
|
-
* - **delegate** String:
|
776
|
-
*
|
777
|
-
* A simple selector to filter the target or look for a descendant of the target. See below for additional details.
|
778
|
-
*
|
779
|
-
* - **stopEvent** Boolean:
|
780
|
-
*
|
781
|
-
* True to stop the event. That is stop propagation, and prevent the default action.
|
782
|
-
*
|
783
|
-
* - **preventDefault** Boolean:
|
784
|
-
*
|
785
|
-
* True to prevent the default action
|
786
|
-
*
|
787
|
-
* - **stopPropagation** Boolean:
|
788
|
-
*
|
789
|
-
* True to prevent event propagation
|
790
|
-
*
|
791
|
-
* - **normalized** Boolean:
|
792
|
-
*
|
793
|
-
* False to pass a browser event to the handler function instead of an Ext.EventObject
|
794
|
-
*
|
795
|
-
* - **target** Ext.dom.Element:
|
796
|
-
*
|
797
|
-
* Only call the handler if the event was fired on the target Element, _not_ if the event was bubbled up from a
|
798
|
-
* child node.
|
799
|
-
*
|
800
|
-
* - **delay** Number:
|
801
|
-
*
|
802
|
-
* The number of milliseconds to delay the invocation of the handler after the event fires.
|
803
|
-
*
|
804
|
-
* - **single** Boolean:
|
805
|
-
*
|
806
|
-
* True to add a handler to handle just the next firing of the event, and then remove itself.
|
807
|
-
*
|
808
|
-
* - **buffer** Number:
|
809
|
-
*
|
810
|
-
* Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed by the specified number of
|
811
|
-
* milliseconds. If the event fires again within that time, the original handler is _not_ invoked, but the new
|
812
|
-
* handler is scheduled in its place.
|
813
|
-
*
|
814
|
-
* **Combining Options**
|
815
|
-
*
|
816
|
-
* Using the options argument, it is possible to combine different types of listeners:
|
817
|
-
*
|
818
|
-
* A delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the options
|
819
|
-
* object. The options object is available as the third parameter in the handler function.
|
820
|
-
*
|
821
|
-
* Code:
|
822
|
-
*
|
823
|
-
* el.on('click', this.onClick, this, {
|
824
|
-
* single: true,
|
825
|
-
* delay: 100,
|
826
|
-
* stopEvent : true,
|
827
|
-
* forumId: 4
|
828
|
-
* });
|
829
|
-
*
|
830
|
-
* **Attaching multiple handlers in 1 call**
|
831
|
-
*
|
832
|
-
* The method also allows for a single argument to be passed which is a config object containing properties which
|
833
|
-
* specify multiple handlers.
|
834
|
-
*
|
835
|
-
* Code:
|
836
|
-
*
|
837
|
-
* el.on({
|
838
|
-
* 'click' : {
|
839
|
-
* fn: this.onClick,
|
840
|
-
* scope: this,
|
841
|
-
* delay: 100
|
842
|
-
* },
|
843
|
-
* 'mouseover' : {
|
844
|
-
* fn: this.onMouseOver,
|
845
|
-
* scope: this
|
846
|
-
* },
|
847
|
-
* 'mouseout' : {
|
848
|
-
* fn: this.onMouseOut,
|
849
|
-
* scope: this
|
850
|
-
* }
|
851
|
-
* });
|
852
|
-
*
|
853
|
-
* Or a shorthand syntax:
|
854
|
-
*
|
855
|
-
* Code:
|
856
|
-
*
|
857
|
-
* el.on({
|
858
|
-
* 'click' : this.onClick,
|
859
|
-
* 'mouseover' : this.onMouseOver,
|
860
|
-
* 'mouseout' : this.onMouseOut,
|
861
|
-
* scope: this
|
862
|
-
* });
|
863
|
-
*
|
864
|
-
* **delegate**
|
865
|
-
*
|
866
|
-
* This is a configuration option that you can pass along when registering a handler for an event to assist with
|
867
|
-
* event delegation. Event delegation is a technique that is used to reduce memory consumption and prevent exposure
|
868
|
-
* to memory-leaks. By registering an event for a container element as opposed to each element within a container.
|
869
|
-
* By setting this configuration option to a simple selector, the target element will be filtered to look for a
|
870
|
-
* descendant of the target. For example:
|
871
|
-
*
|
872
|
-
* // using this markup:
|
873
|
-
* <div id='elId'>
|
874
|
-
* <p id='p1'>paragraph one</p>
|
875
|
-
* <p id='p2' class='clickable'>paragraph two</p>
|
876
|
-
* <p id='p3'>paragraph three</p>
|
877
|
-
* </div>
|
878
|
-
*
|
879
|
-
* // utilize event delegation to registering just one handler on the container element:
|
880
|
-
* el = Ext.get('elId');
|
881
|
-
* el.on(
|
882
|
-
* 'click',
|
883
|
-
* function(e,t) {
|
884
|
-
* // handle click
|
885
|
-
* console.info(t.id); // 'p2'
|
886
|
-
* },
|
887
|
-
* this,
|
888
|
-
* {
|
889
|
-
* // filter the target element to be a descendant with the class 'clickable'
|
890
|
-
* delegate: '.clickable'
|
891
|
-
* }
|
892
|
-
* );
|
893
|
-
*
|
894
|
-
* @return {Ext.dom.Element} this
|
895
|
-
*/
|
896
|
-
on: function(eventName, fn, scope, options) {
|
897
|
-
Ext.EventManager.on(this, eventName, fn, scope || this, options);
|
898
|
-
return this;
|
899
|
-
},
|
900
|
-
|
901
|
-
/**
|
902
|
-
* Removes an event handler from this element.
|
903
|
-
*
|
904
|
-
* **Note**: if a *scope* was explicitly specified when {@link #on adding} the listener,
|
905
|
-
* the same scope must be specified here.
|
906
|
-
*
|
907
|
-
* Example:
|
908
|
-
*
|
909
|
-
* el.un('click', this.handlerFn);
|
910
|
-
* // or
|
911
|
-
* el.removeListener('click', this.handlerFn);
|
912
|
-
*
|
913
|
-
* @param {String} eventName The name of the event from which to remove the handler.
|
914
|
-
* @param {Function} fn The handler function to remove. **This must be a reference to the function passed into the
|
915
|
-
* {@link #on} call.**
|
916
|
-
* @param {Object} scope If a scope (**this** reference) was specified when the listener was added, then this must
|
917
|
-
* refer to the same object.
|
918
|
-
* @return {Ext.dom.Element} this
|
919
|
-
*/
|
920
|
-
un: function(eventName, fn, scope) {
|
921
|
-
Ext.EventManager.un(this, eventName, fn, scope || this);
|
922
|
-
return this;
|
923
|
-
},
|
924
|
-
|
925
|
-
/**
|
926
|
-
* Removes all previous added listeners from this element
|
927
|
-
* @return {Ext.dom.Element} this
|
928
|
-
*/
|
929
|
-
removeAllListeners: function() {
|
930
|
-
Ext.EventManager.removeAll(this);
|
931
|
-
return this;
|
932
|
-
},
|
933
|
-
|
934
|
-
/**
|
935
|
-
* Recursively removes all previous added listeners from this element and its children
|
936
|
-
* @return {Ext.dom.Element} this
|
937
|
-
*/
|
938
|
-
purgeAllListeners: function() {
|
939
|
-
Ext.EventManager.purgeElement(this);
|
940
|
-
return this;
|
941
|
-
}
|
942
|
-
|
943
|
-
}, function() {
|
944
|
-
|
945
|
-
var EC = Ext.cache,
|
946
|
-
El = this,
|
947
|
-
AbstractElement = Ext.dom.AbstractElement,
|
948
|
-
focusRe = /a|button|embed|iframe|img|input|object|select|textarea/i,
|
949
|
-
nonSpaceRe = /\S/,
|
950
|
-
scriptTagRe = /(?:<script([^>]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,
|
951
|
-
replaceScriptTagRe = /(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig,
|
952
|
-
srcRe = /\ssrc=([\'\"])(.*?)\1/i,
|
953
|
-
typeRe = /\stype=([\'\"])(.*?)\1/i,
|
954
|
-
useDocForId = !(Ext.isIE6 || Ext.isIE7 || Ext.isIE8);
|
955
|
-
|
956
|
-
El.boxMarkup = '<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>';
|
957
|
-
//</!if>
|
958
|
-
|
959
|
-
// private
|
960
|
-
// Garbage collection - uncache elements/purge listeners on orphaned elements
|
961
|
-
// so we don't hold a reference and cause the browser to retain them
|
962
|
-
function garbageCollect() {
|
963
|
-
if (!Ext.enableGarbageCollector) {
|
964
|
-
clearInterval(El.collectorThreadId);
|
965
|
-
} else {
|
966
|
-
var eid,
|
967
|
-
d,
|
968
|
-
o,
|
969
|
-
t;
|
970
|
-
|
971
|
-
for (eid in EC) {
|
972
|
-
if (!EC.hasOwnProperty(eid)) {
|
973
|
-
continue;
|
974
|
-
}
|
975
|
-
|
976
|
-
o = EC[eid];
|
977
|
-
|
978
|
-
// Skip document and window elements
|
979
|
-
if (o.skipGarbageCollection) {
|
980
|
-
continue;
|
981
|
-
}
|
982
|
-
|
983
|
-
d = o.dom;
|
984
|
-
|
985
|
-
//<debug>
|
986
|
-
// Should always have a DOM node
|
987
|
-
if (!d) {
|
988
|
-
Ext.Error.raise('Missing DOM node in element garbage collection: ' + eid);
|
989
|
-
}
|
990
|
-
|
991
|
-
// Check that document and window elements haven't got through
|
992
|
-
if (d && (d.getElementById || d.navigator)) {
|
993
|
-
Ext.Error.raise('Unexpected document or window element in element garbage collection');
|
994
|
-
}
|
995
|
-
//</debug>
|
996
|
-
|
997
|
-
// -------------------------------------------------------
|
998
|
-
// Determining what is garbage:
|
999
|
-
// -------------------------------------------------------
|
1000
|
-
// !d.parentNode
|
1001
|
-
// no parentNode == direct orphan, definitely garbage
|
1002
|
-
// -------------------------------------------------------
|
1003
|
-
// !d.offsetParent && !document.getElementById(eid)
|
1004
|
-
// display none elements have no offsetParent so we will
|
1005
|
-
// also try to look it up by it's id. However, check
|
1006
|
-
// offsetParent first so we don't do unneeded lookups.
|
1007
|
-
// This enables collection of elements that are not orphans
|
1008
|
-
// directly, but somewhere up the line they have an orphan
|
1009
|
-
// parent.
|
1010
|
-
// -------------------------------------------------------
|
1011
|
-
if (!d.parentNode || (!d.offsetParent && !Ext.getElementById(eid))) {
|
1012
|
-
if (d && Ext.enableListenerCollection) {
|
1013
|
-
Ext.EventManager.removeAll(d);
|
1014
|
-
}
|
1015
|
-
delete EC[eid];
|
1016
|
-
}
|
1017
|
-
}
|
1018
|
-
// Cleanup IE Object leaks
|
1019
|
-
if (Ext.isIE) {
|
1020
|
-
t = {};
|
1021
|
-
for (eid in EC) {
|
1022
|
-
if (!EC.hasOwnProperty(eid)) {
|
1023
|
-
continue;
|
1024
|
-
}
|
1025
|
-
t[eid] = EC[eid];
|
1026
|
-
}
|
1027
|
-
EC = Ext.cache = t;
|
1028
|
-
}
|
1029
|
-
}
|
1030
|
-
}
|
1031
|
-
|
1032
|
-
El.collectorThreadId = setInterval(garbageCollect, 30000);
|
1033
|
-
|
1034
|
-
//Stuff from Element-more.js
|
1035
|
-
El.addMethods({
|
1036
|
-
|
1037
|
-
/**
|
1038
|
-
* Monitors this Element for the mouse leaving. Calls the function after the specified delay only if
|
1039
|
-
* the mouse was not moved back into the Element within the delay. If the mouse *was* moved
|
1040
|
-
* back in, the function is not called.
|
1041
|
-
* @param {Number} delay The delay **in milliseconds** to wait for possible mouse re-entry before calling the handler function.
|
1042
|
-
* @param {Function} handler The function to call if the mouse remains outside of this Element for the specified time.
|
1043
|
-
* @param {Object} [scope] The scope (`this` reference) in which the handler function executes. Defaults to this Element.
|
1044
|
-
* @return {Object} The listeners object which was added to this element so that monitoring can be stopped. Example usage:
|
1045
|
-
*
|
1046
|
-
* // Hide the menu if the mouse moves out for 250ms or more
|
1047
|
-
* this.mouseLeaveMonitor = this.menuEl.monitorMouseLeave(250, this.hideMenu, this);
|
1048
|
-
*
|
1049
|
-
* ...
|
1050
|
-
* // Remove mouseleave monitor on menu destroy
|
1051
|
-
* this.menuEl.un(this.mouseLeaveMonitor);
|
1052
|
-
*
|
1053
|
-
*/
|
1054
|
-
monitorMouseLeave: function(delay, handler, scope) {
|
1055
|
-
var me = this,
|
1056
|
-
timer,
|
1057
|
-
listeners = {
|
1058
|
-
mouseleave: function(e) {
|
1059
|
-
timer = setTimeout(Ext.Function.bind(handler, scope||me, [e]), delay);
|
1060
|
-
},
|
1061
|
-
mouseenter: function() {
|
1062
|
-
clearTimeout(timer);
|
1063
|
-
},
|
1064
|
-
freezeEvent: true
|
1065
|
-
};
|
1066
|
-
|
1067
|
-
me.on(listeners);
|
1068
|
-
return listeners;
|
1069
|
-
},
|
1070
|
-
|
1071
|
-
/**
|
1072
|
-
* Stops the specified event(s) from bubbling and optionally prevents the default action
|
1073
|
-
* @param {String/String[]} eventName an event / array of events to stop from bubbling
|
1074
|
-
* @param {Boolean} [preventDefault] true to prevent the default action too
|
1075
|
-
* @return {Ext.dom.Element} this
|
1076
|
-
*/
|
1077
|
-
swallowEvent : function(eventName, preventDefault) {
|
1078
|
-
var me = this,
|
1079
|
-
e, eLen;
|
1080
|
-
function fn(e) {
|
1081
|
-
e.stopPropagation();
|
1082
|
-
if (preventDefault) {
|
1083
|
-
e.preventDefault();
|
1084
|
-
}
|
1085
|
-
}
|
1086
|
-
|
1087
|
-
if (Ext.isArray(eventName)) {
|
1088
|
-
eLen = eventName.length;
|
1089
|
-
|
1090
|
-
for (e = 0; e < eLen; e++) {
|
1091
|
-
me.on(eventName[e], fn);
|
1092
|
-
}
|
1093
|
-
|
1094
|
-
return me;
|
1095
|
-
}
|
1096
|
-
me.on(eventName, fn);
|
1097
|
-
return me;
|
1098
|
-
},
|
1099
|
-
|
1100
|
-
/**
|
1101
|
-
* Create an event handler on this element such that when the event fires and is handled by this element,
|
1102
|
-
* it will be relayed to another object (i.e., fired again as if it originated from that object instead).
|
1103
|
-
* @param {String} eventName The type of event to relay
|
1104
|
-
* @param {Object} observable Any object that extends {@link Ext.util.Observable} that will provide the context
|
1105
|
-
* for firing the relayed event
|
1106
|
-
*/
|
1107
|
-
relayEvent : function(eventName, observable) {
|
1108
|
-
this.on(eventName, function(e) {
|
1109
|
-
observable.fireEvent(eventName, e);
|
1110
|
-
});
|
1111
|
-
},
|
1112
|
-
|
1113
|
-
/**
|
1114
|
-
* Removes Empty, or whitespace filled text nodes. Combines adjacent text nodes.
|
1115
|
-
* @param {Boolean} [forceReclean=false] By default the element keeps track if it has been cleaned already
|
1116
|
-
* so you can call this over and over. However, if you update the element and need to force a reclean, you
|
1117
|
-
* can pass true.
|
1118
|
-
*/
|
1119
|
-
clean : function(forceReclean) {
|
1120
|
-
var me = this,
|
1121
|
-
dom = me.dom,
|
1122
|
-
data = (me.$cache || me.getCache()).data,
|
1123
|
-
n = dom.firstChild,
|
1124
|
-
ni = -1,
|
1125
|
-
nx;
|
1126
|
-
|
1127
|
-
if (data.isCleaned && forceReclean !== true) {
|
1128
|
-
return me;
|
1129
|
-
}
|
1130
|
-
|
1131
|
-
while (n) {
|
1132
|
-
nx = n.nextSibling;
|
1133
|
-
if (n.nodeType == 3) {
|
1134
|
-
// Remove empty/whitespace text nodes
|
1135
|
-
if (!(nonSpaceRe.test(n.nodeValue))) {
|
1136
|
-
dom.removeChild(n);
|
1137
|
-
// Combine adjacent text nodes
|
1138
|
-
} else if (nx && nx.nodeType == 3) {
|
1139
|
-
n.appendData(Ext.String.trim(nx.data));
|
1140
|
-
dom.removeChild(nx);
|
1141
|
-
nx = n.nextSibling;
|
1142
|
-
n.nodeIndex = ++ni;
|
1143
|
-
}
|
1144
|
-
} else {
|
1145
|
-
// Recursively clean
|
1146
|
-
Ext.fly(n).clean();
|
1147
|
-
n.nodeIndex = ++ni;
|
1148
|
-
}
|
1149
|
-
n = nx;
|
1150
|
-
}
|
1151
|
-
|
1152
|
-
data.isCleaned = true;
|
1153
|
-
return me;
|
1154
|
-
},
|
1155
|
-
|
1156
|
-
/**
|
1157
|
-
* Direct access to the Ext.ElementLoader {@link Ext.ElementLoader#method-load} method. The method takes the same object
|
1158
|
-
* parameter as {@link Ext.ElementLoader#method-load}
|
1159
|
-
* @return {Ext.dom.Element} this
|
1160
|
-
*/
|
1161
|
-
load : function(options) {
|
1162
|
-
this.getLoader().load(options);
|
1163
|
-
return this;
|
1164
|
-
},
|
1165
|
-
|
1166
|
-
/**
|
1167
|
-
* Gets this element's {@link Ext.ElementLoader ElementLoader}
|
1168
|
-
* @return {Ext.ElementLoader} The loader
|
1169
|
-
*/
|
1170
|
-
getLoader : function() {
|
1171
|
-
var me = this,
|
1172
|
-
data = (me.$cache || me.getCache()).data,
|
1173
|
-
loader = data.loader;
|
1174
|
-
|
1175
|
-
if (!loader) {
|
1176
|
-
data.loader = loader = new Ext.ElementLoader({
|
1177
|
-
target: me
|
1178
|
-
});
|
1179
|
-
}
|
1180
|
-
return loader;
|
1181
|
-
},
|
1182
|
-
|
1183
|
-
/**
|
1184
|
-
* Updates the innerHTML of this element, optionally searching for and processing scripts.
|
1185
|
-
* @param {String} html The new HTML
|
1186
|
-
* @param {Boolean} [loadScripts] True to look for and process scripts (defaults to false)
|
1187
|
-
* @param {Function} [callback] For async script loading you can be notified when the update completes
|
1188
|
-
* @return {Ext.dom.Element} this
|
1189
|
-
*/
|
1190
|
-
update : function(html, loadScripts, callback) {
|
1191
|
-
var me = this,
|
1192
|
-
id,
|
1193
|
-
dom,
|
1194
|
-
interval;
|
1195
|
-
|
1196
|
-
if (!me.dom) {
|
1197
|
-
return me;
|
1198
|
-
}
|
1199
|
-
html = html || '';
|
1200
|
-
dom = me.dom;
|
1201
|
-
|
1202
|
-
if (loadScripts !== true) {
|
1203
|
-
dom.innerHTML = html;
|
1204
|
-
Ext.callback(callback, me);
|
1205
|
-
return me;
|
1206
|
-
}
|
1207
|
-
|
1208
|
-
id = Ext.id();
|
1209
|
-
html += '<span id="' + id + '"></span>';
|
1210
|
-
|
1211
|
-
interval = setInterval(function() {
|
1212
|
-
var hd,
|
1213
|
-
match,
|
1214
|
-
attrs,
|
1215
|
-
srcMatch,
|
1216
|
-
typeMatch,
|
1217
|
-
el,
|
1218
|
-
s;
|
1219
|
-
if (!(el = DOC.getElementById(id))) {
|
1220
|
-
return false;
|
1221
|
-
}
|
1222
|
-
clearInterval(interval);
|
1223
|
-
Ext.removeNode(el);
|
1224
|
-
hd = Ext.getHead().dom;
|
1225
|
-
|
1226
|
-
while ((match = scriptTagRe.exec(html))) {
|
1227
|
-
attrs = match[1];
|
1228
|
-
srcMatch = attrs ? attrs.match(srcRe) : false;
|
1229
|
-
if (srcMatch && srcMatch[2]) {
|
1230
|
-
s = DOC.createElement("script");
|
1231
|
-
s.src = srcMatch[2];
|
1232
|
-
typeMatch = attrs.match(typeRe);
|
1233
|
-
if (typeMatch && typeMatch[2]) {
|
1234
|
-
s.type = typeMatch[2];
|
1235
|
-
}
|
1236
|
-
hd.appendChild(s);
|
1237
|
-
} else if (match[2] && match[2].length > 0) {
|
1238
|
-
if (window.execScript) {
|
1239
|
-
window.execScript(match[2]);
|
1240
|
-
} else {
|
1241
|
-
window.eval(match[2]);
|
1242
|
-
}
|
1243
|
-
}
|
1244
|
-
}
|
1245
|
-
Ext.callback(callback, me);
|
1246
|
-
}, 20);
|
1247
|
-
dom.innerHTML = html.replace(replaceScriptTagRe, '');
|
1248
|
-
return me;
|
1249
|
-
},
|
1250
|
-
|
1251
|
-
// inherit docs, overridden so we can add removeAnchor
|
1252
|
-
removeAllListeners : function() {
|
1253
|
-
this.removeAnchor();
|
1254
|
-
Ext.EventManager.removeAll(this.dom);
|
1255
|
-
return this;
|
1256
|
-
},
|
1257
|
-
|
1258
|
-
/**
|
1259
|
-
* Creates a proxy element of this element
|
1260
|
-
* @param {String/Object} config The class name of the proxy element or a DomHelper config object
|
1261
|
-
* @param {String/HTMLElement} [renderTo] The element or element id to render the proxy to. Defaults to: document.body.
|
1262
|
-
* @param {Boolean} [matchBox=false] True to align and size the proxy to this element now.
|
1263
|
-
* @return {Ext.dom.Element} The new proxy element
|
1264
|
-
*/
|
1265
|
-
createProxy : function(config, renderTo, matchBox) {
|
1266
|
-
config = (typeof config == 'object') ? config : {tag : "div", cls: config};
|
1267
|
-
|
1268
|
-
var me = this,
|
1269
|
-
proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) :
|
1270
|
-
Ext.DomHelper.insertBefore(me.dom, config, true);
|
1271
|
-
|
1272
|
-
proxy.setVisibilityMode(Element.DISPLAY);
|
1273
|
-
proxy.hide();
|
1274
|
-
if (matchBox && me.setBox && me.getBox) { // check to make sure Element.position.js is loaded
|
1275
|
-
proxy.setBox(me.getBox());
|
1276
|
-
}
|
1277
|
-
return proxy;
|
1278
|
-
},
|
1279
|
-
|
1280
|
-
/**
|
1281
|
-
* Gets the parent node of the current element taking into account Ext.scopeResetCSS
|
1282
|
-
* @protected
|
1283
|
-
* @return {HTMLElement} The parent element
|
1284
|
-
*/
|
1285
|
-
getScopeParent: function() {
|
1286
|
-
var parent = this.dom.parentNode;
|
1287
|
-
return Ext.scopeResetCSS ? parent.parentNode : parent;
|
1288
|
-
},
|
1289
|
-
|
1290
|
-
/**
|
1291
|
-
* Returns true if this element needs an explicit tabIndex to make it focusable. Input fields, text areas, buttons
|
1292
|
-
* anchors elements **with an href** etc do not need a tabIndex, but structural elements do.
|
1293
|
-
*/
|
1294
|
-
needsTabIndex: function() {
|
1295
|
-
if (this.dom) {
|
1296
|
-
if ((this.dom.nodeName === 'a') && (!this.dom.href)) {
|
1297
|
-
return true;
|
1298
|
-
}
|
1299
|
-
return !focusRe.test(this.dom.nodeName);
|
1300
|
-
}
|
1301
|
-
},
|
1302
|
-
|
1303
|
-
/**
|
1304
|
-
* Checks whether this element can be focused.
|
1305
|
-
* @return {Boolean} True if the element is focusable
|
1306
|
-
*/
|
1307
|
-
focusable: function () {
|
1308
|
-
var dom = this.dom,
|
1309
|
-
nodeName = dom.nodeName,
|
1310
|
-
canFocus = false;
|
1311
|
-
|
1312
|
-
if (!dom.disabled) {
|
1313
|
-
if (focusRe.test(nodeName)) {
|
1314
|
-
if ((nodeName !== 'a') || dom.href) {
|
1315
|
-
canFocus = true;
|
1316
|
-
}
|
1317
|
-
} else {
|
1318
|
-
canFocus = !isNaN(dom.tabIndex);
|
1319
|
-
}
|
1320
|
-
}
|
1321
|
-
return canFocus && this.isVisible(true);
|
1322
|
-
}
|
1323
|
-
});
|
1324
|
-
|
1325
|
-
if (Ext.isIE) {
|
1326
|
-
El.prototype.getById = function (id, asDom) {
|
1327
|
-
var dom = this.dom,
|
1328
|
-
cached, el, ret;
|
1329
|
-
|
1330
|
-
if (dom) {
|
1331
|
-
// for normal elements getElementById is the best solution, but if the el is
|
1332
|
-
// not part of the document.body, we need to use all[]
|
1333
|
-
el = (useDocForId && DOC.getElementById(id)) || dom.all[id];
|
1334
|
-
if (el) {
|
1335
|
-
if (asDom) {
|
1336
|
-
ret = el;
|
1337
|
-
} else {
|
1338
|
-
// calling El.get here is a real hit (2x slower) because it has to
|
1339
|
-
// redetermine that we are giving it a dom el.
|
1340
|
-
cached = EC[id];
|
1341
|
-
if (cached && cached.el) {
|
1342
|
-
ret = cached.el;
|
1343
|
-
ret.dom = el;
|
1344
|
-
} else {
|
1345
|
-
ret = new Element(el);
|
1346
|
-
}
|
1347
|
-
}
|
1348
|
-
return ret;
|
1349
|
-
}
|
1350
|
-
}
|
1351
|
-
|
1352
|
-
return asDom ? Ext.getDom(id) : El.get(id);
|
1353
|
-
};
|
1354
|
-
}
|
1355
|
-
|
1356
|
-
El.createAlias({
|
1357
|
-
/**
|
1358
|
-
* @method
|
1359
|
-
* @inheritdoc Ext.dom.Element#on
|
1360
|
-
* Shorthand for {@link #on}.
|
1361
|
-
*/
|
1362
|
-
addListener: 'on',
|
1363
|
-
/**
|
1364
|
-
* @method
|
1365
|
-
* @inheritdoc Ext.dom.Element#un
|
1366
|
-
* Shorthand for {@link #un}.
|
1367
|
-
*/
|
1368
|
-
removeListener: 'un',
|
1369
|
-
/**
|
1370
|
-
* @method
|
1371
|
-
* @inheritdoc Ext.dom.Element#removeAllListeners
|
1372
|
-
* Alias for {@link #removeAllListeners}.
|
1373
|
-
*/
|
1374
|
-
clearListeners: 'removeAllListeners'
|
1375
|
-
});
|
1376
|
-
|
1377
|
-
El.Fly = AbstractElement.Fly = new Ext.Class({
|
1378
|
-
extend: El,
|
1379
|
-
|
1380
|
-
constructor: function(dom) {
|
1381
|
-
this.dom = dom;
|
1382
|
-
},
|
1383
|
-
|
1384
|
-
attach: AbstractElement.Fly.prototype.attach
|
1385
|
-
});
|
1386
|
-
|
1387
|
-
if (Ext.isIE) {
|
1388
|
-
Ext.getElementById = function (id) {
|
1389
|
-
var el = DOC.getElementById(id),
|
1390
|
-
detachedBodyEl;
|
1391
|
-
|
1392
|
-
if (!el && (detachedBodyEl = AbstractElement.detachedBodyEl)) {
|
1393
|
-
el = detachedBodyEl.dom.all[id];
|
1394
|
-
}
|
1395
|
-
|
1396
|
-
return el;
|
1397
|
-
};
|
1398
|
-
} else if (!DOC.querySelector) {
|
1399
|
-
Ext.getDetachedBody = Ext.getBody;
|
1400
|
-
|
1401
|
-
Ext.getElementById = function (id) {
|
1402
|
-
return DOC.getElementById(id);
|
1403
|
-
};
|
1404
|
-
}
|
1405
|
-
});
|
1406
|
-
|
1407
|
-
}());
|