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,234 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This is the layout style of choice for creating structural layouts in a multi-column format where the width of each
|
3
|
-
* column can be specified as a percentage or fixed width, but the height is allowed to vary based on the content. This
|
4
|
-
* class is intended to be extended or created via the layout:'column' {@link Ext.container.Container#layout} config,
|
5
|
-
* and should generally not need to be created directly via the new keyword.
|
6
|
-
*
|
7
|
-
* ColumnLayout does not have any direct config options (other than inherited ones), but it does support a specific
|
8
|
-
* config property of `columnWidth` that can be included in the config of any panel added to it. The layout will use
|
9
|
-
* the columnWidth (if present) or width of each panel during layout to determine how to size each panel. If width or
|
10
|
-
* columnWidth is not specified for a given panel, its width will default to the panel's width (or auto).
|
11
|
-
*
|
12
|
-
* The width property is always evaluated as pixels, and must be a number greater than or equal to 1. The columnWidth
|
13
|
-
* property is always evaluated as a percentage, and must be a decimal value greater than 0 and less than 1 (e.g., .25).
|
14
|
-
*
|
15
|
-
* The basic rules for specifying column widths are pretty simple. The logic makes two passes through the set of
|
16
|
-
* contained panels. During the first layout pass, all panels that either have a fixed width or none specified (auto)
|
17
|
-
* are skipped, but their widths are subtracted from the overall container width.
|
18
|
-
*
|
19
|
-
* During the second pass, all panels with columnWidths are assigned pixel widths in proportion to their percentages
|
20
|
-
* based on the total **remaining** container width. In other words, percentage width panels are designed to fill
|
21
|
-
* the space left over by all the fixed-width and/or auto-width panels. Because of this, while you can specify any
|
22
|
-
* number of columns with different percentages, the columnWidths must always add up to 1 (or 100%) when added
|
23
|
-
* together, otherwise your layout may not render as expected.
|
24
|
-
*
|
25
|
-
* @example
|
26
|
-
* // All columns are percentages -- they must add up to 1
|
27
|
-
* Ext.create('Ext.panel.Panel', {
|
28
|
-
* title: 'Column Layout - Percentage Only',
|
29
|
-
* width: 350,
|
30
|
-
* height: 250,
|
31
|
-
* layout:'column',
|
32
|
-
* items: [{
|
33
|
-
* title: 'Column 1',
|
34
|
-
* columnWidth: 0.25
|
35
|
-
* },{
|
36
|
-
* title: 'Column 2',
|
37
|
-
* columnWidth: 0.55
|
38
|
-
* },{
|
39
|
-
* title: 'Column 3',
|
40
|
-
* columnWidth: 0.20
|
41
|
-
* }],
|
42
|
-
* renderTo: Ext.getBody()
|
43
|
-
* });
|
44
|
-
*
|
45
|
-
* // Mix of width and columnWidth -- all columnWidth values must add up
|
46
|
-
* // to 1. The first column will take up exactly 120px, and the last two
|
47
|
-
* // columns will fill the remaining container width.
|
48
|
-
*
|
49
|
-
* Ext.create('Ext.Panel', {
|
50
|
-
* title: 'Column Layout - Mixed',
|
51
|
-
* width: 350,
|
52
|
-
* height: 250,
|
53
|
-
* layout:'column',
|
54
|
-
* items: [{
|
55
|
-
* title: 'Column 1',
|
56
|
-
* width: 120
|
57
|
-
* },{
|
58
|
-
* title: 'Column 2',
|
59
|
-
* columnWidth: 0.7
|
60
|
-
* },{
|
61
|
-
* title: 'Column 3',
|
62
|
-
* columnWidth: 0.3
|
63
|
-
* }],
|
64
|
-
* renderTo: Ext.getBody()
|
65
|
-
* });
|
66
|
-
*/
|
67
|
-
Ext.define('Ext.layout.container.Column', {
|
68
|
-
|
69
|
-
extend: 'Ext.layout.container.Container',
|
70
|
-
alias: ['layout.column'],
|
71
|
-
alternateClassName: 'Ext.layout.ColumnLayout',
|
72
|
-
|
73
|
-
type: 'column',
|
74
|
-
|
75
|
-
itemCls: Ext.baseCSSPrefix + 'column',
|
76
|
-
|
77
|
-
targetCls: Ext.baseCSSPrefix + 'column-layout-ct',
|
78
|
-
|
79
|
-
// Columns with a columnWidth have their width managed.
|
80
|
-
columnWidthSizePolicy: {
|
81
|
-
setsWidth: 1,
|
82
|
-
setsHeight: 0
|
83
|
-
},
|
84
|
-
|
85
|
-
childEls: [
|
86
|
-
'innerCt'
|
87
|
-
],
|
88
|
-
|
89
|
-
manageOverflow: 2,
|
90
|
-
|
91
|
-
renderTpl: [
|
92
|
-
'<div id="{ownerId}-innerCt" class="',Ext.baseCSSPrefix,'column-inner">',
|
93
|
-
'{%this.renderBody(out,values)%}',
|
94
|
-
'<div class="',Ext.baseCSSPrefix,'clear"></div>',
|
95
|
-
'</div>',
|
96
|
-
'{%this.renderPadder(out,values)%}'
|
97
|
-
],
|
98
|
-
|
99
|
-
getItemSizePolicy: function (item) {
|
100
|
-
if (item.columnWidth) {
|
101
|
-
return this.columnWidthSizePolicy;
|
102
|
-
}
|
103
|
-
return this.autoSizePolicy;
|
104
|
-
},
|
105
|
-
|
106
|
-
beginLayout: function() {
|
107
|
-
this.callParent(arguments);
|
108
|
-
this.innerCt.dom.style.width = '';
|
109
|
-
},
|
110
|
-
|
111
|
-
calculate: function (ownerContext) {
|
112
|
-
var me = this,
|
113
|
-
containerSize = me.getContainerSize(ownerContext),
|
114
|
-
state = ownerContext.state;
|
115
|
-
|
116
|
-
if (state.calculatedColumns || (state.calculatedColumns = me.calculateColumns(ownerContext))) {
|
117
|
-
if (me.calculateHeights(ownerContext)) {
|
118
|
-
me.calculateOverflow(ownerContext, containerSize);
|
119
|
-
return;
|
120
|
-
}
|
121
|
-
}
|
122
|
-
|
123
|
-
me.done = false;
|
124
|
-
},
|
125
|
-
|
126
|
-
calculateColumns: function (ownerContext) {
|
127
|
-
var me = this,
|
128
|
-
containerSize = me.getContainerSize(ownerContext),
|
129
|
-
innerCtContext = ownerContext.getEl('innerCt', me),
|
130
|
-
items = ownerContext.childItems,
|
131
|
-
len = items.length,
|
132
|
-
contentWidth = 0,
|
133
|
-
blocked, availableWidth, i, itemContext, itemMarginWidth, itemWidth;
|
134
|
-
|
135
|
-
// Can never decide upon necessity of vertical scrollbar (and therefore, narrower
|
136
|
-
// content width) until the component layout has published a height for the target
|
137
|
-
// element.
|
138
|
-
if (!ownerContext.heightModel.shrinkWrap && !ownerContext.targetContext.hasProp('height')) {
|
139
|
-
return false;
|
140
|
-
}
|
141
|
-
|
142
|
-
// No parallel measurement, cannot lay out boxes.
|
143
|
-
if (!containerSize.gotWidth) { //\\ TODO: Deal with target padding width
|
144
|
-
ownerContext.targetContext.block(me, 'width');
|
145
|
-
blocked = true;
|
146
|
-
} else {
|
147
|
-
availableWidth = containerSize.width;
|
148
|
-
|
149
|
-
innerCtContext.setWidth(availableWidth);
|
150
|
-
}
|
151
|
-
|
152
|
-
// we need the widths of the columns we don't manage to proceed so we block on them
|
153
|
-
// if they are not ready...
|
154
|
-
for (i = 0; i < len; ++i) {
|
155
|
-
itemContext = items[i];
|
156
|
-
|
157
|
-
// this is needed below for non-calculated columns, but is also needed in the
|
158
|
-
// next loop for calculated columns... this way we only call getMarginInfo in
|
159
|
-
// this loop and use the marginInfo property in the next...
|
160
|
-
itemMarginWidth = itemContext.getMarginInfo().width;
|
161
|
-
|
162
|
-
if (!itemContext.widthModel.calculated) {
|
163
|
-
itemWidth = itemContext.getProp('width');
|
164
|
-
if (typeof itemWidth != 'number') {
|
165
|
-
itemContext.block(me, 'width');
|
166
|
-
blocked = true;
|
167
|
-
}
|
168
|
-
|
169
|
-
contentWidth += itemWidth + itemMarginWidth;
|
170
|
-
}
|
171
|
-
}
|
172
|
-
|
173
|
-
if (!blocked) {
|
174
|
-
availableWidth = (availableWidth < contentWidth) ? 0 : availableWidth - contentWidth;
|
175
|
-
|
176
|
-
for (i = 0; i < len; ++i) {
|
177
|
-
itemContext = items[i];
|
178
|
-
if (itemContext.widthModel.calculated) {
|
179
|
-
itemMarginWidth = itemContext.marginInfo.width; // always set by above loop
|
180
|
-
itemWidth = itemContext.target.columnWidth;
|
181
|
-
itemWidth = Math.floor(itemWidth * availableWidth) - itemMarginWidth;
|
182
|
-
itemWidth = itemContext.setWidth(itemWidth); // constrains to min/maxWidth
|
183
|
-
contentWidth += itemWidth + itemMarginWidth;
|
184
|
-
}
|
185
|
-
}
|
186
|
-
|
187
|
-
ownerContext.setContentWidth(contentWidth);
|
188
|
-
}
|
189
|
-
|
190
|
-
// we registered all the values that block this calculation, so abort now if blocked...
|
191
|
-
return !blocked;
|
192
|
-
},
|
193
|
-
|
194
|
-
calculateHeights: function (ownerContext) {
|
195
|
-
var me = this,
|
196
|
-
items = ownerContext.childItems,
|
197
|
-
len = items.length,
|
198
|
-
blocked, i, itemContext;
|
199
|
-
|
200
|
-
// in order for innerCt to have the proper height, all the items must have height
|
201
|
-
// correct in the DOM...
|
202
|
-
blocked = false;
|
203
|
-
for (i = 0; i < len; ++i) {
|
204
|
-
itemContext = items[i];
|
205
|
-
|
206
|
-
if (!itemContext.hasDomProp('height')) {
|
207
|
-
itemContext.domBlock(me, 'height');
|
208
|
-
blocked = true;
|
209
|
-
}
|
210
|
-
}
|
211
|
-
|
212
|
-
if (!blocked) {
|
213
|
-
ownerContext.setContentHeight(me.innerCt.getHeight() + ownerContext.targetContext.getPaddingInfo().height);
|
214
|
-
}
|
215
|
-
|
216
|
-
return !blocked;
|
217
|
-
},
|
218
|
-
|
219
|
-
finishedLayout: function (ownerContext) {
|
220
|
-
var bc = ownerContext.bodyContext;
|
221
|
-
|
222
|
-
// Owner may not have a body - this seems to only be needed for Panels.
|
223
|
-
if (bc && (Ext.isIE6 || Ext.isIE7 || Ext.isIEQuirks)) {
|
224
|
-
// Fix for https://sencha.jira.com/browse/EXTJSIV-4979
|
225
|
-
bc.el.repaint();
|
226
|
-
}
|
227
|
-
|
228
|
-
this.callParent(arguments);
|
229
|
-
},
|
230
|
-
|
231
|
-
getRenderTarget : function() {
|
232
|
-
return this.innerCt;
|
233
|
-
}
|
234
|
-
});
|
@@ -1,961 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This class is intended to be extended or created via the {@link Ext.container.Container#layout layout}
|
3
|
-
* configuration property. See {@link Ext.container.Container#layout} for additional details.
|
4
|
-
*/
|
5
|
-
Ext.define('Ext.layout.container.Container', {
|
6
|
-
|
7
|
-
/* Begin Definitions */
|
8
|
-
|
9
|
-
extend: 'Ext.layout.Layout',
|
10
|
-
|
11
|
-
alternateClassName: 'Ext.layout.ContainerLayout',
|
12
|
-
|
13
|
-
mixins: {
|
14
|
-
elementCt: 'Ext.util.ElementContainer'
|
15
|
-
},
|
16
|
-
|
17
|
-
requires: [
|
18
|
-
'Ext.XTemplate'
|
19
|
-
],
|
20
|
-
|
21
|
-
type: 'container',
|
22
|
-
|
23
|
-
/* End Definitions */
|
24
|
-
|
25
|
-
/**
|
26
|
-
* @cfg {String} itemCls
|
27
|
-
* An optional extra CSS class that will be added to the container. This can be useful for
|
28
|
-
* adding customized styles to the container or any of its children using standard CSS
|
29
|
-
* rules. See {@link Ext.Component}.{@link Ext.Component#componentCls componentCls} also.
|
30
|
-
*/
|
31
|
-
|
32
|
-
/**
|
33
|
-
* @cfg {Number} [manageOverflow=0]
|
34
|
-
* One of the following values:
|
35
|
-
*
|
36
|
-
* - 0 if the layout should ignore overflow.
|
37
|
-
* - 1 if the layout should be rerun if scrollbars are needed.
|
38
|
-
* - 2 if the layout should also correct padding when overflowed.
|
39
|
-
*/
|
40
|
-
manageOverflow: 0,
|
41
|
-
|
42
|
-
/**
|
43
|
-
* @private
|
44
|
-
* Called by an owning Panel before the Panel begins its collapse process.
|
45
|
-
* Most layouts will not need to override the default Ext.emptyFn implementation.
|
46
|
-
*/
|
47
|
-
beginCollapse: Ext.emptyFn,
|
48
|
-
|
49
|
-
/**
|
50
|
-
* @private
|
51
|
-
* Called by an owning Panel before the Panel begins its expand process.
|
52
|
-
* Most layouts will not need to override the default Ext.emptyFn implementation.
|
53
|
-
*/
|
54
|
-
beginExpand: Ext.emptyFn,
|
55
|
-
|
56
|
-
/**
|
57
|
-
* An object which contains boolean properties specifying which properties are to be
|
58
|
-
* animated upon flush of child Component ContextItems. For example, Accordion would
|
59
|
-
* have:
|
60
|
-
*
|
61
|
-
* {
|
62
|
-
* y: true,
|
63
|
-
* height: true
|
64
|
-
* }
|
65
|
-
*
|
66
|
-
* @private
|
67
|
-
*/
|
68
|
-
animatePolicy: null,
|
69
|
-
|
70
|
-
childEls: [
|
71
|
-
/**
|
72
|
-
* @property {Ext.Element} overflowPadderEl
|
73
|
-
* The element used to correct body padding during overflow.
|
74
|
-
*/
|
75
|
-
'overflowPadderEl'
|
76
|
-
],
|
77
|
-
|
78
|
-
renderTpl: [
|
79
|
-
'{%this.renderBody(out,values)%}'
|
80
|
-
],
|
81
|
-
|
82
|
-
usesContainerHeight: true,
|
83
|
-
usesContainerWidth: true,
|
84
|
-
usesHeight: true,
|
85
|
-
usesWidth: true,
|
86
|
-
|
87
|
-
|
88
|
-
/**
|
89
|
-
* @cfg {Boolean} [reserveScrollbar=false]
|
90
|
-
* Set to `true` to leave space for a vertical scrollbar (if the OS shows space-consuming scrollbars) regardless
|
91
|
-
* of whether a scrollbar is needed.
|
92
|
-
*
|
93
|
-
* This is useful if content height changes during application usage, but you do not want the calculated width
|
94
|
-
* of child items to change when a scrollbar appears or disappears. The scrollbar will appear in the reserved space,
|
95
|
-
* and the calculated width of child Components will not change.
|
96
|
-
*
|
97
|
-
* @example
|
98
|
-
* Ext.define('Employee', {
|
99
|
-
* extend: 'Ext.data.Model',
|
100
|
-
* fields: [
|
101
|
-
* {name: 'rating', type: 'int'},
|
102
|
-
* {name: 'salary', type: 'float'},
|
103
|
-
* {name: 'name'}
|
104
|
-
* ]
|
105
|
-
* });
|
106
|
-
*
|
107
|
-
* function createFakeData(count) {
|
108
|
-
* var firstNames = ['Ed', 'Tommy', 'Aaron', 'Abe', 'Jamie', 'Adam', 'Dave', 'David', 'Jay', 'Nicolas', 'Nige'],
|
109
|
-
* lastNames = ['Spencer', 'Maintz', 'Conran', 'Elias', 'Avins', 'Mishcon', 'Kaneda', 'Davis', 'Robinson', 'Ferrero', 'White'],
|
110
|
-
* ratings = [1, 2, 3, 4, 5],
|
111
|
-
* salaries = [100, 400, 900, 1500, 1000000];
|
112
|
-
*
|
113
|
-
* var data = [];
|
114
|
-
* for (var i = 0; i < (count || 25); i++) {
|
115
|
-
* var ratingId = Math.floor(Math.random() * ratings.length),
|
116
|
-
* salaryId = Math.floor(Math.random() * salaries.length),
|
117
|
-
* firstNameId = Math.floor(Math.random() * firstNames.length),
|
118
|
-
* lastNameId = Math.floor(Math.random() * lastNames.length),
|
119
|
-
*
|
120
|
-
* rating = ratings[ratingId],
|
121
|
-
* salary = salaries[salaryId],
|
122
|
-
* name = Ext.String.format("{0} {1}", firstNames[firstNameId], lastNames[lastNameId]);
|
123
|
-
*
|
124
|
-
* data.push({
|
125
|
-
* rating: rating,
|
126
|
-
* salary: salary,
|
127
|
-
* name: name
|
128
|
-
* });
|
129
|
-
* }
|
130
|
-
* store.loadData(data);
|
131
|
-
* }
|
132
|
-
*
|
133
|
-
* // create the Data Store
|
134
|
-
* var store = Ext.create('Ext.data.Store', {
|
135
|
-
* id: 'store',
|
136
|
-
* model: 'Employee',
|
137
|
-
* proxy: {
|
138
|
-
* type: 'memory'
|
139
|
-
* }
|
140
|
-
* });
|
141
|
-
* createFakeData(10);
|
142
|
-
*
|
143
|
-
* var grid = Ext.create('Ext.grid.Panel', {
|
144
|
-
* title: 'Grid loaded with varying number of records',
|
145
|
-
* anchor: '100%',
|
146
|
-
* store: store,
|
147
|
-
* columns: [{
|
148
|
-
* xtype: 'rownumberer',
|
149
|
-
* width: 40,
|
150
|
-
* sortable: false
|
151
|
-
* },{
|
152
|
-
* text: 'Name',
|
153
|
-
* flex: 1,
|
154
|
-
* sortable: true,
|
155
|
-
* dataIndex: 'name'
|
156
|
-
* },{
|
157
|
-
* text: 'Rating',
|
158
|
-
* width: 125,
|
159
|
-
* sortable: true,
|
160
|
-
* dataIndex: 'rating'
|
161
|
-
* },{
|
162
|
-
* text: 'Salary',
|
163
|
-
* width: 125,
|
164
|
-
* sortable: true,
|
165
|
-
* dataIndex: 'salary',
|
166
|
-
* align: 'right',
|
167
|
-
* renderer: Ext.util.Format.usMoney
|
168
|
-
* }]
|
169
|
-
* });
|
170
|
-
*
|
171
|
-
* Ext.create('Ext.panel.Panel', {
|
172
|
-
* renderTo: document.body,
|
173
|
-
* width: 800,
|
174
|
-
* height: 600,
|
175
|
-
* layout: {
|
176
|
-
* type: 'anchor',
|
177
|
-
* reserveScrollbar: true // There will be a gap even when there's no scrollbar
|
178
|
-
* },
|
179
|
-
* autoScroll: true,
|
180
|
-
* items: grid,
|
181
|
-
* tbar: {
|
182
|
-
* defaults: {
|
183
|
-
* handler: function(b) {
|
184
|
-
* createFakeData(b.count);
|
185
|
-
* }
|
186
|
-
* },
|
187
|
-
* items: [{
|
188
|
-
* text: '10 Items',
|
189
|
-
* count: 10
|
190
|
-
* },{
|
191
|
-
* text: '100 Items',
|
192
|
-
* count: 100
|
193
|
-
* },{
|
194
|
-
* text: '300 Items',
|
195
|
-
* count: 300
|
196
|
-
* },{
|
197
|
-
* text: '1000 Items',
|
198
|
-
* count: 1000
|
199
|
-
* },{
|
200
|
-
* text: '5000 Items',
|
201
|
-
* count: 5000
|
202
|
-
* }]
|
203
|
-
* }
|
204
|
-
* });
|
205
|
-
*
|
206
|
-
*/
|
207
|
-
reserveScrollbar: false,
|
208
|
-
|
209
|
-
// Begin with no previous adjustments
|
210
|
-
lastOverflowAdjust: {
|
211
|
-
width: 0,
|
212
|
-
height: 0
|
213
|
-
},
|
214
|
-
|
215
|
-
constructor: function () {
|
216
|
-
this.callParent(arguments);
|
217
|
-
this.mixins.elementCt.constructor.call(this);
|
218
|
-
},
|
219
|
-
|
220
|
-
destroy : function() {
|
221
|
-
this.callParent();
|
222
|
-
this.mixins.elementCt.destroy.call(this);
|
223
|
-
},
|
224
|
-
|
225
|
-
initLayout: function() {
|
226
|
-
var me = this,
|
227
|
-
scrollbarWidth = Ext.getScrollbarSize().width;
|
228
|
-
|
229
|
-
me.callParent();
|
230
|
-
|
231
|
-
// Create a default lastOverflowAdjust based upon scrolling configuration.
|
232
|
-
// If the Container is to overflow, or we *always* reserve space for a scrollbar
|
233
|
-
// then reserve space for a vertical scrollbar
|
234
|
-
if (scrollbarWidth && me.manageOverflow && !me.hasOwnProperty('lastOverflowAdjust')) {
|
235
|
-
if (me.owner.autoScroll || me.reserveScrollbar) {
|
236
|
-
me.lastOverflowAdjust = {
|
237
|
-
width: scrollbarWidth,
|
238
|
-
height: 0
|
239
|
-
};
|
240
|
-
}
|
241
|
-
}
|
242
|
-
},
|
243
|
-
|
244
|
-
/**
|
245
|
-
* In addition to work done by our base classes, containers benefit from some extra
|
246
|
-
* cached data. The following properties are added to the ownerContext:
|
247
|
-
*
|
248
|
-
* - visibleItems: the result of {@link #getVisibleItems}
|
249
|
-
* - childItems: the ContextItem[] for each visible item
|
250
|
-
* - targetContext: the ContextItem for the {@link #getTarget} element
|
251
|
-
*/
|
252
|
-
beginLayout: function (ownerContext) {
|
253
|
-
this.callParent(arguments);
|
254
|
-
|
255
|
-
ownerContext.targetContext = ownerContext.getEl('getTarget', this);
|
256
|
-
|
257
|
-
this.cacheChildItems(ownerContext);
|
258
|
-
},
|
259
|
-
|
260
|
-
beginLayoutCycle: function (ownerContext, firstCycle) {
|
261
|
-
var me = this,
|
262
|
-
padEl = me.overflowPadderEl;
|
263
|
-
|
264
|
-
me.callParent(arguments);
|
265
|
-
|
266
|
-
// Begin with the scrollbar adjustment that we used last time - this is more likely to be correct
|
267
|
-
// than beginning with no adjustment at all
|
268
|
-
if (!ownerContext.state.overflowAdjust) {
|
269
|
-
ownerContext.state.overflowAdjust = me.lastOverflowAdjust;
|
270
|
-
}
|
271
|
-
|
272
|
-
if (firstCycle) {
|
273
|
-
if (me.usesContainerHeight) {
|
274
|
-
++ownerContext.consumersContainerHeight;
|
275
|
-
}
|
276
|
-
if (me.usesContainerWidth) {
|
277
|
-
++ownerContext.consumersContainerWidth;
|
278
|
-
}
|
279
|
-
}
|
280
|
-
|
281
|
-
if (padEl) {
|
282
|
-
padEl.setStyle('display', 'none');
|
283
|
-
}
|
284
|
-
},
|
285
|
-
|
286
|
-
completeLayout: function (ownerContext) {
|
287
|
-
// Cache the scrollbar adjustment
|
288
|
-
this.lastOverflowAdjust = ownerContext.state.overflowAdjust;
|
289
|
-
},
|
290
|
-
|
291
|
-
cacheChildItems: function (ownerContext) {
|
292
|
-
var context = ownerContext.context,
|
293
|
-
childItems = [],
|
294
|
-
items = this.getVisibleItems(),
|
295
|
-
length = items.length,
|
296
|
-
i;
|
297
|
-
|
298
|
-
ownerContext.childItems = childItems;
|
299
|
-
ownerContext.visibleItems = items;
|
300
|
-
|
301
|
-
for (i = 0; i < length; ++i) {
|
302
|
-
childItems.push(context.getCmp(items[i]));
|
303
|
-
}
|
304
|
-
},
|
305
|
-
|
306
|
-
cacheElements: function () {
|
307
|
-
var owner = this.owner;
|
308
|
-
|
309
|
-
this.applyChildEls(owner.el, owner.id); // from ElementContainer mixin
|
310
|
-
},
|
311
|
-
|
312
|
-
calculateContentSize: function (ownerContext, dimensions) {
|
313
|
-
var me = this,
|
314
|
-
containerDimensions = (dimensions || 0) | me.manageOverflow |
|
315
|
-
((ownerContext.widthModel.shrinkWrap ? 1 : 0) |
|
316
|
-
(ownerContext.heightModel.shrinkWrap ? 2 : 0)),
|
317
|
-
calcWidth = (containerDimensions & 1) || undefined,
|
318
|
-
calcHeight = (containerDimensions & 2) || undefined,
|
319
|
-
childItems = ownerContext.childItems,
|
320
|
-
length = childItems.length,
|
321
|
-
contentHeight = 0,
|
322
|
-
contentWidth = 0,
|
323
|
-
needed = 0,
|
324
|
-
props = ownerContext.props,
|
325
|
-
targetXY, targetX, targetY, targetPadding,
|
326
|
-
borders, child, childContext, childX, childY, height, i, margins, width, xy;
|
327
|
-
|
328
|
-
if (calcWidth) {
|
329
|
-
if (isNaN(props.contentWidth)) {
|
330
|
-
++needed;
|
331
|
-
} else {
|
332
|
-
calcWidth = undefined;
|
333
|
-
}
|
334
|
-
}
|
335
|
-
if (calcHeight) {
|
336
|
-
if (isNaN(props.contentHeight)) {
|
337
|
-
++needed;
|
338
|
-
} else {
|
339
|
-
calcHeight = undefined;
|
340
|
-
}
|
341
|
-
}
|
342
|
-
|
343
|
-
if (needed) {
|
344
|
-
// TODO - this is rather brute force... maybe a wrapping el or clientHeight/Width
|
345
|
-
// trick might help. Whatever we do, it must either work for Absolute layout or
|
346
|
-
// at least be correctable by an overridden method in that derived class.
|
347
|
-
for (i = 0; i < length; ++i) {
|
348
|
-
childContext = childItems[i];
|
349
|
-
child = childContext.target;
|
350
|
-
height = calcHeight && childContext.getProp('height');
|
351
|
-
width = calcWidth && childContext.getProp('width');
|
352
|
-
margins = childContext.getMarginInfo();
|
353
|
-
|
354
|
-
// getXY is the root method here (meaning that we cannot avoid getting both
|
355
|
-
// even if we need only one), so dip into the DOM if something is needed
|
356
|
-
if ((calcWidth && isNaN(child.x)) || (calcHeight && isNaN(child.y))) {
|
357
|
-
xy = child.el.getXY();
|
358
|
-
if (!targetXY) {
|
359
|
-
targetXY = ownerContext.targetContext.el.getXY();
|
360
|
-
borders = ownerContext.targetContext.getBorderInfo();
|
361
|
-
targetX = targetXY[0] + borders.left;
|
362
|
-
targetY = targetXY[1] + borders.top;
|
363
|
-
}
|
364
|
-
// not worth avoiding the possibly useless calculation here:
|
365
|
-
childX = xy[0] - targetX;
|
366
|
-
childY = xy[1] - targetY;
|
367
|
-
} else {
|
368
|
-
// not worth avoiding these either:
|
369
|
-
childX = child.x;
|
370
|
-
childY = child.y;
|
371
|
-
}
|
372
|
-
// XY includes the top/left margin
|
373
|
-
|
374
|
-
height += margins.bottom;
|
375
|
-
width += margins.right;
|
376
|
-
|
377
|
-
contentHeight = Math.max(contentHeight, childY + height);
|
378
|
-
contentWidth = Math.max(contentWidth, childX + width);
|
379
|
-
|
380
|
-
if (isNaN(contentHeight) && isNaN(contentWidth)) {
|
381
|
-
me.done = false;
|
382
|
-
return;
|
383
|
-
}
|
384
|
-
}
|
385
|
-
|
386
|
-
if (calcWidth || calcHeight) {
|
387
|
-
targetPadding = ownerContext.targetContext.getPaddingInfo();
|
388
|
-
}
|
389
|
-
if (calcWidth && !ownerContext.setContentWidth(contentWidth + targetPadding.right)) {
|
390
|
-
me.done = false;
|
391
|
-
}
|
392
|
-
if (calcHeight && !ownerContext.setContentHeight(contentHeight + targetPadding.bottom)) {
|
393
|
-
me.done = false;
|
394
|
-
}
|
395
|
-
|
396
|
-
/* add a '/' to turn on this log ('//* enables, '/*' disables)
|
397
|
-
if (me.done) {
|
398
|
-
var el = ownerContext.targetContext.el.dom;
|
399
|
-
Ext.log(this.owner.id, '.contentSize: ', contentWidth, 'x', contentHeight,
|
400
|
-
' => scrollSize: ', el.scrollWidth, 'x', el.scrollHeight);
|
401
|
-
}/**/
|
402
|
-
}
|
403
|
-
},
|
404
|
-
|
405
|
-
/**
|
406
|
-
* Handles overflow processing for a container. This should be called once the layout
|
407
|
-
* has determined contentWidth/Height. In addition to the ownerContext passed to the
|
408
|
-
* {@link #calculate} method, this method also needs the containerSize (the object
|
409
|
-
* returned by {@link #getContainerSize}).
|
410
|
-
*
|
411
|
-
* @param {Ext.layout.ContextItem} ownerContext
|
412
|
-
* @param {Object} containerSize
|
413
|
-
* @param {Number} dimensions A bit mask for the overflow managed dimensions. The 0-bit
|
414
|
-
* is for `width` and the 1-bit is for `height`. In other words, a value of 1 would be
|
415
|
-
* only `width`, 2 would be only `height` and 3 would be both.
|
416
|
-
*/
|
417
|
-
calculateOverflow: function (ownerContext, containerSize, dimensions) {
|
418
|
-
var me = this,
|
419
|
-
owner = me.owner,
|
420
|
-
manageOverflow = me.manageOverflow,
|
421
|
-
state = ownerContext.state,
|
422
|
-
overflowAdjust = state.overflowAdjust,
|
423
|
-
padWidth, padHeight, padElContext, padding, scrollRangeFlags,
|
424
|
-
overflow, scrollbarSize, contentW, contentH, ownerW, ownerH, scrollbars,
|
425
|
-
xauto, yauto;
|
426
|
-
|
427
|
-
if (manageOverflow && !state.secondPass && !me.reserveScrollbar) {
|
428
|
-
// Determine the dimensions that have overflow:auto applied. If these come by
|
429
|
-
// way of component config, this does not require a DOM read:
|
430
|
-
if (owner.autoScroll) {
|
431
|
-
xauto = yauto = true;
|
432
|
-
} else {
|
433
|
-
if (owner.overflowX) {
|
434
|
-
xauto = owner.overflowX == 'auto';
|
435
|
-
} else {
|
436
|
-
overflow = ownerContext.targetContext.getStyle('overflow-x');
|
437
|
-
xauto = overflow && overflow != 'hidden' && overflow != 'scroll';
|
438
|
-
}
|
439
|
-
|
440
|
-
if (owner.overflowY) {
|
441
|
-
yauto = owner.overflowY == 'auto';
|
442
|
-
} else {
|
443
|
-
overflow = ownerContext.targetContext.getStyle('overflow-y');
|
444
|
-
yauto = overflow && overflow != 'hidden' && overflow != 'scroll';
|
445
|
-
}
|
446
|
-
}
|
447
|
-
|
448
|
-
// If the container layout is not using width, we don't need to adjust for the
|
449
|
-
// vscroll (likewise for height). Perhaps we don't even need to run the layout
|
450
|
-
// again if the adjustments won't have any effect on the result!
|
451
|
-
if (!containerSize.gotWidth) {
|
452
|
-
xauto = false;
|
453
|
-
}
|
454
|
-
if (!containerSize.gotHeight) {
|
455
|
-
yauto = false;
|
456
|
-
}
|
457
|
-
|
458
|
-
if (xauto || yauto) {
|
459
|
-
scrollbarSize = Ext.getScrollbarSize();
|
460
|
-
|
461
|
-
// as a container we calculate contentWidth/Height, so we don't want
|
462
|
-
// to use getProp and make it look like we are triggered by them...
|
463
|
-
contentW = ownerContext.peek('contentWidth');
|
464
|
-
contentH = ownerContext.peek('contentHeight');
|
465
|
-
ownerW = containerSize.width;
|
466
|
-
ownerH = containerSize.height;
|
467
|
-
|
468
|
-
scrollbars = me.getScrollbarsNeeded(ownerW, ownerH, contentW, contentH);
|
469
|
-
state.overflowState = scrollbars;
|
470
|
-
|
471
|
-
if (typeof dimensions == 'number') {
|
472
|
-
scrollbars &= ~dimensions; // ignore dimensions that have no effect
|
473
|
-
}
|
474
|
-
|
475
|
-
overflowAdjust = {
|
476
|
-
width: (xauto && (scrollbars & 2)) ? scrollbarSize.width : 0,
|
477
|
-
height: (yauto && (scrollbars & 1)) ? scrollbarSize.height : 0
|
478
|
-
};
|
479
|
-
|
480
|
-
// We can have 0-sized scrollbars (new Mac OS) and so don't invalidate
|
481
|
-
// the layout unless this will change something...
|
482
|
-
if (overflowAdjust.width !== me.lastOverflowAdjust.width || overflowAdjust.height !== me.lastOverflowAdjust.height) {
|
483
|
-
me.done = false;
|
484
|
-
|
485
|
-
// we pass overflowAdjust and overflowState in as state for the next
|
486
|
-
// cycle (these are discarded if one of our ownerCt's invalidates):
|
487
|
-
ownerContext.invalidate({
|
488
|
-
state: {
|
489
|
-
overflowAdjust: overflowAdjust,
|
490
|
-
overflowState: state.overflowState,
|
491
|
-
secondPass: true
|
492
|
-
}
|
493
|
-
});
|
494
|
-
}
|
495
|
-
}
|
496
|
-
}
|
497
|
-
|
498
|
-
if (!me.done) {
|
499
|
-
return;
|
500
|
-
}
|
501
|
-
|
502
|
-
padElContext = ownerContext.padElContext ||
|
503
|
-
(ownerContext.padElContext = ownerContext.getEl('overflowPadderEl', me));
|
504
|
-
|
505
|
-
// Even if overflow does not effect the layout, we still do need the padEl to be
|
506
|
-
// sized or hidden appropriately...
|
507
|
-
if (padElContext) {
|
508
|
-
scrollbars = state.overflowState; // the true overflow state
|
509
|
-
padWidth = containerSize.width;
|
510
|
-
padHeight = 0;// TODO me.padHeightAdj; // 0 or 1
|
511
|
-
|
512
|
-
if (scrollbars) {
|
513
|
-
padding = ownerContext.targetContext.getPaddingInfo();
|
514
|
-
scrollRangeFlags = me.scrollRangeFlags;
|
515
|
-
|
516
|
-
if ((scrollbars & 2) && (scrollRangeFlags & 1)) { // if (vscroll and loses bottom)
|
517
|
-
padHeight += padding.bottom;
|
518
|
-
}
|
519
|
-
|
520
|
-
if ((scrollbars & 1) && (scrollRangeFlags & 4)) { // if (hscroll and loses right)
|
521
|
-
padWidth += padding.right;
|
522
|
-
}
|
523
|
-
padElContext.setProp('display', '');
|
524
|
-
padElContext.setSize(padWidth, padHeight);
|
525
|
-
} else {
|
526
|
-
padElContext.setProp('display', 'none');
|
527
|
-
}
|
528
|
-
}
|
529
|
-
},
|
530
|
-
|
531
|
-
/**
|
532
|
-
* Adds layout's itemCls and owning Container's itemCls
|
533
|
-
* @protected
|
534
|
-
*/
|
535
|
-
configureItem: function(item) {
|
536
|
-
var me = this,
|
537
|
-
ownerItemCls = me.owner.itemCls,
|
538
|
-
addClasses = [].concat(me.itemCls || []);
|
539
|
-
|
540
|
-
me.callParent(arguments);
|
541
|
-
|
542
|
-
if (ownerItemCls) {
|
543
|
-
addClasses = Ext.Array.push(addClasses, ownerItemCls);
|
544
|
-
}
|
545
|
-
item.addCls(addClasses);
|
546
|
-
},
|
547
|
-
|
548
|
-
doRenderBody: function (out, renderData) {
|
549
|
-
// Careful! This method is bolted on to the renderTpl so all we get for context is
|
550
|
-
// the renderData! The "this" pointer is the renderTpl instance!
|
551
|
-
|
552
|
-
this.renderItems(out, renderData);
|
553
|
-
this.renderContent(out, renderData);
|
554
|
-
},
|
555
|
-
|
556
|
-
doRenderContainer: function (out, renderData) {
|
557
|
-
// Careful! This method is bolted on to the renderTpl so all we get for context is
|
558
|
-
// the renderData! The "this" pointer is the renderTpl instance!
|
559
|
-
|
560
|
-
var me = renderData.$comp.layout,
|
561
|
-
tpl = me.getRenderTpl(),
|
562
|
-
data = me.getRenderData();
|
563
|
-
|
564
|
-
tpl.applyOut(data, out);
|
565
|
-
},
|
566
|
-
|
567
|
-
doRenderItems: function (out, renderData) {
|
568
|
-
// Careful! This method is bolted on to the renderTpl so all we get for context is
|
569
|
-
// the renderData! The "this" pointer is the renderTpl instance!
|
570
|
-
|
571
|
-
var me = renderData.$layout,
|
572
|
-
tree = me.getRenderTree();
|
573
|
-
|
574
|
-
if (tree) {
|
575
|
-
Ext.DomHelper.generateMarkup(tree, out);
|
576
|
-
}
|
577
|
-
},
|
578
|
-
|
579
|
-
/**
|
580
|
-
* Creates an element that makes bottom/right body padding consistent across browsers.
|
581
|
-
* This element is sized based on the need for scrollbars in {@link #calculateOverflow}.
|
582
|
-
* If the {@link #manageOverflow} option is false, this element is not created.
|
583
|
-
*
|
584
|
-
* See {@link #getScrollRangeFlags} for more details.
|
585
|
-
*/
|
586
|
-
doRenderPadder: function (out, renderData) {
|
587
|
-
// Careful! This method is bolted on to the renderTpl so all we get for context is
|
588
|
-
// the renderData! The "this" pointer is the renderTpl instance!
|
589
|
-
|
590
|
-
var me = renderData.$layout,
|
591
|
-
owner = me.owner,
|
592
|
-
scrollRangeFlags = me.getScrollRangeFlags();
|
593
|
-
|
594
|
-
if (me.manageOverflow == 2) {
|
595
|
-
if (scrollRangeFlags & 5) { // if (loses parent bottom and/or right padding)
|
596
|
-
out.push('<div id="',owner.id,'-overflowPadderEl" ',
|
597
|
-
'style="font-size: 1px; width:1px; height: 1px;');
|
598
|
-
|
599
|
-
// We won't want the height of the padder to cause problems when we only
|
600
|
-
// want to adjust for right padding, so we relatively position it up 1px so
|
601
|
-
// its height of 1px will have no vertical effect. This trick does not work
|
602
|
-
// on IE due to bugs (the effects are worse than the off-by-1px in scroll
|
603
|
-
// height).
|
604
|
-
//
|
605
|
-
/* turns out this does not work on FF (5) either... TODO
|
606
|
-
if (Ext.isIE || Ext.isGecko) {
|
607
|
-
me.padHeightAdj = 0;
|
608
|
-
} else {
|
609
|
-
me.padHeightAdj = 1;
|
610
|
-
out.push('position: relative; top: -1px;');
|
611
|
-
}/**/
|
612
|
-
|
613
|
-
out.push('"></div>');
|
614
|
-
|
615
|
-
me.scrollRangeFlags = scrollRangeFlags; // remember for calculateOverflow
|
616
|
-
}
|
617
|
-
}
|
618
|
-
},
|
619
|
-
|
620
|
-
finishRender: function () {
|
621
|
-
var me = this,
|
622
|
-
target, items;
|
623
|
-
|
624
|
-
me.callParent();
|
625
|
-
|
626
|
-
me.cacheElements();
|
627
|
-
|
628
|
-
target = me.getRenderTarget();
|
629
|
-
items = me.getLayoutItems();
|
630
|
-
|
631
|
-
if (me.targetCls) {
|
632
|
-
me.getTarget().addCls(me.targetCls);
|
633
|
-
}
|
634
|
-
|
635
|
-
me.finishRenderItems(target, items);
|
636
|
-
},
|
637
|
-
|
638
|
-
/**
|
639
|
-
* @private
|
640
|
-
* Called for every layout in the layout context after all the layouts have been finally flushed
|
641
|
-
*/
|
642
|
-
notifyOwner: function() {
|
643
|
-
this.owner.afterLayout(this);
|
644
|
-
},
|
645
|
-
|
646
|
-
/**
|
647
|
-
* Returns the container size (that of the target). Only the fixed-sized dimensions can
|
648
|
-
* be returned because the shrinkWrap dimensions are based on the contentWidth/Height
|
649
|
-
* as determined by the container layout.
|
650
|
-
*
|
651
|
-
* If the {@link #calculateOverflow} method is used and if {@link #manageOverflow} is
|
652
|
-
* true, this may adjust the width/height by the size of scrollbars.
|
653
|
-
*
|
654
|
-
* @param {Ext.layout.ContextItem} ownerContext The owner's context item.
|
655
|
-
* @param {Boolean} [inDom=false] True if the container size must be in the DOM.
|
656
|
-
* @return {Object} The size
|
657
|
-
* @return {Number} return.width The width
|
658
|
-
* @return {Number} return.height The height
|
659
|
-
* @protected
|
660
|
-
*/
|
661
|
-
getContainerSize : function(ownerContext, inDom) {
|
662
|
-
// Subtle But Important:
|
663
|
-
//
|
664
|
-
// We don't want to call getProp/hasProp et.al. unless we in fact need that value
|
665
|
-
// for our results! If we call it and don't need it, the layout manager will think
|
666
|
-
// we depend on it and will schedule us again should it change.
|
667
|
-
|
668
|
-
var targetContext = ownerContext.targetContext,
|
669
|
-
frameInfo = targetContext.getFrameInfo(),
|
670
|
-
padding = targetContext.getPaddingInfo(),
|
671
|
-
got = 0,
|
672
|
-
needed = 0,
|
673
|
-
overflowAdjust = ownerContext.state.overflowAdjust,
|
674
|
-
gotWidth, gotHeight, width, height;
|
675
|
-
|
676
|
-
// In an shrinkWrap width/height case, we must not ask for any of these dimensions
|
677
|
-
// because they will be determined by contentWidth/Height which is calculated by
|
678
|
-
// this layout...
|
679
|
-
|
680
|
-
// Fit/Card layouts are able to set just the width of children, allowing child's
|
681
|
-
// resulting height to autosize the Container.
|
682
|
-
// See examples/tabs/tabs.html for an example of this.
|
683
|
-
|
684
|
-
if (!ownerContext.widthModel.shrinkWrap) {
|
685
|
-
++needed;
|
686
|
-
width = inDom ? targetContext.getDomProp('width') : targetContext.getProp('width');
|
687
|
-
gotWidth = (typeof width == 'number');
|
688
|
-
if (gotWidth) {
|
689
|
-
++got;
|
690
|
-
width -= frameInfo.width + padding.width;
|
691
|
-
if (overflowAdjust) {
|
692
|
-
width -= overflowAdjust.width;
|
693
|
-
}
|
694
|
-
}
|
695
|
-
}
|
696
|
-
|
697
|
-
if (!ownerContext.heightModel.shrinkWrap) {
|
698
|
-
++needed;
|
699
|
-
height = inDom ? targetContext.getDomProp('height') : targetContext.getProp('height');
|
700
|
-
gotHeight = (typeof height == 'number');
|
701
|
-
if (gotHeight) {
|
702
|
-
++got;
|
703
|
-
height -= frameInfo.height + padding.height;
|
704
|
-
if (overflowAdjust) {
|
705
|
-
height -= overflowAdjust.height;
|
706
|
-
}
|
707
|
-
}
|
708
|
-
}
|
709
|
-
|
710
|
-
return {
|
711
|
-
width: width,
|
712
|
-
height: height,
|
713
|
-
needed: needed,
|
714
|
-
got: got,
|
715
|
-
gotAll: got == needed,
|
716
|
-
gotWidth: gotWidth,
|
717
|
-
gotHeight: gotHeight
|
718
|
-
};
|
719
|
-
},
|
720
|
-
|
721
|
-
/**
|
722
|
-
* Returns an array of child components either for a render phase (Performed in the beforeLayout
|
723
|
-
* method of the layout's base class), or the layout phase (onLayout).
|
724
|
-
* @return {Ext.Component[]} of child components
|
725
|
-
*/
|
726
|
-
getLayoutItems: function() {
|
727
|
-
var owner = this.owner,
|
728
|
-
items = owner && owner.items;
|
729
|
-
|
730
|
-
return (items && items.items) || [];
|
731
|
-
},
|
732
|
-
|
733
|
-
getRenderData: function () {
|
734
|
-
var comp = this.owner;
|
735
|
-
|
736
|
-
return {
|
737
|
-
$comp: comp,
|
738
|
-
$layout: this,
|
739
|
-
ownerId: comp.id
|
740
|
-
};
|
741
|
-
},
|
742
|
-
|
743
|
-
/**
|
744
|
-
* @protected
|
745
|
-
* Returns all items that are rendered
|
746
|
-
* @return {Array} All matching items
|
747
|
-
*/
|
748
|
-
getRenderedItems: function() {
|
749
|
-
var me = this,
|
750
|
-
target = me.getRenderTarget(),
|
751
|
-
items = me.getLayoutItems(),
|
752
|
-
ln = items.length,
|
753
|
-
renderedItems = [],
|
754
|
-
i, item;
|
755
|
-
|
756
|
-
for (i = 0; i < ln; i++) {
|
757
|
-
item = items[i];
|
758
|
-
if (item.rendered && me.isValidParent(item, target, i)) {
|
759
|
-
renderedItems.push(item);
|
760
|
-
}
|
761
|
-
}
|
762
|
-
|
763
|
-
return renderedItems;
|
764
|
-
},
|
765
|
-
|
766
|
-
/**
|
767
|
-
* Returns the element into which rendering must take place. Defaults to the owner Container's
|
768
|
-
* target element.
|
769
|
-
*
|
770
|
-
* May be overridden in layout managers which implement an inner element.
|
771
|
-
*
|
772
|
-
* @return {Ext.Element}
|
773
|
-
*/
|
774
|
-
getRenderTarget: function() {
|
775
|
-
return this.owner.getTargetEl();
|
776
|
-
},
|
777
|
-
|
778
|
-
/**
|
779
|
-
* Returns the element into which extra functional DOM elements can be inserted. Defaults to the owner Component's encapsulating element.
|
780
|
-
*
|
781
|
-
* May be overridden in Component layout managers which implement a {@link #getRenderTarget component render target} which must only
|
782
|
-
* contain child components.
|
783
|
-
* @return {Ext.Element}
|
784
|
-
*/
|
785
|
-
getElementTarget: function() {
|
786
|
-
return this.getRenderTarget();
|
787
|
-
},
|
788
|
-
|
789
|
-
getRenderTpl: function () {
|
790
|
-
var me = this,
|
791
|
-
renderTpl = Ext.XTemplate.getTpl(this, 'renderTpl');
|
792
|
-
|
793
|
-
// Make sure all standard callout methods for the owner component are placed on the
|
794
|
-
// XTemplate instance (but only once please):
|
795
|
-
if (!renderTpl.renderContent) {
|
796
|
-
me.owner.setupRenderTpl(renderTpl);
|
797
|
-
}
|
798
|
-
|
799
|
-
return renderTpl;
|
800
|
-
},
|
801
|
-
|
802
|
-
getRenderTree: function () {
|
803
|
-
var result,
|
804
|
-
items = this.owner.items,
|
805
|
-
itemsGen,
|
806
|
-
renderCfgs = {};
|
807
|
-
|
808
|
-
do {
|
809
|
-
itemsGen = items.generation;
|
810
|
-
result = this.getItemsRenderTree(this.getLayoutItems(), renderCfgs);
|
811
|
-
} while (items.generation !== itemsGen);
|
812
|
-
return result;
|
813
|
-
},
|
814
|
-
|
815
|
-
getScrollbarsNeeded: function (width, height, contentWidth, contentHeight) {
|
816
|
-
var scrollbarSize = Ext.getScrollbarSize(),
|
817
|
-
hasWidth = typeof width == 'number',
|
818
|
-
hasHeight = typeof height == 'number',
|
819
|
-
needHorz = 0,
|
820
|
-
needVert = 0;
|
821
|
-
|
822
|
-
// No space-consuming scrollbars.
|
823
|
-
if (!scrollbarSize.width) {
|
824
|
-
return 0;
|
825
|
-
}
|
826
|
-
if (hasHeight && height < contentHeight) {
|
827
|
-
needVert = 2;
|
828
|
-
width -= scrollbarSize.width;
|
829
|
-
}
|
830
|
-
|
831
|
-
if (hasWidth && width < contentWidth) {
|
832
|
-
needHorz = 1;
|
833
|
-
if (!needVert && hasHeight) {
|
834
|
-
height -= scrollbarSize.height;
|
835
|
-
if (height < contentHeight) {
|
836
|
-
needVert = 2;
|
837
|
-
}
|
838
|
-
}
|
839
|
-
}
|
840
|
-
|
841
|
-
return needVert + needHorz;
|
842
|
-
},
|
843
|
-
|
844
|
-
/**
|
845
|
-
* Returns flags indicating cross-browser handling of scrollHeight/Width. In particular,
|
846
|
-
* IE has issues with padding-bottom in a scrolling element (it does not include that
|
847
|
-
* padding in the scrollHeight). Also, margin-bottom on a child in a scrolling element
|
848
|
-
* can be lost.
|
849
|
-
*
|
850
|
-
* All browsers seem to ignore margin-right on children and padding-right on the parent
|
851
|
-
* element (the one with the overflow)
|
852
|
-
*
|
853
|
-
* This method returns a number with the follow bit positions set based on things not
|
854
|
-
* accounted for in scrollHeight and scrollWidth:
|
855
|
-
*
|
856
|
-
* - 1: Scrolling element's padding-bottom is not included in scrollHeight.
|
857
|
-
* - 2: Last child's margin-bottom is not included in scrollHeight.
|
858
|
-
* - 4: Scrolling element's padding-right is not included in scrollWidth.
|
859
|
-
* - 8: Child's margin-right is not included in scrollWidth.
|
860
|
-
*
|
861
|
-
* To work around the margin-bottom issue, it is sufficient to create a 0px tall last
|
862
|
-
* child that will "hide" the margin. This can also be handled by wrapping the children
|
863
|
-
* in an element, again "hiding" the margin. Wrapping the elements is about the only
|
864
|
-
* way to preserve their right margins. This is the strategy used by Column layout.
|
865
|
-
*
|
866
|
-
* To work around the padding-bottom problem, since it is comes from a style on the
|
867
|
-
* parent element, about the only simple fix is to create a last child with height
|
868
|
-
* equal to padding-bottom. To preserve the right padding, the sizing element needs to
|
869
|
-
* have a width that includes the right padding.
|
870
|
-
*/
|
871
|
-
getScrollRangeFlags: (function () {
|
872
|
-
var flags = -1;
|
873
|
-
|
874
|
-
return function () {
|
875
|
-
if (flags < 0) {
|
876
|
-
var div = Ext.getBody().createChild({
|
877
|
-
//cls: 'x-border-box x-hide-offsets',
|
878
|
-
cls: Ext.baseCSSPrefix + 'border-box',
|
879
|
-
style: {
|
880
|
-
width: '100px', height: '100px', padding: '10px',
|
881
|
-
overflow: 'auto'
|
882
|
-
},
|
883
|
-
children: [{
|
884
|
-
style: {
|
885
|
-
border: '1px solid red',
|
886
|
-
width: '150px', height: '150px',
|
887
|
-
margin: '0 5px 5px 0' // TRBL
|
888
|
-
}
|
889
|
-
}]
|
890
|
-
}),
|
891
|
-
scrollHeight = div.dom.scrollHeight,
|
892
|
-
scrollWidth = div.dom.scrollWidth,
|
893
|
-
heightFlags = {
|
894
|
-
// right answer, nothing missing:
|
895
|
-
175: 0,
|
896
|
-
// missing parent padding-bottom:
|
897
|
-
165: 1,
|
898
|
-
// missing child margin-bottom:
|
899
|
-
170: 2,
|
900
|
-
// missing both
|
901
|
-
160: 3
|
902
|
-
},
|
903
|
-
widthFlags = {
|
904
|
-
// right answer, nothing missing:
|
905
|
-
175: 0,
|
906
|
-
// missing parent padding-right:
|
907
|
-
165: 4,
|
908
|
-
// missing child margin-right:
|
909
|
-
170: 8,
|
910
|
-
// missing both
|
911
|
-
160: 12
|
912
|
-
};
|
913
|
-
|
914
|
-
flags = (heightFlags[scrollHeight] || 0) | (widthFlags[scrollWidth] || 0);
|
915
|
-
//Ext.log('flags=',flags.toString(2));
|
916
|
-
div.remove();
|
917
|
-
}
|
918
|
-
|
919
|
-
return flags;
|
920
|
-
};
|
921
|
-
}()),
|
922
|
-
|
923
|
-
/**
|
924
|
-
* Returns the owner component's resize element.
|
925
|
-
* @return {Ext.Element}
|
926
|
-
*/
|
927
|
-
getTarget: function() {
|
928
|
-
return this.owner.getTargetEl();
|
929
|
-
},
|
930
|
-
|
931
|
-
/**
|
932
|
-
* @protected
|
933
|
-
* Returns all items that are both rendered and visible
|
934
|
-
* @return {Array} All matching items
|
935
|
-
*/
|
936
|
-
getVisibleItems: function() {
|
937
|
-
var target = this.getRenderTarget(),
|
938
|
-
items = this.getLayoutItems(),
|
939
|
-
ln = items.length,
|
940
|
-
visibleItems = [],
|
941
|
-
i, item;
|
942
|
-
|
943
|
-
for (i = 0; i < ln; i++) {
|
944
|
-
item = items[i];
|
945
|
-
if (item.rendered && this.isValidParent(item, target, i) && item.hidden !== true) {
|
946
|
-
visibleItems.push(item);
|
947
|
-
}
|
948
|
-
}
|
949
|
-
|
950
|
-
return visibleItems;
|
951
|
-
},
|
952
|
-
|
953
|
-
setupRenderTpl: function (renderTpl) {
|
954
|
-
var me = this;
|
955
|
-
|
956
|
-
renderTpl.renderBody = me.doRenderBody;
|
957
|
-
renderTpl.renderContainer = me.doRenderContainer;
|
958
|
-
renderTpl.renderItems = me.doRenderItems;
|
959
|
-
renderTpl.renderPadder = me.doRenderPadder;
|
960
|
-
}
|
961
|
-
});
|