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,253 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @class Ext.chart.theme.Theme
|
3
|
-
*
|
4
|
-
* Provides chart theming.
|
5
|
-
*
|
6
|
-
* Used as mixins by Ext.chart.Chart.
|
7
|
-
*/
|
8
|
-
Ext.define('Ext.chart.theme.Theme', {
|
9
|
-
|
10
|
-
/* Begin Definitions */
|
11
|
-
|
12
|
-
requires: ['Ext.draw.Color'],
|
13
|
-
|
14
|
-
/* End Definitions */
|
15
|
-
|
16
|
-
theme: 'Base',
|
17
|
-
themeAttrs: false,
|
18
|
-
|
19
|
-
initTheme: function(theme) {
|
20
|
-
var me = this,
|
21
|
-
themes = Ext.chart.theme,
|
22
|
-
key, gradients;
|
23
|
-
if (theme) {
|
24
|
-
theme = theme.split(':');
|
25
|
-
for (key in themes) {
|
26
|
-
if (key == theme[0]) {
|
27
|
-
gradients = theme[1] == 'gradients';
|
28
|
-
me.themeAttrs = new themes[key]({
|
29
|
-
useGradients: gradients
|
30
|
-
});
|
31
|
-
if (gradients) {
|
32
|
-
me.gradients = me.themeAttrs.gradients;
|
33
|
-
}
|
34
|
-
if (me.themeAttrs.background) {
|
35
|
-
me.background = me.themeAttrs.background;
|
36
|
-
}
|
37
|
-
return;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
//<debug>
|
41
|
-
Ext.Error.raise('No theme found named "' + theme + '"');
|
42
|
-
//</debug>
|
43
|
-
}
|
44
|
-
}
|
45
|
-
},
|
46
|
-
// This callback is executed right after when the class is created. This scope refers to the newly created class itself
|
47
|
-
function() {
|
48
|
-
/* Theme constructor: takes either a complex object with styles like:
|
49
|
-
|
50
|
-
{
|
51
|
-
axis: {
|
52
|
-
fill: '#000',
|
53
|
-
'stroke-width': 1
|
54
|
-
},
|
55
|
-
axisLabelTop: {
|
56
|
-
fill: '#000',
|
57
|
-
font: '11px Arial'
|
58
|
-
},
|
59
|
-
axisLabelLeft: {
|
60
|
-
fill: '#000',
|
61
|
-
font: '11px Arial'
|
62
|
-
},
|
63
|
-
axisLabelRight: {
|
64
|
-
fill: '#000',
|
65
|
-
font: '11px Arial'
|
66
|
-
},
|
67
|
-
axisLabelBottom: {
|
68
|
-
fill: '#000',
|
69
|
-
font: '11px Arial'
|
70
|
-
},
|
71
|
-
axisTitleTop: {
|
72
|
-
fill: '#000',
|
73
|
-
font: '11px Arial'
|
74
|
-
},
|
75
|
-
axisTitleLeft: {
|
76
|
-
fill: '#000',
|
77
|
-
font: '11px Arial'
|
78
|
-
},
|
79
|
-
axisTitleRight: {
|
80
|
-
fill: '#000',
|
81
|
-
font: '11px Arial'
|
82
|
-
},
|
83
|
-
axisTitleBottom: {
|
84
|
-
fill: '#000',
|
85
|
-
font: '11px Arial'
|
86
|
-
},
|
87
|
-
series: {
|
88
|
-
'stroke-width': 1
|
89
|
-
},
|
90
|
-
seriesLabel: {
|
91
|
-
font: '12px Arial',
|
92
|
-
fill: '#333'
|
93
|
-
},
|
94
|
-
marker: {
|
95
|
-
stroke: '#555',
|
96
|
-
fill: '#000',
|
97
|
-
radius: 3,
|
98
|
-
size: 3
|
99
|
-
},
|
100
|
-
seriesThemes: [{
|
101
|
-
fill: '#C6DBEF'
|
102
|
-
}, {
|
103
|
-
fill: '#9ECAE1'
|
104
|
-
}, {
|
105
|
-
fill: '#6BAED6'
|
106
|
-
}, {
|
107
|
-
fill: '#4292C6'
|
108
|
-
}, {
|
109
|
-
fill: '#2171B5'
|
110
|
-
}, {
|
111
|
-
fill: '#084594'
|
112
|
-
}],
|
113
|
-
markerThemes: [{
|
114
|
-
fill: '#084594',
|
115
|
-
type: 'circle'
|
116
|
-
}, {
|
117
|
-
fill: '#2171B5',
|
118
|
-
type: 'cross'
|
119
|
-
}, {
|
120
|
-
fill: '#4292C6',
|
121
|
-
type: 'plus'
|
122
|
-
}]
|
123
|
-
}
|
124
|
-
|
125
|
-
...or also takes just an array of colors and creates the complex object:
|
126
|
-
|
127
|
-
{
|
128
|
-
colors: ['#aaa', '#bcd', '#eee']
|
129
|
-
}
|
130
|
-
|
131
|
-
...or takes just a base color and makes a theme from it
|
132
|
-
|
133
|
-
{
|
134
|
-
baseColor: '#bce'
|
135
|
-
}
|
136
|
-
|
137
|
-
To create a new theme you may add it to the Themes object:
|
138
|
-
|
139
|
-
Ext.chart.theme.MyNewTheme = Ext.extend(Object, {
|
140
|
-
constructor: function(config) {
|
141
|
-
Ext.chart.theme.call(this, config, {
|
142
|
-
baseColor: '#mybasecolor'
|
143
|
-
});
|
144
|
-
}
|
145
|
-
});
|
146
|
-
|
147
|
-
//Proposal:
|
148
|
-
Ext.chart.theme.MyNewTheme = Ext.chart.createTheme('#basecolor');
|
149
|
-
|
150
|
-
...and then to use it provide the name of the theme (as a lower case string) in the chart config.
|
151
|
-
|
152
|
-
{
|
153
|
-
theme: 'mynewtheme'
|
154
|
-
}
|
155
|
-
*/
|
156
|
-
|
157
|
-
(function() {
|
158
|
-
Ext.chart.theme = function(config, base) {
|
159
|
-
config = config || {};
|
160
|
-
var i = 0, d = +new Date(), l, colors, color,
|
161
|
-
seriesThemes, markerThemes,
|
162
|
-
seriesTheme, markerTheme,
|
163
|
-
key, gradients = [],
|
164
|
-
midColor, midL;
|
165
|
-
|
166
|
-
if (config.baseColor) {
|
167
|
-
midColor = Ext.draw.Color.fromString(config.baseColor);
|
168
|
-
midL = midColor.getHSL()[2];
|
169
|
-
if (midL < 0.15) {
|
170
|
-
midColor = midColor.getLighter(0.3);
|
171
|
-
} else if (midL < 0.3) {
|
172
|
-
midColor = midColor.getLighter(0.15);
|
173
|
-
} else if (midL > 0.85) {
|
174
|
-
midColor = midColor.getDarker(0.3);
|
175
|
-
} else if (midL > 0.7) {
|
176
|
-
midColor = midColor.getDarker(0.15);
|
177
|
-
}
|
178
|
-
config.colors = [ midColor.getDarker(0.3).toString(),
|
179
|
-
midColor.getDarker(0.15).toString(),
|
180
|
-
midColor.toString(),
|
181
|
-
midColor.getLighter(0.15).toString(),
|
182
|
-
midColor.getLighter(0.3).toString()];
|
183
|
-
|
184
|
-
delete config.baseColor;
|
185
|
-
}
|
186
|
-
if (config.colors) {
|
187
|
-
colors = config.colors.slice();
|
188
|
-
markerThemes = base.markerThemes;
|
189
|
-
seriesThemes = base.seriesThemes;
|
190
|
-
l = colors.length;
|
191
|
-
base.colors = colors;
|
192
|
-
for (; i < l; i++) {
|
193
|
-
color = colors[i];
|
194
|
-
markerTheme = markerThemes[i] || {};
|
195
|
-
seriesTheme = seriesThemes[i] || {};
|
196
|
-
markerTheme.fill = seriesTheme.fill = markerTheme.stroke = seriesTheme.stroke = color;
|
197
|
-
markerThemes[i] = markerTheme;
|
198
|
-
seriesThemes[i] = seriesTheme;
|
199
|
-
}
|
200
|
-
base.markerThemes = markerThemes.slice(0, l);
|
201
|
-
base.seriesThemes = seriesThemes.slice(0, l);
|
202
|
-
//the user is configuring something in particular (either markers, series or pie slices)
|
203
|
-
}
|
204
|
-
for (key in base) {
|
205
|
-
if (key in config) {
|
206
|
-
if (Ext.isObject(config[key]) && Ext.isObject(base[key])) {
|
207
|
-
Ext.apply(base[key], config[key]);
|
208
|
-
} else {
|
209
|
-
base[key] = config[key];
|
210
|
-
}
|
211
|
-
}
|
212
|
-
}
|
213
|
-
if (config.useGradients) {
|
214
|
-
colors = base.colors || (function () {
|
215
|
-
var ans = [];
|
216
|
-
for (i = 0, seriesThemes = base.seriesThemes, l = seriesThemes.length; i < l; i++) {
|
217
|
-
ans.push(seriesThemes[i].fill || seriesThemes[i].stroke);
|
218
|
-
}
|
219
|
-
return ans;
|
220
|
-
}());
|
221
|
-
for (i = 0, l = colors.length; i < l; i++) {
|
222
|
-
midColor = Ext.draw.Color.fromString(colors[i]);
|
223
|
-
if (midColor) {
|
224
|
-
color = midColor.getDarker(0.1).toString();
|
225
|
-
midColor = midColor.toString();
|
226
|
-
key = 'theme-' + midColor.substr(1) + '-' + color.substr(1) + '-' + d;
|
227
|
-
gradients.push({
|
228
|
-
id: key,
|
229
|
-
angle: 45,
|
230
|
-
stops: {
|
231
|
-
0: {
|
232
|
-
color: midColor.toString()
|
233
|
-
},
|
234
|
-
100: {
|
235
|
-
color: color.toString()
|
236
|
-
}
|
237
|
-
}
|
238
|
-
});
|
239
|
-
colors[i] = 'url(#' + key + ')';
|
240
|
-
}
|
241
|
-
}
|
242
|
-
base.gradients = gradients;
|
243
|
-
base.colors = colors;
|
244
|
-
}
|
245
|
-
/*
|
246
|
-
base.axis = Ext.apply(base.axis || {}, config.axis || {});
|
247
|
-
base.axisLabel = Ext.apply(base.axisLabel || {}, config.axisLabel || {});
|
248
|
-
base.axisTitle = Ext.apply(base.axisTitle || {}, config.axisTitle || {});
|
249
|
-
*/
|
250
|
-
Ext.apply(this, base);
|
251
|
-
};
|
252
|
-
}());
|
253
|
-
});
|
@@ -1,1062 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* An abstract base class which provides shared methods for Containers across the Sencha product line.
|
3
|
-
*
|
4
|
-
* Please refer to sub class's documentation
|
5
|
-
*
|
6
|
-
* @private
|
7
|
-
*/
|
8
|
-
Ext.define('Ext.container.AbstractContainer', {
|
9
|
-
|
10
|
-
/* Begin Definitions */
|
11
|
-
|
12
|
-
extend: 'Ext.Component',
|
13
|
-
|
14
|
-
requires: [
|
15
|
-
'Ext.util.MixedCollection',
|
16
|
-
'Ext.layout.container.Auto',
|
17
|
-
'Ext.ZIndexManager'
|
18
|
-
],
|
19
|
-
|
20
|
-
/* End Definitions */
|
21
|
-
|
22
|
-
renderTpl: '{%this.renderContainer(out,values)%}',
|
23
|
-
|
24
|
-
/**
|
25
|
-
* @cfg {String/Object} layout
|
26
|
-
* **Important**: In order for child items to be correctly sized and
|
27
|
-
* positioned, typically a layout manager **must** be specified through
|
28
|
-
* the `layout` configuration option.
|
29
|
-
*
|
30
|
-
* The sizing and positioning of child {@link #cfg-items} is the responsibility of
|
31
|
-
* the Container's layout manager which creates and manages the type of layout
|
32
|
-
* you have in mind. For example:
|
33
|
-
*
|
34
|
-
* If the {@link #layout} configuration is not explicitly specified for
|
35
|
-
* a general purpose container (e.g. Container or Panel) the
|
36
|
-
* {@link Ext.layout.container.Auto default layout manager} will be used
|
37
|
-
* which does nothing but render child components sequentially into the
|
38
|
-
* Container (no sizing or positioning will be performed in this situation).
|
39
|
-
*
|
40
|
-
* **layout** may be specified as either as an Object or as a String:
|
41
|
-
*
|
42
|
-
* # Specify as an Object
|
43
|
-
*
|
44
|
-
* Example usage:
|
45
|
-
*
|
46
|
-
* layout: {
|
47
|
-
* type: 'vbox',
|
48
|
-
* align: 'left'
|
49
|
-
* }
|
50
|
-
*
|
51
|
-
* - **type**
|
52
|
-
*
|
53
|
-
* The layout type to be used for this container. If not specified,
|
54
|
-
* a default {@link Ext.layout.container.Auto} will be created and used.
|
55
|
-
*
|
56
|
-
* Valid layout <code>type</code> values are:
|
57
|
-
*
|
58
|
-
* - {@link Ext.layout.container.Auto Auto} - **Default**
|
59
|
-
* - {@link Ext.layout.container.Card card}
|
60
|
-
* - {@link Ext.layout.container.Fit fit}
|
61
|
-
* - {@link Ext.layout.container.HBox hbox}
|
62
|
-
* - {@link Ext.layout.container.VBox vbox}
|
63
|
-
* - {@link Ext.layout.container.Anchor anchor}
|
64
|
-
* - {@link Ext.layout.container.Table table}
|
65
|
-
*
|
66
|
-
* - Layout specific configuration properties
|
67
|
-
*
|
68
|
-
* Additional layout specific configuration properties may also be
|
69
|
-
* specified. For complete details regarding the valid config options for
|
70
|
-
* each layout type, see the layout class corresponding to the `type`
|
71
|
-
* specified.
|
72
|
-
*
|
73
|
-
* # Specify as a String
|
74
|
-
*
|
75
|
-
* Example usage:
|
76
|
-
*
|
77
|
-
* layout: 'vbox'
|
78
|
-
*
|
79
|
-
* - **layout**
|
80
|
-
*
|
81
|
-
* The layout `type` to be used for this container (see list
|
82
|
-
* of valid layout type values above).
|
83
|
-
*
|
84
|
-
* Additional layout specific configuration properties. For complete
|
85
|
-
* details regarding the valid config options for each layout type, see the
|
86
|
-
* layout class corresponding to the `layout` specified.
|
87
|
-
*
|
88
|
-
* # Configuring the default layout type
|
89
|
-
*
|
90
|
-
* If a certain Container class has a default layout (For example a {@link Ext.toolbar.Toolbar Toolbar}
|
91
|
-
* with a default `Box` layout), then to simply configure the default layout,
|
92
|
-
* use an object, but without the `type` property:
|
93
|
-
*
|
94
|
-
*
|
95
|
-
* xtype: 'toolbar',
|
96
|
-
* layout: {
|
97
|
-
* pack: 'center'
|
98
|
-
* }
|
99
|
-
*/
|
100
|
-
|
101
|
-
/**
|
102
|
-
* @cfg {String/Number} activeItem
|
103
|
-
* A string component id or the numeric index of the component that should be
|
104
|
-
* initially activated within the container's layout on render. For example,
|
105
|
-
* activeItem: 'item-1' or activeItem: 0 (index 0 = the first item in the
|
106
|
-
* container's collection). activeItem only applies to layout styles that can
|
107
|
-
* display items one at a time (like {@link Ext.layout.container.Card} and
|
108
|
-
* {@link Ext.layout.container.Fit}).
|
109
|
-
*/
|
110
|
-
|
111
|
-
/**
|
112
|
-
* @cfg {Object/Object[]} items
|
113
|
-
* A single item, or an array of child Components to be added to this container
|
114
|
-
*
|
115
|
-
* **Unless configured with a {@link #layout}, a Container simply renders child
|
116
|
-
* Components serially into its encapsulating element and performs no sizing or
|
117
|
-
* positioning upon them.**
|
118
|
-
*
|
119
|
-
* Example:
|
120
|
-
*
|
121
|
-
* // specifying a single item
|
122
|
-
* items: {...},
|
123
|
-
* layout: 'fit', // The single items is sized to fit
|
124
|
-
*
|
125
|
-
* // specifying multiple items
|
126
|
-
* items: [{...}, {...}],
|
127
|
-
* layout: 'hbox', // The items are arranged horizontally
|
128
|
-
*
|
129
|
-
* Each item may be:
|
130
|
-
*
|
131
|
-
* - A {@link Ext.Component Component}
|
132
|
-
* - A Component configuration object
|
133
|
-
*
|
134
|
-
* If a configuration object is specified, the actual type of Component to be
|
135
|
-
* instantiated my be indicated by using the {@link Ext.Component#xtype xtype} option.
|
136
|
-
*
|
137
|
-
* Every Component class has its own {@link Ext.Component#xtype xtype}.
|
138
|
-
*
|
139
|
-
* If an {@link Ext.Component#xtype xtype} is not explicitly specified, the
|
140
|
-
* {@link #defaultType} for the Container is used, which by default is usually `panel`.
|
141
|
-
*
|
142
|
-
* # Notes:
|
143
|
-
*
|
144
|
-
* Ext uses lazy rendering. Child Components will only be rendered
|
145
|
-
* should it become necessary. Items are automatically laid out when they are first
|
146
|
-
* shown (no sizing is done while hidden), or in response to a {@link #doLayout} call.
|
147
|
-
*
|
148
|
-
* Do not specify {@link Ext.panel.Panel#contentEl contentEl} or
|
149
|
-
* {@link Ext.panel.Panel#html html} with `items`.
|
150
|
-
*/
|
151
|
-
|
152
|
-
/**
|
153
|
-
* @cfg {Object/Function} defaults
|
154
|
-
* This option is a means of applying default settings to all added items whether added
|
155
|
-
* through the {@link #cfg-items} config or via the {@link #method-add} or {@link #insert} methods.
|
156
|
-
*
|
157
|
-
* Defaults are applied to both config objects and instantiated components conditionally
|
158
|
-
* so as not to override existing properties in the item (see {@link Ext#applyIf}).
|
159
|
-
*
|
160
|
-
* If the defaults option is specified as a function, then the function will be called
|
161
|
-
* using this Container as the scope (`this` reference) and passing the added item as
|
162
|
-
* the first parameter. Any resulting object from that call is then applied to the item
|
163
|
-
* as default properties.
|
164
|
-
*
|
165
|
-
* For example, to automatically apply padding to the body of each of a set of
|
166
|
-
* contained {@link Ext.panel.Panel} items, you could pass:
|
167
|
-
* `defaults: {bodyStyle:'padding:15px'}`.
|
168
|
-
*
|
169
|
-
* Usage:
|
170
|
-
*
|
171
|
-
* defaults: { // defaults are applied to items, not the container
|
172
|
-
* autoScroll: true
|
173
|
-
* },
|
174
|
-
* items: [
|
175
|
-
* // default will not be applied here, panel1 will be autoScroll: false
|
176
|
-
* {
|
177
|
-
* xtype: 'panel',
|
178
|
-
* id: 'panel1',
|
179
|
-
* autoScroll: false
|
180
|
-
* },
|
181
|
-
* // this component will have autoScroll: true
|
182
|
-
* new Ext.panel.Panel({
|
183
|
-
* id: 'panel2'
|
184
|
-
* })
|
185
|
-
* ]
|
186
|
-
*/
|
187
|
-
|
188
|
-
/**
|
189
|
-
* @cfg {Boolean} suspendLayout
|
190
|
-
* If true, suspend calls to doLayout. Useful when batching multiple adds to a container
|
191
|
-
* and not passing them as multiple arguments or an array.
|
192
|
-
*/
|
193
|
-
suspendLayout : false,
|
194
|
-
|
195
|
-
/**
|
196
|
-
* @cfg {Boolean} [autoDestroy=true]
|
197
|
-
* If true the container will automatically destroy any contained component that is removed
|
198
|
-
* from it, else destruction must be handled manually.
|
199
|
-
*/
|
200
|
-
autoDestroy : true,
|
201
|
-
|
202
|
-
/**
|
203
|
-
* @cfg {String} [defaultType="panel"]
|
204
|
-
* The default {@link Ext.Component xtype} of child Components to create in this Container when
|
205
|
-
* a child item is specified as a raw configuration object, rather than as an instantiated Component.
|
206
|
-
*/
|
207
|
-
defaultType: 'panel',
|
208
|
-
|
209
|
-
/**
|
210
|
-
* @cfg {Boolean} [detachOnRemove=true]
|
211
|
-
* True to move any component to the {@link Ext#getDetachedBody detachedBody} when the component is
|
212
|
-
* removed from this container. This option is only applicable when the component is not destroyed while
|
213
|
-
* being removed, see {@link #autoDestroy} and {@link #method-remove}. If this option is set to false, the DOM
|
214
|
-
* of the component will remain in the current place until it is explicitly moved.
|
215
|
-
*/
|
216
|
-
detachOnRemove: true,
|
217
|
-
|
218
|
-
/*
|
219
|
-
* @property {Boolean} isContainer
|
220
|
-
* `true` in this class to identify an object as an instantiated Container, or subclass thereof.
|
221
|
-
*/
|
222
|
-
isContainer : true,
|
223
|
-
|
224
|
-
/**
|
225
|
-
* @property {Number} layoutCounter
|
226
|
-
* The number of container layout calls made on this object.
|
227
|
-
* @private
|
228
|
-
*/
|
229
|
-
layoutCounter : 0,
|
230
|
-
|
231
|
-
baseCls: Ext.baseCSSPrefix + 'container',
|
232
|
-
|
233
|
-
/**
|
234
|
-
* @cfg {String[]} bubbleEvents
|
235
|
-
* An array of events that, when fired, should be bubbled to any parent container.
|
236
|
-
* See {@link Ext.util.Observable#enableBubble}.
|
237
|
-
*/
|
238
|
-
bubbleEvents: ['add', 'remove'],
|
239
|
-
|
240
|
-
// @private
|
241
|
-
initComponent : function(){
|
242
|
-
var me = this;
|
243
|
-
me.addEvents(
|
244
|
-
/**
|
245
|
-
* @event afterlayout
|
246
|
-
* Fires when the components in this container are arranged by the associated layout manager.
|
247
|
-
* @param {Ext.container.Container} this
|
248
|
-
* @param {Ext.layout.container.Container} layout The ContainerLayout implementation for this container
|
249
|
-
*/
|
250
|
-
'afterlayout',
|
251
|
-
/**
|
252
|
-
* @event beforeadd
|
253
|
-
* Fires before any {@link Ext.Component} is added or inserted into the container.
|
254
|
-
* A handler can return false to cancel the add.
|
255
|
-
* @param {Ext.container.Container} this
|
256
|
-
* @param {Ext.Component} component The component being added
|
257
|
-
* @param {Number} index The index at which the component will be added to the container's items collection
|
258
|
-
*/
|
259
|
-
'beforeadd',
|
260
|
-
/**
|
261
|
-
* @event beforeremove
|
262
|
-
* Fires before any {@link Ext.Component} is removed from the container. A handler can return
|
263
|
-
* false to cancel the remove.
|
264
|
-
* @param {Ext.container.Container} this
|
265
|
-
* @param {Ext.Component} component The component being removed
|
266
|
-
*/
|
267
|
-
'beforeremove',
|
268
|
-
/**
|
269
|
-
* @event add
|
270
|
-
* Fires after any {@link Ext.Component} is added or inserted into the container.
|
271
|
-
*
|
272
|
-
* **This event bubbles:** 'add' will also be fired when Component is added to any of
|
273
|
-
* the child containers or their childern or ...
|
274
|
-
* @param {Ext.container.Container} this
|
275
|
-
* @param {Ext.Component} component The component that was added
|
276
|
-
* @param {Number} index The index at which the component was added to the container's items collection
|
277
|
-
*/
|
278
|
-
'add',
|
279
|
-
/**
|
280
|
-
* @event remove
|
281
|
-
* Fires after any {@link Ext.Component} is removed from the container.
|
282
|
-
*
|
283
|
-
* **This event bubbles:** 'remove' will also be fired when Component is removed from any of
|
284
|
-
* the child containers or their children or ...
|
285
|
-
* @param {Ext.container.Container} this
|
286
|
-
* @param {Ext.Component} component The component that was removed
|
287
|
-
*/
|
288
|
-
'remove'
|
289
|
-
);
|
290
|
-
|
291
|
-
me.callParent();
|
292
|
-
|
293
|
-
me.getLayout();
|
294
|
-
me.initItems();
|
295
|
-
},
|
296
|
-
|
297
|
-
// @private
|
298
|
-
initItems : function() {
|
299
|
-
var me = this,
|
300
|
-
items = me.items;
|
301
|
-
|
302
|
-
/**
|
303
|
-
* The MixedCollection containing all the child items of this container.
|
304
|
-
* @property items
|
305
|
-
* @type Ext.util.AbstractMixedCollection
|
306
|
-
*/
|
307
|
-
me.items = new Ext.util.AbstractMixedCollection(false, me.getComponentId);
|
308
|
-
|
309
|
-
if (items) {
|
310
|
-
if (!Ext.isArray(items)) {
|
311
|
-
items = [items];
|
312
|
-
}
|
313
|
-
|
314
|
-
me.add(items);
|
315
|
-
}
|
316
|
-
},
|
317
|
-
|
318
|
-
/**
|
319
|
-
* @private
|
320
|
-
* Returns the focus holder element associated with this Container. By default, this is the Container's target
|
321
|
-
* element. Subclasses which use embedded focusable elements (such as Window and Button) should override this for use
|
322
|
-
* by the {@link #method-focus} method.
|
323
|
-
* @returns {Ext.Element} the focus holding element.
|
324
|
-
*/
|
325
|
-
getFocusEl: function() {
|
326
|
-
return this.getTargetEl();
|
327
|
-
},
|
328
|
-
|
329
|
-
finishRenderChildren: function () {
|
330
|
-
this.callParent();
|
331
|
-
|
332
|
-
var layout = this.getLayout();
|
333
|
-
|
334
|
-
if (layout) {
|
335
|
-
layout.finishRender();
|
336
|
-
}
|
337
|
-
},
|
338
|
-
|
339
|
-
beforeRender: function () {
|
340
|
-
var me = this,
|
341
|
-
layout = me.getLayout();
|
342
|
-
|
343
|
-
me.callParent();
|
344
|
-
|
345
|
-
if (!layout.initialized) {
|
346
|
-
layout.initLayout();
|
347
|
-
}
|
348
|
-
},
|
349
|
-
|
350
|
-
setupRenderTpl: function (renderTpl) {
|
351
|
-
var layout = this.getLayout();
|
352
|
-
|
353
|
-
this.callParent(arguments);
|
354
|
-
|
355
|
-
layout.setupRenderTpl(renderTpl);
|
356
|
-
},
|
357
|
-
|
358
|
-
// @private
|
359
|
-
setLayout : function(layout) {
|
360
|
-
var currentLayout = this.layout;
|
361
|
-
|
362
|
-
if (currentLayout && currentLayout.isLayout && currentLayout != layout) {
|
363
|
-
currentLayout.setOwner(null);
|
364
|
-
}
|
365
|
-
|
366
|
-
this.layout = layout;
|
367
|
-
layout.setOwner(this);
|
368
|
-
},
|
369
|
-
|
370
|
-
/**
|
371
|
-
* Returns the {@link Ext.layout.container.Container layout} instance currently associated with this Container.
|
372
|
-
* If a layout has not been instantiated yet, that is done first
|
373
|
-
* @return {Ext.layout.container.Container} The layout
|
374
|
-
*/
|
375
|
-
getLayout : function() {
|
376
|
-
var me = this;
|
377
|
-
if (!me.layout || !me.layout.isLayout) {
|
378
|
-
// Pass any configured in layout property, defaulting to the prototype's layout property, falling back to Auto.
|
379
|
-
me.setLayout(Ext.layout.Layout.create(me.layout, me.self.prototype.layout || 'autocontainer'));
|
380
|
-
}
|
381
|
-
|
382
|
-
return me.layout;
|
383
|
-
},
|
384
|
-
|
385
|
-
/**
|
386
|
-
* Manually force this container's layout to be recalculated. The framework uses this internally to refresh layouts
|
387
|
-
* form most cases.
|
388
|
-
* @return {Ext.container.Container} this
|
389
|
-
*/
|
390
|
-
doLayout : function() {
|
391
|
-
this.updateLayout();
|
392
|
-
return this;
|
393
|
-
},
|
394
|
-
|
395
|
-
/**
|
396
|
-
* Invoked after the Container has laid out (and rendered if necessary)
|
397
|
-
* its child Components.
|
398
|
-
*
|
399
|
-
* @param {Ext.layout.container.Container} layout
|
400
|
-
*
|
401
|
-
* @template
|
402
|
-
* @protected
|
403
|
-
*/
|
404
|
-
afterLayout : function(layout) {
|
405
|
-
var me = this;
|
406
|
-
++me.layoutCounter;
|
407
|
-
if (me.hasListeners.afterlayout) {
|
408
|
-
me.fireEvent('afterlayout', me, layout);
|
409
|
-
}
|
410
|
-
},
|
411
|
-
|
412
|
-
// @private
|
413
|
-
prepareItems : function(items, applyDefaults) {
|
414
|
-
// Create an Array which does not refer to the passed array.
|
415
|
-
// The passed array is a reference to a user's config object and MUST NOT be mutated.
|
416
|
-
if (Ext.isArray(items)) {
|
417
|
-
items = items.slice();
|
418
|
-
} else {
|
419
|
-
items = [items];
|
420
|
-
}
|
421
|
-
|
422
|
-
// Make sure defaults are applied and item is initialized
|
423
|
-
var i = 0,
|
424
|
-
len = items.length,
|
425
|
-
item;
|
426
|
-
|
427
|
-
for (; i < len; i++) {
|
428
|
-
item = items[i];
|
429
|
-
if (item == null) {
|
430
|
-
Ext.Array.erase(items, i, 1);
|
431
|
-
--i;
|
432
|
-
--len;
|
433
|
-
} else {
|
434
|
-
if (applyDefaults) {
|
435
|
-
item = this.applyDefaults(item);
|
436
|
-
}
|
437
|
-
items[i] = this.lookupComponent(item);
|
438
|
-
}
|
439
|
-
}
|
440
|
-
|
441
|
-
return items;
|
442
|
-
},
|
443
|
-
|
444
|
-
// @private
|
445
|
-
applyDefaults : function(config) {
|
446
|
-
var defaults = this.defaults;
|
447
|
-
|
448
|
-
if (defaults) {
|
449
|
-
if (Ext.isFunction(defaults)) {
|
450
|
-
defaults = defaults.call(this, config);
|
451
|
-
}
|
452
|
-
|
453
|
-
if (Ext.isString(config)) {
|
454
|
-
config = Ext.ComponentManager.get(config);
|
455
|
-
}
|
456
|
-
Ext.applyIf(config, defaults);
|
457
|
-
}
|
458
|
-
return config;
|
459
|
-
},
|
460
|
-
|
461
|
-
// @private
|
462
|
-
lookupComponent : function(comp) {
|
463
|
-
return (typeof comp == 'string') ? Ext.ComponentManager.get(comp)
|
464
|
-
: Ext.ComponentManager.create(comp, this.defaultType);
|
465
|
-
},
|
466
|
-
|
467
|
-
// @private - used as the key lookup function for the items collection
|
468
|
-
getComponentId : function(comp) {
|
469
|
-
return comp.getItemId();
|
470
|
-
},
|
471
|
-
|
472
|
-
/**
|
473
|
-
* Adds {@link Ext.Component Component}(s) to this Container.
|
474
|
-
*
|
475
|
-
* ## Description:
|
476
|
-
*
|
477
|
-
* - Fires the {@link #beforeadd} event before adding.
|
478
|
-
* - The Container's {@link #defaults default config values} will be applied
|
479
|
-
* accordingly (see `{@link #defaults}` for details).
|
480
|
-
* - Fires the `{@link #event-add}` event after the component has been added.
|
481
|
-
*
|
482
|
-
* ## Notes:
|
483
|
-
*
|
484
|
-
* If the Container is __already rendered__ when `add`
|
485
|
-
* is called, it will render the newly added Component into its content area.
|
486
|
-
*
|
487
|
-
* **If** the Container was configured with a size-managing {@link #layout} manager,
|
488
|
-
* the Container will recalculate its internal layout at this time too.
|
489
|
-
*
|
490
|
-
* Note that the default layout manager simply renders child Components sequentially
|
491
|
-
* into the content area and thereafter performs no sizing.
|
492
|
-
*
|
493
|
-
* If adding multiple new child Components, pass them as an array to the `add` method,
|
494
|
-
* so that only one layout recalculation is performed.
|
495
|
-
*
|
496
|
-
* tb = new {@link Ext.toolbar.Toolbar}({
|
497
|
-
* renderTo: document.body
|
498
|
-
* }); // toolbar is rendered
|
499
|
-
* // add multiple items.
|
500
|
-
* // ({@link #defaultType} for {@link Ext.toolbar.Toolbar Toolbar} is 'button')
|
501
|
-
* tb.add([{text:'Button 1'}, {text:'Button 2'}]);
|
502
|
-
*
|
503
|
-
* To inject components between existing ones, use the {@link #insert} method.
|
504
|
-
*
|
505
|
-
* ## Warning:
|
506
|
-
*
|
507
|
-
* Components directly managed by the BorderLayout layout manager may not be removed
|
508
|
-
* or added. See the Notes for {@link Ext.layout.container.Border BorderLayout} for
|
509
|
-
* more details.
|
510
|
-
*
|
511
|
-
* @param {Ext.Component[]/Ext.Component...} component
|
512
|
-
* Either one or more Components to add or an Array of Components to add.
|
513
|
-
* See `{@link #cfg-items}` for additional information.
|
514
|
-
*
|
515
|
-
* @return {Ext.Component[]/Ext.Component} The Components that were added.
|
516
|
-
*/
|
517
|
-
add : function() {
|
518
|
-
var me = this,
|
519
|
-
args = Ext.Array.slice(arguments),
|
520
|
-
index = (typeof args[0] == 'number') ? args.shift() : -1,
|
521
|
-
layout = me.getLayout(),
|
522
|
-
addingArray, items, i, length, item, pos, ret;
|
523
|
-
|
524
|
-
if (args.length == 1 && Ext.isArray(args[0])) {
|
525
|
-
items = args[0];
|
526
|
-
addingArray = true;
|
527
|
-
} else {
|
528
|
-
items = args;
|
529
|
-
}
|
530
|
-
|
531
|
-
ret = items = me.prepareItems(items, true);
|
532
|
-
length = items.length;
|
533
|
-
|
534
|
-
if (me.rendered) {
|
535
|
-
Ext.suspendLayouts(); // suspend layouts while adding items...
|
536
|
-
}
|
537
|
-
|
538
|
-
if (!addingArray && length == 1) { // an array of 1 should still return an array...
|
539
|
-
ret = items[0];
|
540
|
-
}
|
541
|
-
|
542
|
-
// loop
|
543
|
-
for (i = 0; i < length; i++) {
|
544
|
-
item = items[i];
|
545
|
-
//<debug>
|
546
|
-
if (!item) {
|
547
|
-
Ext.Error.raise("Cannot add null item to Container with itemId/id: " + me.getItemId());
|
548
|
-
}
|
549
|
-
//</debug>
|
550
|
-
|
551
|
-
pos = (index < 0) ? me.items.length : (index + i);
|
552
|
-
|
553
|
-
// Floating Components are not added into the items collection
|
554
|
-
// But they do get an upward ownerCt link so that they can traverse
|
555
|
-
// up to their z-index parent.
|
556
|
-
if (item.floating) {
|
557
|
-
item.onAdded(me, pos);
|
558
|
-
} else if ((!me.hasListeners.beforeadd || me.fireEvent('beforeadd', me, item, pos) !== false) && me.onBeforeAdd(item) !== false) {
|
559
|
-
me.items.insert(pos, item);
|
560
|
-
item.onAdded(me, pos);
|
561
|
-
me.onAdd(item, pos);
|
562
|
-
layout.onAdd(item, pos);
|
563
|
-
|
564
|
-
if (me.hasListeners.add) {
|
565
|
-
me.fireEvent('add', me, item, pos);
|
566
|
-
}
|
567
|
-
}
|
568
|
-
}
|
569
|
-
|
570
|
-
// We need to update our layout after adding all passed items
|
571
|
-
me.updateLayout();
|
572
|
-
if (me.rendered) {
|
573
|
-
Ext.resumeLayouts(true);
|
574
|
-
}
|
575
|
-
|
576
|
-
return ret;
|
577
|
-
},
|
578
|
-
|
579
|
-
/**
|
580
|
-
* This method is invoked after a new Component has been added. It
|
581
|
-
* is passed the Component which has been added. This method may
|
582
|
-
* be used to update any internal structure which may depend upon
|
583
|
-
* the state of the child items.
|
584
|
-
*
|
585
|
-
* @param {Ext.Component} component
|
586
|
-
* @param {Number} position
|
587
|
-
*
|
588
|
-
* @template
|
589
|
-
* @protected
|
590
|
-
*/
|
591
|
-
onAdd : Ext.emptyFn,
|
592
|
-
|
593
|
-
/**
|
594
|
-
* This method is invoked after a new Component has been
|
595
|
-
* removed. It is passed the Component which has been
|
596
|
-
* removed. This method may be used to update any internal
|
597
|
-
* structure which may depend upon the state of the child items.
|
598
|
-
*
|
599
|
-
* @param {Ext.Component} component
|
600
|
-
* @param {Boolean} autoDestroy
|
601
|
-
*
|
602
|
-
* @template
|
603
|
-
* @protected
|
604
|
-
*/
|
605
|
-
onRemove : Ext.emptyFn,
|
606
|
-
|
607
|
-
/**
|
608
|
-
* Inserts a Component into this Container at a specified index. Fires the
|
609
|
-
* {@link #beforeadd} event before inserting, then fires the {@link #event-add}
|
610
|
-
* event after the Component has been inserted.
|
611
|
-
*
|
612
|
-
* @param {Number} index The index at which the Component will be inserted
|
613
|
-
* into the Container's items collection
|
614
|
-
*
|
615
|
-
* @param {Ext.Component} component The child Component to insert.
|
616
|
-
*
|
617
|
-
* Ext uses lazy rendering, and will only render the inserted Component should
|
618
|
-
* it become necessary.
|
619
|
-
*
|
620
|
-
* A Component config object may be passed in order to avoid the overhead of
|
621
|
-
* constructing a real Component object if lazy rendering might mean that the
|
622
|
-
* inserted Component will not be rendered immediately. To take advantage of
|
623
|
-
* this 'lazy instantiation', set the {@link Ext.Component#xtype} config
|
624
|
-
* property to the registered type of the Component wanted.
|
625
|
-
*
|
626
|
-
* For a list of all available xtypes, see {@link Ext.Component}.
|
627
|
-
*
|
628
|
-
* @return {Ext.Component} component The Component (or config object) that was
|
629
|
-
* inserted with the Container's default config values applied.
|
630
|
-
*/
|
631
|
-
insert : function(index, comp) {
|
632
|
-
return this.add(index, comp);
|
633
|
-
},
|
634
|
-
|
635
|
-
/**
|
636
|
-
* Moves a Component within the Container
|
637
|
-
* @param {Number} fromIdx The index the Component you wish to move is currently at.
|
638
|
-
* @param {Number} toIdx The new index for the Component.
|
639
|
-
* @return {Ext.Component} component The Component (or config object) that was moved.
|
640
|
-
*/
|
641
|
-
move : function(fromIdx, toIdx) {
|
642
|
-
var items = this.items,
|
643
|
-
item;
|
644
|
-
item = items.removeAt(fromIdx);
|
645
|
-
if (item === false) {
|
646
|
-
return false;
|
647
|
-
}
|
648
|
-
items.insert(toIdx, item);
|
649
|
-
this.doLayout();
|
650
|
-
return item;
|
651
|
-
},
|
652
|
-
|
653
|
-
/**
|
654
|
-
* This method is invoked before adding a new child Component. It
|
655
|
-
* is passed the new Component, and may be used to modify the
|
656
|
-
* Component, or prepare the Container in some way. Returning
|
657
|
-
* false aborts the add operation.
|
658
|
-
*
|
659
|
-
* @param {Ext.Component} item
|
660
|
-
*
|
661
|
-
* @template
|
662
|
-
* @protected
|
663
|
-
*/
|
664
|
-
onBeforeAdd : function(item) {
|
665
|
-
var me = this,
|
666
|
-
border = item.border;
|
667
|
-
|
668
|
-
if (item.ownerCt) {
|
669
|
-
item.ownerCt.remove(item, false);
|
670
|
-
}
|
671
|
-
|
672
|
-
if (me.border === false || me.border === 0) {
|
673
|
-
// If the parent has no border, only use an explicitly defined border
|
674
|
-
item.border = Ext.isDefined(border) && border !== false && border !== 0;
|
675
|
-
}
|
676
|
-
},
|
677
|
-
|
678
|
-
/**
|
679
|
-
* Removes a component from this container. Fires the {@link #beforeremove} event
|
680
|
-
* before removing, then fires the {@link #event-remove} event after the component has
|
681
|
-
* been removed.
|
682
|
-
*
|
683
|
-
* @param {Ext.Component/String} component The component reference or id to remove.
|
684
|
-
*
|
685
|
-
* @param {Boolean} [autoDestroy] True to automatically invoke the removed Component's
|
686
|
-
* {@link Ext.Component#method-destroy} function.
|
687
|
-
*
|
688
|
-
* Defaults to the value of this Container's {@link #autoDestroy} config.
|
689
|
-
*
|
690
|
-
* @return {Ext.Component} component The Component that was removed.
|
691
|
-
*/
|
692
|
-
remove : function(comp, autoDestroy) {
|
693
|
-
var me = this,
|
694
|
-
c = me.getComponent(comp);
|
695
|
-
//<debug>
|
696
|
-
if (Ext.isDefined(Ext.global.console) && !c) {
|
697
|
-
Ext.global.console.warn("Attempted to remove a component that does not exist. Ext.container.Container: remove takes an argument of the component to remove. cmp.remove() is incorrect usage.");
|
698
|
-
}
|
699
|
-
//</debug>
|
700
|
-
|
701
|
-
if (c && (!me.hasListeners.beforeremove || me.fireEvent('beforeremove', me, c) !== false)) {
|
702
|
-
me.doRemove(c, autoDestroy);
|
703
|
-
if (me.hasListeners.remove) {
|
704
|
-
me.fireEvent('remove', me, c);
|
705
|
-
}
|
706
|
-
|
707
|
-
if (!me.destroying) {
|
708
|
-
me.doLayout();
|
709
|
-
}
|
710
|
-
}
|
711
|
-
|
712
|
-
return c;
|
713
|
-
},
|
714
|
-
|
715
|
-
// @private
|
716
|
-
doRemove : function(component, autoDestroy) {
|
717
|
-
var me = this,
|
718
|
-
layout = me.layout,
|
719
|
-
hasLayout = layout && me.rendered,
|
720
|
-
destroying = autoDestroy === true || (autoDestroy !== false && me.autoDestroy);
|
721
|
-
|
722
|
-
autoDestroy = autoDestroy === true || (autoDestroy !== false && me.autoDestroy);
|
723
|
-
me.items.remove(component);
|
724
|
-
component.onRemoved(destroying);
|
725
|
-
|
726
|
-
if (hasLayout) {
|
727
|
-
layout.onRemove(component);
|
728
|
-
}
|
729
|
-
|
730
|
-
me.onRemove(component, destroying);
|
731
|
-
|
732
|
-
// Destroy if we were explicitly told to, or we're defaulting to our autoDestroy configuration
|
733
|
-
if (destroying) {
|
734
|
-
component.destroy();
|
735
|
-
}
|
736
|
-
// Only have the layout perform remove postprocessing if the Component is not being destroyed
|
737
|
-
else {
|
738
|
-
if (hasLayout) {
|
739
|
-
layout.afterRemove(component);
|
740
|
-
}
|
741
|
-
if (me.detachOnRemove && component.rendered) {
|
742
|
-
Ext.getDetachedBody().appendChild(component.getEl());
|
743
|
-
}
|
744
|
-
}
|
745
|
-
},
|
746
|
-
|
747
|
-
/**
|
748
|
-
* Removes all components from this container.
|
749
|
-
* @param {Boolean} [autoDestroy] True to automatically invoke the removed
|
750
|
-
* Component's {@link Ext.Component#method-destroy} function.
|
751
|
-
* Defaults to the value of this Container's {@link #autoDestroy} config.
|
752
|
-
* @return {Ext.Component[]} Array of the removed components
|
753
|
-
*/
|
754
|
-
removeAll : function(autoDestroy) {
|
755
|
-
var me = this,
|
756
|
-
removeItems = me.items.items.slice(),
|
757
|
-
items = [],
|
758
|
-
i = 0,
|
759
|
-
len = removeItems.length,
|
760
|
-
item;
|
761
|
-
|
762
|
-
// Suspend Layouts while we remove multiple items from the container
|
763
|
-
me.suspendLayouts();
|
764
|
-
for (; i < len; i++) {
|
765
|
-
item = removeItems[i];
|
766
|
-
me.remove(item, autoDestroy);
|
767
|
-
|
768
|
-
if (item.ownerCt !== me) {
|
769
|
-
items.push(item);
|
770
|
-
}
|
771
|
-
}
|
772
|
-
|
773
|
-
// Resume Layouts now that all items have been removed and do a single layout (if we removed anything!)
|
774
|
-
me.resumeLayouts(!!len);
|
775
|
-
return items;
|
776
|
-
},
|
777
|
-
|
778
|
-
// Used by ComponentQuery to retrieve all of the items
|
779
|
-
// which can potentially be considered a child of this Container.
|
780
|
-
// This should be overriden by components which have child items
|
781
|
-
// that are not contained in items. For example dockedItems, menu, etc
|
782
|
-
// IMPORTANT note for maintainers:
|
783
|
-
// Items are returned in tree traversal order. Each item is appended to the result array
|
784
|
-
// followed by the results of that child's getRefItems call.
|
785
|
-
// Floating child items are appended after internal child items.
|
786
|
-
getRefItems : function(deep) {
|
787
|
-
var me = this,
|
788
|
-
items = me.items.items,
|
789
|
-
len = items.length,
|
790
|
-
i = 0,
|
791
|
-
item,
|
792
|
-
result = [];
|
793
|
-
|
794
|
-
for (; i < len; i++) {
|
795
|
-
item = items[i];
|
796
|
-
result.push(item);
|
797
|
-
if (deep && item.getRefItems) {
|
798
|
-
result.push.apply(result, item.getRefItems(true));
|
799
|
-
}
|
800
|
-
}
|
801
|
-
|
802
|
-
// Append floating items to the list.
|
803
|
-
// These will only be present after they are rendered.
|
804
|
-
if (me.floatingItems && me.floatingItems.accessList) {
|
805
|
-
result.push.apply(result, me.floatingItems.accessList);
|
806
|
-
}
|
807
|
-
|
808
|
-
return result;
|
809
|
-
},
|
810
|
-
|
811
|
-
/**
|
812
|
-
* Cascades down the component/container heirarchy from this component (passed in
|
813
|
-
* the first call), calling the specified function with each component. The scope
|
814
|
-
* (this reference) of the function call will be the scope provided or the current
|
815
|
-
* component. The arguments to the function will be the args provided or the current
|
816
|
-
* component. If the function returns false at any point, the cascade is stopped on
|
817
|
-
* that branch.
|
818
|
-
* @param {Function} fn The function to call
|
819
|
-
* @param {Object} [scope] The scope of the function (defaults to current component)
|
820
|
-
* @param {Array} [args] The args to call the function with. The current component
|
821
|
-
* always passed as the last argument.
|
822
|
-
* @return {Ext.Container} this
|
823
|
-
*/
|
824
|
-
cascade : function(fn, scope, origArgs){
|
825
|
-
var me = this,
|
826
|
-
cs = me.items ? me.items.items : [],
|
827
|
-
len = cs.length,
|
828
|
-
i = 0,
|
829
|
-
c,
|
830
|
-
args = origArgs ? origArgs.concat(me) : [me],
|
831
|
-
componentIndex = args.length - 1;
|
832
|
-
|
833
|
-
if (fn.apply(scope || me, args) !== false) {
|
834
|
-
for (; i < len; i++){
|
835
|
-
c = cs[i];
|
836
|
-
if (c.cascade) {
|
837
|
-
c.cascade(fn, scope, origArgs);
|
838
|
-
} else {
|
839
|
-
args[componentIndex] = c;
|
840
|
-
fn.apply(scope || cs, args);
|
841
|
-
}
|
842
|
-
}
|
843
|
-
}
|
844
|
-
return this;
|
845
|
-
},
|
846
|
-
|
847
|
-
/**
|
848
|
-
* Determines whether **this Container** is an ancestor of the passed Component.
|
849
|
-
* This will return `true` if the passed Component is anywhere within the subtree
|
850
|
-
* beneath this Container.
|
851
|
-
* @param {Ext.Component} possibleDescendant The Component to test for presence
|
852
|
-
* within this Container's subtree.
|
853
|
-
*/
|
854
|
-
isAncestor: function(possibleDescendant) {
|
855
|
-
while (possibleDescendant) {
|
856
|
-
if (possibleDescendant.ownerCt === this) {
|
857
|
-
return true;
|
858
|
-
}
|
859
|
-
possibleDescendant = possibleDescendant.ownerCt;
|
860
|
-
}
|
861
|
-
},
|
862
|
-
|
863
|
-
/**
|
864
|
-
* Examines this container's {@link #property-items} **property** and gets a direct child
|
865
|
-
* component of this container.
|
866
|
-
*
|
867
|
-
* @param {String/Number} comp This parameter may be any of the following:
|
868
|
-
*
|
869
|
-
* - a **String** : representing the {@link Ext.Component#itemId itemId}
|
870
|
-
* or {@link Ext.Component#id id} of the child component.
|
871
|
-
* - a **Number** : representing the position of the child component
|
872
|
-
* within the {@link #property-items} **property**
|
873
|
-
*
|
874
|
-
* For additional information see {@link Ext.util.MixedCollection#get}.
|
875
|
-
*
|
876
|
-
* @return Ext.Component The component (if found).
|
877
|
-
*/
|
878
|
-
getComponent : function(comp) {
|
879
|
-
if (Ext.isObject(comp)) {
|
880
|
-
comp = comp.getItemId();
|
881
|
-
}
|
882
|
-
|
883
|
-
return this.items.get(comp);
|
884
|
-
},
|
885
|
-
|
886
|
-
/**
|
887
|
-
* Retrieves all descendant components which match the passed selector.
|
888
|
-
* Executes an Ext.ComponentQuery.query using this container as its root.
|
889
|
-
* @param {String} [selector] Selector complying to an Ext.ComponentQuery selector.
|
890
|
-
* If no selector is specified all items will be returned.
|
891
|
-
* @return {Ext.Component[]} Components which matched the selector
|
892
|
-
*/
|
893
|
-
query : function(selector) {
|
894
|
-
selector = selector || '*';
|
895
|
-
return Ext.ComponentQuery.query(selector, this);
|
896
|
-
},
|
897
|
-
|
898
|
-
/**
|
899
|
-
* Retrieves all descendant components which match the passed function.
|
900
|
-
* The function should return false for components that are to be
|
901
|
-
* excluded from the selection.
|
902
|
-
* @param {Function} fn The matcher function. It will be called with a single argument,
|
903
|
-
* the component being tested.
|
904
|
-
* @param {Object} [scope] The scope in which to run the function. If not specified,
|
905
|
-
* it will default to the active component.
|
906
|
-
* @return {Ext.Component[]} Components matched by the passed function
|
907
|
-
*/
|
908
|
-
queryBy: function(fn, scope) {
|
909
|
-
var out = [],
|
910
|
-
items = this.getRefItems(true),
|
911
|
-
i = 0,
|
912
|
-
len = items.length,
|
913
|
-
item;
|
914
|
-
|
915
|
-
for (; i < len; ++i) {
|
916
|
-
item = items[i];
|
917
|
-
if (fn.call(scope || item, item) !== false) {
|
918
|
-
out.push(item);
|
919
|
-
}
|
920
|
-
}
|
921
|
-
return out;
|
922
|
-
},
|
923
|
-
|
924
|
-
/**
|
925
|
-
* Finds a component at any level under this container matching the id/itemId.
|
926
|
-
* This is a shorthand for calling ct.down('#' + id);
|
927
|
-
* @param {String} id The id to find
|
928
|
-
* @return {Ext.Component} The matching id, null if not found
|
929
|
-
*/
|
930
|
-
queryById: function(id){
|
931
|
-
return this.down('#' + id);
|
932
|
-
},
|
933
|
-
|
934
|
-
/**
|
935
|
-
* Retrieves the first direct child of this container which matches the passed selector.
|
936
|
-
* The passed in selector must comply with an Ext.ComponentQuery selector.
|
937
|
-
* @param {String} [selector] An Ext.ComponentQuery selector. If no selector is
|
938
|
-
* specified, the first child will be returned.
|
939
|
-
* @return Ext.Component
|
940
|
-
*/
|
941
|
-
child : function(selector) {
|
942
|
-
selector = selector || '';
|
943
|
-
return this.query('> ' + selector)[0] || null;
|
944
|
-
},
|
945
|
-
|
946
|
-
nextChild: function(child, selector) {
|
947
|
-
var me = this,
|
948
|
-
result,
|
949
|
-
childIndex = me.items.indexOf(child);
|
950
|
-
|
951
|
-
if (childIndex !== -1) {
|
952
|
-
result = selector ? Ext.ComponentQuery(selector, me.items.items.slice(childIndex + 1)) : me.items.getAt(childIndex + 1);
|
953
|
-
if (!result && me.ownerCt) {
|
954
|
-
result = me.ownerCt.nextChild(me, selector);
|
955
|
-
}
|
956
|
-
}
|
957
|
-
return result;
|
958
|
-
},
|
959
|
-
|
960
|
-
prevChild: function(child, selector) {
|
961
|
-
var me = this,
|
962
|
-
result,
|
963
|
-
childIndex = me.items.indexOf(child);
|
964
|
-
|
965
|
-
if (childIndex !== -1) {
|
966
|
-
result = selector ? Ext.ComponentQuery(selector, me.items.items.slice(childIndex + 1)) : me.items.getAt(childIndex + 1);
|
967
|
-
if (!result && me.ownerCt) {
|
968
|
-
result = me.ownerCt.nextChild(me, selector);
|
969
|
-
}
|
970
|
-
}
|
971
|
-
return result;
|
972
|
-
},
|
973
|
-
|
974
|
-
/**
|
975
|
-
* Retrieves the first descendant of this container which matches the passed selector.
|
976
|
-
* The passed in selector must comply with an Ext.ComponentQuery selector.
|
977
|
-
* @param {String} [selector] An Ext.ComponentQuery selector. If no selector is
|
978
|
-
* specified, the first child will be returned.
|
979
|
-
* @return Ext.Component
|
980
|
-
*/
|
981
|
-
down : function(selector) {
|
982
|
-
return this.query(selector)[0] || null;
|
983
|
-
},
|
984
|
-
|
985
|
-
// @private
|
986
|
-
// Enable all immediate children that was previously disabled
|
987
|
-
// Override enable because onEnable only gets called when rendered
|
988
|
-
enable: function() {
|
989
|
-
this.callParent(arguments);
|
990
|
-
|
991
|
-
var itemsToDisable = this.getChildItemsToDisable(),
|
992
|
-
length = itemsToDisable.length,
|
993
|
-
item, i;
|
994
|
-
|
995
|
-
for (i = 0; i < length; i++) {
|
996
|
-
item = itemsToDisable[i];
|
997
|
-
|
998
|
-
if (item.resetDisable) {
|
999
|
-
item.enable();
|
1000
|
-
}
|
1001
|
-
}
|
1002
|
-
},
|
1003
|
-
|
1004
|
-
// Inherit docs
|
1005
|
-
// Disable all immediate children that was previously disabled
|
1006
|
-
// Override disable because onDisable only gets called when rendered
|
1007
|
-
disable: function() {
|
1008
|
-
this.callParent(arguments);
|
1009
|
-
|
1010
|
-
var itemsToDisable = this.getChildItemsToDisable(),
|
1011
|
-
length = itemsToDisable.length,
|
1012
|
-
item, i;
|
1013
|
-
|
1014
|
-
for (i = 0; i < length; i++) {
|
1015
|
-
item = itemsToDisable[i];
|
1016
|
-
|
1017
|
-
if (item.resetDisable !== false && !item.disabled) {
|
1018
|
-
item.disable();
|
1019
|
-
item.resetDisable = true;
|
1020
|
-
}
|
1021
|
-
}
|
1022
|
-
},
|
1023
|
-
|
1024
|
-
/**
|
1025
|
-
* Gets a list of child components to enable/disable when the container is
|
1026
|
-
* enabled/disabled
|
1027
|
-
* @private
|
1028
|
-
* @return {Ext.Component[]} Items to be enabled/disabled
|
1029
|
-
*/
|
1030
|
-
getChildItemsToDisable: function(){
|
1031
|
-
return this.query('[isFormField],button');
|
1032
|
-
},
|
1033
|
-
|
1034
|
-
/**
|
1035
|
-
* Occurs before componentLayout is run. Returning false from this method
|
1036
|
-
* will prevent the containerLayout from being executed.
|
1037
|
-
*
|
1038
|
-
* @template
|
1039
|
-
* @protected
|
1040
|
-
*/
|
1041
|
-
beforeLayout: function() {
|
1042
|
-
return true;
|
1043
|
-
},
|
1044
|
-
|
1045
|
-
// @private
|
1046
|
-
beforeDestroy : function() {
|
1047
|
-
var me = this,
|
1048
|
-
items = me.items,
|
1049
|
-
c;
|
1050
|
-
|
1051
|
-
if (items) {
|
1052
|
-
while ((c = items.first())) {
|
1053
|
-
me.doRemove(c, true);
|
1054
|
-
}
|
1055
|
-
}
|
1056
|
-
|
1057
|
-
Ext.destroy(
|
1058
|
-
me.layout
|
1059
|
-
);
|
1060
|
-
me.callParent();
|
1061
|
-
}
|
1062
|
-
});
|