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,1067 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is code is also distributed under MIT license for use
|
3
|
-
* with jQuery and prototype JavaScript libraries.
|
4
|
-
*/
|
5
|
-
/**
|
6
|
-
* @class Ext.dom.Query
|
7
|
-
* @alternateClassName Ext.DomQuery
|
8
|
-
* @alternateClassName Ext.core.DomQuery
|
9
|
-
* @singleton
|
10
|
-
*
|
11
|
-
* Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes
|
12
|
-
* and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in).
|
13
|
-
*
|
14
|
-
* DomQuery supports most of the [CSS3 selectors spec][1], along with some custom selectors and basic XPath.
|
15
|
-
*
|
16
|
-
* All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example
|
17
|
-
* `div.foo:nth-child(odd)[@foo=bar].bar:first` would be a perfectly valid selector. Node filters are processed
|
18
|
-
* in the order in which they appear, which allows you to optimize your queries for your document structure.
|
19
|
-
*
|
20
|
-
* ## Element Selectors:
|
21
|
-
*
|
22
|
-
* - **`*`** any element
|
23
|
-
* - **`E`** an element with the tag E
|
24
|
-
* - **`E F`** All descendent elements of E that have the tag F
|
25
|
-
* - **`E > F`** or **E/F** all direct children elements of E that have the tag F
|
26
|
-
* - **`E + F`** all elements with the tag F that are immediately preceded by an element with the tag E
|
27
|
-
* - **`E ~ F`** all elements with the tag F that are preceded by a sibling element with the tag E
|
28
|
-
*
|
29
|
-
* ## Attribute Selectors:
|
30
|
-
*
|
31
|
-
* The use of `@` and quotes are optional. For example, `div[@foo='bar']` is also a valid attribute selector.
|
32
|
-
*
|
33
|
-
* - **`E[foo]`** has an attribute "foo"
|
34
|
-
* - **`E[foo=bar]`** has an attribute "foo" that equals "bar"
|
35
|
-
* - **`E[foo^=bar]`** has an attribute "foo" that starts with "bar"
|
36
|
-
* - **`E[foo$=bar]`** has an attribute "foo" that ends with "bar"
|
37
|
-
* - **`E[foo*=bar]`** has an attribute "foo" that contains the substring "bar"
|
38
|
-
* - **`E[foo%=2]`** has an attribute "foo" that is evenly divisible by 2
|
39
|
-
* - **`E[foo!=bar]`** attribute "foo" does not equal "bar"
|
40
|
-
*
|
41
|
-
* ## Pseudo Classes:
|
42
|
-
*
|
43
|
-
* - **`E:first-child`** E is the first child of its parent
|
44
|
-
* - **`E:last-child`** E is the last child of its parent
|
45
|
-
* - **`E:nth-child(_n_)`** E is the _n_th child of its parent (1 based as per the spec)
|
46
|
-
* - **`E:nth-child(odd)`** E is an odd child of its parent
|
47
|
-
* - **`E:nth-child(even)`** E is an even child of its parent
|
48
|
-
* - **`E:only-child`** E is the only child of its parent
|
49
|
-
* - **`E:checked`** E is an element that is has a checked attribute that is true (e.g. a radio or checkbox)
|
50
|
-
* - **`E:first`** the first E in the resultset
|
51
|
-
* - **`E:last`** the last E in the resultset
|
52
|
-
* - **`E:nth(_n_)`** the _n_th E in the resultset (1 based)
|
53
|
-
* - **`E:odd`** shortcut for :nth-child(odd)
|
54
|
-
* - **`E:even`** shortcut for :nth-child(even)
|
55
|
-
* - **`E:contains(foo)`** E's innerHTML contains the substring "foo"
|
56
|
-
* - **`E:nodeValue(foo)`** E contains a textNode with a nodeValue that equals "foo"
|
57
|
-
* - **`E:not(S)`** an E element that does not match simple selector S
|
58
|
-
* - **`E:has(S)`** an E element that has a descendent that matches simple selector S
|
59
|
-
* - **`E:next(S)`** an E element whose next sibling matches simple selector S
|
60
|
-
* - **`E:prev(S)`** an E element whose previous sibling matches simple selector S
|
61
|
-
* - **`E:any(S1|S2|S2)`** an E element which matches any of the simple selectors S1, S2 or S3
|
62
|
-
*
|
63
|
-
* ## CSS Value Selectors:
|
64
|
-
*
|
65
|
-
* - **`E{display=none}`** css value "display" that equals "none"
|
66
|
-
* - **`E{display^=none}`** css value "display" that starts with "none"
|
67
|
-
* - **`E{display$=none}`** css value "display" that ends with "none"
|
68
|
-
* - **`E{display*=none}`** css value "display" that contains the substring "none"
|
69
|
-
* - **`E{display%=2}`** css value "display" that is evenly divisible by 2
|
70
|
-
* - **`E{display!=none}`** css value "display" that does not equal "none"
|
71
|
-
*
|
72
|
-
* [1]: http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#selectors
|
73
|
-
*/
|
74
|
-
Ext.ns('Ext.core');
|
75
|
-
|
76
|
-
Ext.dom.Query = Ext.core.DomQuery = Ext.DomQuery = (function(){
|
77
|
-
var cache = {},
|
78
|
-
simpleCache = {},
|
79
|
-
valueCache = {},
|
80
|
-
nonSpace = /\S/,
|
81
|
-
trimRe = /^\s+|\s+$/g,
|
82
|
-
tplRe = /\{(\d+)\}/g,
|
83
|
-
modeRe = /^(\s?[\/>+~]\s?|\s|$)/,
|
84
|
-
tagTokenRe = /^(#)?([\w\-\*\\]+)/,
|
85
|
-
nthRe = /(\d*)n\+?(\d*)/,
|
86
|
-
nthRe2 = /\D/,
|
87
|
-
startIdRe = /^\s*\#/,
|
88
|
-
// This is for IE MSXML which does not support expandos.
|
89
|
-
// IE runs the same speed using setAttribute, however FF slows way down
|
90
|
-
// and Safari completely fails so they need to continue to use expandos.
|
91
|
-
isIE = window.ActiveXObject ? true : false,
|
92
|
-
key = 30803,
|
93
|
-
longHex = /\\([0-9a-fA-F]{6})/g,
|
94
|
-
shortHex = /\\([0-9a-fA-F]{1,6})\s{0,1}/g,
|
95
|
-
nonHex = /\\([^0-9a-fA-F]{1})/g,
|
96
|
-
escapes = /\\/g,
|
97
|
-
num, hasEscapes,
|
98
|
-
|
99
|
-
// replaces a long hex regex match group with the appropriate ascii value
|
100
|
-
// $args indicate regex match pos
|
101
|
-
longHexToChar = function($0, $1) {
|
102
|
-
return String.fromCharCode(parseInt($1, 16));
|
103
|
-
},
|
104
|
-
|
105
|
-
// converts a shortHex regex match to the long form
|
106
|
-
shortToLongHex = function($0, $1) {
|
107
|
-
while ($1.length < 6) {
|
108
|
-
$1 = '0' + $1;
|
109
|
-
}
|
110
|
-
return '\\' + $1;
|
111
|
-
},
|
112
|
-
|
113
|
-
// converts a single char escape to long escape form
|
114
|
-
charToLongHex = function($0, $1) {
|
115
|
-
num = $1.charCodeAt(0).toString(16);
|
116
|
-
if (num.length === 1) {
|
117
|
-
num = '0' + num;
|
118
|
-
}
|
119
|
-
return '\\0000' + num;
|
120
|
-
},
|
121
|
-
|
122
|
-
// Un-escapes an input selector string. Assumes all escape sequences have been
|
123
|
-
// normalized to the css '\\0000##' 6-hex-digit style escape sequence :
|
124
|
-
// will not handle any other escape formats
|
125
|
-
unescapeCssSelector = function (selector) {
|
126
|
-
return (hasEscapes)
|
127
|
-
? selector.replace(longHex, longHexToChar)
|
128
|
-
: selector;
|
129
|
-
};
|
130
|
-
|
131
|
-
// this eval is stop the compressor from
|
132
|
-
// renaming the variable to something shorter
|
133
|
-
eval("var batch = 30803;");
|
134
|
-
|
135
|
-
// Retrieve the child node from a particular
|
136
|
-
// parent at the specified index.
|
137
|
-
function child(parent, index){
|
138
|
-
var i = 0,
|
139
|
-
n = parent.firstChild;
|
140
|
-
while(n){
|
141
|
-
if(n.nodeType == 1){
|
142
|
-
if(++i == index){
|
143
|
-
return n;
|
144
|
-
}
|
145
|
-
}
|
146
|
-
n = n.nextSibling;
|
147
|
-
}
|
148
|
-
return null;
|
149
|
-
}
|
150
|
-
|
151
|
-
// retrieve the next element node
|
152
|
-
function next(n){
|
153
|
-
while((n = n.nextSibling) && n.nodeType != 1);
|
154
|
-
return n;
|
155
|
-
}
|
156
|
-
|
157
|
-
// retrieve the previous element node
|
158
|
-
function prev(n){
|
159
|
-
while((n = n.previousSibling) && n.nodeType != 1);
|
160
|
-
return n;
|
161
|
-
}
|
162
|
-
|
163
|
-
// Mark each child node with a nodeIndex skipping and
|
164
|
-
// removing empty text nodes.
|
165
|
-
function children(parent){
|
166
|
-
var n = parent.firstChild,
|
167
|
-
nodeIndex = -1,
|
168
|
-
nextNode;
|
169
|
-
while(n){
|
170
|
-
nextNode = n.nextSibling;
|
171
|
-
// clean worthless empty nodes.
|
172
|
-
if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){
|
173
|
-
parent.removeChild(n);
|
174
|
-
}else{
|
175
|
-
// add an expando nodeIndex
|
176
|
-
n.nodeIndex = ++nodeIndex;
|
177
|
-
}
|
178
|
-
n = nextNode;
|
179
|
-
}
|
180
|
-
return this;
|
181
|
-
}
|
182
|
-
|
183
|
-
// nodeSet - array of nodes
|
184
|
-
// cls - CSS Class
|
185
|
-
function byClassName(nodeSet, cls){
|
186
|
-
cls = unescapeCssSelector(cls);
|
187
|
-
if(!cls){
|
188
|
-
return nodeSet;
|
189
|
-
}
|
190
|
-
var result = [], ri = -1,
|
191
|
-
i, ci;
|
192
|
-
for(i = 0, ci; ci = nodeSet[i]; i++){
|
193
|
-
if((' '+ci.className+' ').indexOf(cls) != -1){
|
194
|
-
result[++ri] = ci;
|
195
|
-
}
|
196
|
-
}
|
197
|
-
return result;
|
198
|
-
}
|
199
|
-
|
200
|
-
function attrValue(n, attr){
|
201
|
-
// if its an array, use the first node.
|
202
|
-
if(!n.tagName && typeof n.length != "undefined"){
|
203
|
-
n = n[0];
|
204
|
-
}
|
205
|
-
if(!n){
|
206
|
-
return null;
|
207
|
-
}
|
208
|
-
|
209
|
-
if(attr == "for"){
|
210
|
-
return n.htmlFor;
|
211
|
-
}
|
212
|
-
if(attr == "class" || attr == "className"){
|
213
|
-
return n.className;
|
214
|
-
}
|
215
|
-
return n.getAttribute(attr) || n[attr];
|
216
|
-
|
217
|
-
}
|
218
|
-
|
219
|
-
|
220
|
-
// ns - nodes
|
221
|
-
// mode - false, /, >, +, ~
|
222
|
-
// tagName - defaults to "*"
|
223
|
-
function getNodes(ns, mode, tagName){
|
224
|
-
var result = [], ri = -1, cs,
|
225
|
-
i, ni, j, ci, cn, utag, n, cj;
|
226
|
-
if(!ns){
|
227
|
-
return result;
|
228
|
-
}
|
229
|
-
tagName = tagName || "*";
|
230
|
-
// convert to array
|
231
|
-
if(typeof ns.getElementsByTagName != "undefined"){
|
232
|
-
ns = [ns];
|
233
|
-
}
|
234
|
-
|
235
|
-
// no mode specified, grab all elements by tagName
|
236
|
-
// at any depth
|
237
|
-
if(!mode){
|
238
|
-
for(i = 0, ni; ni = ns[i]; i++){
|
239
|
-
cs = ni.getElementsByTagName(tagName);
|
240
|
-
for(j = 0, ci; ci = cs[j]; j++){
|
241
|
-
result[++ri] = ci;
|
242
|
-
}
|
243
|
-
}
|
244
|
-
// Direct Child mode (/ or >)
|
245
|
-
// E > F or E/F all direct children elements of E that have the tag
|
246
|
-
} else if(mode == "/" || mode == ">"){
|
247
|
-
utag = tagName.toUpperCase();
|
248
|
-
for(i = 0, ni, cn; ni = ns[i]; i++){
|
249
|
-
cn = ni.childNodes;
|
250
|
-
for(j = 0, cj; cj = cn[j]; j++){
|
251
|
-
if(cj.nodeName == utag || cj.nodeName == tagName || tagName == '*'){
|
252
|
-
result[++ri] = cj;
|
253
|
-
}
|
254
|
-
}
|
255
|
-
}
|
256
|
-
// Immediately Preceding mode (+)
|
257
|
-
// E + F all elements with the tag F that are immediately preceded by an element with the tag E
|
258
|
-
}else if(mode == "+"){
|
259
|
-
utag = tagName.toUpperCase();
|
260
|
-
for(i = 0, n; n = ns[i]; i++){
|
261
|
-
while((n = n.nextSibling) && n.nodeType != 1);
|
262
|
-
if(n && (n.nodeName == utag || n.nodeName == tagName || tagName == '*')){
|
263
|
-
result[++ri] = n;
|
264
|
-
}
|
265
|
-
}
|
266
|
-
// Sibling mode (~)
|
267
|
-
// E ~ F all elements with the tag F that are preceded by a sibling element with the tag E
|
268
|
-
}else if(mode == "~"){
|
269
|
-
utag = tagName.toUpperCase();
|
270
|
-
for(i = 0, n; n = ns[i]; i++){
|
271
|
-
while((n = n.nextSibling)){
|
272
|
-
if (n.nodeName == utag || n.nodeName == tagName || tagName == '*'){
|
273
|
-
result[++ri] = n;
|
274
|
-
}
|
275
|
-
}
|
276
|
-
}
|
277
|
-
}
|
278
|
-
return result;
|
279
|
-
}
|
280
|
-
|
281
|
-
function concat(a, b){
|
282
|
-
if(b.slice){
|
283
|
-
return a.concat(b);
|
284
|
-
}
|
285
|
-
for(var i = 0, l = b.length; i < l; i++){
|
286
|
-
a[a.length] = b[i];
|
287
|
-
}
|
288
|
-
return a;
|
289
|
-
}
|
290
|
-
|
291
|
-
function byTag(cs, tagName){
|
292
|
-
if(cs.tagName || cs == document){
|
293
|
-
cs = [cs];
|
294
|
-
}
|
295
|
-
if(!tagName){
|
296
|
-
return cs;
|
297
|
-
}
|
298
|
-
var result = [], ri = -1,
|
299
|
-
i, ci;
|
300
|
-
tagName = tagName.toLowerCase();
|
301
|
-
for(i = 0, ci; ci = cs[i]; i++){
|
302
|
-
if(ci.nodeType == 1 && ci.tagName.toLowerCase() == tagName){
|
303
|
-
result[++ri] = ci;
|
304
|
-
}
|
305
|
-
}
|
306
|
-
return result;
|
307
|
-
}
|
308
|
-
|
309
|
-
function byId(cs, id){
|
310
|
-
id = unescapeCssSelector(id);
|
311
|
-
if(cs.tagName || cs == document){
|
312
|
-
cs = [cs];
|
313
|
-
}
|
314
|
-
if(!id){
|
315
|
-
return cs;
|
316
|
-
}
|
317
|
-
var result = [], ri = -1,
|
318
|
-
i, ci;
|
319
|
-
for(i = 0, ci; ci = cs[i]; i++){
|
320
|
-
if(ci && ci.id == id){
|
321
|
-
result[++ri] = ci;
|
322
|
-
return result;
|
323
|
-
}
|
324
|
-
}
|
325
|
-
return result;
|
326
|
-
}
|
327
|
-
|
328
|
-
// operators are =, !=, ^=, $=, *=, %=, |= and ~=
|
329
|
-
// custom can be "{"
|
330
|
-
function byAttribute(cs, attr, value, op, custom){
|
331
|
-
var result = [],
|
332
|
-
ri = -1,
|
333
|
-
useGetStyle = custom == "{",
|
334
|
-
fn = Ext.DomQuery.operators[op],
|
335
|
-
a,
|
336
|
-
xml,
|
337
|
-
hasXml,
|
338
|
-
i, ci;
|
339
|
-
|
340
|
-
value = unescapeCssSelector(value);
|
341
|
-
|
342
|
-
for(i = 0, ci; ci = cs[i]; i++){
|
343
|
-
// skip non-element nodes.
|
344
|
-
if(ci.nodeType != 1){
|
345
|
-
continue;
|
346
|
-
}
|
347
|
-
// only need to do this for the first node
|
348
|
-
if(!hasXml){
|
349
|
-
xml = Ext.DomQuery.isXml(ci);
|
350
|
-
hasXml = true;
|
351
|
-
}
|
352
|
-
|
353
|
-
// we only need to change the property names if we're dealing with html nodes, not XML
|
354
|
-
if(!xml){
|
355
|
-
if(useGetStyle){
|
356
|
-
a = Ext.DomQuery.getStyle(ci, attr);
|
357
|
-
} else if (attr == "class" || attr == "className"){
|
358
|
-
a = ci.className;
|
359
|
-
} else if (attr == "for"){
|
360
|
-
a = ci.htmlFor;
|
361
|
-
} else if (attr == "href"){
|
362
|
-
// getAttribute href bug
|
363
|
-
// http://www.glennjones.net/Post/809/getAttributehrefbug.htm
|
364
|
-
a = ci.getAttribute("href", 2);
|
365
|
-
} else{
|
366
|
-
a = ci.getAttribute(attr);
|
367
|
-
}
|
368
|
-
}else{
|
369
|
-
a = ci.getAttribute(attr);
|
370
|
-
}
|
371
|
-
if((fn && fn(a, value)) || (!fn && a)){
|
372
|
-
result[++ri] = ci;
|
373
|
-
}
|
374
|
-
}
|
375
|
-
return result;
|
376
|
-
}
|
377
|
-
|
378
|
-
function byPseudo(cs, name, value){
|
379
|
-
value = unescapeCssSelector(value);
|
380
|
-
return Ext.DomQuery.pseudos[name](cs, value);
|
381
|
-
}
|
382
|
-
|
383
|
-
function nodupIEXml(cs){
|
384
|
-
var d = ++key,
|
385
|
-
r,
|
386
|
-
i, len, c;
|
387
|
-
cs[0].setAttribute("_nodup", d);
|
388
|
-
r = [cs[0]];
|
389
|
-
for(i = 1, len = cs.length; i < len; i++){
|
390
|
-
c = cs[i];
|
391
|
-
if(!c.getAttribute("_nodup") != d){
|
392
|
-
c.setAttribute("_nodup", d);
|
393
|
-
r[r.length] = c;
|
394
|
-
}
|
395
|
-
}
|
396
|
-
for(i = 0, len = cs.length; i < len; i++){
|
397
|
-
cs[i].removeAttribute("_nodup");
|
398
|
-
}
|
399
|
-
return r;
|
400
|
-
}
|
401
|
-
|
402
|
-
function nodup(cs){
|
403
|
-
if(!cs){
|
404
|
-
return [];
|
405
|
-
}
|
406
|
-
var len = cs.length, c, i, r = cs, cj, ri = -1, d, j;
|
407
|
-
if(!len || typeof cs.nodeType != "undefined" || len == 1){
|
408
|
-
return cs;
|
409
|
-
}
|
410
|
-
if(isIE && typeof cs[0].selectSingleNode != "undefined"){
|
411
|
-
return nodupIEXml(cs);
|
412
|
-
}
|
413
|
-
d = ++key;
|
414
|
-
cs[0]._nodup = d;
|
415
|
-
for(i = 1; c = cs[i]; i++){
|
416
|
-
if(c._nodup != d){
|
417
|
-
c._nodup = d;
|
418
|
-
}else{
|
419
|
-
r = [];
|
420
|
-
for(j = 0; j < i; j++){
|
421
|
-
r[++ri] = cs[j];
|
422
|
-
}
|
423
|
-
for(j = i+1; cj = cs[j]; j++){
|
424
|
-
if(cj._nodup != d){
|
425
|
-
cj._nodup = d;
|
426
|
-
r[++ri] = cj;
|
427
|
-
}
|
428
|
-
}
|
429
|
-
return r;
|
430
|
-
}
|
431
|
-
}
|
432
|
-
return r;
|
433
|
-
}
|
434
|
-
|
435
|
-
function quickDiffIEXml(c1, c2){
|
436
|
-
var d = ++key,
|
437
|
-
r = [],
|
438
|
-
i, len;
|
439
|
-
for(i = 0, len = c1.length; i < len; i++){
|
440
|
-
c1[i].setAttribute("_qdiff", d);
|
441
|
-
}
|
442
|
-
for(i = 0, len = c2.length; i < len; i++){
|
443
|
-
if(c2[i].getAttribute("_qdiff") != d){
|
444
|
-
r[r.length] = c2[i];
|
445
|
-
}
|
446
|
-
}
|
447
|
-
for(i = 0, len = c1.length; i < len; i++){
|
448
|
-
c1[i].removeAttribute("_qdiff");
|
449
|
-
}
|
450
|
-
return r;
|
451
|
-
}
|
452
|
-
|
453
|
-
function quickDiff(c1, c2){
|
454
|
-
var len1 = c1.length,
|
455
|
-
d = ++key,
|
456
|
-
r = [],
|
457
|
-
i, len;
|
458
|
-
if(!len1){
|
459
|
-
return c2;
|
460
|
-
}
|
461
|
-
if(isIE && typeof c1[0].selectSingleNode != "undefined"){
|
462
|
-
return quickDiffIEXml(c1, c2);
|
463
|
-
}
|
464
|
-
for(i = 0; i < len1; i++){
|
465
|
-
c1[i]._qdiff = d;
|
466
|
-
}
|
467
|
-
for(i = 0, len = c2.length; i < len; i++){
|
468
|
-
if(c2[i]._qdiff != d){
|
469
|
-
r[r.length] = c2[i];
|
470
|
-
}
|
471
|
-
}
|
472
|
-
return r;
|
473
|
-
}
|
474
|
-
|
475
|
-
function quickId(ns, mode, root, id){
|
476
|
-
if(ns == root){
|
477
|
-
id = unescapeCssSelector(id);
|
478
|
-
var d = root.ownerDocument || root;
|
479
|
-
return d.getElementById(id);
|
480
|
-
}
|
481
|
-
ns = getNodes(ns, mode, "*");
|
482
|
-
return byId(ns, id);
|
483
|
-
}
|
484
|
-
|
485
|
-
return {
|
486
|
-
getStyle : function(el, name){
|
487
|
-
return Ext.fly(el).getStyle(name);
|
488
|
-
},
|
489
|
-
/**
|
490
|
-
* Compiles a selector/xpath query into a reusable function. The returned function
|
491
|
-
* takes one parameter "root" (optional), which is the context node from where the query should start.
|
492
|
-
* @param {String} selector The selector/xpath query
|
493
|
-
* @param {String} [type="select"] Either "select" or "simple" for a simple selector match
|
494
|
-
* @return {Function}
|
495
|
-
*/
|
496
|
-
compile : function(path, type){
|
497
|
-
type = type || "select";
|
498
|
-
|
499
|
-
// setup fn preamble
|
500
|
-
var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],
|
501
|
-
mode,
|
502
|
-
lastPath,
|
503
|
-
matchers = Ext.DomQuery.matchers,
|
504
|
-
matchersLn = matchers.length,
|
505
|
-
modeMatch,
|
506
|
-
// accept leading mode switch
|
507
|
-
lmode = path.match(modeRe),
|
508
|
-
tokenMatch, matched, j, t, m;
|
509
|
-
|
510
|
-
hasEscapes = (path.indexOf('\\') > -1);
|
511
|
-
if (hasEscapes) {
|
512
|
-
path = path
|
513
|
-
.replace(shortHex, shortToLongHex)
|
514
|
-
.replace(nonHex, charToLongHex)
|
515
|
-
.replace(escapes, '\\\\'); // double the '\' for js compilation
|
516
|
-
}
|
517
|
-
|
518
|
-
if(lmode && lmode[1]){
|
519
|
-
fn[fn.length] = 'mode="'+lmode[1].replace(trimRe, "")+'";';
|
520
|
-
path = path.replace(lmode[1], "");
|
521
|
-
}
|
522
|
-
|
523
|
-
// strip leading slashes
|
524
|
-
while(path.substr(0, 1)=="/"){
|
525
|
-
path = path.substr(1);
|
526
|
-
}
|
527
|
-
|
528
|
-
while(path && lastPath != path){
|
529
|
-
lastPath = path;
|
530
|
-
tokenMatch = path.match(tagTokenRe);
|
531
|
-
if(type == "select"){
|
532
|
-
if(tokenMatch){
|
533
|
-
// ID Selector
|
534
|
-
if(tokenMatch[1] == "#"){
|
535
|
-
fn[fn.length] = 'n = quickId(n, mode, root, "'+tokenMatch[2]+'");';
|
536
|
-
}else{
|
537
|
-
fn[fn.length] = 'n = getNodes(n, mode, "'+tokenMatch[2]+'");';
|
538
|
-
}
|
539
|
-
path = path.replace(tokenMatch[0], "");
|
540
|
-
}else if(path.substr(0, 1) != '@'){
|
541
|
-
fn[fn.length] = 'n = getNodes(n, mode, "*");';
|
542
|
-
}
|
543
|
-
// type of "simple"
|
544
|
-
}else{
|
545
|
-
if(tokenMatch){
|
546
|
-
if(tokenMatch[1] == "#"){
|
547
|
-
fn[fn.length] = 'n = byId(n, "'+tokenMatch[2]+'");';
|
548
|
-
}else{
|
549
|
-
fn[fn.length] = 'n = byTag(n, "'+tokenMatch[2]+'");';
|
550
|
-
}
|
551
|
-
path = path.replace(tokenMatch[0], "");
|
552
|
-
}
|
553
|
-
}
|
554
|
-
while(!(modeMatch = path.match(modeRe))){
|
555
|
-
matched = false;
|
556
|
-
for(j = 0; j < matchersLn; j++){
|
557
|
-
t = matchers[j];
|
558
|
-
m = path.match(t.re);
|
559
|
-
if(m){
|
560
|
-
fn[fn.length] = t.select.replace(tplRe, function(x, i){
|
561
|
-
return m[i];
|
562
|
-
});
|
563
|
-
path = path.replace(m[0], "");
|
564
|
-
matched = true;
|
565
|
-
break;
|
566
|
-
}
|
567
|
-
}
|
568
|
-
// prevent infinite loop on bad selector
|
569
|
-
if(!matched){
|
570
|
-
Ext.Error.raise({
|
571
|
-
sourceClass: 'Ext.DomQuery',
|
572
|
-
sourceMethod: 'compile',
|
573
|
-
msg: 'Error parsing selector. Parsing failed at "' + path + '"'
|
574
|
-
});
|
575
|
-
}
|
576
|
-
}
|
577
|
-
if(modeMatch[1]){
|
578
|
-
fn[fn.length] = 'mode="'+modeMatch[1].replace(trimRe, "")+'";';
|
579
|
-
path = path.replace(modeMatch[1], "");
|
580
|
-
}
|
581
|
-
}
|
582
|
-
// close fn out
|
583
|
-
fn[fn.length] = "return nodup(n);\n}";
|
584
|
-
|
585
|
-
// eval fn and return it
|
586
|
-
eval(fn.join(""));
|
587
|
-
return f;
|
588
|
-
},
|
589
|
-
|
590
|
-
/**
|
591
|
-
* Selects an array of DOM nodes using JavaScript-only implementation.
|
592
|
-
*
|
593
|
-
* Use {@link #select} to take advantage of browsers built-in support for CSS selectors.
|
594
|
-
* @param {String} selector The selector/xpath query (can be a comma separated list of selectors)
|
595
|
-
* @param {HTMLElement/String} [root=document] The start of the query.
|
596
|
-
* @return {HTMLElement[]} An Array of DOM elements which match the selector. If there are
|
597
|
-
* no matches, and empty Array is returned.
|
598
|
-
*/
|
599
|
-
jsSelect: function(path, root, type){
|
600
|
-
// set root to doc if not specified.
|
601
|
-
root = root || document;
|
602
|
-
|
603
|
-
if(typeof root == "string"){
|
604
|
-
root = document.getElementById(root);
|
605
|
-
}
|
606
|
-
var paths = path.split(","),
|
607
|
-
results = [],
|
608
|
-
i, len, subPath, result;
|
609
|
-
|
610
|
-
// loop over each selector
|
611
|
-
for(i = 0, len = paths.length; i < len; i++){
|
612
|
-
subPath = paths[i].replace(trimRe, "");
|
613
|
-
// compile and place in cache
|
614
|
-
if(!cache[subPath]){
|
615
|
-
cache[subPath] = Ext.DomQuery.compile(subPath, type);
|
616
|
-
if(!cache[subPath]){
|
617
|
-
Ext.Error.raise({
|
618
|
-
sourceClass: 'Ext.DomQuery',
|
619
|
-
sourceMethod: 'jsSelect',
|
620
|
-
msg: subPath + ' is not a valid selector'
|
621
|
-
});
|
622
|
-
}
|
623
|
-
}
|
624
|
-
result = cache[subPath](root);
|
625
|
-
if(result && result != document){
|
626
|
-
results = results.concat(result);
|
627
|
-
}
|
628
|
-
}
|
629
|
-
|
630
|
-
// if there were multiple selectors, make sure dups
|
631
|
-
// are eliminated
|
632
|
-
if(paths.length > 1){
|
633
|
-
return nodup(results);
|
634
|
-
}
|
635
|
-
return results;
|
636
|
-
},
|
637
|
-
|
638
|
-
isXml: function(el) {
|
639
|
-
var docEl = (el ? el.ownerDocument || el : 0).documentElement;
|
640
|
-
return docEl ? docEl.nodeName !== "HTML" : false;
|
641
|
-
},
|
642
|
-
|
643
|
-
/**
|
644
|
-
* Selects an array of DOM nodes by CSS/XPath selector.
|
645
|
-
*
|
646
|
-
* Uses [document.querySelectorAll][0] if browser supports that, otherwise falls back to
|
647
|
-
* {@link Ext.dom.Query#jsSelect} to do the work.
|
648
|
-
*
|
649
|
-
* Aliased as {@link Ext#query}.
|
650
|
-
*
|
651
|
-
* [0]: https://developer.mozilla.org/en/DOM/document.querySelectorAll
|
652
|
-
*
|
653
|
-
* @param {String} path The selector/xpath query
|
654
|
-
* @param {HTMLElement} [root=document] The start of the query.
|
655
|
-
* @return {HTMLElement[]} An array of DOM elements (not a NodeList as returned by `querySelectorAll`).
|
656
|
-
* @param {String} [type="select"] Either "select" or "simple" for a simple selector match (only valid when
|
657
|
-
* used when the call is deferred to the jsSelect method)
|
658
|
-
* @method
|
659
|
-
*/
|
660
|
-
select : document.querySelectorAll ? function(path, root, type) {
|
661
|
-
root = root || document;
|
662
|
-
if (!Ext.DomQuery.isXml(root)) {
|
663
|
-
try {
|
664
|
-
/*
|
665
|
-
* This checking here is to "fix" the behaviour of querySelectorAll
|
666
|
-
* for non root document queries. The way qsa works is intentional,
|
667
|
-
* however it's definitely not the expected way it should work.
|
668
|
-
* When descendant selectors are used, only the lowest selector must be inside the root!
|
669
|
-
* More info: http://ejohn.org/blog/thoughts-on-queryselectorall/
|
670
|
-
* So we create a descendant selector by prepending the root's ID, and query the parent node.
|
671
|
-
* UNLESS the root has no parent in which qsa will work perfectly.
|
672
|
-
*
|
673
|
-
* We only modify the path for single selectors (ie, no multiples),
|
674
|
-
* without a full parser it makes it difficult to do this correctly.
|
675
|
-
*/
|
676
|
-
if (root.parentNode && (root.nodeType !== 9) && path.indexOf(',') === -1 && !startIdRe.test(path)) {
|
677
|
-
path = '#' + Ext.escapeId(Ext.id(root)) + ' ' + path;
|
678
|
-
root = root.parentNode;
|
679
|
-
}
|
680
|
-
return Ext.Array.toArray(root.querySelectorAll(path));
|
681
|
-
}
|
682
|
-
catch (e) {
|
683
|
-
}
|
684
|
-
}
|
685
|
-
return Ext.DomQuery.jsSelect.call(this, path, root, type);
|
686
|
-
} : function(path, root, type) {
|
687
|
-
return Ext.DomQuery.jsSelect.call(this, path, root, type);
|
688
|
-
},
|
689
|
-
|
690
|
-
/**
|
691
|
-
* Selects a single element.
|
692
|
-
* @param {String} selector The selector/xpath query
|
693
|
-
* @param {HTMLElement} [root=document] The start of the query.
|
694
|
-
* @return {HTMLElement} The DOM element which matched the selector.
|
695
|
-
*/
|
696
|
-
selectNode : function(path, root){
|
697
|
-
return Ext.DomQuery.select(path, root)[0];
|
698
|
-
},
|
699
|
-
|
700
|
-
/**
|
701
|
-
* Selects the value of a node, optionally replacing null with the defaultValue.
|
702
|
-
* @param {String} selector The selector/xpath query
|
703
|
-
* @param {HTMLElement} [root=document] The start of the query.
|
704
|
-
* @param {String} [defaultValue] When specified, this is return as empty value.
|
705
|
-
* @return {String}
|
706
|
-
*/
|
707
|
-
selectValue : function(path, root, defaultValue){
|
708
|
-
path = path.replace(trimRe, "");
|
709
|
-
if(!valueCache[path]){
|
710
|
-
valueCache[path] = Ext.DomQuery.compile(path, "select");
|
711
|
-
}
|
712
|
-
var n = valueCache[path](root), v;
|
713
|
-
n = n[0] ? n[0] : n;
|
714
|
-
|
715
|
-
// overcome a limitation of maximum textnode size
|
716
|
-
// Rumored to potentially crash IE6 but has not been confirmed.
|
717
|
-
// http://reference.sitepoint.com/javascript/Node/normalize
|
718
|
-
// https://developer.mozilla.org/En/DOM/Node.normalize
|
719
|
-
if (typeof n.normalize == 'function') {
|
720
|
-
n.normalize();
|
721
|
-
}
|
722
|
-
|
723
|
-
v = (n && n.firstChild ? n.firstChild.nodeValue : null);
|
724
|
-
return ((v === null||v === undefined||v==='') ? defaultValue : v);
|
725
|
-
},
|
726
|
-
|
727
|
-
/**
|
728
|
-
* Selects the value of a node, parsing integers and floats.
|
729
|
-
* Returns the defaultValue, or 0 if none is specified.
|
730
|
-
* @param {String} selector The selector/xpath query
|
731
|
-
* @param {HTMLElement} [root=document] The start of the query.
|
732
|
-
* @param {Number} [defaultValue] When specified, this is return as empty value.
|
733
|
-
* @return {Number}
|
734
|
-
*/
|
735
|
-
selectNumber : function(path, root, defaultValue){
|
736
|
-
var v = Ext.DomQuery.selectValue(path, root, defaultValue || 0);
|
737
|
-
return parseFloat(v);
|
738
|
-
},
|
739
|
-
|
740
|
-
/**
|
741
|
-
* Returns true if the passed element(s) match the passed simple selector
|
742
|
-
* (e.g. `div.some-class` or `span:first-child`)
|
743
|
-
* @param {String/HTMLElement/HTMLElement[]} el An element id, element or array of elements
|
744
|
-
* @param {String} selector The simple selector to test
|
745
|
-
* @return {Boolean}
|
746
|
-
*/
|
747
|
-
is : function(el, ss){
|
748
|
-
if(typeof el == "string"){
|
749
|
-
el = document.getElementById(el);
|
750
|
-
}
|
751
|
-
var isArray = Ext.isArray(el),
|
752
|
-
result = Ext.DomQuery.filter(isArray ? el : [el], ss);
|
753
|
-
return isArray ? (result.length == el.length) : (result.length > 0);
|
754
|
-
},
|
755
|
-
|
756
|
-
/**
|
757
|
-
* Filters an array of elements to only include matches of a simple selector
|
758
|
-
* (e.g. `div.some-class` or `span:first-child`)
|
759
|
-
* @param {HTMLElement[]} el An array of elements to filter
|
760
|
-
* @param {String} selector The simple selector to test
|
761
|
-
* @param {Boolean} nonMatches If true, it returns the elements that DON'T match the selector instead of the
|
762
|
-
* ones that match
|
763
|
-
* @return {HTMLElement[]} An Array of DOM elements which match the selector. If there are no matches, and empty
|
764
|
-
* Array is returned.
|
765
|
-
*/
|
766
|
-
filter : function(els, ss, nonMatches){
|
767
|
-
ss = ss.replace(trimRe, "");
|
768
|
-
if(!simpleCache[ss]){
|
769
|
-
simpleCache[ss] = Ext.DomQuery.compile(ss, "simple");
|
770
|
-
}
|
771
|
-
var result = simpleCache[ss](els);
|
772
|
-
return nonMatches ? quickDiff(result, els) : result;
|
773
|
-
},
|
774
|
-
|
775
|
-
/**
|
776
|
-
* Collection of matching regular expressions and code snippets.
|
777
|
-
* Each capture group within `()` will be replace the `{}` in the select
|
778
|
-
* statement as specified by their index.
|
779
|
-
*/
|
780
|
-
matchers : [{
|
781
|
-
re: /^\.([\w\-\\]+)/,
|
782
|
-
select: 'n = byClassName(n, " {1} ");'
|
783
|
-
}, {
|
784
|
-
re: /^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,
|
785
|
-
select: 'n = byPseudo(n, "{1}", "{2}");'
|
786
|
-
},{
|
787
|
-
re: /^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,
|
788
|
-
select: 'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'
|
789
|
-
}, {
|
790
|
-
re: /^#([\w\-\\]+)/,
|
791
|
-
select: 'n = byId(n, "{1}");'
|
792
|
-
},{
|
793
|
-
re: /^@([\w\-]+)/,
|
794
|
-
select: 'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'
|
795
|
-
}
|
796
|
-
],
|
797
|
-
|
798
|
-
/**
|
799
|
-
* Collection of operator comparison functions.
|
800
|
-
* The default operators are `=`, `!=`, `^=`, `$=`, `*=`, `%=`, `|=` and `~=`.
|
801
|
-
* New operators can be added as long as the match the format *c*`=` where *c*
|
802
|
-
* is any character other than space, `>`, or `<`.
|
803
|
-
*/
|
804
|
-
operators : {
|
805
|
-
"=" : function(a, v){
|
806
|
-
return a == v;
|
807
|
-
},
|
808
|
-
"!=" : function(a, v){
|
809
|
-
return a != v;
|
810
|
-
},
|
811
|
-
"^=" : function(a, v){
|
812
|
-
return a && a.substr(0, v.length) == v;
|
813
|
-
},
|
814
|
-
"$=" : function(a, v){
|
815
|
-
return a && a.substr(a.length-v.length) == v;
|
816
|
-
},
|
817
|
-
"*=" : function(a, v){
|
818
|
-
return a && a.indexOf(v) !== -1;
|
819
|
-
},
|
820
|
-
"%=" : function(a, v){
|
821
|
-
return (a % v) == 0;
|
822
|
-
},
|
823
|
-
"|=" : function(a, v){
|
824
|
-
return a && (a == v || a.substr(0, v.length+1) == v+'-');
|
825
|
-
},
|
826
|
-
"~=" : function(a, v){
|
827
|
-
return a && (' '+a+' ').indexOf(' '+v+' ') != -1;
|
828
|
-
}
|
829
|
-
},
|
830
|
-
|
831
|
-
/**
|
832
|
-
* Object hash of "pseudo class" filter functions which are used when filtering selections.
|
833
|
-
* Each function is passed two parameters:
|
834
|
-
*
|
835
|
-
* - **c** : Array
|
836
|
-
* An Array of DOM elements to filter.
|
837
|
-
*
|
838
|
-
* - **v** : String
|
839
|
-
* The argument (if any) supplied in the selector.
|
840
|
-
*
|
841
|
-
* A filter function returns an Array of DOM elements which conform to the pseudo class.
|
842
|
-
* In addition to the provided pseudo classes listed above such as `first-child` and `nth-child`,
|
843
|
-
* developers may add additional, custom psuedo class filters to select elements according to application-specific requirements.
|
844
|
-
*
|
845
|
-
* For example, to filter `a` elements to only return links to __external__ resources:
|
846
|
-
*
|
847
|
-
* Ext.DomQuery.pseudos.external = function(c, v){
|
848
|
-
* var r = [], ri = -1;
|
849
|
-
* for(var i = 0, ci; ci = c[i]; i++){
|
850
|
-
* // Include in result set only if it's a link to an external resource
|
851
|
-
* if(ci.hostname != location.hostname){
|
852
|
-
* r[++ri] = ci;
|
853
|
-
* }
|
854
|
-
* }
|
855
|
-
* return r;
|
856
|
-
* };
|
857
|
-
*
|
858
|
-
* Then external links could be gathered with the following statement:
|
859
|
-
*
|
860
|
-
* var externalLinks = Ext.select("a:external");
|
861
|
-
*/
|
862
|
-
pseudos : {
|
863
|
-
"first-child" : function(c){
|
864
|
-
var r = [], ri = -1, n,
|
865
|
-
i, ci;
|
866
|
-
for(i = 0; (ci = n = c[i]); i++){
|
867
|
-
while((n = n.previousSibling) && n.nodeType != 1);
|
868
|
-
if(!n){
|
869
|
-
r[++ri] = ci;
|
870
|
-
}
|
871
|
-
}
|
872
|
-
return r;
|
873
|
-
},
|
874
|
-
|
875
|
-
"last-child" : function(c){
|
876
|
-
var r = [], ri = -1, n,
|
877
|
-
i, ci;
|
878
|
-
for(i = 0; (ci = n = c[i]); i++){
|
879
|
-
while((n = n.nextSibling) && n.nodeType != 1);
|
880
|
-
if(!n){
|
881
|
-
r[++ri] = ci;
|
882
|
-
}
|
883
|
-
}
|
884
|
-
return r;
|
885
|
-
},
|
886
|
-
|
887
|
-
"nth-child" : function(c, a) {
|
888
|
-
var r = [], ri = -1,
|
889
|
-
m = nthRe.exec(a == "even" && "2n" || a == "odd" && "2n+1" || !nthRe2.test(a) && "n+" + a || a),
|
890
|
-
f = (m[1] || 1) - 0, l = m[2] - 0,
|
891
|
-
i, n, j, cn, pn;
|
892
|
-
for(i = 0; n = c[i]; i++){
|
893
|
-
pn = n.parentNode;
|
894
|
-
if (batch != pn._batch) {
|
895
|
-
j = 0;
|
896
|
-
for(cn = pn.firstChild; cn; cn = cn.nextSibling){
|
897
|
-
if(cn.nodeType == 1){
|
898
|
-
cn.nodeIndex = ++j;
|
899
|
-
}
|
900
|
-
}
|
901
|
-
pn._batch = batch;
|
902
|
-
}
|
903
|
-
if (f == 1) {
|
904
|
-
if (l == 0 || n.nodeIndex == l){
|
905
|
-
r[++ri] = n;
|
906
|
-
}
|
907
|
-
} else if ((n.nodeIndex + l) % f == 0){
|
908
|
-
r[++ri] = n;
|
909
|
-
}
|
910
|
-
}
|
911
|
-
|
912
|
-
return r;
|
913
|
-
},
|
914
|
-
|
915
|
-
"only-child" : function(c){
|
916
|
-
var r = [], ri = -1,
|
917
|
-
i, ci;
|
918
|
-
for(i = 0; ci = c[i]; i++){
|
919
|
-
if(!prev(ci) && !next(ci)){
|
920
|
-
r[++ri] = ci;
|
921
|
-
}
|
922
|
-
}
|
923
|
-
return r;
|
924
|
-
},
|
925
|
-
|
926
|
-
"empty" : function(c){
|
927
|
-
var r = [], ri = -1,
|
928
|
-
i, ci, cns, j, cn, empty;
|
929
|
-
for(i = 0, ci; ci = c[i]; i++){
|
930
|
-
cns = ci.childNodes;
|
931
|
-
j = 0;
|
932
|
-
empty = true;
|
933
|
-
while(cn = cns[j]){
|
934
|
-
++j;
|
935
|
-
if(cn.nodeType == 1 || cn.nodeType == 3){
|
936
|
-
empty = false;
|
937
|
-
break;
|
938
|
-
}
|
939
|
-
}
|
940
|
-
if(empty){
|
941
|
-
r[++ri] = ci;
|
942
|
-
}
|
943
|
-
}
|
944
|
-
return r;
|
945
|
-
},
|
946
|
-
|
947
|
-
"contains" : function(c, v){
|
948
|
-
var r = [], ri = -1,
|
949
|
-
i, ci;
|
950
|
-
for(i = 0; ci = c[i]; i++){
|
951
|
-
if((ci.textContent||ci.innerText||ci.text||'').indexOf(v) != -1){
|
952
|
-
r[++ri] = ci;
|
953
|
-
}
|
954
|
-
}
|
955
|
-
return r;
|
956
|
-
},
|
957
|
-
|
958
|
-
"nodeValue" : function(c, v){
|
959
|
-
var r = [], ri = -1,
|
960
|
-
i, ci;
|
961
|
-
for(i = 0; ci = c[i]; i++){
|
962
|
-
if(ci.firstChild && ci.firstChild.nodeValue == v){
|
963
|
-
r[++ri] = ci;
|
964
|
-
}
|
965
|
-
}
|
966
|
-
return r;
|
967
|
-
},
|
968
|
-
|
969
|
-
"checked" : function(c){
|
970
|
-
var r = [], ri = -1,
|
971
|
-
i, ci;
|
972
|
-
for(i = 0; ci = c[i]; i++){
|
973
|
-
if(ci.checked == true){
|
974
|
-
r[++ri] = ci;
|
975
|
-
}
|
976
|
-
}
|
977
|
-
return r;
|
978
|
-
},
|
979
|
-
|
980
|
-
"not" : function(c, ss){
|
981
|
-
return Ext.DomQuery.filter(c, ss, true);
|
982
|
-
},
|
983
|
-
|
984
|
-
"any" : function(c, selectors){
|
985
|
-
var ss = selectors.split('|'),
|
986
|
-
r = [], ri = -1, s,
|
987
|
-
i, ci, j;
|
988
|
-
for(i = 0; ci = c[i]; i++){
|
989
|
-
for(j = 0; s = ss[j]; j++){
|
990
|
-
if(Ext.DomQuery.is(ci, s)){
|
991
|
-
r[++ri] = ci;
|
992
|
-
break;
|
993
|
-
}
|
994
|
-
}
|
995
|
-
}
|
996
|
-
return r;
|
997
|
-
},
|
998
|
-
|
999
|
-
"odd" : function(c){
|
1000
|
-
return this["nth-child"](c, "odd");
|
1001
|
-
},
|
1002
|
-
|
1003
|
-
"even" : function(c){
|
1004
|
-
return this["nth-child"](c, "even");
|
1005
|
-
},
|
1006
|
-
|
1007
|
-
"nth" : function(c, a){
|
1008
|
-
return c[a-1] || [];
|
1009
|
-
},
|
1010
|
-
|
1011
|
-
"first" : function(c){
|
1012
|
-
return c[0] || [];
|
1013
|
-
},
|
1014
|
-
|
1015
|
-
"last" : function(c){
|
1016
|
-
return c[c.length-1] || [];
|
1017
|
-
},
|
1018
|
-
|
1019
|
-
"has" : function(c, ss){
|
1020
|
-
var s = Ext.DomQuery.select,
|
1021
|
-
r = [], ri = -1,
|
1022
|
-
i, ci;
|
1023
|
-
for(i = 0; ci = c[i]; i++){
|
1024
|
-
if(s(ss, ci).length > 0){
|
1025
|
-
r[++ri] = ci;
|
1026
|
-
}
|
1027
|
-
}
|
1028
|
-
return r;
|
1029
|
-
},
|
1030
|
-
|
1031
|
-
"next" : function(c, ss){
|
1032
|
-
var is = Ext.DomQuery.is,
|
1033
|
-
r = [], ri = -1,
|
1034
|
-
i, ci, n;
|
1035
|
-
for(i = 0; ci = c[i]; i++){
|
1036
|
-
n = next(ci);
|
1037
|
-
if(n && is(n, ss)){
|
1038
|
-
r[++ri] = ci;
|
1039
|
-
}
|
1040
|
-
}
|
1041
|
-
return r;
|
1042
|
-
},
|
1043
|
-
|
1044
|
-
"prev" : function(c, ss){
|
1045
|
-
var is = Ext.DomQuery.is,
|
1046
|
-
r = [], ri = -1,
|
1047
|
-
i, ci, n;
|
1048
|
-
for(i = 0; ci = c[i]; i++){
|
1049
|
-
n = prev(ci);
|
1050
|
-
if(n && is(n, ss)){
|
1051
|
-
r[++ri] = ci;
|
1052
|
-
}
|
1053
|
-
}
|
1054
|
-
return r;
|
1055
|
-
}
|
1056
|
-
}
|
1057
|
-
};
|
1058
|
-
}());
|
1059
|
-
|
1060
|
-
/**
|
1061
|
-
* Shorthand of {@link Ext.dom.Query#select}
|
1062
|
-
* @member Ext
|
1063
|
-
* @method query
|
1064
|
-
* @inheritdoc Ext.dom.Query#select
|
1065
|
-
*/
|
1066
|
-
Ext.query = Ext.DomQuery.select;
|
1067
|
-
|