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,254 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This plugin provides drag and/or drop functionality for a GridView.
|
3
|
-
*
|
4
|
-
* It creates a specialized instance of {@link Ext.dd.DragZone DragZone} which knows how to drag out of a {@link
|
5
|
-
* Ext.grid.View GridView} and loads the data object which is passed to a cooperating {@link Ext.dd.DragZone DragZone}'s
|
6
|
-
* methods with the following properties:
|
7
|
-
*
|
8
|
-
* - `copy` : Boolean
|
9
|
-
*
|
10
|
-
* The value of the GridView's `copy` property, or `true` if the GridView was configured with `allowCopy: true` _and_
|
11
|
-
* the control key was pressed when the drag operation was begun.
|
12
|
-
*
|
13
|
-
* - `view` : GridView
|
14
|
-
*
|
15
|
-
* The source GridView from which the drag originated.
|
16
|
-
*
|
17
|
-
* - `ddel` : HtmlElement
|
18
|
-
*
|
19
|
-
* The drag proxy element which moves with the mouse
|
20
|
-
*
|
21
|
-
* - `item` : HtmlElement
|
22
|
-
*
|
23
|
-
* The GridView node upon which the mousedown event was registered.
|
24
|
-
*
|
25
|
-
* - `records` : Array
|
26
|
-
*
|
27
|
-
* An Array of {@link Ext.data.Model Model}s representing the selected data being dragged from the source GridView.
|
28
|
-
*
|
29
|
-
* It also creates a specialized instance of {@link Ext.dd.DropZone} which cooperates with other DropZones which are
|
30
|
-
* members of the same ddGroup which processes such data objects.
|
31
|
-
*
|
32
|
-
* Adding this plugin to a view means that two new events may be fired from the client GridView, `{@link #beforedrop
|
33
|
-
* beforedrop}` and `{@link #drop drop}`
|
34
|
-
*
|
35
|
-
* @example
|
36
|
-
* Ext.create('Ext.data.Store', {
|
37
|
-
* storeId:'simpsonsStore',
|
38
|
-
* fields:['name'],
|
39
|
-
* data: [["Lisa"], ["Bart"], ["Homer"], ["Marge"]],
|
40
|
-
* proxy: {
|
41
|
-
* type: 'memory',
|
42
|
-
* reader: 'array'
|
43
|
-
* }
|
44
|
-
* });
|
45
|
-
*
|
46
|
-
* Ext.create('Ext.grid.Panel', {
|
47
|
-
* store: 'simpsonsStore',
|
48
|
-
* columns: [
|
49
|
-
* {header: 'Name', dataIndex: 'name', flex: true}
|
50
|
-
* ],
|
51
|
-
* viewConfig: {
|
52
|
-
* plugins: {
|
53
|
-
* ptype: 'gridviewdragdrop',
|
54
|
-
* dragText: 'Drag and drop to reorganize'
|
55
|
-
* }
|
56
|
-
* },
|
57
|
-
* height: 200,
|
58
|
-
* width: 400,
|
59
|
-
* renderTo: Ext.getBody()
|
60
|
-
* });
|
61
|
-
*/
|
62
|
-
Ext.define('Ext.grid.plugin.DragDrop', {
|
63
|
-
extend: 'Ext.AbstractPlugin',
|
64
|
-
alias: 'plugin.gridviewdragdrop',
|
65
|
-
|
66
|
-
uses: [
|
67
|
-
'Ext.view.DragZone',
|
68
|
-
'Ext.grid.ViewDropZone'
|
69
|
-
],
|
70
|
-
|
71
|
-
/**
|
72
|
-
* @event beforedrop
|
73
|
-
* **This event is fired through the GridView. Add listeners to the GridView object**
|
74
|
-
*
|
75
|
-
* Fired when a drop gesture has been triggered by a mouseup event in a valid drop position in the GridView.
|
76
|
-
*
|
77
|
-
* @param {HTMLElement} node The GridView node **if any** over which the mouse was positioned.
|
78
|
-
*
|
79
|
-
* Returning `false` to this event signals that the drop gesture was invalid, and if the drag proxy will animate
|
80
|
-
* back to the point from which the drag began.
|
81
|
-
*
|
82
|
-
* Returning `0` To this event signals that the data transfer operation should not take place, but that the gesture
|
83
|
-
* was valid, and that the repair operation should not take place.
|
84
|
-
*
|
85
|
-
* Any other return value continues with the data transfer operation.
|
86
|
-
*
|
87
|
-
* @param {Object} data The data object gathered at mousedown time by the cooperating {@link Ext.dd.DragZone
|
88
|
-
* DragZone}'s {@link Ext.dd.DragZone#getDragData getDragData} method it contains the following properties:
|
89
|
-
*
|
90
|
-
* - copy : Boolean
|
91
|
-
*
|
92
|
-
* The value of the GridView's `copy` property, or `true` if the GridView was configured with `allowCopy: true` and
|
93
|
-
* the control key was pressed when the drag operation was begun
|
94
|
-
*
|
95
|
-
* - view : GridView
|
96
|
-
*
|
97
|
-
* The source GridView from which the drag originated.
|
98
|
-
*
|
99
|
-
* - ddel : HtmlElement
|
100
|
-
*
|
101
|
-
* The drag proxy element which moves with the mouse
|
102
|
-
*
|
103
|
-
* - item : HtmlElement
|
104
|
-
*
|
105
|
-
* The GridView node upon which the mousedown event was registered.
|
106
|
-
*
|
107
|
-
* - records : Array
|
108
|
-
*
|
109
|
-
* An Array of {@link Ext.data.Model Model}s representing the selected data being dragged from the source GridView.
|
110
|
-
*
|
111
|
-
* @param {Ext.data.Model} overModel The Model over which the drop gesture took place.
|
112
|
-
*
|
113
|
-
* @param {String} dropPosition `"before"` or `"after"` depending on whether the mouse is above or below the midline
|
114
|
-
* of the node.
|
115
|
-
*
|
116
|
-
* @param {Function} dropFunction
|
117
|
-
*
|
118
|
-
* A function to call to complete the data transfer operation and either move or copy Model instances from the
|
119
|
-
* source View's Store to the destination View's Store.
|
120
|
-
*
|
121
|
-
* This is useful when you want to perform some kind of asynchronous processing before confirming the drop, such as
|
122
|
-
* an {@link Ext.window.MessageBox#confirm confirm} call, or an Ajax request.
|
123
|
-
*
|
124
|
-
* Return `0` from this event handler, and call the `dropFunction` at any time to perform the data transfer.
|
125
|
-
*/
|
126
|
-
|
127
|
-
/**
|
128
|
-
* @event drop
|
129
|
-
* **This event is fired through the GridView. Add listeners to the GridView object** Fired when a drop operation
|
130
|
-
* has been completed and the data has been moved or copied.
|
131
|
-
*
|
132
|
-
* @param {HTMLElement} node The GridView node **if any** over which the mouse was positioned.
|
133
|
-
*
|
134
|
-
* @param {Object} data The data object gathered at mousedown time by the cooperating {@link Ext.dd.DragZone
|
135
|
-
* DragZone}'s {@link Ext.dd.DragZone#getDragData getDragData} method it contains the following properties:
|
136
|
-
*
|
137
|
-
* - copy : Boolean
|
138
|
-
*
|
139
|
-
* The value of the GridView's `copy` property, or `true` if the GridView was configured with `allowCopy: true` and
|
140
|
-
* the control key was pressed when the drag operation was begun
|
141
|
-
*
|
142
|
-
* - view : GridView
|
143
|
-
*
|
144
|
-
* The source GridView from which the drag originated.
|
145
|
-
*
|
146
|
-
* - ddel : HtmlElement
|
147
|
-
*
|
148
|
-
* The drag proxy element which moves with the mouse
|
149
|
-
*
|
150
|
-
* - item : HtmlElement
|
151
|
-
*
|
152
|
-
* The GridView node upon which the mousedown event was registered.
|
153
|
-
*
|
154
|
-
* - records : Array
|
155
|
-
*
|
156
|
-
* An Array of {@link Ext.data.Model Model}s representing the selected data being dragged from the source GridView.
|
157
|
-
*
|
158
|
-
* @param {Ext.data.Model} overModel The Model over which the drop gesture took place.
|
159
|
-
*
|
160
|
-
* @param {String} dropPosition `"before"` or `"after"` depending on whether the mouse is above or below the midline
|
161
|
-
* of the node.
|
162
|
-
*/
|
163
|
-
//<locale>
|
164
|
-
dragText : '{0} selected row{1}',
|
165
|
-
//</locale>
|
166
|
-
|
167
|
-
/**
|
168
|
-
* @cfg {String} ddGroup
|
169
|
-
* A named drag drop group to which this object belongs. If a group is specified, then both the DragZones and
|
170
|
-
* DropZone used by this plugin will only interact with other drag drop objects in the same group.
|
171
|
-
*/
|
172
|
-
ddGroup : "GridDD",
|
173
|
-
|
174
|
-
/**
|
175
|
-
* @cfg {String} dragGroup
|
176
|
-
* The ddGroup to which the DragZone will belong.
|
177
|
-
*
|
178
|
-
* This defines which other DropZones the DragZone will interact with. Drag/DropZones only interact with other
|
179
|
-
* Drag/DropZones which are members of the same ddGroup.
|
180
|
-
*/
|
181
|
-
|
182
|
-
/**
|
183
|
-
* @cfg {String} dropGroup
|
184
|
-
* The ddGroup to which the DropZone will belong.
|
185
|
-
*
|
186
|
-
* This defines which other DragZones the DropZone will interact with. Drag/DropZones only interact with other
|
187
|
-
* Drag/DropZones which are members of the same ddGroup.
|
188
|
-
*/
|
189
|
-
|
190
|
-
/**
|
191
|
-
* @cfg {Boolean} enableDrop
|
192
|
-
* False to disallow the View from accepting drop gestures.
|
193
|
-
*/
|
194
|
-
enableDrop: true,
|
195
|
-
|
196
|
-
/**
|
197
|
-
* @cfg {Boolean} enableDrag
|
198
|
-
* False to disallow dragging items from the View.
|
199
|
-
*/
|
200
|
-
enableDrag: true,
|
201
|
-
|
202
|
-
init : function(view) {
|
203
|
-
view.on('render', this.onViewRender, this, {single: true});
|
204
|
-
},
|
205
|
-
|
206
|
-
/**
|
207
|
-
* @private
|
208
|
-
* AbstractComponent calls destroy on all its plugins at destroy time.
|
209
|
-
*/
|
210
|
-
destroy: function() {
|
211
|
-
Ext.destroy(this.dragZone, this.dropZone);
|
212
|
-
},
|
213
|
-
|
214
|
-
enable: function() {
|
215
|
-
var me = this;
|
216
|
-
if (me.dragZone) {
|
217
|
-
me.dragZone.unlock();
|
218
|
-
}
|
219
|
-
if (me.dropZone) {
|
220
|
-
me.dropZone.unlock();
|
221
|
-
}
|
222
|
-
me.callParent();
|
223
|
-
},
|
224
|
-
|
225
|
-
disable: function() {
|
226
|
-
var me = this;
|
227
|
-
if (me.dragZone) {
|
228
|
-
me.dragZone.lock();
|
229
|
-
}
|
230
|
-
if (me.dropZone) {
|
231
|
-
me.dropZone.lock();
|
232
|
-
}
|
233
|
-
me.callParent();
|
234
|
-
},
|
235
|
-
|
236
|
-
onViewRender : function(view) {
|
237
|
-
var me = this;
|
238
|
-
|
239
|
-
if (me.enableDrag) {
|
240
|
-
me.dragZone = new Ext.view.DragZone({
|
241
|
-
view: view,
|
242
|
-
ddGroup: me.dragGroup || me.ddGroup,
|
243
|
-
dragText: me.dragText
|
244
|
-
});
|
245
|
-
}
|
246
|
-
|
247
|
-
if (me.enableDrop) {
|
248
|
-
me.dropZone = new Ext.grid.ViewDropZone({
|
249
|
-
view: view,
|
250
|
-
ddGroup: me.dropGroup || me.ddGroup
|
251
|
-
});
|
252
|
-
}
|
253
|
-
}
|
254
|
-
});
|
@@ -1,561 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* This class provides an abstract grid editing plugin on selected {@link Ext.grid.column.Column columns}.
|
3
|
-
* The editable columns are specified by providing an {@link Ext.grid.column.Column#editor editor}
|
4
|
-
* in the {@link Ext.grid.column.Column column configuration}.
|
5
|
-
*
|
6
|
-
* **Note:** This class should not be used directly. See {@link Ext.grid.plugin.CellEditing} and
|
7
|
-
* {@link Ext.grid.plugin.RowEditing}.
|
8
|
-
*/
|
9
|
-
Ext.define('Ext.grid.plugin.Editing', {
|
10
|
-
alias: 'editing.editing',
|
11
|
-
|
12
|
-
requires: [
|
13
|
-
'Ext.grid.column.Column',
|
14
|
-
'Ext.util.KeyNav'
|
15
|
-
],
|
16
|
-
|
17
|
-
mixins: {
|
18
|
-
observable: 'Ext.util.Observable'
|
19
|
-
},
|
20
|
-
|
21
|
-
/**
|
22
|
-
* @cfg {Number} clicksToEdit
|
23
|
-
* The number of clicks on a grid required to display the editor.
|
24
|
-
*/
|
25
|
-
clicksToEdit: 2,
|
26
|
-
|
27
|
-
/**
|
28
|
-
* @cfg {String} triggerEvent
|
29
|
-
* The event which triggers editing. Supercedes the {@link clicksToEdit} configuration. Maybe one of:
|
30
|
-
*
|
31
|
-
* * cellclick
|
32
|
-
* * celldblclick
|
33
|
-
* * cellfocus
|
34
|
-
* * rowfocus
|
35
|
-
*/
|
36
|
-
triggerEvent: undefined,
|
37
|
-
|
38
|
-
// private
|
39
|
-
defaultFieldXType: 'textfield',
|
40
|
-
|
41
|
-
// cell, row, form
|
42
|
-
editStyle: '',
|
43
|
-
|
44
|
-
constructor: function(config) {
|
45
|
-
var me = this;
|
46
|
-
Ext.apply(me, config);
|
47
|
-
|
48
|
-
me.addEvents(
|
49
|
-
/**
|
50
|
-
* @event beforeedit
|
51
|
-
* Fires before editing is triggered. Return false from event handler to stop the editing.
|
52
|
-
*
|
53
|
-
* @param {Ext.grid.plugin.Editing} editor
|
54
|
-
* @param {Object} e An edit event with the following properties:
|
55
|
-
*
|
56
|
-
* - grid - The grid
|
57
|
-
* - record - The record being edited
|
58
|
-
* - field - The field name being edited
|
59
|
-
* - value - The value for the field being edited.
|
60
|
-
* - row - The grid table row
|
61
|
-
* - column - The grid {@link Ext.grid.column.Column Column} defining the column that is being edited.
|
62
|
-
* - rowIdx - The row index that is being edited
|
63
|
-
* - colIdx - The column index that is being edited
|
64
|
-
* - cancel - Set this to true to cancel the edit or return false from your handler.
|
65
|
-
* - originalValue - Alias for value (only when using {@link Ext.grid.plugin.CellEditing CellEditing}).
|
66
|
-
*/
|
67
|
-
'beforeedit',
|
68
|
-
|
69
|
-
/**
|
70
|
-
* @event edit
|
71
|
-
* Fires after a editing. Usage example:
|
72
|
-
*
|
73
|
-
* grid.on('edit', function(editor, e) {
|
74
|
-
* // commit the changes right after editing finished
|
75
|
-
* e.record.commit();
|
76
|
-
* });
|
77
|
-
*
|
78
|
-
* @param {Ext.grid.plugin.Editing} editor
|
79
|
-
* @param {Object} e An edit event with the following properties:
|
80
|
-
*
|
81
|
-
* - grid - The grid
|
82
|
-
* - record - The record that was edited
|
83
|
-
* - field - The field name that was edited
|
84
|
-
* - value - The value being set
|
85
|
-
* - row - The grid table row
|
86
|
-
* - column - The grid {@link Ext.grid.column.Column Column} defining the column that was edited.
|
87
|
-
* - rowIdx - The row index that was edited
|
88
|
-
* - colIdx - The column index that was edited
|
89
|
-
* - originalValue - The original value for the field, before the edit (only when using {@link Ext.grid.plugin.CellEditing CellEditing})
|
90
|
-
* - originalValues - The original values for the field, before the edit (only when using {@link Ext.grid.plugin.RowEditing RowEditing})
|
91
|
-
* - newValues - The new values being set (only when using {@link Ext.grid.plugin.RowEditing RowEditing})
|
92
|
-
* - view - The grid view (only when using {@link Ext.grid.plugin.RowEditing RowEditing})
|
93
|
-
* - store - The grid store (only when using {@link Ext.grid.plugin.RowEditing RowEditing})
|
94
|
-
*/
|
95
|
-
'edit',
|
96
|
-
|
97
|
-
/**
|
98
|
-
* @event validateedit
|
99
|
-
* Fires after editing, but before the value is set in the record. Return false from event handler to
|
100
|
-
* cancel the change.
|
101
|
-
*
|
102
|
-
* Usage example showing how to remove the red triangle (dirty record indicator) from some records (not all). By
|
103
|
-
* observing the grid's validateedit event, it can be cancelled if the edit occurs on a targeted row (for example)
|
104
|
-
* and then setting the field's new value in the Record directly:
|
105
|
-
*
|
106
|
-
* grid.on('validateedit', function(editor, e) {
|
107
|
-
* var myTargetRow = 6;
|
108
|
-
*
|
109
|
-
* if (e.rowIdx == myTargetRow) {
|
110
|
-
* e.cancel = true;
|
111
|
-
* e.record.data[e.field] = e.value;
|
112
|
-
* }
|
113
|
-
* });
|
114
|
-
*
|
115
|
-
* @param {Ext.grid.plugin.Editing} editor
|
116
|
-
* @param {Object} e An edit event with the following properties:
|
117
|
-
*
|
118
|
-
* - grid - The grid
|
119
|
-
* - record - The record being edited
|
120
|
-
* - field - The field name being edited
|
121
|
-
* - value - The value being set
|
122
|
-
* - row - The grid table row
|
123
|
-
* - column - The grid {@link Ext.grid.column.Column Column} defining the column that is being edited.
|
124
|
-
* - rowIdx - The row index that is being edited
|
125
|
-
* - colIdx - The column index that is being edited
|
126
|
-
* - cancel - Set this to true to cancel the edit or return false from your handler.
|
127
|
-
* - originalValue - The original value for the field, before the edit (only when using {@link Ext.grid.plugin.CellEditing CellEditing})
|
128
|
-
* - originalValues - The original values for the field, before the edit (only when using {@link Ext.grid.plugin.RowEditing RowEditing})
|
129
|
-
* - newValues - The new values being set (only when using {@link Ext.grid.plugin.RowEditing RowEditing})
|
130
|
-
* - view - The grid view (only when using {@link Ext.grid.plugin.RowEditing RowEditing})
|
131
|
-
* - store - The grid store (only when using {@link Ext.grid.plugin.RowEditing RowEditing})
|
132
|
-
*/
|
133
|
-
'validateedit',
|
134
|
-
/**
|
135
|
-
* @event canceledit
|
136
|
-
* Fires when the user started editing but then cancelled the edit.
|
137
|
-
* @param {Ext.grid.plugin.Editing} editor
|
138
|
-
* @param {Object} e An edit event with the following properties:
|
139
|
-
*
|
140
|
-
* - grid - The grid
|
141
|
-
* - record - The record that was edited
|
142
|
-
* - field - The field name that was edited
|
143
|
-
* - value - The value being set
|
144
|
-
* - row - The grid table row
|
145
|
-
* - column - The grid {@link Ext.grid.column.Column Column} defining the column that was edited.
|
146
|
-
* - rowIdx - The row index that was edited
|
147
|
-
* - colIdx - The column index that was edited
|
148
|
-
* - view - The grid view
|
149
|
-
* - store - The grid store
|
150
|
-
*/
|
151
|
-
'canceledit'
|
152
|
-
|
153
|
-
);
|
154
|
-
me.mixins.observable.constructor.call(me);
|
155
|
-
// TODO: Deprecated, remove in 5.0
|
156
|
-
me.on("edit", function(editor, e) {
|
157
|
-
me.fireEvent("afteredit", editor, e);
|
158
|
-
});
|
159
|
-
},
|
160
|
-
|
161
|
-
// private
|
162
|
-
init: function(grid) {
|
163
|
-
var me = this;
|
164
|
-
|
165
|
-
// If the plugin owner is a lockable grid, attach to its normal (right side) grid.
|
166
|
-
if (grid.lockable) {
|
167
|
-
grid = grid.view.normalGrid;
|
168
|
-
}
|
169
|
-
me.grid = grid;
|
170
|
-
|
171
|
-
me.view = grid.view;
|
172
|
-
me.initEvents();
|
173
|
-
me.mon(grid, 'reconfigure', me.onReconfigure, me);
|
174
|
-
me.onReconfigure();
|
175
|
-
|
176
|
-
grid.relayEvents(me, [
|
177
|
-
/**
|
178
|
-
* @event beforeedit
|
179
|
-
* Forwarded event from Ext.grid.plugin.Editing.
|
180
|
-
* @member Ext.panel.Table
|
181
|
-
* @inheritdoc Ext.grid.plugin.Editing#beforeedit
|
182
|
-
*/
|
183
|
-
'beforeedit',
|
184
|
-
/**
|
185
|
-
* @event edit
|
186
|
-
* Forwarded event from Ext.grid.plugin.Editing.
|
187
|
-
* @member Ext.panel.Table
|
188
|
-
* @inheritdoc Ext.grid.plugin.Editing#edit
|
189
|
-
*/
|
190
|
-
'edit',
|
191
|
-
/**
|
192
|
-
* @event validateedit
|
193
|
-
* Forwarded event from Ext.grid.plugin.Editing.
|
194
|
-
* @member Ext.panel.Table
|
195
|
-
* @inheritdoc Ext.grid.plugin.Editing#validateedit
|
196
|
-
*/
|
197
|
-
'validateedit',
|
198
|
-
/**
|
199
|
-
* @event canceledit
|
200
|
-
* Forwarded event from Ext.grid.plugin.Editing.
|
201
|
-
* @member Ext.panel.Table
|
202
|
-
* @inheritdoc Ext.grid.plugin.Editing#canceledit
|
203
|
-
*/
|
204
|
-
'canceledit'
|
205
|
-
]);
|
206
|
-
// Marks the grid as editable, so that the SelectionModel
|
207
|
-
// can make appropriate decisions during navigation
|
208
|
-
grid.isEditable = true;
|
209
|
-
grid.editingPlugin = grid.view.editingPlugin = me;
|
210
|
-
},
|
211
|
-
|
212
|
-
/**
|
213
|
-
* Fires after the grid is reconfigured
|
214
|
-
* @private
|
215
|
-
*/
|
216
|
-
onReconfigure: function(){
|
217
|
-
this.initFieldAccessors(this.view.getGridColumns());
|
218
|
-
},
|
219
|
-
|
220
|
-
/**
|
221
|
-
* @private
|
222
|
-
* AbstractComponent calls destroy on all its plugins at destroy time.
|
223
|
-
*/
|
224
|
-
destroy: function() {
|
225
|
-
var me = this,
|
226
|
-
grid = me.grid;
|
227
|
-
|
228
|
-
Ext.destroy(me.keyNav);
|
229
|
-
me.removeFieldAccessors(grid.getView().getGridColumns());
|
230
|
-
|
231
|
-
// Clear all listeners from all our events, clear all managed listeners we added to other Observables
|
232
|
-
me.clearListeners();
|
233
|
-
|
234
|
-
delete me.grid.editingPlugin;
|
235
|
-
delete me.grid.view.editingPlugin;
|
236
|
-
delete me.grid;
|
237
|
-
delete me.view;
|
238
|
-
delete me.editor;
|
239
|
-
delete me.keyNav;
|
240
|
-
},
|
241
|
-
|
242
|
-
// private
|
243
|
-
getEditStyle: function() {
|
244
|
-
return this.editStyle;
|
245
|
-
},
|
246
|
-
|
247
|
-
// private
|
248
|
-
initFieldAccessors: function(columns) {
|
249
|
-
columns = [].concat(columns);
|
250
|
-
|
251
|
-
var me = this,
|
252
|
-
c,
|
253
|
-
cLen = columns.length,
|
254
|
-
column;
|
255
|
-
|
256
|
-
for (c = 0; c < cLen; c++) {
|
257
|
-
column = columns[c];
|
258
|
-
|
259
|
-
Ext.applyIf(column, {
|
260
|
-
getEditor: function(record, defaultField) {
|
261
|
-
return me.getColumnField(this, defaultField);
|
262
|
-
},
|
263
|
-
|
264
|
-
setEditor: function(field) {
|
265
|
-
me.setColumnField(this, field);
|
266
|
-
}
|
267
|
-
});
|
268
|
-
}
|
269
|
-
},
|
270
|
-
|
271
|
-
// private
|
272
|
-
removeFieldAccessors: function(columns) {
|
273
|
-
columns = [].concat(columns);
|
274
|
-
|
275
|
-
var c,
|
276
|
-
cLen = columns.length,
|
277
|
-
column;
|
278
|
-
|
279
|
-
for (c = 0; c < cLen; c++) {
|
280
|
-
column = columns[c];
|
281
|
-
|
282
|
-
delete column.getEditor;
|
283
|
-
delete column.setEditor;
|
284
|
-
}
|
285
|
-
},
|
286
|
-
|
287
|
-
// private
|
288
|
-
// remaps to the public API of Ext.grid.column.Column.getEditor
|
289
|
-
getColumnField: function(columnHeader, defaultField) {
|
290
|
-
var field = columnHeader.field;
|
291
|
-
|
292
|
-
if (!field && columnHeader.editor) {
|
293
|
-
field = columnHeader.editor;
|
294
|
-
delete columnHeader.editor;
|
295
|
-
}
|
296
|
-
|
297
|
-
if (!field && defaultField) {
|
298
|
-
field = defaultField;
|
299
|
-
}
|
300
|
-
|
301
|
-
if (field) {
|
302
|
-
if (Ext.isString(field)) {
|
303
|
-
field = { xtype: field };
|
304
|
-
}
|
305
|
-
if (!field.isFormField) {
|
306
|
-
field = Ext.ComponentManager.create(field, this.defaultFieldXType);
|
307
|
-
}
|
308
|
-
columnHeader.field = field;
|
309
|
-
|
310
|
-
Ext.apply(field, {
|
311
|
-
name: columnHeader.dataIndex
|
312
|
-
});
|
313
|
-
|
314
|
-
return field;
|
315
|
-
}
|
316
|
-
},
|
317
|
-
|
318
|
-
// private
|
319
|
-
// remaps to the public API of Ext.grid.column.Column.setEditor
|
320
|
-
setColumnField: function(column, field) {
|
321
|
-
if (Ext.isObject(field) && !field.isFormField) {
|
322
|
-
field = Ext.ComponentManager.create(field, this.defaultFieldXType);
|
323
|
-
}
|
324
|
-
column.field = field;
|
325
|
-
},
|
326
|
-
|
327
|
-
// private
|
328
|
-
initEvents: function() {
|
329
|
-
var me = this;
|
330
|
-
me.initEditTriggers();
|
331
|
-
me.initCancelTriggers();
|
332
|
-
},
|
333
|
-
|
334
|
-
// @abstract
|
335
|
-
initCancelTriggers: Ext.emptyFn,
|
336
|
-
|
337
|
-
// private
|
338
|
-
initEditTriggers: function() {
|
339
|
-
var me = this,
|
340
|
-
view = me.view;
|
341
|
-
|
342
|
-
// Listen for the edit trigger event.
|
343
|
-
if (me.triggerEvent == 'cellfocus') {
|
344
|
-
me.mon(view, 'cellfocus', me.onCellFocus, me);
|
345
|
-
} else if (me.triggerEvent == 'rowfocus') {
|
346
|
-
me.mon(view, 'rowfocus', me.onRowFocus, me);
|
347
|
-
} else {
|
348
|
-
|
349
|
-
// Prevent the View from processing when the SelectionModel focuses.
|
350
|
-
// This is because the SelectionModel processes the mousedown event, and
|
351
|
-
// focusing causes a scroll which means that the subsequent mouseup might
|
352
|
-
// take place at a different document XY position, and will therefore
|
353
|
-
// not trigger a click.
|
354
|
-
// This Editor must call the View's focusCell method directly when we recieve a request to edit
|
355
|
-
if (view.selModel.isCellModel) {
|
356
|
-
view.onCellFocus = Ext.Function.bind(me.beforeViewCellFocus, me);
|
357
|
-
}
|
358
|
-
|
359
|
-
// Listen for whichever click event we are configured to use
|
360
|
-
me.mon(view, me.triggerEvent || ('cell' + (me.clicksToEdit === 1 ? 'click' : 'dblclick')), me.onCellClick, me);
|
361
|
-
}
|
362
|
-
view.on('render', me.addHeaderEvents, me, {single: true});
|
363
|
-
},
|
364
|
-
|
365
|
-
// Override of View's method so that we can pre-empt the View's processing if the view is being triggered by a mousedown
|
366
|
-
beforeViewCellFocus: function(position) {
|
367
|
-
// Pass call on to view if the navigation is from the keyboard, or we are not going to edit this cell.
|
368
|
-
if (this.view.selModel.keyNavigation || !this.isCellEditable || !this.isCellEditable(position.row, position.columnHeader)) {
|
369
|
-
this.view.focusCell.apply(this.view, arguments);
|
370
|
-
}
|
371
|
-
},
|
372
|
-
|
373
|
-
// private. Used if we are triggered by the rowfocus event
|
374
|
-
onRowFocus: function(record, row, rowIdx) {
|
375
|
-
this.startEdit(row, 0);
|
376
|
-
},
|
377
|
-
|
378
|
-
// private. Used if we are triggered by the cellfocus event
|
379
|
-
onCellFocus: function(record, cell, position) {
|
380
|
-
this.startEdit(position.row, position.column);
|
381
|
-
},
|
382
|
-
|
383
|
-
// private. Used if we are triggered by a cellclick event
|
384
|
-
onCellClick: function(view, cell, colIdx, record, row, rowIdx, e) {
|
385
|
-
// cancel editing if the element that was clicked was a tree expander
|
386
|
-
if(!view.expanderSelector || !e.getTarget(view.expanderSelector)) {
|
387
|
-
this.startEdit(record, view.getHeaderAtIndex(colIdx));
|
388
|
-
}
|
389
|
-
},
|
390
|
-
|
391
|
-
addHeaderEvents: function(){
|
392
|
-
var me = this;
|
393
|
-
me.mon(me.grid.headerCt, {
|
394
|
-
scope: me,
|
395
|
-
add: me.onColumnAdd,
|
396
|
-
remove: me.onColumnRemove
|
397
|
-
});
|
398
|
-
|
399
|
-
me.keyNav = Ext.create('Ext.util.KeyNav', me.view.el, {
|
400
|
-
enter: me.onEnterKey,
|
401
|
-
esc: me.onEscKey,
|
402
|
-
scope: me
|
403
|
-
});
|
404
|
-
},
|
405
|
-
|
406
|
-
// private
|
407
|
-
onColumnAdd: function(ct, column) {
|
408
|
-
if (column.isHeader) {
|
409
|
-
this.initFieldAccessors(column);
|
410
|
-
}
|
411
|
-
},
|
412
|
-
|
413
|
-
// private
|
414
|
-
onColumnRemove: function(ct, column) {
|
415
|
-
if (column.isHeader) {
|
416
|
-
this.removeFieldAccessors(column);
|
417
|
-
}
|
418
|
-
},
|
419
|
-
|
420
|
-
// private
|
421
|
-
onEnterKey: function(e) {
|
422
|
-
var me = this,
|
423
|
-
grid = me.grid,
|
424
|
-
selModel = grid.getSelectionModel(),
|
425
|
-
record,
|
426
|
-
pos,
|
427
|
-
columnHeader = grid.headerCt.getHeaderAtIndex(0);
|
428
|
-
|
429
|
-
// Calculate editing start position from SelectionModel
|
430
|
-
// CellSelectionModel
|
431
|
-
if (selModel.getCurrentPosition) {
|
432
|
-
pos = selModel.getCurrentPosition();
|
433
|
-
if (pos) {
|
434
|
-
record = grid.store.getAt(pos.row);
|
435
|
-
columnHeader = grid.headerCt.getHeaderAtIndex(pos.column);
|
436
|
-
}
|
437
|
-
}
|
438
|
-
// RowSelectionModel
|
439
|
-
else {
|
440
|
-
record = selModel.getLastSelected();
|
441
|
-
}
|
442
|
-
|
443
|
-
// If there was a selection to provide a starting context...
|
444
|
-
if (record && columnHeader) {
|
445
|
-
me.startEdit(record, columnHeader);
|
446
|
-
}
|
447
|
-
},
|
448
|
-
|
449
|
-
// private
|
450
|
-
onEscKey: function(e) {
|
451
|
-
this.cancelEdit();
|
452
|
-
},
|
453
|
-
|
454
|
-
/**
|
455
|
-
* @private
|
456
|
-
* @template
|
457
|
-
* Template method called before editing begins.
|
458
|
-
* @param {Object} context The current editing context
|
459
|
-
* @return {Boolean} Return false to cancel the editing process
|
460
|
-
*/
|
461
|
-
beforeEdit: Ext.emptyFn,
|
462
|
-
|
463
|
-
/**
|
464
|
-
* Starts editing the specified record, using the specified Column definition to define which field is being edited.
|
465
|
-
* @param {Ext.data.Model/Number} record The Store data record which backs the row to be edited, or index of the record in Store.
|
466
|
-
* @param {Ext.grid.column.Column/Number} columnHeader The Column object defining the column to be edited, or index of the column.
|
467
|
-
*/
|
468
|
-
startEdit: function(record, columnHeader) {
|
469
|
-
var me = this,
|
470
|
-
context = me.getEditingContext(record, columnHeader);
|
471
|
-
|
472
|
-
if (me.beforeEdit(context) === false || me.fireEvent('beforeedit', me, context) === false || context.cancel || !me.grid.view.isVisible(true)) {
|
473
|
-
return false;
|
474
|
-
}
|
475
|
-
|
476
|
-
me.context = context;
|
477
|
-
me.editing = true;
|
478
|
-
},
|
479
|
-
|
480
|
-
// TODO: Have this use a new class Ext.grid.CellContext for use here, and in CellSelectionModel
|
481
|
-
/**
|
482
|
-
* @private
|
483
|
-
* Collects all information necessary for any subclasses to perform their editing functions.
|
484
|
-
* @param record
|
485
|
-
* @param columnHeader
|
486
|
-
* @returns {Object} The editing context based upon the passed record and column
|
487
|
-
*/
|
488
|
-
getEditingContext: function(record, columnHeader) {
|
489
|
-
var me = this,
|
490
|
-
grid = me.grid,
|
491
|
-
view = grid.getView(),
|
492
|
-
node = view.getNode(record),
|
493
|
-
rowIdx, colIdx;
|
494
|
-
|
495
|
-
// An intervening listener may have deleted the Record
|
496
|
-
if (!node) {
|
497
|
-
return;
|
498
|
-
}
|
499
|
-
|
500
|
-
// Coerce the column index to the closest visible column
|
501
|
-
columnHeader = grid.headerCt.getVisibleHeaderClosestToIndex(Ext.isNumber(columnHeader) ? columnHeader : columnHeader.getIndex());
|
502
|
-
|
503
|
-
// No corresponding column. Possible if all columns have been moved to the other side of a lockable grid pair
|
504
|
-
if (!columnHeader) {
|
505
|
-
return;
|
506
|
-
}
|
507
|
-
|
508
|
-
colIdx = columnHeader.getIndex();
|
509
|
-
|
510
|
-
if (Ext.isNumber(record)) {
|
511
|
-
// look up record if numeric row index was passed
|
512
|
-
rowIdx = record;
|
513
|
-
record = view.getRecord(node);
|
514
|
-
} else {
|
515
|
-
rowIdx = view.indexOf(node);
|
516
|
-
}
|
517
|
-
|
518
|
-
return {
|
519
|
-
grid : grid,
|
520
|
-
record : record,
|
521
|
-
field : columnHeader.dataIndex,
|
522
|
-
value : record.get(columnHeader.dataIndex),
|
523
|
-
row : view.getNode(rowIdx),
|
524
|
-
column : columnHeader,
|
525
|
-
rowIdx : rowIdx,
|
526
|
-
colIdx : colIdx
|
527
|
-
};
|
528
|
-
},
|
529
|
-
|
530
|
-
/**
|
531
|
-
* Cancels any active edit that is in progress.
|
532
|
-
*/
|
533
|
-
cancelEdit: function() {
|
534
|
-
var me = this;
|
535
|
-
|
536
|
-
me.editing = false;
|
537
|
-
me.fireEvent('canceledit', me, me.context);
|
538
|
-
},
|
539
|
-
|
540
|
-
/**
|
541
|
-
* Completes the edit if there is an active edit in progress.
|
542
|
-
*/
|
543
|
-
completeEdit: function() {
|
544
|
-
var me = this;
|
545
|
-
|
546
|
-
if (me.editing && me.validateEdit()) {
|
547
|
-
me.fireEvent('edit', me, me.context);
|
548
|
-
}
|
549
|
-
|
550
|
-
delete me.context;
|
551
|
-
me.editing = false;
|
552
|
-
},
|
553
|
-
|
554
|
-
// @abstract
|
555
|
-
validateEdit: function() {
|
556
|
-
var me = this,
|
557
|
-
context = me.context;
|
558
|
-
|
559
|
-
return me.fireEvent('validateedit', me, context) !== false && !context.cancel;
|
560
|
-
}
|
561
|
-
});
|