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,82 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* A Column definition class which renders boolean data fields. See the {@link Ext.grid.column.Column#xtype xtype}
|
3
|
-
* config option of {@link Ext.grid.column.Column} for more details.
|
4
|
-
*
|
5
|
-
* @example
|
6
|
-
* Ext.create('Ext.data.Store', {
|
7
|
-
* storeId:'sampleStore',
|
8
|
-
* fields:[
|
9
|
-
* {name: 'framework', type: 'string'},
|
10
|
-
* {name: 'rocks', type: 'boolean'}
|
11
|
-
* ],
|
12
|
-
* data:{'items':[
|
13
|
-
* { 'framework': "Ext JS 4", 'rocks': true },
|
14
|
-
* { 'framework': "Sencha Touch", 'rocks': true },
|
15
|
-
* { 'framework': "Ext GWT", 'rocks': true },
|
16
|
-
* { 'framework': "Other Guys", 'rocks': false }
|
17
|
-
* ]},
|
18
|
-
* proxy: {
|
19
|
-
* type: 'memory',
|
20
|
-
* reader: {
|
21
|
-
* type: 'json',
|
22
|
-
* root: 'items'
|
23
|
-
* }
|
24
|
-
* }
|
25
|
-
* });
|
26
|
-
*
|
27
|
-
* Ext.create('Ext.grid.Panel', {
|
28
|
-
* title: 'Boolean Column Demo',
|
29
|
-
* store: Ext.data.StoreManager.lookup('sampleStore'),
|
30
|
-
* columns: [
|
31
|
-
* { text: 'Framework', dataIndex: 'framework', flex: 1 },
|
32
|
-
* {
|
33
|
-
* xtype: 'booleancolumn',
|
34
|
-
* text: 'Rocks',
|
35
|
-
* trueText: 'Yes',
|
36
|
-
* falseText: 'No',
|
37
|
-
* dataIndex: 'rocks'
|
38
|
-
* }
|
39
|
-
* ],
|
40
|
-
* height: 200,
|
41
|
-
* width: 400,
|
42
|
-
* renderTo: Ext.getBody()
|
43
|
-
* });
|
44
|
-
*/
|
45
|
-
Ext.define('Ext.grid.column.Boolean', {
|
46
|
-
extend: 'Ext.grid.column.Column',
|
47
|
-
alias: ['widget.booleancolumn'],
|
48
|
-
alternateClassName: 'Ext.grid.BooleanColumn',
|
49
|
-
|
50
|
-
/**
|
51
|
-
* @cfg {String} trueText
|
52
|
-
* The string returned by the renderer when the column value is not falsey.
|
53
|
-
*/
|
54
|
-
//<locale>
|
55
|
-
trueText: 'true',
|
56
|
-
//</locale>
|
57
|
-
|
58
|
-
/**
|
59
|
-
* @cfg {String} falseText
|
60
|
-
* The string returned by the renderer when the column value is falsey (but not undefined).
|
61
|
-
*/
|
62
|
-
//<locale>
|
63
|
-
falseText: 'false',
|
64
|
-
//</locale>
|
65
|
-
|
66
|
-
/**
|
67
|
-
* @cfg {String} undefinedText
|
68
|
-
* The string returned by the renderer when the column value is undefined.
|
69
|
-
*/
|
70
|
-
undefinedText: ' ',
|
71
|
-
|
72
|
-
defaultRenderer: function(value){
|
73
|
-
if (value === undefined) {
|
74
|
-
return this.undefinedText;
|
75
|
-
}
|
76
|
-
|
77
|
-
if (!value || value === 'false') {
|
78
|
-
return this.falseText;
|
79
|
-
}
|
80
|
-
return this.trueText;
|
81
|
-
}
|
82
|
-
});
|
@@ -1,835 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This class specifies the definition for a column inside a {@link Ext.grid.Panel}. It encompasses
|
3
|
-
* both the grid header configuration as well as displaying data within the grid itself. If the
|
4
|
-
* {@link #columns} configuration is specified, this column will become a column group and can
|
5
|
-
* contain other columns inside. In general, this class will not be created directly, rather
|
6
|
-
* an array of column configurations will be passed to the grid:
|
7
|
-
*
|
8
|
-
* @example
|
9
|
-
* Ext.create('Ext.data.Store', {
|
10
|
-
* storeId:'employeeStore',
|
11
|
-
* fields:['firstname', 'lastname', 'seniority', 'dep', 'hired'],
|
12
|
-
* data:[
|
13
|
-
* {firstname:"Michael", lastname:"Scott", seniority:7, dep:"Management", hired:"01/10/2004"},
|
14
|
-
* {firstname:"Dwight", lastname:"Schrute", seniority:2, dep:"Sales", hired:"04/01/2004"},
|
15
|
-
* {firstname:"Jim", lastname:"Halpert", seniority:3, dep:"Sales", hired:"02/22/2006"},
|
16
|
-
* {firstname:"Kevin", lastname:"Malone", seniority:4, dep:"Accounting", hired:"06/10/2007"},
|
17
|
-
* {firstname:"Angela", lastname:"Martin", seniority:5, dep:"Accounting", hired:"10/21/2008"}
|
18
|
-
* ]
|
19
|
-
* });
|
20
|
-
*
|
21
|
-
* Ext.create('Ext.grid.Panel', {
|
22
|
-
* title: 'Column Demo',
|
23
|
-
* store: Ext.data.StoreManager.lookup('employeeStore'),
|
24
|
-
* columns: [
|
25
|
-
* {text: 'First Name', dataIndex:'firstname'},
|
26
|
-
* {text: 'Last Name', dataIndex:'lastname'},
|
27
|
-
* {text: 'Hired Month', dataIndex:'hired', xtype:'datecolumn', format:'M'},
|
28
|
-
* {text: 'Department (Yrs)', xtype:'templatecolumn', tpl:'{dep} ({seniority})'}
|
29
|
-
* ],
|
30
|
-
* width: 400,
|
31
|
-
* forceFit: true,
|
32
|
-
* renderTo: Ext.getBody()
|
33
|
-
* });
|
34
|
-
*
|
35
|
-
* # Convenience Subclasses
|
36
|
-
*
|
37
|
-
* There are several column subclasses that provide default rendering for various data types
|
38
|
-
*
|
39
|
-
* - {@link Ext.grid.column.Action}: Renders icons that can respond to click events inline
|
40
|
-
* - {@link Ext.grid.column.Boolean}: Renders for boolean values
|
41
|
-
* - {@link Ext.grid.column.Date}: Renders for date values
|
42
|
-
* - {@link Ext.grid.column.Number}: Renders for numeric values
|
43
|
-
* - {@link Ext.grid.column.Template}: Renders a value using an {@link Ext.XTemplate} using the record data
|
44
|
-
*
|
45
|
-
* # Setting Sizes
|
46
|
-
*
|
47
|
-
* The columns are laid out by a {@link Ext.layout.container.HBox} layout, so a column can either
|
48
|
-
* be given an explicit width value or a flex configuration. If no width is specified the grid will
|
49
|
-
* automatically the size the column to 100px. For column groups, the size is calculated by measuring
|
50
|
-
* the width of the child columns, so a width option should not be specified in that case.
|
51
|
-
*
|
52
|
-
* # Header Options
|
53
|
-
*
|
54
|
-
* - {@link #text}: Sets the header text for the column
|
55
|
-
* - {@link #sortable}: Specifies whether the column can be sorted by clicking the header or using the column menu
|
56
|
-
* - {@link #hideable}: Specifies whether the column can be hidden using the column menu
|
57
|
-
* - {@link #menuDisabled}: Disables the column header menu
|
58
|
-
* - {@link #cfg-draggable}: Specifies whether the column header can be reordered by dragging
|
59
|
-
* - {@link #groupable}: Specifies whether the grid can be grouped by the column dataIndex. See also {@link Ext.grid.feature.Grouping}
|
60
|
-
*
|
61
|
-
* # Data Options
|
62
|
-
*
|
63
|
-
* - {@link #dataIndex}: The dataIndex is the field in the underlying {@link Ext.data.Store} to use as the value for the column.
|
64
|
-
* - {@link #renderer}: Allows the underlying store value to be transformed before being displayed in the grid
|
65
|
-
*/
|
66
|
-
Ext.define('Ext.grid.column.Column', {
|
67
|
-
extend: 'Ext.grid.header.Container',
|
68
|
-
alias: 'widget.gridcolumn',
|
69
|
-
requires: ['Ext.util.KeyNav', 'Ext.grid.ColumnComponentLayout', 'Ext.grid.ColumnLayout'],
|
70
|
-
alternateClassName: 'Ext.grid.Column',
|
71
|
-
|
72
|
-
baseCls: Ext.baseCSSPrefix + 'column-header ' + Ext.baseCSSPrefix + 'unselectable',
|
73
|
-
|
74
|
-
// Not the standard, automatically applied overCls because we must filter out overs of child headers.
|
75
|
-
hoverCls: Ext.baseCSSPrefix + 'column-header-over',
|
76
|
-
|
77
|
-
handleWidth: 5,
|
78
|
-
|
79
|
-
sortState: null,
|
80
|
-
|
81
|
-
possibleSortStates: ['ASC', 'DESC'],
|
82
|
-
|
83
|
-
childEls: [
|
84
|
-
'titleEl', 'triggerEl', 'textEl'
|
85
|
-
],
|
86
|
-
|
87
|
-
renderTpl:
|
88
|
-
'<div id="{id}-titleEl" class="' + Ext.baseCSSPrefix + 'column-header-inner">' +
|
89
|
-
'<span id="{id}-textEl" class="' + Ext.baseCSSPrefix + 'column-header-text">' +
|
90
|
-
'{text}' +
|
91
|
-
'</span>' +
|
92
|
-
'<tpl if="!menuDisabled">'+
|
93
|
-
'<div id="{id}-triggerEl" class="' + Ext.baseCSSPrefix + 'column-header-trigger"></div>'+
|
94
|
-
'</tpl>' +
|
95
|
-
'</div>' +
|
96
|
-
'{%this.renderContainer(out,values)%}',
|
97
|
-
|
98
|
-
/**
|
99
|
-
* @cfg {Object[]} columns
|
100
|
-
* An optional array of sub-column definitions. This column becomes a group, and houses the columns defined in the
|
101
|
-
* `columns` config.
|
102
|
-
*
|
103
|
-
* Group columns may not be sortable. But they may be hideable and moveable. And you may move headers into and out
|
104
|
-
* of a group. Note that if all sub columns are dragged out of a group, the group is destroyed.
|
105
|
-
*/
|
106
|
-
|
107
|
-
/**
|
108
|
-
* @override
|
109
|
-
* @cfg {String} stateId
|
110
|
-
* An identifier which identifies this column uniquely within the owning grid's {@link #stateful state}.
|
111
|
-
*
|
112
|
-
* This does not have to be *globally* unique. A column's state is not saved standalone. It is encapsulated within
|
113
|
-
* the owning grid's state.
|
114
|
-
*/
|
115
|
-
|
116
|
-
/**
|
117
|
-
* @cfg {String} dataIndex
|
118
|
-
* The name of the field in the grid's {@link Ext.data.Store}'s {@link Ext.data.Model} definition from
|
119
|
-
* which to draw the column's value. **Required.**
|
120
|
-
*/
|
121
|
-
dataIndex: null,
|
122
|
-
|
123
|
-
/**
|
124
|
-
* @cfg {String} text
|
125
|
-
* The header text to be used as innerHTML (html tags are accepted) to display in the Grid.
|
126
|
-
* **Note**: to have a clickable header with no text displayed you can use the default of ` ` aka ` `.
|
127
|
-
*/
|
128
|
-
text: ' ',
|
129
|
-
|
130
|
-
/**
|
131
|
-
* @cfg {String} menuText
|
132
|
-
* The text to render in the column visibility selection menu for this column. If not
|
133
|
-
* specified, will default to the text value.
|
134
|
-
*/
|
135
|
-
menuText: null,
|
136
|
-
|
137
|
-
/**
|
138
|
-
* @cfg {String} [emptyCellText=undefined]
|
139
|
-
* The text to diplay in empty cells (cells with a value of `undefined`, `null`, or `''`).
|
140
|
-
*
|
141
|
-
* Defaults to ` ` aka ` `.
|
142
|
-
*/
|
143
|
-
emptyCellText: ' ',
|
144
|
-
|
145
|
-
/**
|
146
|
-
* @cfg {Boolean} sortable
|
147
|
-
* False to disable sorting of this column. Whether local/remote sorting is used is specified in
|
148
|
-
* `{@link Ext.data.Store#remoteSort}`.
|
149
|
-
*/
|
150
|
-
sortable: true,
|
151
|
-
|
152
|
-
/**
|
153
|
-
* @cfg {Boolean} groupable
|
154
|
-
* If the grid uses a {@link Ext.grid.feature.Grouping}, this option may be used to disable the header menu
|
155
|
-
* item to group by the column selected. By default, the header menu group option is enabled. Set to false to
|
156
|
-
* disable (but still show) the group option in the header menu for the column.
|
157
|
-
*/
|
158
|
-
|
159
|
-
/**
|
160
|
-
* @cfg {Boolean} fixed
|
161
|
-
* True to prevent the column from being resizable.
|
162
|
-
* @deprecated
|
163
|
-
*/
|
164
|
-
|
165
|
-
/**
|
166
|
-
* @cfg {Boolean} resizable
|
167
|
-
* False to prevent the column from being resizable.
|
168
|
-
*/
|
169
|
-
resizable: true,
|
170
|
-
|
171
|
-
/**
|
172
|
-
* @cfg {Boolean} hideable
|
173
|
-
* False to prevent the user from hiding this column.
|
174
|
-
*/
|
175
|
-
hideable: true,
|
176
|
-
|
177
|
-
/**
|
178
|
-
* @cfg {Boolean} menuDisabled
|
179
|
-
* True to disable the column header menu containing sort/hide options.
|
180
|
-
*/
|
181
|
-
menuDisabled: false,
|
182
|
-
|
183
|
-
/**
|
184
|
-
* @cfg {Function} renderer
|
185
|
-
* A renderer is an 'interceptor' method which can be used transform data (value, appearance, etc.)
|
186
|
-
* before it is rendered. Example:
|
187
|
-
*
|
188
|
-
* {
|
189
|
-
* renderer: function(value){
|
190
|
-
* if (value === 1) {
|
191
|
-
* return '1 person';
|
192
|
-
* }
|
193
|
-
* return value + ' people';
|
194
|
-
* }
|
195
|
-
* }
|
196
|
-
*
|
197
|
-
* @cfg {Object} renderer.value The data value for the current cell
|
198
|
-
* @cfg {Object} renderer.metaData A collection of metadata about the current cell; can be used or modified
|
199
|
-
* by the renderer. Recognized properties are: tdCls, tdAttr, and style.
|
200
|
-
* @cfg {Ext.data.Model} renderer.record The record for the current row
|
201
|
-
* @cfg {Number} renderer.rowIndex The index of the current row
|
202
|
-
* @cfg {Number} renderer.colIndex The index of the current column
|
203
|
-
* @cfg {Ext.data.Store} renderer.store The data store
|
204
|
-
* @cfg {Ext.view.View} renderer.view The current view
|
205
|
-
* @cfg {String} renderer.return The HTML string to be rendered.
|
206
|
-
*/
|
207
|
-
renderer: false,
|
208
|
-
|
209
|
-
/**
|
210
|
-
* @cfg {Function} editRenderer
|
211
|
-
* A renderer to be used in conjunction with {@link Ext.grid.plugin.RowEditing RowEditing}. This renderer is used to
|
212
|
-
* display a custom value for non-editable fields.
|
213
|
-
*/
|
214
|
-
editRenderer: false,
|
215
|
-
|
216
|
-
/**
|
217
|
-
* @cfg {String} align
|
218
|
-
* Sets the alignment of the header and rendered columns.
|
219
|
-
* Possible values are: `'left'`, `'center'`, and `'right'`.
|
220
|
-
*/
|
221
|
-
align: 'left',
|
222
|
-
|
223
|
-
/**
|
224
|
-
* @cfg {Boolean} draggable
|
225
|
-
* False to disable drag-drop reordering of this column.
|
226
|
-
*/
|
227
|
-
draggable: true,
|
228
|
-
|
229
|
-
// Header does not use the typical ComponentDraggable class and therefore we
|
230
|
-
// override this with an emptyFn. It is controlled at the HeaderDragZone.
|
231
|
-
initDraggable: Ext.emptyFn,
|
232
|
-
|
233
|
-
/**
|
234
|
-
* @cfg {String} tdCls
|
235
|
-
* A CSS class names to apply to the table cells for this column.
|
236
|
-
*/
|
237
|
-
|
238
|
-
/**
|
239
|
-
* @cfg {Object/String} editor
|
240
|
-
* An optional xtype or config object for a {@link Ext.form.field.Field Field} to use for editing.
|
241
|
-
* Only applicable if the grid is using an {@link Ext.grid.plugin.Editing Editing} plugin.
|
242
|
-
*/
|
243
|
-
|
244
|
-
/**
|
245
|
-
* @cfg {Object/String} field
|
246
|
-
* Alias for {@link #editor}.
|
247
|
-
* @deprecated 4.0.5 Use {@link #editor} instead.
|
248
|
-
*/
|
249
|
-
|
250
|
-
/**
|
251
|
-
* @property {Ext.Element} triggerEl
|
252
|
-
* Element that acts as button for column header dropdown menu.
|
253
|
-
*/
|
254
|
-
|
255
|
-
/**
|
256
|
-
* @property {Ext.Element} textEl
|
257
|
-
* Element that contains the text in column header.
|
258
|
-
*/
|
259
|
-
|
260
|
-
/**
|
261
|
-
* @property {Boolean} isHeader
|
262
|
-
* Set in this class to identify, at runtime, instances which are not instances of the
|
263
|
-
* HeaderContainer base class, but are in fact, the subclass: Header.
|
264
|
-
*/
|
265
|
-
isHeader: true,
|
266
|
-
|
267
|
-
componentLayout: 'columncomponent',
|
268
|
-
|
269
|
-
// We need to override the default component resizable behaviour here
|
270
|
-
initResizable: Ext.emptyFn,
|
271
|
-
|
272
|
-
initComponent: function() {
|
273
|
-
var me = this,
|
274
|
-
renderer;
|
275
|
-
|
276
|
-
if (Ext.isDefined(me.header)) {
|
277
|
-
me.text = me.header;
|
278
|
-
delete me.header;
|
279
|
-
}
|
280
|
-
|
281
|
-
if (!me.triStateSort) {
|
282
|
-
me.possibleSortStates.length = 2;
|
283
|
-
}
|
284
|
-
|
285
|
-
// A group header; It contains items which are themselves Headers
|
286
|
-
if (Ext.isDefined(me.columns)) {
|
287
|
-
me.isGroupHeader = true;
|
288
|
-
|
289
|
-
//<debug>
|
290
|
-
if (me.dataIndex) {
|
291
|
-
Ext.Error.raise('Ext.grid.column.Column: Group header may not accept a dataIndex');
|
292
|
-
}
|
293
|
-
if ((me.width && me.width !== Ext.grid.header.Container.prototype.defaultWidth) || me.flex) {
|
294
|
-
Ext.Error.raise('Ext.grid.column.Column: Group header does not support setting explicit widths or flexs. The group header width is calculated by the sum of its children.');
|
295
|
-
}
|
296
|
-
//</debug>
|
297
|
-
|
298
|
-
// The headers become child items
|
299
|
-
me.items = me.columns;
|
300
|
-
delete me.columns;
|
301
|
-
delete me.flex;
|
302
|
-
delete me.width;
|
303
|
-
me.cls = (me.cls||'') + ' ' + Ext.baseCSSPrefix + 'group-header';
|
304
|
-
me.sortable = false;
|
305
|
-
me.resizable = false;
|
306
|
-
me.align = 'center';
|
307
|
-
} else {
|
308
|
-
// If we are not a group header, then this is not to be used as a container, and must not have a container layout executed, and it must
|
309
|
-
// acquire layout height from DOM content, not from child items.
|
310
|
-
me.isContainer = false;
|
311
|
-
|
312
|
-
// Flexed Headers need to have a minWidth defined so that they can never be squeezed out of existence by the
|
313
|
-
// HeaderContainer's specialized Box layout, the ColumnLayout. The ColumnLayout's overridden calculateChildboxes
|
314
|
-
// method extends the available layout space to accommodate the "desiredWidth" of all the columns.
|
315
|
-
if (me.flex) {
|
316
|
-
me.minWidth = me.minWidth || Ext.grid.plugin.HeaderResizer.prototype.minColWidth;
|
317
|
-
}
|
318
|
-
}
|
319
|
-
me.addCls(Ext.baseCSSPrefix + 'column-header-align-' + me.align);
|
320
|
-
|
321
|
-
renderer = me.renderer;
|
322
|
-
if (renderer) {
|
323
|
-
// When specifying a renderer as a string, it always resolves
|
324
|
-
// to Ext.util.Format
|
325
|
-
if (typeof renderer == 'string') {
|
326
|
-
me.renderer = Ext.util.Format[renderer];
|
327
|
-
}
|
328
|
-
me.hasCustomRenderer = true;
|
329
|
-
} else if (me.defaultRenderer) {
|
330
|
-
me.scope = me;
|
331
|
-
me.renderer = me.defaultRenderer;
|
332
|
-
}
|
333
|
-
|
334
|
-
// Initialize as a HeaderContainer
|
335
|
-
me.callParent(arguments);
|
336
|
-
|
337
|
-
me.on({
|
338
|
-
element: 'el',
|
339
|
-
click: me.onElClick,
|
340
|
-
dblclick: me.onElDblClick,
|
341
|
-
scope: me
|
342
|
-
});
|
343
|
-
me.on({
|
344
|
-
element: 'titleEl',
|
345
|
-
mouseenter: me.onTitleMouseOver,
|
346
|
-
mouseleave: me.onTitleMouseOut,
|
347
|
-
scope: me
|
348
|
-
});
|
349
|
-
},
|
350
|
-
|
351
|
-
onAdd: function(childHeader) {
|
352
|
-
childHeader.isSubHeader = true;
|
353
|
-
childHeader.addCls(Ext.baseCSSPrefix + 'group-sub-header');
|
354
|
-
this.callParent(arguments);
|
355
|
-
},
|
356
|
-
|
357
|
-
onRemove: function(childHeader) {
|
358
|
-
childHeader.isSubHeader = false;
|
359
|
-
childHeader.removeCls(Ext.baseCSSPrefix + 'group-sub-header');
|
360
|
-
this.callParent(arguments);
|
361
|
-
},
|
362
|
-
|
363
|
-
initRenderData: function() {
|
364
|
-
var me = this;
|
365
|
-
return Ext.applyIf(me.callParent(arguments), {
|
366
|
-
text: me.text,
|
367
|
-
menuDisabled: me.menuDisabled
|
368
|
-
});
|
369
|
-
},
|
370
|
-
|
371
|
-
applyColumnState: function (state) {
|
372
|
-
var me = this,
|
373
|
-
defined = Ext.isDefined;
|
374
|
-
|
375
|
-
// apply any columns
|
376
|
-
me.applyColumnsState(state.columns);
|
377
|
-
|
378
|
-
// Only state properties which were saved should be restored.
|
379
|
-
// (Only user-changed properties were saved by getState)
|
380
|
-
if (defined(state.hidden)) {
|
381
|
-
me.hidden = state.hidden;
|
382
|
-
}
|
383
|
-
if (defined(state.locked)) {
|
384
|
-
me.locked = state.locked;
|
385
|
-
}
|
386
|
-
if (defined(state.sortable)) {
|
387
|
-
me.sortable = state.sortable;
|
388
|
-
}
|
389
|
-
if (defined(state.width)) {
|
390
|
-
delete me.flex;
|
391
|
-
me.width = state.width;
|
392
|
-
} else if (defined(state.flex)) {
|
393
|
-
delete me.width;
|
394
|
-
me.flex = state.flex;
|
395
|
-
}
|
396
|
-
},
|
397
|
-
|
398
|
-
getColumnState: function () {
|
399
|
-
var me = this,
|
400
|
-
items = me.items.items,
|
401
|
-
// Check for the existence of items, since column.Action won't have them
|
402
|
-
iLen = items ? items.length : 0,
|
403
|
-
i,
|
404
|
-
columns = [],
|
405
|
-
state = {
|
406
|
-
id: me.getStateId()
|
407
|
-
};
|
408
|
-
|
409
|
-
me.savePropsToState(['hidden', 'sortable', 'locked', 'flex', 'width'], state);
|
410
|
-
|
411
|
-
if (me.isGroupHeader) {
|
412
|
-
for (i = 0; i < iLen; i++) {
|
413
|
-
columns.push(items[i].getColumnState());
|
414
|
-
}
|
415
|
-
|
416
|
-
if (columns.length) {
|
417
|
-
state.columns = columns;
|
418
|
-
}
|
419
|
-
} else if (me.isSubHeader && me.ownerCt.hidden) {
|
420
|
-
// don't set hidden on the children so they can auto height
|
421
|
-
delete me.hidden;
|
422
|
-
}
|
423
|
-
|
424
|
-
if ('width' in state) {
|
425
|
-
delete state.flex; // width wins
|
426
|
-
}
|
427
|
-
return state;
|
428
|
-
},
|
429
|
-
|
430
|
-
getStateId: function () {
|
431
|
-
return this.stateId || this.headerId;
|
432
|
-
},
|
433
|
-
|
434
|
-
/**
|
435
|
-
* Sets the header text for this Column.
|
436
|
-
* @param {String} text The header to display on this Column.
|
437
|
-
*/
|
438
|
-
setText: function(text) {
|
439
|
-
this.text = text;
|
440
|
-
if (this.rendered) {
|
441
|
-
this.textEl.update(text);
|
442
|
-
}
|
443
|
-
},
|
444
|
-
|
445
|
-
// Find the topmost HeaderContainer: An ancestor which is NOT a Header.
|
446
|
-
// Group Headers are themselves HeaderContainers
|
447
|
-
getOwnerHeaderCt: function() {
|
448
|
-
return this.up(':not([isHeader])');
|
449
|
-
},
|
450
|
-
|
451
|
-
/**
|
452
|
-
* Returns the index of this column only if this column is a base level Column. If it
|
453
|
-
* is a group column, it returns `false`.
|
454
|
-
* @return {Number}
|
455
|
-
*/
|
456
|
-
getIndex: function() {
|
457
|
-
return this.isGroupColumn ? false : this.getOwnerHeaderCt().getHeaderIndex(this);
|
458
|
-
},
|
459
|
-
|
460
|
-
/**
|
461
|
-
* Returns the index of this column in the list of *visible* columns only if this column is a base level Column. If it
|
462
|
-
* is a group column, it returns `false`.
|
463
|
-
* @return {Number}
|
464
|
-
*/
|
465
|
-
getVisibleIndex: function() {
|
466
|
-
return this.isGroupColumn ? false : Ext.Array.indexOf(this.getOwnerHeaderCt().getVisibleGridColumns(), this);
|
467
|
-
},
|
468
|
-
|
469
|
-
beforeRender: function() {
|
470
|
-
var me = this,
|
471
|
-
grid = me.up('tablepanel');
|
472
|
-
|
473
|
-
me.callParent();
|
474
|
-
|
475
|
-
// Disable the menu if there's nothing to show in the menu, ie:
|
476
|
-
// Column cannot be sorted, grouped or locked, and there are no grid columns which may be hidden
|
477
|
-
if (grid && (!me.sortable || grid.sortableColumns === false) && !me.groupable &&
|
478
|
-
!me.lockable && (grid.enableColumnHide === false ||
|
479
|
-
!me.getOwnerHeaderCt().getHideableColumns().length)) {
|
480
|
-
me.menuDisabled = true;
|
481
|
-
}
|
482
|
-
},
|
483
|
-
|
484
|
-
afterRender: function() {
|
485
|
-
var me = this,
|
486
|
-
el = me.el;
|
487
|
-
|
488
|
-
me.callParent(arguments);
|
489
|
-
|
490
|
-
if (me.overCls) {
|
491
|
-
el.addClsOnOver(me.overCls);
|
492
|
-
}
|
493
|
-
|
494
|
-
// BrowserBug: Ie8 Strict Mode, this will break the focus for this browser,
|
495
|
-
// must be fixed when focus management will be implemented.
|
496
|
-
if (!Ext.isIE8 || !Ext.isStrict) {
|
497
|
-
me.mon(me.getFocusEl(), {
|
498
|
-
focus: me.onTitleMouseOver,
|
499
|
-
blur: me.onTitleMouseOut,
|
500
|
-
scope: me
|
501
|
-
});
|
502
|
-
}
|
503
|
-
|
504
|
-
me.keyNav = new Ext.util.KeyNav(el, {
|
505
|
-
enter: me.onEnterKey,
|
506
|
-
down: me.onDownKey,
|
507
|
-
scope: me
|
508
|
-
});
|
509
|
-
},
|
510
|
-
|
511
|
-
|
512
|
-
afterComponentLayout: function(width, height, oldWidth, oldHeight) {
|
513
|
-
var me = this,
|
514
|
-
ownerHeaderCt = me.getOwnerHeaderCt();
|
515
|
-
|
516
|
-
me.callParent(arguments);
|
517
|
-
|
518
|
-
if (ownerHeaderCt && (oldWidth != null || me.flex) && width !== oldWidth) {
|
519
|
-
ownerHeaderCt.onHeaderResize(me, width, true);
|
520
|
-
}
|
521
|
-
delete me.oldWidth;
|
522
|
-
},
|
523
|
-
|
524
|
-
// private
|
525
|
-
// After the container has laid out and stretched, it calls this to correctly pad the inner to center the text vertically
|
526
|
-
// Total available header height must be passed to enable padding for inner elements to be calculated.
|
527
|
-
setPadding: function(headerHeight) {
|
528
|
-
var me = this,
|
529
|
-
lineHeight = parseInt(me.textEl.getStyle('line-height'), 10),
|
530
|
-
textHeight = me.textEl.dom.offsetHeight,
|
531
|
-
titleEl = me.titleEl,
|
532
|
-
availableHeight = headerHeight - me.el.getBorderWidth('tb'),
|
533
|
-
titleElHeight;
|
534
|
-
|
535
|
-
// Top title containing element must stretch to match height of sibling group headers
|
536
|
-
if (!me.isGroupHeader) {
|
537
|
-
if (titleEl.getHeight() < availableHeight) {
|
538
|
-
titleEl.setHeight(availableHeight);
|
539
|
-
// the column el's parent element (the 'innerCt') may have an incorrect height
|
540
|
-
// at this point because it may have been shrink wrapped prior to the titleEl's
|
541
|
-
// height being set, so we need to sync it up here
|
542
|
-
me.ownerCt.layout.innerCt.setHeight(headerHeight);
|
543
|
-
}
|
544
|
-
}
|
545
|
-
titleElHeight = titleEl.getViewSize().height;
|
546
|
-
|
547
|
-
// Vertically center the header text in potentially vertically stretched header
|
548
|
-
if (textHeight) {
|
549
|
-
if(lineHeight) {
|
550
|
-
textHeight = Math.ceil(textHeight / lineHeight) * lineHeight;
|
551
|
-
}
|
552
|
-
titleEl.setStyle({
|
553
|
-
paddingTop: Math.floor(Math.max(((titleElHeight - textHeight) / 2), 0)) + 'px'
|
554
|
-
});
|
555
|
-
}
|
556
|
-
|
557
|
-
// Only IE needs this
|
558
|
-
if (Ext.isIE && me.triggerEl) {
|
559
|
-
me.triggerEl.setHeight(titleElHeight);
|
560
|
-
}
|
561
|
-
},
|
562
|
-
|
563
|
-
onDestroy: function() {
|
564
|
-
var me = this;
|
565
|
-
// force destroy on the textEl, IE reports a leak
|
566
|
-
Ext.destroy(me.textEl, me.keyNav);
|
567
|
-
delete me.keyNav;
|
568
|
-
me.callParent(arguments);
|
569
|
-
},
|
570
|
-
|
571
|
-
onTitleMouseOver: function() {
|
572
|
-
this.titleEl.addCls(this.hoverCls);
|
573
|
-
},
|
574
|
-
|
575
|
-
onTitleMouseOut: function() {
|
576
|
-
this.titleEl.removeCls(this.hoverCls);
|
577
|
-
},
|
578
|
-
|
579
|
-
onDownKey: function(e) {
|
580
|
-
if (this.triggerEl) {
|
581
|
-
this.onElClick(e, this.triggerEl.dom || this.el.dom);
|
582
|
-
}
|
583
|
-
},
|
584
|
-
|
585
|
-
onEnterKey: function(e) {
|
586
|
-
this.onElClick(e, this.el.dom);
|
587
|
-
},
|
588
|
-
|
589
|
-
/**
|
590
|
-
* @private
|
591
|
-
* Double click
|
592
|
-
* @param e
|
593
|
-
* @param t
|
594
|
-
*/
|
595
|
-
onElDblClick: function(e, t) {
|
596
|
-
var me = this,
|
597
|
-
ownerCt = me.ownerCt;
|
598
|
-
if (ownerCt && Ext.Array.indexOf(ownerCt.items, me) !== 0 && me.isOnLeftEdge(e) ) {
|
599
|
-
ownerCt.expandToFit(me.previousSibling('gridcolumn'));
|
600
|
-
}
|
601
|
-
},
|
602
|
-
|
603
|
-
onElClick: function(e, t) {
|
604
|
-
|
605
|
-
// The grid's docked HeaderContainer.
|
606
|
-
var me = this,
|
607
|
-
ownerHeaderCt = me.getOwnerHeaderCt();
|
608
|
-
|
609
|
-
if (ownerHeaderCt && !ownerHeaderCt.ddLock) {
|
610
|
-
// Firefox doesn't check the current target in a within check.
|
611
|
-
// Therefore we check the target directly and then within (ancestors)
|
612
|
-
if (me.triggerEl && (e.target === me.triggerEl.dom || t === me.triggerEl.dom || e.within(me.triggerEl))) {
|
613
|
-
ownerHeaderCt.onHeaderTriggerClick(me, e, t);
|
614
|
-
// if its not on the left hand edge, sort
|
615
|
-
} else if (e.getKey() || (!me.isOnLeftEdge(e) && !me.isOnRightEdge(e))) {
|
616
|
-
me.toggleSortState();
|
617
|
-
ownerHeaderCt.onHeaderClick(me, e, t);
|
618
|
-
}
|
619
|
-
}
|
620
|
-
},
|
621
|
-
|
622
|
-
/**
|
623
|
-
* @private
|
624
|
-
* Process UI events from the view. The owning TablePanel calls this method, relaying events from the TableView
|
625
|
-
* @param {String} type Event type, eg 'click'
|
626
|
-
* @param {Ext.view.Table} view TableView Component
|
627
|
-
* @param {HTMLElement} cell Cell HtmlElement the event took place within
|
628
|
-
* @param {Number} recordIndex Index of the associated Store Model (-1 if none)
|
629
|
-
* @param {Number} cellIndex Cell index within the row
|
630
|
-
* @param {Ext.EventObject} e Original event
|
631
|
-
*/
|
632
|
-
processEvent: function(type, view, cell, recordIndex, cellIndex, e) {
|
633
|
-
return this.fireEvent.apply(this, arguments);
|
634
|
-
},
|
635
|
-
|
636
|
-
toggleSortState: function() {
|
637
|
-
var me = this,
|
638
|
-
idx,
|
639
|
-
nextIdx;
|
640
|
-
|
641
|
-
if (me.sortable) {
|
642
|
-
idx = Ext.Array.indexOf(me.possibleSortStates, me.sortState);
|
643
|
-
|
644
|
-
nextIdx = (idx + 1) % me.possibleSortStates.length;
|
645
|
-
me.setSortState(me.possibleSortStates[nextIdx]);
|
646
|
-
}
|
647
|
-
},
|
648
|
-
|
649
|
-
doSort: function(state) {
|
650
|
-
var ds = this.up('tablepanel').store;
|
651
|
-
ds.sort({
|
652
|
-
property: this.getSortParam(),
|
653
|
-
direction: state
|
654
|
-
});
|
655
|
-
},
|
656
|
-
|
657
|
-
/**
|
658
|
-
* Returns the parameter to sort upon when sorting this header. By default this returns the dataIndex and will not
|
659
|
-
* need to be overriden in most cases.
|
660
|
-
* @return {String}
|
661
|
-
*/
|
662
|
-
getSortParam: function() {
|
663
|
-
return this.dataIndex;
|
664
|
-
},
|
665
|
-
|
666
|
-
//setSortState: function(state, updateUI) {
|
667
|
-
//setSortState: function(state, doSort) {
|
668
|
-
setSortState: function(state, skipClear, initial) {
|
669
|
-
var me = this,
|
670
|
-
colSortClsPrefix = Ext.baseCSSPrefix + 'column-header-sort-',
|
671
|
-
ascCls = colSortClsPrefix + 'ASC',
|
672
|
-
descCls = colSortClsPrefix + 'DESC',
|
673
|
-
nullCls = colSortClsPrefix + 'null',
|
674
|
-
ownerHeaderCt = me.getOwnerHeaderCt(),
|
675
|
-
oldSortState = me.sortState;
|
676
|
-
|
677
|
-
if (oldSortState !== state && me.getSortParam()) {
|
678
|
-
me.addCls(colSortClsPrefix + state);
|
679
|
-
// don't trigger a sort on the first time, we just want to update the UI
|
680
|
-
if (state && !initial) {
|
681
|
-
me.doSort(state);
|
682
|
-
}
|
683
|
-
switch (state) {
|
684
|
-
case 'DESC':
|
685
|
-
me.removeCls([ascCls, nullCls]);
|
686
|
-
break;
|
687
|
-
case 'ASC':
|
688
|
-
me.removeCls([descCls, nullCls]);
|
689
|
-
break;
|
690
|
-
case null:
|
691
|
-
me.removeCls([ascCls, descCls]);
|
692
|
-
break;
|
693
|
-
}
|
694
|
-
if (ownerHeaderCt && !me.triStateSort && !skipClear) {
|
695
|
-
ownerHeaderCt.clearOtherSortStates(me);
|
696
|
-
}
|
697
|
-
me.sortState = state;
|
698
|
-
// we only want to fire the event if we have a null state when using triStateSort
|
699
|
-
if (me.triStateSort || state != null) {
|
700
|
-
ownerHeaderCt.fireEvent('sortchange', ownerHeaderCt, me, state);
|
701
|
-
}
|
702
|
-
}
|
703
|
-
},
|
704
|
-
|
705
|
-
hide: function(fromOwner) {
|
706
|
-
var me = this,
|
707
|
-
ownerHeaderCt = me.getOwnerHeaderCt(),
|
708
|
-
owner = me.ownerCt,
|
709
|
-
ownerIsGroup = owner.isGroupHeader,
|
710
|
-
item, items, len, i;
|
711
|
-
|
712
|
-
// owner is a group, hide call didn't come from the owner
|
713
|
-
if (ownerIsGroup && !fromOwner) {
|
714
|
-
items = owner.query('>:not([hidden])');
|
715
|
-
// only have one item that isn't hidden, this is it.
|
716
|
-
if (items.length === 1 && items[0] == me) {
|
717
|
-
me.ownerCt.hide();
|
718
|
-
return;
|
719
|
-
}
|
720
|
-
}
|
721
|
-
|
722
|
-
Ext.suspendLayouts();
|
723
|
-
|
724
|
-
if (me.isGroupHeader) {
|
725
|
-
items = me.items.items;
|
726
|
-
for (i = 0, len = items.length; i < len; i++) {
|
727
|
-
item = items[i];
|
728
|
-
if (!item.hidden) {
|
729
|
-
item.hide(true);
|
730
|
-
}
|
731
|
-
}
|
732
|
-
}
|
733
|
-
|
734
|
-
me.callParent();
|
735
|
-
// Notify owning HeaderContainer
|
736
|
-
ownerHeaderCt.onHeaderHide(me);
|
737
|
-
|
738
|
-
Ext.resumeLayouts(true);
|
739
|
-
},
|
740
|
-
|
741
|
-
show: function(fromOwner, fromChild) {
|
742
|
-
var me = this,
|
743
|
-
ownerCt = me.ownerCt,
|
744
|
-
items,
|
745
|
-
len, i,
|
746
|
-
item;
|
747
|
-
|
748
|
-
Ext.suspendLayouts();
|
749
|
-
|
750
|
-
// If a sub header, ensure that the group header is visible
|
751
|
-
if (me.isSubHeader && ownerCt.hidden) {
|
752
|
-
ownerCt.show(false, true);
|
753
|
-
}
|
754
|
-
|
755
|
-
me.callParent(arguments);
|
756
|
-
|
757
|
-
// If we've just shown a group with all its sub headers hidden, then show all its sub headers
|
758
|
-
if (me.isGroupHeader && fromChild !== true && !me.query(':not([hidden])').length) {
|
759
|
-
items = me.query('>*');
|
760
|
-
for (i = 0, len = items.length; i < len; i++) {
|
761
|
-
item = items[i];
|
762
|
-
if (item.hidden) {
|
763
|
-
item.show(true);
|
764
|
-
}
|
765
|
-
}
|
766
|
-
}
|
767
|
-
|
768
|
-
Ext.resumeLayouts(true);
|
769
|
-
|
770
|
-
// Notify owning HeaderContainer AFTER layout has been flushed so that header and headerCt widths are all correct
|
771
|
-
ownerCt = me.getOwnerHeaderCt();
|
772
|
-
if (ownerCt) {
|
773
|
-
ownerCt.onHeaderShow(me);
|
774
|
-
}
|
775
|
-
},
|
776
|
-
|
777
|
-
getDesiredWidth: function() {
|
778
|
-
var me = this;
|
779
|
-
if (me.rendered && me.componentLayout && me.componentLayout.lastComponentSize) {
|
780
|
-
// headers always have either a width or a flex
|
781
|
-
// because HeaderContainer sets a defaults width
|
782
|
-
// therefore we can ignore the natural width
|
783
|
-
// we use the componentLayout's tracked width so that
|
784
|
-
// we can calculate the desired width when rendered
|
785
|
-
// but not visible because its being obscured by a layout
|
786
|
-
return me.componentLayout.lastComponentSize.width;
|
787
|
-
// Flexed but yet to be rendered this could be the case
|
788
|
-
// where a HeaderContainer and Headers are simply used as data
|
789
|
-
// structures and not rendered.
|
790
|
-
}
|
791
|
-
else if (me.flex) {
|
792
|
-
// this is going to be wrong, the defaultWidth
|
793
|
-
return me.width;
|
794
|
-
}
|
795
|
-
else {
|
796
|
-
return me.width;
|
797
|
-
}
|
798
|
-
},
|
799
|
-
|
800
|
-
getCellSelector: function() {
|
801
|
-
return '.' + Ext.baseCSSPrefix + 'grid-cell-' + this.getItemId();
|
802
|
-
},
|
803
|
-
|
804
|
-
getCellInnerSelector: function() {
|
805
|
-
return this.getCellSelector() + ' .' + Ext.baseCSSPrefix + 'grid-cell-inner';
|
806
|
-
},
|
807
|
-
|
808
|
-
isOnLeftEdge: function(e) {
|
809
|
-
return (e.getXY()[0] - this.el.getLeft() <= this.handleWidth);
|
810
|
-
},
|
811
|
-
|
812
|
-
isOnRightEdge: function(e) {
|
813
|
-
return (this.el.getRight() - e.getXY()[0] <= this.handleWidth);
|
814
|
-
}
|
815
|
-
|
816
|
-
// intentionally omit getEditor and setEditor definitions bc we applyIf into columns
|
817
|
-
// when the editing plugin is injected
|
818
|
-
|
819
|
-
/**
|
820
|
-
* @method getEditor
|
821
|
-
* Retrieves the editing field for editing associated with this header. Returns false if there is no field
|
822
|
-
* associated with the Header the method will return false. If the field has not been instantiated it will be
|
823
|
-
* created. Note: These methods only has an implementation if a Editing plugin has been enabled on the grid.
|
824
|
-
* @param {Object} record The {@link Ext.data.Model Model} instance being edited.
|
825
|
-
* @param {Object} defaultField An object representing a default field to be created
|
826
|
-
* @return {Ext.form.field.Field} field
|
827
|
-
*/
|
828
|
-
/**
|
829
|
-
* @method setEditor
|
830
|
-
* Sets the form field to be used for editing. Note: This method only has an implementation if an Editing plugin has
|
831
|
-
* been enabled on the grid.
|
832
|
-
* @param {Object} field An object representing a field to be created. If no xtype is specified a 'textfield' is
|
833
|
-
* assumed.
|
834
|
-
*/
|
835
|
-
});
|