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,1103 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @class Ext.view.AbstractView
|
3
|
-
* This is an abstract superclass and should not be used directly. Please see {@link Ext.view.View}.
|
4
|
-
* @private
|
5
|
-
*/
|
6
|
-
Ext.define('Ext.view.AbstractView', {
|
7
|
-
extend: 'Ext.Component',
|
8
|
-
requires: [
|
9
|
-
'Ext.LoadMask',
|
10
|
-
'Ext.data.StoreManager',
|
11
|
-
'Ext.CompositeElementLite',
|
12
|
-
'Ext.DomQuery',
|
13
|
-
'Ext.selection.DataViewModel'
|
14
|
-
],
|
15
|
-
mixins: {
|
16
|
-
bindable: 'Ext.util.Bindable'
|
17
|
-
},
|
18
|
-
|
19
|
-
inheritableStatics: {
|
20
|
-
getRecord: function(node) {
|
21
|
-
return this.getBoundView(node).getRecord(node);
|
22
|
-
},
|
23
|
-
|
24
|
-
getBoundView: function(node) {
|
25
|
-
return Ext.getCmp(node.boundView);
|
26
|
-
}
|
27
|
-
},
|
28
|
-
|
29
|
-
/**
|
30
|
-
* @cfg {String/String[]/Ext.XTemplate} tpl (required)
|
31
|
-
* The HTML fragment or an array of fragments that will make up the template used by this DataView. This should
|
32
|
-
* be specified in the same format expected by the constructor of {@link Ext.XTemplate}.
|
33
|
-
*/
|
34
|
-
/**
|
35
|
-
* @cfg {Ext.data.Store} store (required)
|
36
|
-
* The {@link Ext.data.Store} to bind this DataView to.
|
37
|
-
*/
|
38
|
-
|
39
|
-
/**
|
40
|
-
* @cfg {Boolean} deferInitialRefresh
|
41
|
-
* <p>Defaults to <code>true</code> to defer the initial refresh of the view.</p>
|
42
|
-
* <p>This allows the View to execute its render and initial layout more quickly because the process will not be encumbered
|
43
|
-
* by the expensive update of the view structure.</p>
|
44
|
-
* <p><b>Important: </b>Be aware that this will mean that the View's item elements will not be available immediately upon render, so
|
45
|
-
* <i>selection</i> may not take place at render time. To access a View's item elements as soon as possible, use the {@link #viewready} event.
|
46
|
-
* Or set <code>deferInitialrefresh</code> to false, but this will be at the cost of slower rendering.</p>
|
47
|
-
*/
|
48
|
-
deferInitialRefresh: true,
|
49
|
-
|
50
|
-
/**
|
51
|
-
* @cfg {String} itemSelector (required)
|
52
|
-
* <b>This is a required setting</b>. A simple CSS selector (e.g. <tt>div.some-class</tt> or
|
53
|
-
* <tt>span:first-child</tt>) that will be used to determine what nodes this DataView will be
|
54
|
-
* working with. The itemSelector is used to map DOM nodes to records. As such, there should
|
55
|
-
* only be one root level element that matches the selector for each record.
|
56
|
-
*/
|
57
|
-
|
58
|
-
/**
|
59
|
-
* @cfg {String} itemCls
|
60
|
-
* Specifies the class to be assigned to each element in the view when used in conjunction with the
|
61
|
-
* {@link #itemTpl} configuration.
|
62
|
-
*/
|
63
|
-
itemCls: Ext.baseCSSPrefix + 'dataview-item',
|
64
|
-
|
65
|
-
/**
|
66
|
-
* @cfg {String/String[]/Ext.XTemplate} itemTpl
|
67
|
-
* The inner portion of the item template to be rendered. Follows an XTemplate
|
68
|
-
* structure and will be placed inside of a tpl.
|
69
|
-
*/
|
70
|
-
|
71
|
-
/**
|
72
|
-
* @cfg {String} overItemCls
|
73
|
-
* A CSS class to apply to each item in the view on mouseover.
|
74
|
-
* Ensure {@link #trackOver} is set to `true` to make use of this.
|
75
|
-
*/
|
76
|
-
|
77
|
-
/**
|
78
|
-
* @cfg {String} loadingText
|
79
|
-
* A string to display during data load operations. If specified, this text will be
|
80
|
-
* displayed in a loading div and the view's contents will be cleared while loading, otherwise the view's
|
81
|
-
* contents will continue to display normally until the new data is loaded and the contents are replaced.
|
82
|
-
*/
|
83
|
-
//<locale>
|
84
|
-
loadingText: 'Loading...',
|
85
|
-
//</locale>
|
86
|
-
|
87
|
-
/**
|
88
|
-
* @cfg {Boolean/Object} loadMask
|
89
|
-
* False to disable a load mask from displaying will the view is loading. This can also be a
|
90
|
-
* {@link Ext.LoadMask} configuration object.
|
91
|
-
*/
|
92
|
-
loadMask: true,
|
93
|
-
|
94
|
-
/**
|
95
|
-
* @cfg {String} loadingCls
|
96
|
-
* The CSS class to apply to the loading message element. Defaults to Ext.LoadMask.prototype.msgCls "x-mask-loading".
|
97
|
-
*/
|
98
|
-
|
99
|
-
/**
|
100
|
-
* @cfg {Boolean} loadingUseMsg
|
101
|
-
* Whether or not to use the loading message.
|
102
|
-
* @private
|
103
|
-
*/
|
104
|
-
loadingUseMsg: true,
|
105
|
-
|
106
|
-
|
107
|
-
/**
|
108
|
-
* @cfg {Number} loadingHeight
|
109
|
-
* If specified, gives an explicit height for the data view when it is showing the {@link #loadingText},
|
110
|
-
* if that is specified. This is useful to prevent the view's height from collapsing to zero when the
|
111
|
-
* loading mask is applied and there are no other contents in the data view.
|
112
|
-
*/
|
113
|
-
|
114
|
-
/**
|
115
|
-
* @cfg {String} [selectedItemCls='x-view-selected']
|
116
|
-
* A CSS class to apply to each selected item in the view.
|
117
|
-
*/
|
118
|
-
selectedItemCls: Ext.baseCSSPrefix + 'item-selected',
|
119
|
-
|
120
|
-
/**
|
121
|
-
* @cfg {String} emptyText
|
122
|
-
* The text to display in the view when there is no data to display.
|
123
|
-
* Note that when using local data the emptyText will not be displayed unless you set
|
124
|
-
* the {@link #deferEmptyText} option to false.
|
125
|
-
*/
|
126
|
-
//<locale>
|
127
|
-
emptyText: "",
|
128
|
-
//</locale>
|
129
|
-
|
130
|
-
/**
|
131
|
-
* @cfg {Boolean} deferEmptyText
|
132
|
-
* True to defer emptyText being applied until the store's first load.
|
133
|
-
*/
|
134
|
-
deferEmptyText: true,
|
135
|
-
|
136
|
-
/**
|
137
|
-
* @cfg {Boolean} trackOver
|
138
|
-
* True to enable mouseenter and mouseleave events
|
139
|
-
*/
|
140
|
-
trackOver: false,
|
141
|
-
|
142
|
-
/**
|
143
|
-
* @cfg {Boolean} blockRefresh
|
144
|
-
* Set this to true to ignore refresh events on the bound store. This is useful if
|
145
|
-
* you wish to provide custom transition animations via a plugin
|
146
|
-
*/
|
147
|
-
blockRefresh: false,
|
148
|
-
|
149
|
-
/**
|
150
|
-
* @cfg {Boolean} disableSelection
|
151
|
-
* True to disable selection within the DataView. This configuration will lock the selection model
|
152
|
-
* that the DataView uses.
|
153
|
-
*/
|
154
|
-
|
155
|
-
/**
|
156
|
-
* @cfg {Boolean} preserveScrollOnRefresh=false
|
157
|
-
* True to preserve scroll position across refresh operations.
|
158
|
-
*/
|
159
|
-
preserveScrollOnRefresh: false,
|
160
|
-
|
161
|
-
//private
|
162
|
-
last: false,
|
163
|
-
|
164
|
-
triggerEvent: 'itemclick',
|
165
|
-
triggerCtEvent: 'containerclick',
|
166
|
-
|
167
|
-
addCmpEvents: function() {
|
168
|
-
|
169
|
-
},
|
170
|
-
|
171
|
-
// private
|
172
|
-
initComponent : function(){
|
173
|
-
var me = this,
|
174
|
-
isDef = Ext.isDefined,
|
175
|
-
itemTpl = me.itemTpl,
|
176
|
-
memberFn = {};
|
177
|
-
|
178
|
-
if (itemTpl) {
|
179
|
-
if (Ext.isArray(itemTpl)) {
|
180
|
-
// string array
|
181
|
-
itemTpl = itemTpl.join('');
|
182
|
-
} else if (Ext.isObject(itemTpl)) {
|
183
|
-
// tpl instance
|
184
|
-
memberFn = Ext.apply(memberFn, itemTpl.initialConfig);
|
185
|
-
itemTpl = itemTpl.html;
|
186
|
-
}
|
187
|
-
|
188
|
-
if (!me.itemSelector) {
|
189
|
-
me.itemSelector = '.' + me.itemCls;
|
190
|
-
}
|
191
|
-
|
192
|
-
itemTpl = Ext.String.format('<tpl for="."><div class="{0}">{1}</div></tpl>', me.itemCls, itemTpl);
|
193
|
-
me.tpl = new Ext.XTemplate(itemTpl, memberFn);
|
194
|
-
}
|
195
|
-
|
196
|
-
//<debug>
|
197
|
-
if (!isDef(me.tpl) || !isDef(me.itemSelector)) {
|
198
|
-
Ext.Error.raise({
|
199
|
-
sourceClass: 'Ext.view.View',
|
200
|
-
tpl: me.tpl,
|
201
|
-
itemSelector: me.itemSelector,
|
202
|
-
msg: "DataView requires both tpl and itemSelector configurations to be defined."
|
203
|
-
});
|
204
|
-
}
|
205
|
-
//</debug>
|
206
|
-
|
207
|
-
me.callParent();
|
208
|
-
if(Ext.isString(me.tpl) || Ext.isArray(me.tpl)){
|
209
|
-
me.tpl = new Ext.XTemplate(me.tpl);
|
210
|
-
}
|
211
|
-
|
212
|
-
//<debug>
|
213
|
-
// backwards compat alias for overClass/selectedClass
|
214
|
-
// TODO: Consider support for overCls generation Ext.Component config
|
215
|
-
if (isDef(me.overCls) || isDef(me.overClass)) {
|
216
|
-
if (Ext.isDefined(Ext.global.console)) {
|
217
|
-
Ext.global.console.warn('Ext.view.View: Using the deprecated overCls or overClass configuration. Use overItemCls instead.');
|
218
|
-
}
|
219
|
-
me.overItemCls = me.overCls || me.overClass;
|
220
|
-
delete me.overCls;
|
221
|
-
delete me.overClass;
|
222
|
-
}
|
223
|
-
|
224
|
-
if (me.overItemCls) {
|
225
|
-
me.trackOver = true;
|
226
|
-
}
|
227
|
-
|
228
|
-
if (isDef(me.selectedCls) || isDef(me.selectedClass)) {
|
229
|
-
if (Ext.isDefined(Ext.global.console)) {
|
230
|
-
Ext.global.console.warn('Ext.view.View: Using the deprecated selectedCls or selectedClass configuration. Use selectedItemCls instead.');
|
231
|
-
}
|
232
|
-
me.selectedItemCls = me.selectedCls || me.selectedClass;
|
233
|
-
delete me.selectedCls;
|
234
|
-
delete me.selectedClass;
|
235
|
-
}
|
236
|
-
//</debug>
|
237
|
-
|
238
|
-
me.addEvents(
|
239
|
-
/**
|
240
|
-
* @event beforerefresh
|
241
|
-
* Fires before the view is refreshed
|
242
|
-
* @param {Ext.view.View} this The DataView object
|
243
|
-
*/
|
244
|
-
'beforerefresh',
|
245
|
-
/**
|
246
|
-
* @event refresh
|
247
|
-
* Fires when the view is refreshed
|
248
|
-
* @param {Ext.view.View} this The DataView object
|
249
|
-
*/
|
250
|
-
'refresh',
|
251
|
-
/**
|
252
|
-
* @event viewready
|
253
|
-
* Fires when the View's item elements representing Store items has been rendered. If the {@link #deferInitialRefresh} flag
|
254
|
-
* was set (and it is <code>true</code> by default), this will be <b>after</b> initial render, and no items will be available
|
255
|
-
* for selection until this event fires.
|
256
|
-
* @param {Ext.view.View} this
|
257
|
-
*/
|
258
|
-
'viewready',
|
259
|
-
/**
|
260
|
-
* @event itemupdate
|
261
|
-
* Fires when the node associated with an individual record is updated
|
262
|
-
* @param {Ext.data.Model} record The model instance
|
263
|
-
* @param {Number} index The index of the record/node
|
264
|
-
* @param {HTMLElement} node The node that has just been updated
|
265
|
-
*/
|
266
|
-
'itemupdate',
|
267
|
-
/**
|
268
|
-
* @event itemadd
|
269
|
-
* Fires when the nodes associated with an recordset have been added to the underlying store
|
270
|
-
* @param {Ext.data.Model[]} records The model instance
|
271
|
-
* @param {Number} index The index at which the set of record/nodes starts
|
272
|
-
* @param {HTMLElement[]} node The node that has just been updated
|
273
|
-
*/
|
274
|
-
'itemadd',
|
275
|
-
/**
|
276
|
-
* @event itemremove
|
277
|
-
* Fires when the node associated with an individual record is removed
|
278
|
-
* @param {Ext.data.Model} record The model instance
|
279
|
-
* @param {Number} index The index of the record/node
|
280
|
-
*/
|
281
|
-
'itemremove'
|
282
|
-
);
|
283
|
-
|
284
|
-
me.addCmpEvents();
|
285
|
-
|
286
|
-
// Look up the configured Store. If none configured, use the fieldless, empty Store defined in Ext.data.Store.
|
287
|
-
me.store = Ext.data.StoreManager.lookup(me.store || 'ext-empty-store');
|
288
|
-
me.bindStore(me.store, true);
|
289
|
-
me.all = new Ext.CompositeElementLite();
|
290
|
-
|
291
|
-
// We track the scroll position
|
292
|
-
me.scrollState = {
|
293
|
-
top: 0,
|
294
|
-
left: 0
|
295
|
-
};
|
296
|
-
me.on({
|
297
|
-
scroll: me.onViewScroll,
|
298
|
-
element: 'el',
|
299
|
-
scope: me
|
300
|
-
});
|
301
|
-
},
|
302
|
-
|
303
|
-
onRender: function() {
|
304
|
-
var me = this,
|
305
|
-
mask = me.loadMask,
|
306
|
-
cfg = {
|
307
|
-
msg: me.loadingText,
|
308
|
-
msgCls: me.loadingCls,
|
309
|
-
useMsg: me.loadingUseMsg
|
310
|
-
};
|
311
|
-
|
312
|
-
me.callParent(arguments);
|
313
|
-
|
314
|
-
if (mask) {
|
315
|
-
// either a config object
|
316
|
-
if (Ext.isObject(mask)) {
|
317
|
-
cfg = Ext.apply(cfg, mask);
|
318
|
-
}
|
319
|
-
// Attach the LoadMask to a *Component* so that it can be sensitive to resizing during long loads.
|
320
|
-
// If this DataView is floating, then mask this DataView.
|
321
|
-
// Otherwise, mask its owning Container (or this, if there *is* no owning Container).
|
322
|
-
// LoadMask captures the element upon render.
|
323
|
-
me.loadMask = new Ext.LoadMask(me, cfg);
|
324
|
-
me.loadMask.on({
|
325
|
-
scope: me,
|
326
|
-
beforeshow: me.onMaskBeforeShow,
|
327
|
-
hide: me.onMaskHide
|
328
|
-
});
|
329
|
-
}
|
330
|
-
},
|
331
|
-
|
332
|
-
onBoxReady: function(){
|
333
|
-
var me = this,
|
334
|
-
store = me.store;
|
335
|
-
|
336
|
-
me.callParent(arguments);
|
337
|
-
me.doFirstRefresh(me.store);
|
338
|
-
},
|
339
|
-
|
340
|
-
onMaskBeforeShow: function(){
|
341
|
-
var me = this,
|
342
|
-
loadingHeight = me.loadingHeight;
|
343
|
-
|
344
|
-
me.getSelectionModel().deselectAll();
|
345
|
-
me.all.clear();
|
346
|
-
if (loadingHeight && loadingHeight > me.getHeight()) {
|
347
|
-
me.hasLoadingHeight = true;
|
348
|
-
me.oldMinHeight = me.minHeight;
|
349
|
-
me.minHeight = loadingHeight;
|
350
|
-
me.updateLayout();
|
351
|
-
}
|
352
|
-
},
|
353
|
-
|
354
|
-
onMaskHide: function(){
|
355
|
-
var me = this;
|
356
|
-
|
357
|
-
if (!me.destroying && me.hasLoadingHeight) {
|
358
|
-
me.minHeight = me.oldMinHeight;
|
359
|
-
me.updateLayout();
|
360
|
-
delete me.hasLoadingHeight;
|
361
|
-
}
|
362
|
-
},
|
363
|
-
|
364
|
-
afterRender: function() {
|
365
|
-
this.callParent(arguments);
|
366
|
-
|
367
|
-
// Init the SelectionModel after any on('render') listeners have been added.
|
368
|
-
// Drag plugins create a DragDrop instance in a render listener, and that needs
|
369
|
-
// to see an itemmousedown event first.
|
370
|
-
this.getSelectionModel().bindComponent(this);
|
371
|
-
},
|
372
|
-
|
373
|
-
/**
|
374
|
-
* Gets the selection model for this view.
|
375
|
-
* @return {Ext.selection.Model} The selection model
|
376
|
-
*/
|
377
|
-
getSelectionModel: function(){
|
378
|
-
var me = this,
|
379
|
-
mode = 'SINGLE';
|
380
|
-
|
381
|
-
if (!me.selModel) {
|
382
|
-
me.selModel = {};
|
383
|
-
}
|
384
|
-
|
385
|
-
if (me.simpleSelect) {
|
386
|
-
mode = 'SIMPLE';
|
387
|
-
} else if (me.multiSelect) {
|
388
|
-
mode = 'MULTI';
|
389
|
-
}
|
390
|
-
|
391
|
-
Ext.applyIf(me.selModel, {
|
392
|
-
allowDeselect: me.allowDeselect,
|
393
|
-
mode: mode
|
394
|
-
});
|
395
|
-
|
396
|
-
if (!me.selModel.events) {
|
397
|
-
me.selModel = new Ext.selection.DataViewModel(me.selModel);
|
398
|
-
}
|
399
|
-
|
400
|
-
if (!me.selModel.hasRelaySetup) {
|
401
|
-
me.relayEvents(me.selModel, [
|
402
|
-
'selectionchange', 'beforeselect', 'beforedeselect', 'select', 'deselect', 'focuschange'
|
403
|
-
]);
|
404
|
-
me.selModel.hasRelaySetup = true;
|
405
|
-
}
|
406
|
-
|
407
|
-
// lock the selection model if user
|
408
|
-
// has disabled selection
|
409
|
-
if (me.disableSelection) {
|
410
|
-
me.selModel.locked = true;
|
411
|
-
}
|
412
|
-
|
413
|
-
return me.selModel;
|
414
|
-
},
|
415
|
-
|
416
|
-
/**
|
417
|
-
* Refreshes the view by reloading the data from the store and re-rendering the template.
|
418
|
-
*/
|
419
|
-
refresh: function() {
|
420
|
-
var me = this,
|
421
|
-
targetEl,
|
422
|
-
targetParent,
|
423
|
-
oldDisplay,
|
424
|
-
nextSibling,
|
425
|
-
dom,
|
426
|
-
records;
|
427
|
-
|
428
|
-
if (!me.rendered || me.isDestroyed) {
|
429
|
-
return;
|
430
|
-
}
|
431
|
-
|
432
|
-
if (!me.hasListeners.beforerefresh || me.fireEvent('beforerefresh', me) !== false) {
|
433
|
-
targetEl = me.getTargetEl();
|
434
|
-
records = me.store.getRange();
|
435
|
-
dom = targetEl.dom;
|
436
|
-
|
437
|
-
// Updating is much quicker if done when the targetEl is detached from the document, and not displayed.
|
438
|
-
// But this resets the scroll position, so when preserving scroll position, this cannot be done.
|
439
|
-
if (!me.preserveScrollOnRefresh) {
|
440
|
-
targetParent = dom.parentNode;
|
441
|
-
oldDisplay = dom.style.display;
|
442
|
-
dom.style.display = 'none';
|
443
|
-
nextSibling = dom.nextSibling;
|
444
|
-
targetParent.removeChild(dom);
|
445
|
-
}
|
446
|
-
|
447
|
-
if (me.refreshCounter) {
|
448
|
-
me.clearViewEl();
|
449
|
-
} else {
|
450
|
-
me.fixedNodes = targetEl.dom.childNodes.length;
|
451
|
-
me.refreshCounter = 1;
|
452
|
-
}
|
453
|
-
|
454
|
-
// Always attempt to create the required markup after the fixedNodes.
|
455
|
-
// Usually, for an empty record set, this would be blank, but when the Template
|
456
|
-
// Creates markup outside of the record loop, this must still be honoured even if there are no
|
457
|
-
// records.
|
458
|
-
me.tpl.append(targetEl, me.collectData(records, 0));
|
459
|
-
|
460
|
-
// The emptyText is now appended to the View's element
|
461
|
-
// after any fixedNodes.
|
462
|
-
if (records.length < 1) {
|
463
|
-
if (!me.deferEmptyText || me.hasSkippedEmptyText) {
|
464
|
-
Ext.core.DomHelper.insertHtml('beforeEnd', targetEl.dom, me.emptyText);
|
465
|
-
}
|
466
|
-
me.all.clear();
|
467
|
-
} else {
|
468
|
-
me.all.fill(Ext.query(me.getItemSelector(), targetEl.dom));
|
469
|
-
me.updateIndexes(0);
|
470
|
-
}
|
471
|
-
|
472
|
-
me.selModel.refresh();
|
473
|
-
me.hasSkippedEmptyText = true;
|
474
|
-
|
475
|
-
if (!me.preserveScrollOnRefresh) {
|
476
|
-
targetParent.insertBefore(dom, nextSibling);
|
477
|
-
dom.style.display = oldDisplay;
|
478
|
-
}
|
479
|
-
|
480
|
-
// Ensure layout system knows about new content size
|
481
|
-
this.refreshSize();
|
482
|
-
|
483
|
-
me.fireEvent('refresh', me);
|
484
|
-
|
485
|
-
// Upon first refresh, fire the viewready event.
|
486
|
-
// Reconfiguring the grid "renews" this event.
|
487
|
-
if (!me.viewReady) {
|
488
|
-
// Fire an event when deferred content becomes available.
|
489
|
-
// This supports grid Panel's deferRowRender capability
|
490
|
-
me.viewReady = true;
|
491
|
-
me.fireEvent('viewready', me);
|
492
|
-
}
|
493
|
-
}
|
494
|
-
},
|
495
|
-
|
496
|
-
/**
|
497
|
-
* @private
|
498
|
-
* Called by the framework when the view is refreshed, or when rows are added or deleted.
|
499
|
-
*
|
500
|
-
* These operations may cause the view's dimensions to change, and if the owning container
|
501
|
-
* is shrinkwrapping this view, then the layout must be updated to accommodate these new dimensions.
|
502
|
-
*/
|
503
|
-
refreshSize: function() {
|
504
|
-
var sizeModel = this.getSizeModel();
|
505
|
-
if (sizeModel.height.shrinkWrap || sizeModel.width.shrinkWrap) {
|
506
|
-
this.updateLayout();
|
507
|
-
}
|
508
|
-
},
|
509
|
-
|
510
|
-
clearViewEl: function(){
|
511
|
-
// The purpose of this is to allow boilerplate HTML nodes to remain in place inside a View
|
512
|
-
// while the transient, templated data can be discarded and recreated.
|
513
|
-
// The first time through this code, we take a count of the number of existing child nodes.
|
514
|
-
// Subsequent refreshes then do not clear the entire element, but remove all nodes
|
515
|
-
// *after* the fixedNodes count.
|
516
|
-
// In particular, this is used in infinite grid scrolling: A very tall "stretcher" element is
|
517
|
-
// inserted into the View's element to create a scrollbar of the correct proportion.
|
518
|
-
|
519
|
-
var me = this,
|
520
|
-
el = me.getTargetEl();
|
521
|
-
|
522
|
-
if (me.fixedNodes) {
|
523
|
-
while (el.dom.childNodes[me.fixedNodes]) {
|
524
|
-
el.dom.removeChild(el.dom.childNodes[me.fixedNodes]);
|
525
|
-
}
|
526
|
-
} else {
|
527
|
-
el.update('');
|
528
|
-
}
|
529
|
-
me.refreshCounter++;
|
530
|
-
},
|
531
|
-
|
532
|
-
// Private template method to be overridden in subclasses.
|
533
|
-
onViewScroll: Ext.emptyFn,
|
534
|
-
|
535
|
-
/**
|
536
|
-
* Saves the scrollState in a private variable. Must be used in conjunction with restoreScrollState.
|
537
|
-
* @private
|
538
|
-
*/
|
539
|
-
saveScrollState: function() {
|
540
|
-
if (this.rendered) {
|
541
|
-
var dom = this.el.dom,
|
542
|
-
state = this.scrollState;
|
543
|
-
|
544
|
-
state.left = dom.scrollLeft;
|
545
|
-
state.top = dom.scrollTop;
|
546
|
-
}
|
547
|
-
},
|
548
|
-
|
549
|
-
/**
|
550
|
-
* Restores the scrollState.
|
551
|
-
* Must be used in conjunction with saveScrollState
|
552
|
-
* @private
|
553
|
-
*/
|
554
|
-
restoreScrollState: function() {
|
555
|
-
if (this.rendered) {
|
556
|
-
var dom = this.el.dom,
|
557
|
-
state = this.scrollState;
|
558
|
-
|
559
|
-
dom.scrollLeft = state.left;
|
560
|
-
dom.scrollTop = state.top;
|
561
|
-
}
|
562
|
-
},
|
563
|
-
|
564
|
-
/**
|
565
|
-
* Function which can be overridden to provide custom formatting for each Record that is used by this
|
566
|
-
* DataView's {@link #tpl template} to render each node.
|
567
|
-
* @param {Object/Object[]} data The raw data object that was used to create the Record.
|
568
|
-
* @param {Number} recordIndex the index number of the Record being prepared for rendering.
|
569
|
-
* @param {Ext.data.Model} record The Record being prepared for rendering.
|
570
|
-
* @return {Array/Object} The formatted data in a format expected by the internal {@link #tpl template}'s overwrite() method.
|
571
|
-
* (either an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}))
|
572
|
-
*/
|
573
|
-
prepareData: function(data, index, record) {
|
574
|
-
var associatedData, attr;
|
575
|
-
if (record) {
|
576
|
-
associatedData = record.getAssociatedData();
|
577
|
-
for (attr in associatedData) {
|
578
|
-
if (associatedData.hasOwnProperty(attr)) {
|
579
|
-
data[attr] = associatedData[attr];
|
580
|
-
}
|
581
|
-
}
|
582
|
-
}
|
583
|
-
return data;
|
584
|
-
},
|
585
|
-
|
586
|
-
/**
|
587
|
-
* <p>Function which can be overridden which returns the data object passed to this
|
588
|
-
* DataView's {@link #tpl template} to render the whole DataView.</p>
|
589
|
-
* <p>This is usually an Array of data objects, each element of which is processed by an
|
590
|
-
* {@link Ext.XTemplate XTemplate} which uses <tt>'<tpl for=".">'</tt> to iterate over its supplied
|
591
|
-
* data object as an Array. However, <i>named</i> properties may be placed into the data object to
|
592
|
-
* provide non-repeating data such as headings, totals etc.</p>
|
593
|
-
* @param {Ext.data.Model[]} records An Array of {@link Ext.data.Model}s to be rendered into the DataView.
|
594
|
-
* @param {Number} startIndex the index number of the Record being prepared for rendering.
|
595
|
-
* @return {Object[]} An Array of data objects to be processed by a repeating XTemplate. May also
|
596
|
-
* contain <i>named</i> properties.
|
597
|
-
*/
|
598
|
-
collectData : function(records, startIndex){
|
599
|
-
var data = [],
|
600
|
-
i = 0,
|
601
|
-
len = records.length,
|
602
|
-
record;
|
603
|
-
|
604
|
-
for (; i < len; i++) {
|
605
|
-
record = records[i];
|
606
|
-
data[i] = this.prepareData(record.data, startIndex + i, record);
|
607
|
-
}
|
608
|
-
return data;
|
609
|
-
},
|
610
|
-
|
611
|
-
// private
|
612
|
-
bufferRender : function(records, index){
|
613
|
-
var me = this,
|
614
|
-
div = me.renderBuffer || (me.renderBuffer = document.createElement('div'));
|
615
|
-
|
616
|
-
me.tpl.overwrite(div, me.collectData(records, index));
|
617
|
-
return Ext.query(me.getItemSelector(), div);
|
618
|
-
},
|
619
|
-
|
620
|
-
// private
|
621
|
-
onUpdate : function(ds, record){
|
622
|
-
var me = this,
|
623
|
-
index,
|
624
|
-
node;
|
625
|
-
|
626
|
-
if (me.rendered) {
|
627
|
-
index = me.store.indexOf(record);
|
628
|
-
if (index > -1) {
|
629
|
-
node = me.bufferRender([record], index)[0];
|
630
|
-
// ensure the node actually exists in the DOM
|
631
|
-
if (me.getNode(record)) {
|
632
|
-
me.all.replaceElement(index, node, true);
|
633
|
-
me.updateIndexes(index, index);
|
634
|
-
// Maintain selection after update
|
635
|
-
// TODO: Move to approriate event handler.
|
636
|
-
me.selModel.refresh();
|
637
|
-
if (me.hasListeners.itemupdate) {
|
638
|
-
me.fireEvent('itemupdate', record, index, node);
|
639
|
-
}
|
640
|
-
return node;
|
641
|
-
}
|
642
|
-
}
|
643
|
-
}
|
644
|
-
|
645
|
-
},
|
646
|
-
|
647
|
-
// private
|
648
|
-
onAdd : function(ds, records, index) {
|
649
|
-
var me = this,
|
650
|
-
nodes;
|
651
|
-
|
652
|
-
if (me.rendered) {
|
653
|
-
// If we are adding into an empty view, we must refresh in order that the *full tpl* is applied
|
654
|
-
// which might create boilerplate content *around* the record nodes.
|
655
|
-
if (me.all.getCount() === 0) {
|
656
|
-
me.refresh();
|
657
|
-
return;
|
658
|
-
}
|
659
|
-
|
660
|
-
nodes = me.bufferRender(records, index);
|
661
|
-
me.doAdd(nodes, records, index);
|
662
|
-
|
663
|
-
me.selModel.refresh();
|
664
|
-
me.updateIndexes(index);
|
665
|
-
|
666
|
-
// Ensure layout system knows about new content size
|
667
|
-
this.refreshSize();
|
668
|
-
|
669
|
-
if (me.hasListeners.itemadd) {
|
670
|
-
me.fireEvent('itemadd', records, index, nodes);
|
671
|
-
}
|
672
|
-
}
|
673
|
-
|
674
|
-
},
|
675
|
-
|
676
|
-
doAdd: function(nodes, records, index) {
|
677
|
-
var all = this.all,
|
678
|
-
count = all.getCount();
|
679
|
-
|
680
|
-
if (count === 0) {
|
681
|
-
this.clearViewEl();
|
682
|
-
this.getTargetEl().appendChild(nodes);
|
683
|
-
} else if (index < count) {
|
684
|
-
if (index === 0) {
|
685
|
-
all.item(index).insertSibling(nodes, 'before', true);
|
686
|
-
} else {
|
687
|
-
all.item(index - 1).insertSibling(nodes, 'after', true);
|
688
|
-
}
|
689
|
-
} else {
|
690
|
-
all.last().insertSibling(nodes, 'after', true);
|
691
|
-
}
|
692
|
-
|
693
|
-
Ext.Array.insert(all.elements, index, nodes);
|
694
|
-
},
|
695
|
-
|
696
|
-
// private
|
697
|
-
onRemove : function(ds, record, index) {
|
698
|
-
var me = this;
|
699
|
-
|
700
|
-
if (me.rendered) {
|
701
|
-
if (me.store.getCount() === 0) {
|
702
|
-
// Refresh so emptyText can be applied if necessary
|
703
|
-
me.refresh();
|
704
|
-
} else {
|
705
|
-
// Just remove the element which corresponds to the removed record
|
706
|
-
// The tpl's full HTML will still be in place.
|
707
|
-
me.doRemove(record, index);
|
708
|
-
me.updateIndexes(index);
|
709
|
-
}
|
710
|
-
|
711
|
-
// Ensure layout system knows about new content height
|
712
|
-
this.refreshSize();
|
713
|
-
|
714
|
-
if (me.hasListeners.itemremove) {
|
715
|
-
me.fireEvent('itemremove', record, index);
|
716
|
-
}
|
717
|
-
}
|
718
|
-
},
|
719
|
-
|
720
|
-
doRemove: function(record, index) {
|
721
|
-
this.all.removeElement(index, true);
|
722
|
-
},
|
723
|
-
|
724
|
-
/**
|
725
|
-
* Refreshes an individual node's data from the store.
|
726
|
-
* @param {Number} index The item's data index in the store
|
727
|
-
*/
|
728
|
-
refreshNode : function(index){
|
729
|
-
this.onUpdate(this.store, this.store.getAt(index));
|
730
|
-
},
|
731
|
-
|
732
|
-
// private
|
733
|
-
updateIndexes : function(startIndex, endIndex) {
|
734
|
-
var ns = this.all.elements,
|
735
|
-
records = this.store.getRange(),
|
736
|
-
i;
|
737
|
-
|
738
|
-
startIndex = startIndex || 0;
|
739
|
-
endIndex = endIndex || ((endIndex === 0) ? 0 : (ns.length - 1));
|
740
|
-
for(i = startIndex; i <= endIndex; i++){
|
741
|
-
ns[i].viewIndex = i;
|
742
|
-
ns[i].viewRecordId = records[i].internalId;
|
743
|
-
if (!ns[i].boundView) {
|
744
|
-
ns[i].boundView = this.id;
|
745
|
-
}
|
746
|
-
}
|
747
|
-
},
|
748
|
-
|
749
|
-
/**
|
750
|
-
* Returns the store associated with this DataView.
|
751
|
-
* @return {Ext.data.Store} The store
|
752
|
-
*/
|
753
|
-
getStore : function(){
|
754
|
-
return this.store;
|
755
|
-
},
|
756
|
-
|
757
|
-
/**
|
758
|
-
* Changes the data store bound to this view and refreshes it.
|
759
|
-
* @param {Ext.data.Store} store The store to bind to this view
|
760
|
-
*/
|
761
|
-
bindStore : function(store, initial) {
|
762
|
-
var me = this;
|
763
|
-
me.mixins.bindable.bindStore.apply(me, arguments);
|
764
|
-
// Bind the store to our selection model
|
765
|
-
me.getSelectionModel().bindStore(me.store);
|
766
|
-
|
767
|
-
// If we have already achieved our first layout, refresh immediately.
|
768
|
-
// If we have bound to the Store before the first layout, then onBoxReady will
|
769
|
-
// call doFirstRefresh1
|
770
|
-
if (me.componentLayoutCounter) {
|
771
|
-
me.doFirstRefresh(store);
|
772
|
-
}
|
773
|
-
},
|
774
|
-
|
775
|
-
/**
|
776
|
-
* @private
|
777
|
-
* Perform the first refresh of the View from a newly bound store.
|
778
|
-
*
|
779
|
-
* This is called when this View has been sized for the first time.
|
780
|
-
*/
|
781
|
-
doFirstRefresh: function(store) {
|
782
|
-
var me = this;
|
783
|
-
|
784
|
-
// 4.1.0: If we have a store, and the Store is *NOT* already loading (a refresh is on the way), then
|
785
|
-
// on first layout, refresh regardless of record count.
|
786
|
-
// Template may contain boilerplate HTML outside of record iteration loop.
|
787
|
-
// Also, emptyText is appended by the refresh method.
|
788
|
-
// We call refresh on a defer if this is the initial call, and we are configured to defer the initial refresh.
|
789
|
-
if (store && !store.loading) {
|
790
|
-
if (me.deferInitialRefresh) {
|
791
|
-
Ext.Function.defer(function () {
|
792
|
-
if (!me.isDestroyed) {
|
793
|
-
me.refresh();
|
794
|
-
}
|
795
|
-
}, 1);
|
796
|
-
} else {
|
797
|
-
me.refresh();
|
798
|
-
}
|
799
|
-
}
|
800
|
-
},
|
801
|
-
|
802
|
-
onUnbindStore: function(store) {
|
803
|
-
this.setMaskBind(null);
|
804
|
-
},
|
805
|
-
|
806
|
-
onBindStore: function(store) {
|
807
|
-
this.setMaskBind(store);
|
808
|
-
},
|
809
|
-
|
810
|
-
setMaskBind: function(store) {
|
811
|
-
var mask = this.loadMask;
|
812
|
-
if (mask && mask.bindStore) {
|
813
|
-
mask.bindStore(store);
|
814
|
-
}
|
815
|
-
},
|
816
|
-
|
817
|
-
getStoreListeners: function() {
|
818
|
-
var me = this;
|
819
|
-
return {
|
820
|
-
refresh: me.onDataRefresh,
|
821
|
-
add: me.onAdd,
|
822
|
-
remove: me.onRemove,
|
823
|
-
update: me.onUpdate,
|
824
|
-
clear: me.refresh
|
825
|
-
};
|
826
|
-
},
|
827
|
-
|
828
|
-
/**
|
829
|
-
* @private
|
830
|
-
* Calls this.refresh if this.blockRefresh is not true
|
831
|
-
*/
|
832
|
-
onDataRefresh: function() {
|
833
|
-
if (this.blockRefresh !== true) {
|
834
|
-
this.refresh.apply(this, arguments);
|
835
|
-
}
|
836
|
-
},
|
837
|
-
|
838
|
-
/**
|
839
|
-
* Returns the template node the passed child belongs to, or null if it doesn't belong to one.
|
840
|
-
* @param {HTMLElement} node
|
841
|
-
* @return {HTMLElement} The template node
|
842
|
-
*/
|
843
|
-
findItemByChild: function(node){
|
844
|
-
return Ext.fly(node).findParent(this.getItemSelector(), this.getTargetEl());
|
845
|
-
},
|
846
|
-
|
847
|
-
/**
|
848
|
-
* Returns the template node by the Ext.EventObject or null if it is not found.
|
849
|
-
* @param {Ext.EventObject} e
|
850
|
-
*/
|
851
|
-
findTargetByEvent: function(e) {
|
852
|
-
return e.getTarget(this.getItemSelector(), this.getTargetEl());
|
853
|
-
},
|
854
|
-
|
855
|
-
|
856
|
-
/**
|
857
|
-
* Gets the currently selected nodes.
|
858
|
-
* @return {HTMLElement[]} An array of HTMLElements
|
859
|
-
*/
|
860
|
-
getSelectedNodes: function(){
|
861
|
-
var nodes = [],
|
862
|
-
records = this.selModel.getSelection(),
|
863
|
-
ln = records.length,
|
864
|
-
i = 0;
|
865
|
-
|
866
|
-
for (; i < ln; i++) {
|
867
|
-
nodes.push(this.getNode(records[i]));
|
868
|
-
}
|
869
|
-
|
870
|
-
return nodes;
|
871
|
-
},
|
872
|
-
|
873
|
-
/**
|
874
|
-
* Gets an array of the records from an array of nodes
|
875
|
-
* @param {HTMLElement[]} nodes The nodes to evaluate
|
876
|
-
* @return {Ext.data.Model[]} records The {@link Ext.data.Model} objects
|
877
|
-
*/
|
878
|
-
getRecords: function(nodes) {
|
879
|
-
var records = [],
|
880
|
-
i = 0,
|
881
|
-
len = nodes.length,
|
882
|
-
data = this.store.data;
|
883
|
-
|
884
|
-
for (; i < len; i++) {
|
885
|
-
records[records.length] = data.getByKey(nodes[i].viewRecordId);
|
886
|
-
}
|
887
|
-
|
888
|
-
return records;
|
889
|
-
},
|
890
|
-
|
891
|
-
/**
|
892
|
-
* Gets a record from a node
|
893
|
-
* @param {Ext.Element/HTMLElement} node The node to evaluate
|
894
|
-
*
|
895
|
-
* @return {Ext.data.Model} record The {@link Ext.data.Model} object
|
896
|
-
*/
|
897
|
-
getRecord: function(node){
|
898
|
-
return this.store.data.getByKey(Ext.getDom(node).viewRecordId);
|
899
|
-
},
|
900
|
-
|
901
|
-
|
902
|
-
/**
|
903
|
-
* Returns true if the passed node is selected, else false.
|
904
|
-
* @param {HTMLElement/Number/Ext.data.Model} node The node, node index or record to check
|
905
|
-
* @return {Boolean} True if selected, else false
|
906
|
-
*/
|
907
|
-
isSelected : function(node) {
|
908
|
-
// TODO: El/Idx/Record
|
909
|
-
var r = this.getRecord(node);
|
910
|
-
return this.selModel.isSelected(r);
|
911
|
-
},
|
912
|
-
|
913
|
-
/**
|
914
|
-
* Selects a record instance by record instance or index.
|
915
|
-
* @param {Ext.data.Model[]/Number} records An array of records or an index
|
916
|
-
* @param {Boolean} keepExisting
|
917
|
-
* @param {Boolean} suppressEvent Set to false to not fire a select event
|
918
|
-
*/
|
919
|
-
select: function(records, keepExisting, suppressEvent) {
|
920
|
-
this.selModel.select(records, keepExisting, suppressEvent);
|
921
|
-
},
|
922
|
-
|
923
|
-
/**
|
924
|
-
* Deselects a record instance by record instance or index.
|
925
|
-
* @param {Ext.data.Model[]/Number} records An array of records or an index
|
926
|
-
* @param {Boolean} suppressEvent Set to false to not fire a deselect event
|
927
|
-
*/
|
928
|
-
deselect: function(records, suppressEvent) {
|
929
|
-
this.selModel.deselect(records, suppressEvent);
|
930
|
-
},
|
931
|
-
|
932
|
-
/**
|
933
|
-
* Gets a template node.
|
934
|
-
* @param {HTMLElement/String/Number/Ext.data.Model} nodeInfo An HTMLElement template node, index of a template node,
|
935
|
-
* the id of a template node or the record associated with the node.
|
936
|
-
* @return {HTMLElement} The node or null if it wasn't found
|
937
|
-
*/
|
938
|
-
getNode : function(nodeInfo) {
|
939
|
-
if ((!nodeInfo && nodeInfo !== 0) || !this.rendered) {
|
940
|
-
return null;
|
941
|
-
}
|
942
|
-
|
943
|
-
if (Ext.isString(nodeInfo)) {
|
944
|
-
return document.getElementById(nodeInfo);
|
945
|
-
}
|
946
|
-
if (Ext.isNumber(nodeInfo)) {
|
947
|
-
return this.all.elements[nodeInfo];
|
948
|
-
}
|
949
|
-
if (nodeInfo.isModel) {
|
950
|
-
return this.getNodeByRecord(nodeInfo);
|
951
|
-
}
|
952
|
-
return nodeInfo; // already an HTMLElement
|
953
|
-
},
|
954
|
-
|
955
|
-
/**
|
956
|
-
* @private
|
957
|
-
*/
|
958
|
-
getNodeByRecord: function(record) {
|
959
|
-
var ns = this.all.elements,
|
960
|
-
ln = ns.length,
|
961
|
-
i = 0;
|
962
|
-
|
963
|
-
for (; i < ln; i++) {
|
964
|
-
if (ns[i].viewRecordId === record.internalId) {
|
965
|
-
return ns[i];
|
966
|
-
}
|
967
|
-
}
|
968
|
-
|
969
|
-
return null;
|
970
|
-
},
|
971
|
-
|
972
|
-
/**
|
973
|
-
* Gets a range nodes.
|
974
|
-
* @param {Number} start (optional) The index of the first node in the range
|
975
|
-
* @param {Number} end (optional) The index of the last node in the range
|
976
|
-
* @return {HTMLElement[]} An array of nodes
|
977
|
-
*/
|
978
|
-
getNodes: function(start, end) {
|
979
|
-
var ns = this.all.elements,
|
980
|
-
nodes = [],
|
981
|
-
i;
|
982
|
-
|
983
|
-
start = start || 0;
|
984
|
-
end = !Ext.isDefined(end) ? Math.max(ns.length - 1, 0) : end;
|
985
|
-
if (start <= end) {
|
986
|
-
for (i = start; i <= end && ns[i]; i++) {
|
987
|
-
nodes.push(ns[i]);
|
988
|
-
}
|
989
|
-
} else {
|
990
|
-
for (i = start; i >= end && ns[i]; i--) {
|
991
|
-
nodes.push(ns[i]);
|
992
|
-
}
|
993
|
-
}
|
994
|
-
return nodes;
|
995
|
-
},
|
996
|
-
|
997
|
-
/**
|
998
|
-
* Finds the index of the passed node.
|
999
|
-
* @param {HTMLElement/String/Number/Ext.data.Model} nodeInfo An HTMLElement template node, index of a template node, the id of a template node
|
1000
|
-
* or a record associated with a node.
|
1001
|
-
* @return {Number} The index of the node or -1
|
1002
|
-
*/
|
1003
|
-
indexOf: function(node) {
|
1004
|
-
node = this.getNode(node);
|
1005
|
-
if (Ext.isNumber(node.viewIndex)) {
|
1006
|
-
return node.viewIndex;
|
1007
|
-
}
|
1008
|
-
return this.all.indexOf(node);
|
1009
|
-
},
|
1010
|
-
|
1011
|
-
onDestroy : function() {
|
1012
|
-
var me = this;
|
1013
|
-
|
1014
|
-
me.all.clear();
|
1015
|
-
me.callParent();
|
1016
|
-
me.bindStore(null);
|
1017
|
-
me.selModel.destroy();
|
1018
|
-
},
|
1019
|
-
|
1020
|
-
// invoked by the selection model to maintain visual UI cues
|
1021
|
-
onItemSelect: function(record) {
|
1022
|
-
var node = this.getNode(record);
|
1023
|
-
|
1024
|
-
if (node) {
|
1025
|
-
Ext.fly(node).addCls(this.selectedItemCls);
|
1026
|
-
}
|
1027
|
-
},
|
1028
|
-
|
1029
|
-
// invoked by the selection model to maintain visual UI cues
|
1030
|
-
onItemDeselect: function(record) {
|
1031
|
-
var node = this.getNode(record);
|
1032
|
-
|
1033
|
-
if (node) {
|
1034
|
-
Ext.fly(node).removeCls(this.selectedItemCls);
|
1035
|
-
}
|
1036
|
-
},
|
1037
|
-
|
1038
|
-
getItemSelector: function() {
|
1039
|
-
return this.itemSelector;
|
1040
|
-
}
|
1041
|
-
}, function() {
|
1042
|
-
// all of this information is available directly
|
1043
|
-
// from the SelectionModel itself, the only added methods
|
1044
|
-
// to DataView regarding selection will perform some transformation/lookup
|
1045
|
-
// between HTMLElement/Nodes to records and vice versa.
|
1046
|
-
Ext.deprecate('extjs', '4.0', function() {
|
1047
|
-
Ext.view.AbstractView.override({
|
1048
|
-
/**
|
1049
|
-
* @cfg {Boolean} [multiSelect=false]
|
1050
|
-
* True to allow selection of more than one item at a time, false to allow selection of only a single item
|
1051
|
-
* at a time or no selection at all, depending on the value of {@link #singleSelect}.
|
1052
|
-
*/
|
1053
|
-
/**
|
1054
|
-
* @cfg {Boolean} [singleSelect=false]
|
1055
|
-
* True to allow selection of exactly one item at a time, false to allow no selection at all.
|
1056
|
-
* Note that if {@link #multiSelect} = true, this value will be ignored.
|
1057
|
-
*/
|
1058
|
-
/**
|
1059
|
-
* @cfg {Boolean} [simpleSelect=false]
|
1060
|
-
* True to enable multiselection by clicking on multiple items without requiring the user to hold Shift or Ctrl,
|
1061
|
-
* false to force the user to hold Ctrl or Shift to select more than on item.
|
1062
|
-
*/
|
1063
|
-
|
1064
|
-
/**
|
1065
|
-
* Gets the number of selected nodes.
|
1066
|
-
* @return {Number} The node count
|
1067
|
-
*/
|
1068
|
-
getSelectionCount : function(){
|
1069
|
-
if (Ext.global.console) {
|
1070
|
-
Ext.global.console.warn("DataView: getSelectionCount will be removed, please interact with the Ext.selection.DataViewModel");
|
1071
|
-
}
|
1072
|
-
return this.selModel.getSelection().length;
|
1073
|
-
},
|
1074
|
-
|
1075
|
-
/**
|
1076
|
-
* Gets an array of the selected records
|
1077
|
-
* @return {Ext.data.Model[]} An array of {@link Ext.data.Model} objects
|
1078
|
-
*/
|
1079
|
-
getSelectedRecords : function(){
|
1080
|
-
if (Ext.global.console) {
|
1081
|
-
Ext.global.console.warn("DataView: getSelectedRecords will be removed, please interact with the Ext.selection.DataViewModel");
|
1082
|
-
}
|
1083
|
-
return this.selModel.getSelection();
|
1084
|
-
},
|
1085
|
-
|
1086
|
-
select: function(records, keepExisting, supressEvents) {
|
1087
|
-
if (Ext.global.console) {
|
1088
|
-
Ext.global.console.warn("DataView: select will be removed, please access select through a DataView's SelectionModel, ie: view.getSelectionModel().select()");
|
1089
|
-
}
|
1090
|
-
var sm = this.getSelectionModel();
|
1091
|
-
return sm.select.apply(sm, arguments);
|
1092
|
-
},
|
1093
|
-
|
1094
|
-
clearSelections: function() {
|
1095
|
-
if (Ext.global.console) {
|
1096
|
-
Ext.global.console.warn("DataView: clearSelections will be removed, please access deselectAll through DataView's SelectionModel, ie: view.getSelectionModel().deselectAll()");
|
1097
|
-
}
|
1098
|
-
var sm = this.getSelectionModel();
|
1099
|
-
return sm.deselectAll();
|
1100
|
-
}
|
1101
|
-
});
|
1102
|
-
});
|
1103
|
-
});
|