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,271 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Represents an Ext JS 4 application, which is typically a single page app using a {@link Ext.container.Viewport Viewport}.
|
3
|
-
* A typical Ext.app.Application might look like this:
|
4
|
-
*
|
5
|
-
* Ext.application({
|
6
|
-
* name: 'MyApp',
|
7
|
-
* launch: function() {
|
8
|
-
* Ext.create('Ext.container.Viewport', {
|
9
|
-
* items: {
|
10
|
-
* html: 'My App'
|
11
|
-
* }
|
12
|
-
* });
|
13
|
-
* }
|
14
|
-
* });
|
15
|
-
*
|
16
|
-
* This does several things. First it creates a global variable called 'MyApp' - all of your Application's classes (such
|
17
|
-
* as its Models, Views and Controllers) will reside under this single namespace, which drastically lowers the chances
|
18
|
-
* of colliding global variables.
|
19
|
-
*
|
20
|
-
* When the page is ready and all of your JavaScript has loaded, your Application's {@link #launch} function is called,
|
21
|
-
* at which time you can run the code that starts your app. Usually this consists of creating a Viewport, as we do in
|
22
|
-
* the example above.
|
23
|
-
*
|
24
|
-
* # Telling Application about the rest of the app
|
25
|
-
*
|
26
|
-
* Because an Ext.app.Application represents an entire app, we should tell it about the other parts of the app - namely
|
27
|
-
* the Models, Views and Controllers that are bundled with the application. Let's say we have a blog management app; we
|
28
|
-
* might have Models and Controllers for Posts and Comments, and Views for listing, adding and editing Posts and Comments.
|
29
|
-
* Here's how we'd tell our Application about all these things:
|
30
|
-
*
|
31
|
-
* Ext.application({
|
32
|
-
* name: 'Blog',
|
33
|
-
* models: ['Post', 'Comment'],
|
34
|
-
* controllers: ['Posts', 'Comments'],
|
35
|
-
*
|
36
|
-
* launch: function() {
|
37
|
-
* ...
|
38
|
-
* }
|
39
|
-
* });
|
40
|
-
*
|
41
|
-
* Note that we didn't actually list the Views directly in the Application itself. This is because Views are managed by
|
42
|
-
* Controllers, so it makes sense to keep those dependencies there. The Application will load each of the specified
|
43
|
-
* Controllers using the pathing conventions laid out in the [application architecture guide][mvc] - in this case
|
44
|
-
* expecting the controllers to reside in app/controller/Posts.js and app/controller/Comments.js. In turn, each
|
45
|
-
* Controller simply needs to list the Views it uses and they will be automatically loaded. Here's how our Posts
|
46
|
-
* controller like be defined:
|
47
|
-
*
|
48
|
-
* Ext.define('MyApp.controller.Posts', {
|
49
|
-
* extend: 'Ext.app.Controller',
|
50
|
-
* views: ['posts.List', 'posts.Edit'],
|
51
|
-
*
|
52
|
-
* //the rest of the Controller here
|
53
|
-
* });
|
54
|
-
*
|
55
|
-
* Because we told our Application about our Models and Controllers, and our Controllers about their Views, Ext JS will
|
56
|
-
* automatically load all of our app files for us. This means we don't have to manually add script tags into our html
|
57
|
-
* files whenever we add a new class, but more importantly it enables us to create a minimized build of our entire
|
58
|
-
* application using the Ext JS 4 SDK Tools.
|
59
|
-
*
|
60
|
-
* For more information about writing Ext JS 4 applications, please see the [application architecture guide][mvc].
|
61
|
-
*
|
62
|
-
* [mvc]: #/guide/application_architecture
|
63
|
-
*
|
64
|
-
* @docauthor Ed Spencer
|
65
|
-
*/
|
66
|
-
Ext.define('Ext.app.Application', {
|
67
|
-
extend: 'Ext.app.Controller',
|
68
|
-
|
69
|
-
requires: [
|
70
|
-
'Ext.ModelManager',
|
71
|
-
'Ext.data.Model',
|
72
|
-
'Ext.data.StoreManager',
|
73
|
-
'Ext.tip.QuickTipManager',
|
74
|
-
'Ext.ComponentManager',
|
75
|
-
'Ext.app.EventBus'
|
76
|
-
],
|
77
|
-
|
78
|
-
/**
|
79
|
-
* @cfg {String} name
|
80
|
-
* The name of your application. This will also be the namespace for your views, controllers
|
81
|
-
* models and stores. Don't use spaces or special characters in the name.
|
82
|
-
*/
|
83
|
-
|
84
|
-
/**
|
85
|
-
* @cfg {String[]} controllers
|
86
|
-
* Names of controllers that the app uses.
|
87
|
-
*/
|
88
|
-
|
89
|
-
/**
|
90
|
-
* @cfg {Object} scope
|
91
|
-
* The scope to execute the {@link #launch} function in. Defaults to the Application instance.
|
92
|
-
*/
|
93
|
-
scope: undefined,
|
94
|
-
|
95
|
-
/**
|
96
|
-
* @cfg {Boolean} enableQuickTips
|
97
|
-
* True to automatically set up Ext.tip.QuickTip support.
|
98
|
-
*/
|
99
|
-
enableQuickTips: true,
|
100
|
-
|
101
|
-
/**
|
102
|
-
* @cfg {String} defaultUrl
|
103
|
-
* When the app is first loaded, this url will be redirected to.
|
104
|
-
*/
|
105
|
-
|
106
|
-
/**
|
107
|
-
* @cfg {String} appFolder
|
108
|
-
* The path to the directory which contains all application's classes.
|
109
|
-
* This path will be registered via {@link Ext.Loader#setPath} for the namespace specified
|
110
|
-
* in the {@link #name name} config.
|
111
|
-
*/
|
112
|
-
appFolder: 'app',
|
113
|
-
|
114
|
-
/**
|
115
|
-
* @cfg {Boolean} autoCreateViewport
|
116
|
-
* True to automatically load and instantiate AppName.view.Viewport before firing the launch function.
|
117
|
-
*/
|
118
|
-
autoCreateViewport: false,
|
119
|
-
|
120
|
-
/**
|
121
|
-
* Creates new Application.
|
122
|
-
* @param {Object} [config] Config object.
|
123
|
-
*/
|
124
|
-
constructor: function(config) {
|
125
|
-
config = config || {};
|
126
|
-
Ext.apply(this, config);
|
127
|
-
|
128
|
-
var requires = config.requires || [],
|
129
|
-
controllers, ln, i, controller,
|
130
|
-
paths, path, ns;
|
131
|
-
|
132
|
-
Ext.Loader.setPath(this.name, this.appFolder);
|
133
|
-
|
134
|
-
if (this.paths) {
|
135
|
-
paths = this.paths;
|
136
|
-
|
137
|
-
for (ns in paths) {
|
138
|
-
if (paths.hasOwnProperty(ns)) {
|
139
|
-
path = paths[ns];
|
140
|
-
|
141
|
-
Ext.Loader.setPath(ns, path);
|
142
|
-
}
|
143
|
-
}
|
144
|
-
}
|
145
|
-
|
146
|
-
this.callParent(arguments);
|
147
|
-
|
148
|
-
this.eventbus = new Ext.app.EventBus;
|
149
|
-
|
150
|
-
controllers = Ext.Array.from(this.controllers);
|
151
|
-
ln = controllers && controllers.length;
|
152
|
-
|
153
|
-
this.controllers = new Ext.util.MixedCollection();
|
154
|
-
|
155
|
-
if (this.autoCreateViewport) {
|
156
|
-
requires.push(this.getModuleClassName('Viewport', 'view'));
|
157
|
-
}
|
158
|
-
|
159
|
-
for (i = 0; i < ln; i++) {
|
160
|
-
requires.push(this.getModuleClassName(controllers[i], 'controller'));
|
161
|
-
}
|
162
|
-
|
163
|
-
Ext.require(requires);
|
164
|
-
|
165
|
-
Ext.onReady(function() {
|
166
|
-
for (i = 0; i < ln; i++) {
|
167
|
-
controller = this.getController(controllers[i]);
|
168
|
-
controller.init(this);
|
169
|
-
}
|
170
|
-
|
171
|
-
this.onBeforeLaunch.call(this);
|
172
|
-
}, this);
|
173
|
-
},
|
174
|
-
|
175
|
-
control: function(selectors, listeners, controller) {
|
176
|
-
this.eventbus.control(selectors, listeners, controller);
|
177
|
-
},
|
178
|
-
|
179
|
-
/**
|
180
|
-
* @method
|
181
|
-
* @template
|
182
|
-
* Called automatically when the page has completely loaded. This is an empty function that should be
|
183
|
-
* overridden by each application that needs to take action on page load.
|
184
|
-
* @param {String} profile The detected {@link #profiles application profile}
|
185
|
-
* @return {Boolean} By default, the Application will dispatch to the configured startup controller and
|
186
|
-
* action immediately after running the launch function. Return false to prevent this behavior.
|
187
|
-
*/
|
188
|
-
launch: Ext.emptyFn,
|
189
|
-
|
190
|
-
/**
|
191
|
-
* @private
|
192
|
-
*/
|
193
|
-
onBeforeLaunch: function() {
|
194
|
-
var me = this,
|
195
|
-
controllers, c, cLen, controller;
|
196
|
-
|
197
|
-
if (me.enableQuickTips) {
|
198
|
-
Ext.tip.QuickTipManager.init();
|
199
|
-
}
|
200
|
-
|
201
|
-
if (me.autoCreateViewport) {
|
202
|
-
me.getView('Viewport').create();
|
203
|
-
}
|
204
|
-
|
205
|
-
me.launch.call(this.scope || this);
|
206
|
-
me.launched = true;
|
207
|
-
me.fireEvent('launch', this);
|
208
|
-
|
209
|
-
controllers = me.controllers.items;
|
210
|
-
cLen = controllers.length;
|
211
|
-
|
212
|
-
for (c = 0; c < cLen; c++) {
|
213
|
-
controller = controllers[c];
|
214
|
-
controller.onLaunch(this);
|
215
|
-
}
|
216
|
-
},
|
217
|
-
|
218
|
-
getModuleClassName: function(name, module) {
|
219
|
-
// Deciding if a class name must be qualified:
|
220
|
-
// 1 - if the name doesn't contains at least one dot, we must definitely qualify it
|
221
|
-
// 2 - the name may be a qualified name of a known class, but:
|
222
|
-
// 2.1 - in runtime, the loader may not know the class - specially in production - so we must check the class manager
|
223
|
-
// 2.2 - in build time, the class manager may not know the class, but the loader does, so we check the second one
|
224
|
-
// (the loader check assures it's really a class, and not a namespace, so we can have 'Books.controller.Books',
|
225
|
-
// and request for a controller called Books will not be underqualified)
|
226
|
-
if (name.indexOf('.') !== -1 && (Ext.ClassManager.isCreated(name) || Ext.Loader.isAClassNameWithAKnownPrefix(name))) {
|
227
|
-
return name;
|
228
|
-
} else {
|
229
|
-
return this.name + '.' + module + '.' + name;
|
230
|
-
}
|
231
|
-
},
|
232
|
-
|
233
|
-
getController: function(name) {
|
234
|
-
var controller = this.controllers.get(name);
|
235
|
-
|
236
|
-
if (!controller) {
|
237
|
-
controller = Ext.create(this.getModuleClassName(name, 'controller'), {
|
238
|
-
application: this,
|
239
|
-
id: name
|
240
|
-
});
|
241
|
-
|
242
|
-
this.controllers.add(controller);
|
243
|
-
}
|
244
|
-
|
245
|
-
return controller;
|
246
|
-
},
|
247
|
-
|
248
|
-
getStore: function(name) {
|
249
|
-
var store = Ext.StoreManager.get(name);
|
250
|
-
|
251
|
-
if (!store) {
|
252
|
-
store = Ext.create(this.getModuleClassName(name, 'store'), {
|
253
|
-
storeId: name
|
254
|
-
});
|
255
|
-
}
|
256
|
-
|
257
|
-
return store;
|
258
|
-
},
|
259
|
-
|
260
|
-
getModel: function(model) {
|
261
|
-
model = this.getModuleClassName(model, 'model');
|
262
|
-
|
263
|
-
return Ext.ModelManager.getModel(model);
|
264
|
-
},
|
265
|
-
|
266
|
-
getView: function(view) {
|
267
|
-
view = this.getModuleClassName(view, 'view');
|
268
|
-
|
269
|
-
return Ext.ClassManager.get(view);
|
270
|
-
}
|
271
|
-
});
|
@@ -1,458 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @class Ext.app.Controller
|
3
|
-
*
|
4
|
-
* Controllers are the glue that binds an application together. All they really do is listen for events (usually from
|
5
|
-
* views) and take some action. Here's how we might create a Controller to manage Users:
|
6
|
-
*
|
7
|
-
* Ext.define('MyApp.controller.Users', {
|
8
|
-
* extend: 'Ext.app.Controller',
|
9
|
-
*
|
10
|
-
* init: function() {
|
11
|
-
* console.log('Initialized Users! This happens before the Application launch function is called');
|
12
|
-
* }
|
13
|
-
* });
|
14
|
-
*
|
15
|
-
* The init function is a special method that is called when your application boots. It is called before the
|
16
|
-
* {@link Ext.app.Application Application}'s launch function is executed so gives a hook point to run any code before
|
17
|
-
* your Viewport is created.
|
18
|
-
*
|
19
|
-
* The init function is a great place to set up how your controller interacts with the view, and is usually used in
|
20
|
-
* conjunction with another Controller function - {@link Ext.app.Controller#control control}. The control function
|
21
|
-
* makes it easy to listen to events on your view classes and take some action with a handler function. Let's update
|
22
|
-
* our Users controller to tell us when the panel is rendered:
|
23
|
-
*
|
24
|
-
* Ext.define('MyApp.controller.Users', {
|
25
|
-
* extend: 'Ext.app.Controller',
|
26
|
-
*
|
27
|
-
* init: function() {
|
28
|
-
* this.control({
|
29
|
-
* 'viewport > panel': {
|
30
|
-
* render: this.onPanelRendered
|
31
|
-
* }
|
32
|
-
* });
|
33
|
-
* },
|
34
|
-
*
|
35
|
-
* onPanelRendered: function() {
|
36
|
-
* console.log('The panel was rendered');
|
37
|
-
* }
|
38
|
-
* });
|
39
|
-
*
|
40
|
-
* We've updated the init function to use this.control to set up listeners on views in our application. The control
|
41
|
-
* function uses the new ComponentQuery engine to quickly and easily get references to components on the page. If you
|
42
|
-
* are not familiar with ComponentQuery yet, be sure to check out the {@link Ext.ComponentQuery documentation}. In brief though,
|
43
|
-
* it allows us to pass a CSS-like selector that will find every matching component on the page.
|
44
|
-
*
|
45
|
-
* In our init function above we supplied 'viewport > panel', which translates to "find me every Panel that is a direct
|
46
|
-
* child of a Viewport". We then supplied an object that maps event names (just 'render' in this case) to handler
|
47
|
-
* functions. The overall effect is that whenever any component that matches our selector fires a 'render' event, our
|
48
|
-
* onPanelRendered function is called.
|
49
|
-
*
|
50
|
-
* <u>Using refs</u>
|
51
|
-
*
|
52
|
-
* One of the most useful parts of Controllers is the new ref system. These use the new {@link Ext.ComponentQuery} to
|
53
|
-
* make it really easy to get references to Views on your page. Let's look at an example of this now:
|
54
|
-
*
|
55
|
-
* Ext.define('MyApp.controller.Users', {
|
56
|
-
* extend: 'Ext.app.Controller',
|
57
|
-
*
|
58
|
-
* refs: [
|
59
|
-
* {
|
60
|
-
* ref: 'list',
|
61
|
-
* selector: 'grid'
|
62
|
-
* }
|
63
|
-
* ],
|
64
|
-
*
|
65
|
-
* init: function() {
|
66
|
-
* this.control({
|
67
|
-
* 'button': {
|
68
|
-
* click: this.refreshGrid
|
69
|
-
* }
|
70
|
-
* });
|
71
|
-
* },
|
72
|
-
*
|
73
|
-
* refreshGrid: function() {
|
74
|
-
* this.getList().store.load();
|
75
|
-
* }
|
76
|
-
* });
|
77
|
-
*
|
78
|
-
* This example assumes the existence of a {@link Ext.grid.Panel Grid} on the page, which contains a single button to
|
79
|
-
* refresh the Grid when clicked. In our refs array, we set up a reference to the grid. There are two parts to this -
|
80
|
-
* the 'selector', which is a {@link Ext.ComponentQuery ComponentQuery} selector which finds any grid on the page and
|
81
|
-
* assigns it to the reference 'list'.
|
82
|
-
*
|
83
|
-
* By giving the reference a name, we get a number of things for free. The first is the getList function that we use in
|
84
|
-
* the refreshGrid method above. This is generated automatically by the Controller based on the name of our ref, which
|
85
|
-
* was capitalized and prepended with get to go from 'list' to 'getList'.
|
86
|
-
*
|
87
|
-
* The way this works is that the first time getList is called by your code, the ComponentQuery selector is run and the
|
88
|
-
* first component that matches the selector ('grid' in this case) will be returned. All future calls to getList will
|
89
|
-
* use a cached reference to that grid. Usually it is advised to use a specific ComponentQuery selector that will only
|
90
|
-
* match a single View in your application (in the case above our selector will match any grid on the page).
|
91
|
-
*
|
92
|
-
* Bringing it all together, our init function is called when the application boots, at which time we call this.control
|
93
|
-
* to listen to any click on a {@link Ext.button.Button button} and call our refreshGrid function (again, this will
|
94
|
-
* match any button on the page so we advise a more specific selector than just 'button', but have left it this way for
|
95
|
-
* simplicity). When the button is clicked we use out getList function to refresh the grid.
|
96
|
-
*
|
97
|
-
* You can create any number of refs and control any number of components this way, simply adding more functions to
|
98
|
-
* your Controller as you go. For an example of real-world usage of Controllers see the Feed Viewer example in the
|
99
|
-
* examples/app/feed-viewer folder in the SDK download.
|
100
|
-
*
|
101
|
-
* <u>Generated getter methods</u>
|
102
|
-
*
|
103
|
-
* Refs aren't the only thing that generate convenient getter methods. Controllers often have to deal with Models and
|
104
|
-
* Stores so the framework offers a couple of easy ways to get access to those too. Let's look at another example:
|
105
|
-
*
|
106
|
-
* Ext.define('MyApp.controller.Users', {
|
107
|
-
* extend: 'Ext.app.Controller',
|
108
|
-
*
|
109
|
-
* models: ['User'],
|
110
|
-
* stores: ['AllUsers', 'AdminUsers'],
|
111
|
-
*
|
112
|
-
* init: function() {
|
113
|
-
* var User = this.getUserModel(),
|
114
|
-
* allUsers = this.getAllUsersStore();
|
115
|
-
*
|
116
|
-
* var ed = new User({name: 'Ed'});
|
117
|
-
* allUsers.add(ed);
|
118
|
-
* }
|
119
|
-
* });
|
120
|
-
*
|
121
|
-
* By specifying Models and Stores that the Controller cares about, it again dynamically loads them from the appropriate
|
122
|
-
* locations (app/model/User.js, app/store/AllUsers.js and app/store/AdminUsers.js in this case) and creates getter
|
123
|
-
* functions for them all. The example above will create a new User model instance and add it to the AllUsers Store.
|
124
|
-
* Of course, you could do anything in this function but in this case we just did something simple to demonstrate the
|
125
|
-
* functionality.
|
126
|
-
*
|
127
|
-
* <u>Further Reading</u>
|
128
|
-
*
|
129
|
-
* For more information about writing Ext JS 4 applications, please see the
|
130
|
-
* [application architecture guide](#/guide/application_architecture). Also see the {@link Ext.app.Application} documentation.
|
131
|
-
*
|
132
|
-
* @docauthor Ed Spencer
|
133
|
-
*/
|
134
|
-
Ext.define('Ext.app.Controller', {
|
135
|
-
|
136
|
-
mixins: {
|
137
|
-
observable: 'Ext.util.Observable'
|
138
|
-
},
|
139
|
-
|
140
|
-
/**
|
141
|
-
* @cfg {String} id The id of this controller. You can use this id when dispatching.
|
142
|
-
*/
|
143
|
-
|
144
|
-
/**
|
145
|
-
* @cfg {String[]} models
|
146
|
-
* Array of models to require from AppName.model namespace. For example:
|
147
|
-
*
|
148
|
-
* Ext.define("MyApp.controller.Foo", {
|
149
|
-
* extend: "Ext.app.Controller",
|
150
|
-
* models: ['User', 'Vehicle']
|
151
|
-
* });
|
152
|
-
*
|
153
|
-
* This is equivalent of:
|
154
|
-
*
|
155
|
-
* Ext.define("MyApp.controller.Foo", {
|
156
|
-
* extend: "Ext.app.Controller",
|
157
|
-
* requires: ['MyApp.model.User', 'MyApp.model.Vehicle']
|
158
|
-
* });
|
159
|
-
*
|
160
|
-
*/
|
161
|
-
|
162
|
-
/**
|
163
|
-
* @cfg {String[]} views
|
164
|
-
* Array of views to require from AppName.view namespace. For example:
|
165
|
-
*
|
166
|
-
* Ext.define("MyApp.controller.Foo", {
|
167
|
-
* extend: "Ext.app.Controller",
|
168
|
-
* views: ['List', 'Detail']
|
169
|
-
* });
|
170
|
-
*
|
171
|
-
* This is equivalent of:
|
172
|
-
*
|
173
|
-
* Ext.define("MyApp.controller.Foo", {
|
174
|
-
* extend: "Ext.app.Controller",
|
175
|
-
* requires: ['MyApp.view.List', 'MyApp.view.Detail']
|
176
|
-
* });
|
177
|
-
*
|
178
|
-
*/
|
179
|
-
|
180
|
-
/**
|
181
|
-
* @cfg {String[]} stores
|
182
|
-
* Array of stores to require from AppName.store namespace. For example:
|
183
|
-
*
|
184
|
-
* Ext.define("MyApp.controller.Foo", {
|
185
|
-
* extend: "Ext.app.Controller",
|
186
|
-
* stores: ['Users', 'Vehicles']
|
187
|
-
* });
|
188
|
-
*
|
189
|
-
* This is equivalent of:
|
190
|
-
*
|
191
|
-
* Ext.define("MyApp.controller.Foo", {
|
192
|
-
* extend: "Ext.app.Controller",
|
193
|
-
* requires: ['MyApp.store.Users', 'MyApp.store.Vehicles']
|
194
|
-
* });
|
195
|
-
*
|
196
|
-
*/
|
197
|
-
|
198
|
-
/**
|
199
|
-
* @cfg {Object[]} refs
|
200
|
-
* Array of configs to build up references to views on page. For example:
|
201
|
-
*
|
202
|
-
* Ext.define("MyApp.controller.Foo", {
|
203
|
-
* extend: "Ext.app.Controller",
|
204
|
-
* refs: [
|
205
|
-
* {
|
206
|
-
* ref: 'list',
|
207
|
-
* selector: 'grid'
|
208
|
-
* }
|
209
|
-
* ],
|
210
|
-
* });
|
211
|
-
*
|
212
|
-
* This will add method `getList` to the controller which will internally use
|
213
|
-
* Ext.ComponentQuery to reference the grid component on page.
|
214
|
-
*/
|
215
|
-
|
216
|
-
onClassExtended: function(cls, data, hooks) {
|
217
|
-
var className = Ext.getClassName(cls),
|
218
|
-
match = className.match(/^(.*)\.controller\./),
|
219
|
-
namespace,
|
220
|
-
onBeforeClassCreated,
|
221
|
-
requires,
|
222
|
-
modules,
|
223
|
-
namespaceAndModule;
|
224
|
-
|
225
|
-
if (match !== null) {
|
226
|
-
namespace = Ext.Loader.getPrefix(className) || match[1];
|
227
|
-
onBeforeClassCreated = hooks.onBeforeCreated;
|
228
|
-
requires = [];
|
229
|
-
modules = ['model', 'view', 'store'];
|
230
|
-
|
231
|
-
hooks.onBeforeCreated = function(cls, data) {
|
232
|
-
var i, ln, module,
|
233
|
-
items, j, subLn, item;
|
234
|
-
|
235
|
-
for (i = 0,ln = modules.length; i < ln; i++) {
|
236
|
-
module = modules[i];
|
237
|
-
namespaceAndModule = namespace + '.' + module + '.';
|
238
|
-
|
239
|
-
items = Ext.Array.from(data[module + 's']);
|
240
|
-
|
241
|
-
for (j = 0,subLn = items.length; j < subLn; j++) {
|
242
|
-
item = items[j];
|
243
|
-
// Deciding if a class name must be qualified:
|
244
|
-
// 1 - if the name doesn't contains at least one dot, we must definitely qualify it
|
245
|
-
// 2 - the name may be a qualified name of a known class, but:
|
246
|
-
// 2.1 - in runtime, the loader may not know the class - specially in production - so we must check the class manager
|
247
|
-
// 2.2 - in build time, the class manager may not know the class, but the loader does, so we check the second one
|
248
|
-
// (the loader check assures it's really a class, and not a namespace, so we can have 'Books.controller.Books',
|
249
|
-
// and requesting a controller called Books will not be underqualified)
|
250
|
-
if (item.indexOf('.') !== -1 && (Ext.ClassManager.isCreated(item) || Ext.Loader.isAClassNameWithAKnownPrefix(item))) {
|
251
|
-
requires.push(item);
|
252
|
-
} else {
|
253
|
-
requires.push(namespaceAndModule + item);
|
254
|
-
}
|
255
|
-
}
|
256
|
-
}
|
257
|
-
|
258
|
-
Ext.require(requires, Ext.Function.pass(onBeforeClassCreated, arguments, this));
|
259
|
-
};
|
260
|
-
}
|
261
|
-
},
|
262
|
-
|
263
|
-
/**
|
264
|
-
* Creates new Controller.
|
265
|
-
* @param {Object} config (optional) Config object.
|
266
|
-
*/
|
267
|
-
constructor: function(config) {
|
268
|
-
this.mixins.observable.constructor.call(this, config);
|
269
|
-
|
270
|
-
Ext.apply(this, config || {});
|
271
|
-
this.createGetters('model', this.models);
|
272
|
-
this.createGetters('store', this.stores);
|
273
|
-
this.createGetters('view', this.views);
|
274
|
-
|
275
|
-
if (this.refs) {
|
276
|
-
this.ref(this.refs);
|
277
|
-
}
|
278
|
-
},
|
279
|
-
|
280
|
-
/**
|
281
|
-
* A template method that is called when your application boots. It is called before the
|
282
|
-
* {@link Ext.app.Application Application}'s launch function is executed so gives a hook point to run any code before
|
283
|
-
* your Viewport is created.
|
284
|
-
*
|
285
|
-
* @param {Ext.app.Application} application
|
286
|
-
* @template
|
287
|
-
*/
|
288
|
-
init: function(application) {},
|
289
|
-
|
290
|
-
/**
|
291
|
-
* A template method like {@link #init}, but called after the viewport is created.
|
292
|
-
* This is called after the {@link Ext.app.Application#launch launch} method of Application is executed.
|
293
|
-
*
|
294
|
-
* @param {Ext.app.Application} application
|
295
|
-
* @template
|
296
|
-
*/
|
297
|
-
onLaunch: function(application) {},
|
298
|
-
|
299
|
-
createGetters: function(type, refs) {
|
300
|
-
type = Ext.String.capitalize(type);
|
301
|
-
|
302
|
-
var i = 0,
|
303
|
-
length = (refs) ? refs.length : 0,
|
304
|
-
fn, ref, parts, x, numParts;
|
305
|
-
|
306
|
-
for (; i < length; i++) {
|
307
|
-
fn = 'get';
|
308
|
-
ref = refs[i];
|
309
|
-
parts = ref.split('.');
|
310
|
-
numParts = parts.length;
|
311
|
-
|
312
|
-
// Handle namespaced class names. E.g. feed.Add becomes getFeedAddView etc.
|
313
|
-
for (x = 0 ; x < numParts; x++) {
|
314
|
-
fn += Ext.String.capitalize(parts[x]);
|
315
|
-
}
|
316
|
-
|
317
|
-
fn += type;
|
318
|
-
|
319
|
-
if (!this[fn]) {
|
320
|
-
this[fn] = Ext.Function.pass(this['get' + type], [ref], this);
|
321
|
-
}
|
322
|
-
// Execute it right away
|
323
|
-
this[fn](ref);
|
324
|
-
}
|
325
|
-
},
|
326
|
-
|
327
|
-
ref: function(refs) {
|
328
|
-
refs = Ext.Array.from(refs);
|
329
|
-
|
330
|
-
var me = this,
|
331
|
-
i = 0,
|
332
|
-
length = refs.length,
|
333
|
-
info, ref, fn;
|
334
|
-
|
335
|
-
for (; i < length; i++) {
|
336
|
-
info = refs[i];
|
337
|
-
ref = info.ref;
|
338
|
-
fn = 'get' + Ext.String.capitalize(ref);
|
339
|
-
|
340
|
-
if (!me[fn]) {
|
341
|
-
me[fn] = Ext.Function.pass(me.getRef, [ref, info], me);
|
342
|
-
}
|
343
|
-
me.references = me.references || [];
|
344
|
-
me.references.push(ref.toLowerCase());
|
345
|
-
}
|
346
|
-
},
|
347
|
-
|
348
|
-
addRef: function(ref) {
|
349
|
-
return this.ref([ref]);
|
350
|
-
},
|
351
|
-
|
352
|
-
getRef: function(ref, info, config) {
|
353
|
-
this.refCache = this.refCache || {};
|
354
|
-
info = info || {};
|
355
|
-
config = config || {};
|
356
|
-
|
357
|
-
Ext.apply(info, config);
|
358
|
-
|
359
|
-
if (info.forceCreate) {
|
360
|
-
return Ext.ComponentManager.create(info, 'component');
|
361
|
-
}
|
362
|
-
|
363
|
-
var me = this,
|
364
|
-
cached = me.refCache[ref];
|
365
|
-
|
366
|
-
if (!cached) {
|
367
|
-
me.refCache[ref] = cached = Ext.ComponentQuery.query(info.selector)[0];
|
368
|
-
if (!cached && info.autoCreate) {
|
369
|
-
me.refCache[ref] = cached = Ext.ComponentManager.create(info, 'component');
|
370
|
-
}
|
371
|
-
if (cached) {
|
372
|
-
cached.on('beforedestroy', function() {
|
373
|
-
me.refCache[ref] = null;
|
374
|
-
});
|
375
|
-
}
|
376
|
-
}
|
377
|
-
|
378
|
-
return cached;
|
379
|
-
},
|
380
|
-
|
381
|
-
hasRef: function(ref) {
|
382
|
-
return this.references && this.references.indexOf(ref.toLowerCase()) !== -1;
|
383
|
-
},
|
384
|
-
|
385
|
-
/**
|
386
|
-
* Adds listeners to components selected via {@link Ext.ComponentQuery}. Accepts an
|
387
|
-
* object containing component paths mapped to a hash of listener functions.
|
388
|
-
*
|
389
|
-
* In the following example the `updateUser` function is mapped to to the `click`
|
390
|
-
* event on a button component, which is a child of the `useredit` component.
|
391
|
-
*
|
392
|
-
* Ext.define('AM.controller.Users', {
|
393
|
-
* init: function() {
|
394
|
-
* this.control({
|
395
|
-
* 'useredit button[action=save]': {
|
396
|
-
* click: this.updateUser
|
397
|
-
* }
|
398
|
-
* });
|
399
|
-
* },
|
400
|
-
*
|
401
|
-
* updateUser: function(button) {
|
402
|
-
* console.log('clicked the Save button');
|
403
|
-
* }
|
404
|
-
* });
|
405
|
-
*
|
406
|
-
* See {@link Ext.ComponentQuery} for more information on component selectors.
|
407
|
-
*
|
408
|
-
* @param {String/Object} selectors If a String, the second argument is used as the
|
409
|
-
* listeners, otherwise an object of selectors -> listeners is assumed
|
410
|
-
* @param {Object} listeners
|
411
|
-
*/
|
412
|
-
control: function(selectors, listeners) {
|
413
|
-
this.application.control(selectors, listeners, this);
|
414
|
-
},
|
415
|
-
|
416
|
-
/**
|
417
|
-
* Returns instance of a {@link Ext.app.Controller controller} with the given name.
|
418
|
-
* When controller doesn't exist yet, it's created.
|
419
|
-
* @param {String} name
|
420
|
-
* @return {Ext.app.Controller} a controller instance.
|
421
|
-
*/
|
422
|
-
getController: function(name) {
|
423
|
-
return this.application.getController(name);
|
424
|
-
},
|
425
|
-
|
426
|
-
/**
|
427
|
-
* Returns instance of a {@link Ext.data.Store Store} with the given name.
|
428
|
-
* When store doesn't exist yet, it's created.
|
429
|
-
* @param {String} name
|
430
|
-
* @return {Ext.data.Store} a store instance.
|
431
|
-
*/
|
432
|
-
getStore: function(name) {
|
433
|
-
return this.application.getStore(name);
|
434
|
-
},
|
435
|
-
|
436
|
-
/**
|
437
|
-
* Returns a {@link Ext.data.Model Model} class with the given name.
|
438
|
-
* A shorthand for using {@link Ext.ModelManager#getModel}.
|
439
|
-
* @param {String} name
|
440
|
-
* @return {Ext.data.Model} a model class.
|
441
|
-
*/
|
442
|
-
getModel: function(model) {
|
443
|
-
return this.application.getModel(model);
|
444
|
-
},
|
445
|
-
|
446
|
-
/**
|
447
|
-
* Returns a View class with the given name. To create an instance of the view,
|
448
|
-
* you can use it like it's used by Application to create the Viewport:
|
449
|
-
*
|
450
|
-
* this.getView('Viewport').create();
|
451
|
-
*
|
452
|
-
* @param {String} name
|
453
|
-
* @return {Ext.Base} a view class.
|
454
|
-
*/
|
455
|
-
getView: function(view) {
|
456
|
-
return this.application.getView(view);
|
457
|
-
}
|
458
|
-
});
|