extjs-rails 4.1.0.alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE +36 -0
- data/README.md +29 -0
- data/Rakefile +2 -0
- data/app/assets/javascripts/extjs-rails/extjs-rails.js +1 -0
- data/app/assets/javascripts/extjs-rails/index.js.erb +9 -0
- data/app/assets/javascripts/extjs-rails/sdk.jsb3 +2017 -0
- data/app/assets/javascripts/extjs-rails/src/AbstractComponent.js +3290 -0
- data/app/assets/javascripts/extjs-rails/src/AbstractManager.js +144 -0
- data/app/assets/javascripts/extjs-rails/src/AbstractPlugin.js +72 -0
- data/app/assets/javascripts/extjs-rails/src/Action.js +276 -0
- data/app/assets/javascripts/extjs-rails/src/Ajax.js +99 -0
- data/app/assets/javascripts/extjs-rails/src/Component.js +1344 -0
- data/app/assets/javascripts/extjs-rails/src/ComponentLoader.js +202 -0
- data/app/assets/javascripts/extjs-rails/src/ComponentManager.js +47 -0
- data/app/assets/javascripts/extjs-rails/src/ComponentQuery.js +521 -0
- data/app/assets/javascripts/extjs-rails/src/Editor.js +494 -0
- data/app/assets/javascripts/extjs-rails/src/ElementLoader.js +404 -0
- data/app/assets/javascripts/extjs-rails/src/FocusManager.js +712 -0
- data/app/assets/javascripts/extjs-rails/src/Img.js +111 -0
- data/app/assets/javascripts/extjs-rails/src/Layer.js +543 -0
- data/app/assets/javascripts/extjs-rails/src/LoadMask.js +432 -0
- data/app/assets/javascripts/extjs-rails/src/ModelManager.js +186 -0
- data/app/assets/javascripts/extjs-rails/src/PluginManager.js +110 -0
- data/app/assets/javascripts/extjs-rails/src/ProgressBar.js +336 -0
- data/app/assets/javascripts/extjs-rails/src/Shadow.js +233 -0
- data/app/assets/javascripts/extjs-rails/src/ShadowPool.js +43 -0
- data/app/assets/javascripts/extjs-rails/src/Template.js +331 -0
- data/app/assets/javascripts/extjs-rails/src/XTemplate.js +365 -0
- data/app/assets/javascripts/extjs-rails/src/XTemplateCompiler.js +450 -0
- data/app/assets/javascripts/extjs-rails/src/XTemplateParser.js +249 -0
- data/app/assets/javascripts/extjs-rails/src/ZIndexManager.js +519 -0
- data/app/assets/javascripts/extjs-rails/src/app/Application.js +271 -0
- data/app/assets/javascripts/extjs-rails/src/app/Controller.js +458 -0
- data/app/assets/javascripts/extjs-rails/src/app/EventBus.js +112 -0
- data/app/assets/javascripts/extjs-rails/src/button/Button.js +1483 -0
- data/app/assets/javascripts/extjs-rails/src/button/Cycle.js +215 -0
- data/app/assets/javascripts/extjs-rails/src/button/Split.js +99 -0
- data/app/assets/javascripts/extjs-rails/src/chart/Callout.js +140 -0
- data/app/assets/javascripts/extjs-rails/src/chart/Chart.js +966 -0
- data/app/assets/javascripts/extjs-rails/src/chart/Highlight.js +172 -0
- data/app/assets/javascripts/extjs-rails/src/chart/Label.js +241 -0
- data/app/assets/javascripts/extjs-rails/src/chart/Legend.js +474 -0
- data/app/assets/javascripts/extjs-rails/src/chart/LegendItem.js +217 -0
- data/app/assets/javascripts/extjs-rails/src/chart/Mask.js +230 -0
- data/app/assets/javascripts/extjs-rails/src/chart/MaskLayer.js +48 -0
- data/app/assets/javascripts/extjs-rails/src/chart/Navigation.js +79 -0
- data/app/assets/javascripts/extjs-rails/src/chart/Shape.js +106 -0
- data/app/assets/javascripts/extjs-rails/src/chart/Tip.js +98 -0
- data/app/assets/javascripts/extjs-rails/src/chart/TipSurface.js +42 -0
- data/app/assets/javascripts/extjs-rails/src/chart/axis/Abstract.js +73 -0
- data/app/assets/javascripts/extjs-rails/src/chart/axis/Axis.js +961 -0
- data/app/assets/javascripts/extjs-rails/src/chart/axis/Category.js +130 -0
- data/app/assets/javascripts/extjs-rails/src/chart/axis/Gauge.js +203 -0
- data/app/assets/javascripts/extjs-rails/src/chart/axis/Numeric.js +235 -0
- data/app/assets/javascripts/extjs-rails/src/chart/axis/Radial.js +204 -0
- data/app/assets/javascripts/extjs-rails/src/chart/axis/Time.js +135 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Area.js +803 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Bar.js +853 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Cartesian.js +328 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Column.js +104 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Gauge.js +490 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Line.js +1104 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Pie.js +1072 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Radar.js +440 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Scatter.js +668 -0
- data/app/assets/javascripts/extjs-rails/src/chart/series/Series.js +443 -0
- data/app/assets/javascripts/extjs-rails/src/chart/theme/Base.js +175 -0
- data/app/assets/javascripts/extjs-rails/src/chart/theme/Theme.js +253 -0
- data/app/assets/javascripts/extjs-rails/src/container/AbstractContainer.js +1062 -0
- data/app/assets/javascripts/extjs-rails/src/container/ButtonGroup.js +143 -0
- data/app/assets/javascripts/extjs-rails/src/container/Container.js +212 -0
- data/app/assets/javascripts/extjs-rails/src/container/DockingContainer.js +265 -0
- data/app/assets/javascripts/extjs-rails/src/container/Viewport.js +184 -0
- data/app/assets/javascripts/extjs-rails/src/core/dom/Element.form.js +50 -0
- data/app/assets/javascripts/extjs-rails/src/core/dom/Element.static-more.js +159 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/index.html +321 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/index.js +6 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/CTO.js +25 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/CoolGuy.js +20 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Developer.js +43 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Gun.js +3 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/HumanResource.js +23 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Musician.js +20 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/Person.js +50 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/ability/CanComposeSongs.js +9 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/ability/CanPlayGuitar.js +9 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/ability/CanSing.js +18 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/A.js +3 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/B.js +3 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/C.js +3 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/D.js +3 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/deadlock/E.js +3 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/notdeadlock/A.js +3 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/notdeadlock/B.js +4 -0
- data/app/assets/javascripts/extjs-rails/src/core/examples/src/Sample/notdeadlock/C.js +3 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/EventManager.js +1167 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/EventObject.js +883 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/Ext-more.js +1283 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/Ext.js +736 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/Support.js +662 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/class/Base.js +1085 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/class/Class.js +676 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/class/ClassManager.js +1591 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/class/Loader.js +1423 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.alignment.js +173 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.insertion.js +193 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.js +681 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.position.js +356 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.static.js +474 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.style.js +851 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractElement.traversal.js +180 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractHelper.js +291 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/AbstractQuery.js +72 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/CompositeElement.js +75 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/CompositeElementLite.js +436 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/dom/DomQuery-aria.js +1049 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/env/Browser.js +186 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/env/FeatureDetector.js +274 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/env/OS.js +141 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/lang/Array.js +1205 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/lang/Date.js +1463 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/lang/Error.js +326 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/lang/Function.js +485 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/lang/Number.js +175 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/lang/Object.js +606 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/lang/String.js +333 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/misc/JSON.js +236 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/perf/Accumulator.js +244 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/perf/Monitor.js +197 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/util/DelayedTask.js +71 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/util/Event.js +215 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/util/Format.js +551 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/util/TaskManager.js +417 -0
- data/app/assets/javascripts/extjs-rails/src/core/src/version/Version.js +364 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/README.MD +91 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/bootstrap.js +39 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/build/build-data.js +34 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/build/build.sh +2 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/data.js +27 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/index.html +15 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom.html +40 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/extjs-api.js +12 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/platform-api.js +134 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/sanity.js +4 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/touch-api-out.js +128 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/dom/touch-api.js +89 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/other_specs/env/Environment.js +357 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/resources/APITest.js +37 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/resources/jsb3.js +14 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/resources/test-setup.js +137 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/EventManager.js +629 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/Ext-mess.backup +198 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/Ext-more.js +520 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/Ext.js +1550 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/Support.js +250 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/class/Base.js +47 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/class/Class.js +561 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/class/ClassManager.js +555 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/CompositeElementLite.js +409 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/DomHelper.js +444 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.insertion.js +342 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.js +731 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.static.js +201 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.style.js +118 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/dom/Element.traversal.js +336 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Array.js +1229 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Date.js +697 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Error.js +277 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Function.js +536 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Number.js +323 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/Object.js +591 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/lang/String.js +451 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/misc/JSON.js +252 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/util/Format.js +521 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/spec/version/Version.js +148 -0
- data/app/assets/javascripts/extjs-rails/src/core/test/unit/specs.html +19 -0
- data/app/assets/javascripts/extjs-rails/src/data/AbstractStore.js +887 -0
- data/app/assets/javascripts/extjs-rails/src/data/ArrayStore.js +74 -0
- data/app/assets/javascripts/extjs-rails/src/data/Batch.js +236 -0
- data/app/assets/javascripts/extjs-rails/src/data/BufferStore.js +13 -0
- data/app/assets/javascripts/extjs-rails/src/data/Connection.js +969 -0
- data/app/assets/javascripts/extjs-rails/src/data/DirectStore.js +50 -0
- data/app/assets/javascripts/extjs-rails/src/data/Errors.js +52 -0
- data/app/assets/javascripts/extjs-rails/src/data/Field.js +341 -0
- data/app/assets/javascripts/extjs-rails/src/data/IdGenerator.js +198 -0
- data/app/assets/javascripts/extjs-rails/src/data/JsonP.js +253 -0
- data/app/assets/javascripts/extjs-rails/src/data/JsonPStore.js +51 -0
- data/app/assets/javascripts/extjs-rails/src/data/JsonStore.js +60 -0
- data/app/assets/javascripts/extjs-rails/src/data/Model.js +1673 -0
- data/app/assets/javascripts/extjs-rails/src/data/NodeInterface.js +1294 -0
- data/app/assets/javascripts/extjs-rails/src/data/NodeStore.js +254 -0
- data/app/assets/javascripts/extjs-rails/src/data/Operation.js +331 -0
- data/app/assets/javascripts/extjs-rails/src/data/Request.js +40 -0
- data/app/assets/javascripts/extjs-rails/src/data/ResultSet.js +56 -0
- data/app/assets/javascripts/extjs-rails/src/data/SequentialIdGenerator.js +61 -0
- data/app/assets/javascripts/extjs-rails/src/data/SortTypes.js +125 -0
- data/app/assets/javascripts/extjs-rails/src/data/Store.js +2609 -0
- data/app/assets/javascripts/extjs-rails/src/data/StoreManager.js +156 -0
- data/app/assets/javascripts/extjs-rails/src/data/Tree.js +290 -0
- data/app/assets/javascripts/extjs-rails/src/data/TreeStore.js +655 -0
- data/app/assets/javascripts/extjs-rails/src/data/Types.js +190 -0
- data/app/assets/javascripts/extjs-rails/src/data/UuidGenerator.js +215 -0
- data/app/assets/javascripts/extjs-rails/src/data/XmlStore.js +76 -0
- data/app/assets/javascripts/extjs-rails/src/data/association/Association.js +243 -0
- data/app/assets/javascripts/extjs-rails/src/data/association/BelongsTo.js +291 -0
- data/app/assets/javascripts/extjs-rails/src/data/association/HasMany.js +289 -0
- data/app/assets/javascripts/extjs-rails/src/data/association/HasOne.js +304 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/Ajax.js +282 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/Client.js +21 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/Direct.js +181 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/JsonP.js +313 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/LocalStorage.js +69 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/Memory.js +156 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/Proxy.js +433 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/Rest.js +173 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/Server.js +460 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/SessionStorage.js +39 -0
- data/app/assets/javascripts/extjs-rails/src/data/proxy/WebStorage.js +546 -0
- data/app/assets/javascripts/extjs-rails/src/data/reader/Array.js +68 -0
- data/app/assets/javascripts/extjs-rails/src/data/reader/Json.js +383 -0
- data/app/assets/javascripts/extjs-rails/src/data/reader/Reader.js +735 -0
- data/app/assets/javascripts/extjs-rails/src/data/reader/Xml.js +292 -0
- data/app/assets/javascripts/extjs-rails/src/data/validations.js +149 -0
- data/app/assets/javascripts/extjs-rails/src/data/writer/Json.js +81 -0
- data/app/assets/javascripts/extjs-rails/src/data/writer/Writer.js +147 -0
- data/app/assets/javascripts/extjs-rails/src/data/writer/Xml.js +88 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DD.js +300 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DDProxy.js +204 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DDTarget.js +171 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DragDrop.js +1101 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DragDropManager.js +1264 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DragSource.js +392 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DragTracker.js +562 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DragZone.js +137 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DropTarget.js +118 -0
- data/app/assets/javascripts/extjs-rails/src/dd/DropZone.js +254 -0
- data/app/assets/javascripts/extjs-rails/src/dd/Registry.js +117 -0
- data/app/assets/javascripts/extjs-rails/src/dd/ScrollManager.js +218 -0
- data/app/assets/javascripts/extjs-rails/src/dd/StatusProxy.js +179 -0
- data/app/assets/javascripts/extjs-rails/src/diag/layout/Context.js +523 -0
- data/app/assets/javascripts/extjs-rails/src/diag/layout/ContextItem.js +179 -0
- data/app/assets/javascripts/extjs-rails/src/direct/Event.js +35 -0
- data/app/assets/javascripts/extjs-rails/src/direct/ExceptionEvent.js +16 -0
- data/app/assets/javascripts/extjs-rails/src/direct/JsonProvider.js +82 -0
- data/app/assets/javascripts/extjs-rails/src/direct/Manager.js +263 -0
- data/app/assets/javascripts/extjs-rails/src/direct/PollingProvider.js +156 -0
- data/app/assets/javascripts/extjs-rails/src/direct/Provider.js +96 -0
- data/app/assets/javascripts/extjs-rails/src/direct/RemotingEvent.js +24 -0
- data/app/assets/javascripts/extjs-rails/src/direct/RemotingMethod.js +100 -0
- data/app/assets/javascripts/extjs-rails/src/direct/RemotingProvider.js +510 -0
- data/app/assets/javascripts/extjs-rails/src/direct/Transaction.js +41 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Element.alignment.js +378 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Element.anim.js +962 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Element.dd.js +40 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Element.fx.js +194 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Element.js +1407 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Element.position.js +501 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Element.scroll.js +214 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Element.style.js +792 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Element.traversal.js +8 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Helper.js +466 -0
- data/app/assets/javascripts/extjs-rails/src/dom/Query.js +1067 -0
- data/app/assets/javascripts/extjs-rails/src/draw/Color.js +303 -0
- data/app/assets/javascripts/extjs-rails/src/draw/Component.js +245 -0
- data/app/assets/javascripts/extjs-rails/src/draw/CompositeSprite.js +299 -0
- data/app/assets/javascripts/extjs-rails/src/draw/Draw.js +1217 -0
- data/app/assets/javascripts/extjs-rails/src/draw/Matrix.js +183 -0
- data/app/assets/javascripts/extjs-rails/src/draw/Sprite.js +554 -0
- data/app/assets/javascripts/extjs-rails/src/draw/SpriteDD.js +87 -0
- data/app/assets/javascripts/extjs-rails/src/draw/Surface.js +1001 -0
- data/app/assets/javascripts/extjs-rails/src/draw/Text.js +175 -0
- data/app/assets/javascripts/extjs-rails/src/draw/engine/ImageExporter.js +106 -0
- data/app/assets/javascripts/extjs-rails/src/draw/engine/Svg.js +734 -0
- data/app/assets/javascripts/extjs-rails/src/draw/engine/SvgExporter.js +280 -0
- data/app/assets/javascripts/extjs-rails/src/draw/engine/Vml.js +916 -0
- data/app/assets/javascripts/extjs-rails/src/flash/Component.js +248 -0
- data/app/assets/javascripts/extjs-rails/src/form/Basic.js +1018 -0
- data/app/assets/javascripts/extjs-rails/src/form/CheckboxGroup.js +441 -0
- data/app/assets/javascripts/extjs-rails/src/form/CheckboxManager.js +26 -0
- data/app/assets/javascripts/extjs-rails/src/form/FieldAncestor.js +210 -0
- data/app/assets/javascripts/extjs-rails/src/form/FieldContainer.js +290 -0
- data/app/assets/javascripts/extjs-rails/src/form/FieldSet.js +506 -0
- data/app/assets/javascripts/extjs-rails/src/form/Label.js +110 -0
- data/app/assets/javascripts/extjs-rails/src/form/Labelable.js +764 -0
- data/app/assets/javascripts/extjs-rails/src/form/Panel.js +335 -0
- data/app/assets/javascripts/extjs-rails/src/form/RadioGroup.js +124 -0
- data/app/assets/javascripts/extjs-rails/src/form/RadioManager.js +26 -0
- data/app/assets/javascripts/extjs-rails/src/form/action/Action.js +307 -0
- data/app/assets/javascripts/extjs-rails/src/form/action/DirectLoad.js +107 -0
- data/app/assets/javascripts/extjs-rails/src/form/action/DirectSubmit.js +119 -0
- data/app/assets/javascripts/extjs-rails/src/form/action/Load.js +120 -0
- data/app/assets/javascripts/extjs-rails/src/form/action/StandardSubmit.js +34 -0
- data/app/assets/javascripts/extjs-rails/src/form/action/Submit.js +257 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Base.js +813 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Checkbox.js +505 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/ComboBox.js +1427 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Date.js +578 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Display.js +155 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Field.js +430 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/File.js +265 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Hidden.js +75 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/HtmlEditor.js +1439 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Number.js +380 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Picker.js +321 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Radio.js +279 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Spinner.js +321 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Text.js +727 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/TextArea.js +228 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Time.js +459 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/Trigger.js +469 -0
- data/app/assets/javascripts/extjs-rails/src/form/field/VTypes.js +172 -0
- data/app/assets/javascripts/extjs-rails/src/fx/Anim.js +472 -0
- data/app/assets/javascripts/extjs-rails/src/fx/Animator.js +410 -0
- data/app/assets/javascripts/extjs-rails/src/fx/CubicBezier.js +77 -0
- data/app/assets/javascripts/extjs-rails/src/fx/Easing.js +136 -0
- data/app/assets/javascripts/extjs-rails/src/fx/Manager.js +353 -0
- data/app/assets/javascripts/extjs-rails/src/fx/PropertyHandler.js +381 -0
- data/app/assets/javascripts/extjs-rails/src/fx/Queue.js +123 -0
- data/app/assets/javascripts/extjs-rails/src/fx/target/Component.js +118 -0
- data/app/assets/javascripts/extjs-rails/src/fx/target/CompositeElement.js +46 -0
- data/app/assets/javascripts/extjs-rails/src/fx/target/CompositeElementCSS.js +22 -0
- data/app/assets/javascripts/extjs-rails/src/fx/target/CompositeSprite.js +34 -0
- data/app/assets/javascripts/extjs-rails/src/fx/target/Element.js +83 -0
- data/app/assets/javascripts/extjs-rails/src/fx/target/ElementCSS.js +77 -0
- data/app/assets/javascripts/extjs-rails/src/fx/target/Sprite.js +128 -0
- data/app/assets/javascripts/extjs-rails/src/fx/target/Target.js +36 -0
- data/app/assets/javascripts/extjs-rails/src/grid/CellEditor.js +172 -0
- data/app/assets/javascripts/extjs-rails/src/grid/ColumnComponentLayout.js +34 -0
- data/app/assets/javascripts/extjs-rails/src/grid/ColumnLayout.js +201 -0
- data/app/assets/javascripts/extjs-rails/src/grid/Lockable.js +863 -0
- data/app/assets/javascripts/extjs-rails/src/grid/LockingView.js +169 -0
- data/app/assets/javascripts/extjs-rails/src/grid/PagingScroller.js +539 -0
- data/app/assets/javascripts/extjs-rails/src/grid/Panel.js +393 -0
- data/app/assets/javascripts/extjs-rails/src/grid/RowEditor.js +731 -0
- data/app/assets/javascripts/extjs-rails/src/grid/RowNumberer.js +76 -0
- data/app/assets/javascripts/extjs-rails/src/grid/Scroller.js +5 -0
- data/app/assets/javascripts/extjs-rails/src/grid/View.js +44 -0
- data/app/assets/javascripts/extjs-rails/src/grid/ViewDropZone.js +41 -0
- data/app/assets/javascripts/extjs-rails/src/grid/column/Action.js +318 -0
- data/app/assets/javascripts/extjs-rails/src/grid/column/Boolean.js +82 -0
- data/app/assets/javascripts/extjs-rails/src/grid/column/Column.js +835 -0
- data/app/assets/javascripts/extjs-rails/src/grid/column/Date.js +63 -0
- data/app/assets/javascripts/extjs-rails/src/grid/column/Number.js +52 -0
- data/app/assets/javascripts/extjs-rails/src/grid/column/Template.js +58 -0
- data/app/assets/javascripts/extjs-rails/src/grid/feature/AbstractSummary.js +154 -0
- data/app/assets/javascripts/extjs-rails/src/grid/feature/Chunking.js +77 -0
- data/app/assets/javascripts/extjs-rails/src/grid/feature/Feature.js +158 -0
- data/app/assets/javascripts/extjs-rails/src/grid/feature/Grouping.js +822 -0
- data/app/assets/javascripts/extjs-rails/src/grid/feature/GroupingSummary.js +243 -0
- data/app/assets/javascripts/extjs-rails/src/grid/feature/RowBody.js +116 -0
- data/app/assets/javascripts/extjs-rails/src/grid/feature/RowWrap.js +120 -0
- data/app/assets/javascripts/extjs-rails/src/grid/feature/Summary.js +167 -0
- data/app/assets/javascripts/extjs-rails/src/grid/header/Container.js +965 -0
- data/app/assets/javascripts/extjs-rails/src/grid/header/DragZone.js +69 -0
- data/app/assets/javascripts/extjs-rails/src/grid/header/DropZone.js +265 -0
- data/app/assets/javascripts/extjs-rails/src/grid/plugin/CellEditing.js +453 -0
- data/app/assets/javascripts/extjs-rails/src/grid/plugin/DragDrop.js +254 -0
- data/app/assets/javascripts/extjs-rails/src/grid/plugin/Editing.js +561 -0
- data/app/assets/javascripts/extjs-rails/src/grid/plugin/HeaderReorderer.js +49 -0
- data/app/assets/javascripts/extjs-rails/src/grid/plugin/HeaderResizer.js +292 -0
- data/app/assets/javascripts/extjs-rails/src/grid/plugin/RowEditing.js +339 -0
- data/app/assets/javascripts/extjs-rails/src/grid/property/Grid.js +351 -0
- data/app/assets/javascripts/extjs-rails/src/grid/property/HeaderContainer.js +109 -0
- data/app/assets/javascripts/extjs-rails/src/grid/property/Property.js +36 -0
- data/app/assets/javascripts/extjs-rails/src/grid/property/Store.js +141 -0
- data/app/assets/javascripts/extjs-rails/src/layout/ClassList.js +90 -0
- data/app/assets/javascripts/extjs-rails/src/layout/Context.js +1232 -0
- data/app/assets/javascripts/extjs-rails/src/layout/ContextItem.js +1470 -0
- data/app/assets/javascripts/extjs-rails/src/layout/Layout.js +761 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/Auto.js +220 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/Body.js +80 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/BoundList.js +95 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/Button.js +261 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/Component.js +427 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/Dock.js +1132 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/Draw.js +79 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/FieldSet.js +62 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/ProgressBar.js +54 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/Tab.js +23 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/field/ComboBox.js +52 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/field/Field.js +372 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/field/FieldContainer.js +48 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/field/HtmlEditor.js +54 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/field/Slider.js +58 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/field/Text.js +75 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/field/TextArea.js +51 -0
- data/app/assets/javascripts/extjs-rails/src/layout/component/field/Trigger.js +132 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Absolute.js +121 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Accordion.js +308 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Anchor.js +403 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Auto.js +70 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Border-old-js +1079 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Border.js +816 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Box.js +929 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Card.js +361 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/CheckboxGroup.js +376 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Column.js +234 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Container.js +961 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Editor.js +74 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Fit.js +287 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Form.js +157 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/HBox.js +134 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/Table.js +412 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/VBox.js +139 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/boxOverflow/Menu.js +365 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/boxOverflow/None.js +83 -0
- data/app/assets/javascripts/extjs-rails/src/layout/container/boxOverflow/Scroller.js +475 -0
- data/app/assets/javascripts/extjs-rails/src/menu/CheckItem.js +169 -0
- data/app/assets/javascripts/extjs-rails/src/menu/ColorPicker.js +110 -0
- data/app/assets/javascripts/extjs-rails/src/menu/DatePicker.js +100 -0
- data/app/assets/javascripts/extjs-rails/src/menu/Item.js +553 -0
- data/app/assets/javascripts/extjs-rails/src/menu/KeyNav.js +134 -0
- data/app/assets/javascripts/extjs-rails/src/menu/Manager.js +219 -0
- data/app/assets/javascripts/extjs-rails/src/menu/Menu.js +579 -0
- data/app/assets/javascripts/extjs-rails/src/menu/Separator.js +126 -0
- data/app/assets/javascripts/extjs-rails/src/panel/AbstractPanel.js +323 -0
- data/app/assets/javascripts/extjs-rails/src/panel/DD.js +99 -0
- data/app/assets/javascripts/extjs-rails/src/panel/Header.js +518 -0
- data/app/assets/javascripts/extjs-rails/src/panel/Panel.js +2150 -0
- data/app/assets/javascripts/extjs-rails/src/panel/Proxy.js +131 -0
- data/app/assets/javascripts/extjs-rails/src/panel/Table.js +1018 -0
- data/app/assets/javascripts/extjs-rails/src/panel/Tool.js +304 -0
- data/app/assets/javascripts/extjs-rails/src/picker/Color.js +219 -0
- data/app/assets/javascripts/extjs-rails/src/picker/Date.js +1140 -0
- data/app/assets/javascripts/extjs-rails/src/picker/Month.js +490 -0
- data/app/assets/javascripts/extjs-rails/src/picker/Time.js +165 -0
- data/app/assets/javascripts/extjs-rails/src/resizer/BorderSplitter.js +22 -0
- data/app/assets/javascripts/extjs-rails/src/resizer/BorderSplitterTracker.js +210 -0
- data/app/assets/javascripts/extjs-rails/src/resizer/Handle.js +29 -0
- data/app/assets/javascripts/extjs-rails/src/resizer/ResizeTracker.js +346 -0
- data/app/assets/javascripts/extjs-rails/src/resizer/Resizer.js +477 -0
- data/app/assets/javascripts/extjs-rails/src/resizer/Splitter.js +242 -0
- data/app/assets/javascripts/extjs-rails/src/resizer/SplitterTracker.js +230 -0
- data/app/assets/javascripts/extjs-rails/src/selection/CellModel.js +395 -0
- data/app/assets/javascripts/extjs-rails/src/selection/CheckboxModel.js +234 -0
- data/app/assets/javascripts/extjs-rails/src/selection/DataViewModel.js +160 -0
- data/app/assets/javascripts/extjs-rails/src/selection/Model.js +646 -0
- data/app/assets/javascripts/extjs-rails/src/selection/RowModel.js +499 -0
- data/app/assets/javascripts/extjs-rails/src/selection/TreeModel.js +78 -0
- data/app/assets/javascripts/extjs-rails/src/slider/Multi.js +835 -0
- data/app/assets/javascripts/extjs-rails/src/slider/Single.js +56 -0
- data/app/assets/javascripts/extjs-rails/src/slider/Thumb.js +259 -0
- data/app/assets/javascripts/extjs-rails/src/slider/Tip.js +130 -0
- data/app/assets/javascripts/extjs-rails/src/state/CookieProvider.js +120 -0
- data/app/assets/javascripts/extjs-rails/src/state/LocalStorageProvider.js +72 -0
- data/app/assets/javascripts/extjs-rails/src/state/Manager.js +70 -0
- data/app/assets/javascripts/extjs-rails/src/state/Provider.js +182 -0
- data/app/assets/javascripts/extjs-rails/src/state/Stateful.js +364 -0
- data/app/assets/javascripts/extjs-rails/src/tab/Bar.js +258 -0
- data/app/assets/javascripts/extjs-rails/src/tab/Panel.js +654 -0
- data/app/assets/javascripts/extjs-rails/src/tab/Tab.js +358 -0
- data/app/assets/javascripts/extjs-rails/src/tail.js +10 -0
- data/app/assets/javascripts/extjs-rails/src/tip/QuickTip.js +335 -0
- data/app/assets/javascripts/extjs-rails/src/tip/QuickTipManager.js +239 -0
- data/app/assets/javascripts/extjs-rails/src/tip/Tip.js +160 -0
- data/app/assets/javascripts/extjs-rails/src/tip/ToolTip.js +691 -0
- data/app/assets/javascripts/extjs-rails/src/toolbar/Fill.js +28 -0
- data/app/assets/javascripts/extjs-rails/src/toolbar/Item.js +16 -0
- data/app/assets/javascripts/extjs-rails/src/toolbar/Paging.js +600 -0
- data/app/assets/javascripts/extjs-rails/src/toolbar/Separator.js +23 -0
- data/app/assets/javascripts/extjs-rails/src/toolbar/Spacer.js +33 -0
- data/app/assets/javascripts/extjs-rails/src/toolbar/TextItem.js +57 -0
- data/app/assets/javascripts/extjs-rails/src/toolbar/Toolbar-legacy.js +123 -0
- data/app/assets/javascripts/extjs-rails/src/toolbar/Toolbar.js +447 -0
- data/app/assets/javascripts/extjs-rails/src/tree/Column.js +90 -0
- data/app/assets/javascripts/extjs-rails/src/tree/Panel.js +505 -0
- data/app/assets/javascripts/extjs-rails/src/tree/View.js +658 -0
- data/app/assets/javascripts/extjs-rails/src/tree/ViewDragZone.js +49 -0
- data/app/assets/javascripts/extjs-rails/src/tree/ViewDropZone.js +287 -0
- data/app/assets/javascripts/extjs-rails/src/tree/plugin/TreeViewDragDrop.js +244 -0
- data/app/assets/javascripts/extjs-rails/src/util/AbstractMixedCollection.js +772 -0
- data/app/assets/javascripts/extjs-rails/src/util/Animate.js +426 -0
- data/app/assets/javascripts/extjs-rails/src/util/Bindable.js +102 -0
- data/app/assets/javascripts/extjs-rails/src/util/CSS.js +185 -0
- data/app/assets/javascripts/extjs-rails/src/util/ClickRepeater.js +238 -0
- data/app/assets/javascripts/extjs-rails/src/util/ComponentDragger.js +126 -0
- data/app/assets/javascripts/extjs-rails/src/util/Cookies.js +91 -0
- data/app/assets/javascripts/extjs-rails/src/util/ElementContainer.js +293 -0
- data/app/assets/javascripts/extjs-rails/src/util/Filter.js +159 -0
- data/app/assets/javascripts/extjs-rails/src/util/Floating.js +321 -0
- data/app/assets/javascripts/extjs-rails/src/util/Grouper.js +26 -0
- data/app/assets/javascripts/extjs-rails/src/util/HashMap.js +356 -0
- data/app/assets/javascripts/extjs-rails/src/util/History.js +285 -0
- data/app/assets/javascripts/extjs-rails/src/util/Inflector.js +297 -0
- data/app/assets/javascripts/extjs-rails/src/util/KeyMap.js +427 -0
- data/app/assets/javascripts/extjs-rails/src/util/KeyNav.js +239 -0
- data/app/assets/javascripts/extjs-rails/src/util/LruCache.js +257 -0
- data/app/assets/javascripts/extjs-rails/src/util/Memento.js +131 -0
- data/app/assets/javascripts/extjs-rails/src/util/MixedCollection.js +239 -0
- data/app/assets/javascripts/extjs-rails/src/util/Observable.js +1003 -0
- data/app/assets/javascripts/extjs-rails/src/util/Offset.js +60 -0
- data/app/assets/javascripts/extjs-rails/src/util/Point.js +93 -0
- data/app/assets/javascripts/extjs-rails/src/util/ProtoElement.js +205 -0
- data/app/assets/javascripts/extjs-rails/src/util/Queue.js +76 -0
- data/app/assets/javascripts/extjs-rails/src/util/Region.js +388 -0
- data/app/assets/javascripts/extjs-rails/src/util/Renderable.js +1079 -0
- data/app/assets/javascripts/extjs-rails/src/util/Sortable.js +248 -0
- data/app/assets/javascripts/extjs-rails/src/util/Sorter.js +179 -0
- data/app/assets/javascripts/extjs-rails/src/util/TextMetrics.js +148 -0
- data/app/assets/javascripts/extjs-rails/src/view/AbstractView.js +1103 -0
- data/app/assets/javascripts/extjs-rails/src/view/BoundList.js +207 -0
- data/app/assets/javascripts/extjs-rails/src/view/BoundListKeyNav.js +92 -0
- data/app/assets/javascripts/extjs-rails/src/view/DragZone.js +106 -0
- data/app/assets/javascripts/extjs-rails/src/view/DropZone.js +240 -0
- data/app/assets/javascripts/extjs-rails/src/view/Table.js +1229 -0
- data/app/assets/javascripts/extjs-rails/src/view/TableChunker.js +139 -0
- data/app/assets/javascripts/extjs-rails/src/view/View.js +636 -0
- data/app/assets/javascripts/extjs-rails/src/window/MessageBox.js +880 -0
- data/app/assets/javascripts/extjs-rails/src/window/Window-legacy.js +56 -0
- data/app/assets/javascripts/extjs-rails/src/window/Window.js +793 -0
- data/extjs-rails.gemspec +24 -0
- data/lib/extjs-rails.rb +7 -0
- data/lib/extjs-rails/engine.rb +7 -0
- data/lib/extjs-rails/version.rb +5 -0
- metadata +660 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Supporting Class for Ext.Direct (not intended to be used directly).
|
|
3
|
+
*/
|
|
4
|
+
Ext.define('Ext.direct.Transaction', {
|
|
5
|
+
|
|
6
|
+
/* Begin Definitions */
|
|
7
|
+
|
|
8
|
+
alias: 'direct.transaction',
|
|
9
|
+
alternateClassName: 'Ext.Direct.Transaction',
|
|
10
|
+
|
|
11
|
+
statics: {
|
|
12
|
+
TRANSACTION_ID: 0
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
/* End Definitions */
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Creates new Transaction.
|
|
19
|
+
* @param {Object} [config] Config object.
|
|
20
|
+
*/
|
|
21
|
+
constructor: function(config){
|
|
22
|
+
var me = this;
|
|
23
|
+
|
|
24
|
+
Ext.apply(me, config);
|
|
25
|
+
me.id = me.tid = ++me.self.TRANSACTION_ID;
|
|
26
|
+
me.retryCount = 0;
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
send: function(){
|
|
30
|
+
this.provider.queueTransaction(this);
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
retry: function(){
|
|
34
|
+
this.retryCount++;
|
|
35
|
+
this.send();
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
getProvider: function(){
|
|
39
|
+
return this.provider;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @class Ext.dom.Element
|
|
3
|
+
*/
|
|
4
|
+
Ext.dom.Element.override((function() {
|
|
5
|
+
|
|
6
|
+
var doc = document,
|
|
7
|
+
win = window,
|
|
8
|
+
alignRe = /^([a-z]+)-([a-z]+)(\?)?$/,
|
|
9
|
+
round = Math.round;
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Gets the x,y coordinates specified by the anchor position on the element.
|
|
15
|
+
* @param {String} [anchor='c'] The specified anchor position. See {@link #alignTo}
|
|
16
|
+
* for details on supported anchor positions.
|
|
17
|
+
* @param {Boolean} [local] True to get the local (element top/left-relative) anchor position instead
|
|
18
|
+
* of page coordinates
|
|
19
|
+
* @param {Object} [size] An object containing the size to use for calculating anchor position
|
|
20
|
+
* {width: (target width), height: (target height)} (defaults to the element's current size)
|
|
21
|
+
* @return {Number[]} [x, y] An array containing the element's x and y coordinates
|
|
22
|
+
*/
|
|
23
|
+
getAnchorXY: function(anchor, local, mySize) {
|
|
24
|
+
//Passing a different size is useful for pre-calculating anchors,
|
|
25
|
+
//especially for anchored animations that change the el size.
|
|
26
|
+
anchor = (anchor || "tl").toLowerCase();
|
|
27
|
+
mySize = mySize || {};
|
|
28
|
+
|
|
29
|
+
var me = this,
|
|
30
|
+
isViewport = me.dom == doc.body || me.dom == doc,
|
|
31
|
+
myWidth = mySize.width || isViewport ? Ext.dom.Element.getViewWidth() : me.getWidth(),
|
|
32
|
+
myHeight = mySize.height || isViewport ? Ext.dom.Element.getViewHeight() : me.getHeight(),
|
|
33
|
+
xy,
|
|
34
|
+
myPos = me.getXY(),
|
|
35
|
+
scroll = me.getScroll(),
|
|
36
|
+
extraX = isViewport ? scroll.left : !local ? myPos[0] : 0,
|
|
37
|
+
extraY = isViewport ? scroll.top : !local ? myPos[1] : 0;
|
|
38
|
+
|
|
39
|
+
// Calculate anchor position.
|
|
40
|
+
// Test most common cases for picker alignment first.
|
|
41
|
+
switch (anchor) {
|
|
42
|
+
case 'tl' : xy = [ 0, 0];
|
|
43
|
+
break;
|
|
44
|
+
case 'bl' : xy = [ 0, myHeight];
|
|
45
|
+
break;
|
|
46
|
+
case 'tr' : xy = [ myWidth, 0];
|
|
47
|
+
break;
|
|
48
|
+
case 'c' : xy = [ round(myWidth * 0.5), round(myHeight * 0.5)];
|
|
49
|
+
break;
|
|
50
|
+
case 't' : xy = [ round(myWidth * 0.5), 0];
|
|
51
|
+
break;
|
|
52
|
+
case 'l' : xy = [ 0, round(myHeight * 0.5)];
|
|
53
|
+
break;
|
|
54
|
+
case 'r' : xy = [ myWidth, round(myHeight * 0.5)];
|
|
55
|
+
break;
|
|
56
|
+
case 'b' : xy = [ round(myWidth * 0.5), myHeight];
|
|
57
|
+
break;
|
|
58
|
+
case 'br' : xy = [ myWidth, myHeight];
|
|
59
|
+
}
|
|
60
|
+
return [xy[0] + extraX, xy[1] + extraY];
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Gets the x,y coordinates to align this element with another element. See {@link #alignTo} for more info on the
|
|
65
|
+
* supported position values.
|
|
66
|
+
* @param {String/HTMLElement/Ext.Element} element The element to align to.
|
|
67
|
+
* @param {String} [position="tl-bl?"] The position to align to (defaults to )
|
|
68
|
+
* @param {Number[]} [offsets] Offset the positioning by [x, y]
|
|
69
|
+
* @return {Number[]} [x, y]
|
|
70
|
+
*/
|
|
71
|
+
getAlignToXY : function(alignToEl, posSpec, offset) {
|
|
72
|
+
alignToEl = Ext.get(alignToEl);
|
|
73
|
+
|
|
74
|
+
if (!alignToEl || !alignToEl.dom) {
|
|
75
|
+
//<debug>
|
|
76
|
+
Ext.Error.raise({
|
|
77
|
+
sourceClass: 'Ext.dom.Element',
|
|
78
|
+
sourceMethod: 'getAlignToXY',
|
|
79
|
+
msg: 'Attempted to align an element that doesn\'t exist'
|
|
80
|
+
});
|
|
81
|
+
//</debug>
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
offset = offset || [0,0];
|
|
85
|
+
posSpec = (!posSpec || posSpec == "?" ? "tl-bl?" : (!(/-/).test(posSpec) && posSpec !== "" ? "tl-" + posSpec : posSpec || "tl-bl")).toLowerCase();
|
|
86
|
+
|
|
87
|
+
var me = this,
|
|
88
|
+
myPosition,
|
|
89
|
+
alignToElPosition,
|
|
90
|
+
x,
|
|
91
|
+
y,
|
|
92
|
+
myWidth,
|
|
93
|
+
myHeight,
|
|
94
|
+
alignToElRegion,
|
|
95
|
+
viewportWidth = Ext.dom.Element.getViewWidth() - 10, // 10px of margin for ie
|
|
96
|
+
viewportHeight = Ext.dom.Element.getViewHeight() - 10, // 10px of margin for ie
|
|
97
|
+
p1y,
|
|
98
|
+
p1x,
|
|
99
|
+
p2y,
|
|
100
|
+
p2x,
|
|
101
|
+
swapY,
|
|
102
|
+
swapX,
|
|
103
|
+
docElement = doc.documentElement,
|
|
104
|
+
docBody = doc.body,
|
|
105
|
+
scrollX = (docElement.scrollLeft || docBody.scrollLeft || 0),// + 5, WHY was 5 ever added?
|
|
106
|
+
scrollY = (docElement.scrollTop || docBody.scrollTop || 0),// + 5, It means align will fail if the alignTo el was at less than 5,5
|
|
107
|
+
constrain, //constrain to viewport
|
|
108
|
+
align1,
|
|
109
|
+
align2,
|
|
110
|
+
alignMatch = posSpec.match(alignRe);
|
|
111
|
+
|
|
112
|
+
//<debug>
|
|
113
|
+
if (!alignMatch) {
|
|
114
|
+
Ext.Error.raise({
|
|
115
|
+
sourceClass: 'Ext.dom.Element',
|
|
116
|
+
sourceMethod: 'getAlignToXY',
|
|
117
|
+
el: alignToEl,
|
|
118
|
+
position: posSpec,
|
|
119
|
+
offset: offset,
|
|
120
|
+
msg: 'Attemmpted to align an element with an invalid position: "' + posSpec + '"'
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
//</debug>
|
|
124
|
+
|
|
125
|
+
align1 = alignMatch[1];
|
|
126
|
+
align2 = alignMatch[2];
|
|
127
|
+
constrain = !!alignMatch[3];
|
|
128
|
+
|
|
129
|
+
//Subtract the aligned el's internal xy from the target's offset xy
|
|
130
|
+
//plus custom offset to get this Element's new offset xy
|
|
131
|
+
myPosition = me.getAnchorXY(align1, true);
|
|
132
|
+
alignToElPosition = alignToEl.getAnchorXY(align2, false);
|
|
133
|
+
|
|
134
|
+
x = alignToElPosition[0] - myPosition[0] + offset[0];
|
|
135
|
+
y = alignToElPosition[1] - myPosition[1] + offset[1];
|
|
136
|
+
|
|
137
|
+
// If position spec ended with a "?", then constrain to viewport is necessary
|
|
138
|
+
if (constrain) {
|
|
139
|
+
myWidth = me.getWidth();
|
|
140
|
+
myHeight = me.getHeight();
|
|
141
|
+
alignToElRegion = alignToEl.getRegion();
|
|
142
|
+
//If we are at a viewport boundary and the aligned el is anchored on a target border that is
|
|
143
|
+
//perpendicular to the vp border, allow the aligned el to slide on that border,
|
|
144
|
+
//otherwise swap the aligned el to the opposite border of the target.
|
|
145
|
+
p1y = align1.charAt(0);
|
|
146
|
+
p1x = align1.charAt(align1.length - 1);
|
|
147
|
+
p2y = align2.charAt(0);
|
|
148
|
+
p2x = align2.charAt(align2.length - 1);
|
|
149
|
+
swapY = ((p1y == "t" && p2y == "b") || (p1y == "b" && p2y == "t"));
|
|
150
|
+
swapX = ((p1x == "r" && p2x == "l") || (p1x == "l" && p2x == "r"));
|
|
151
|
+
|
|
152
|
+
if (x + myWidth > viewportWidth + scrollX) {
|
|
153
|
+
x = swapX ? alignToElRegion.left - myWidth : viewportWidth + scrollX - myWidth;
|
|
154
|
+
}
|
|
155
|
+
if (x < scrollX) {
|
|
156
|
+
x = swapX ? alignToElRegion.right : scrollX;
|
|
157
|
+
}
|
|
158
|
+
if (y + myHeight > viewportHeight + scrollY) {
|
|
159
|
+
y = swapY ? alignToElRegion.top - myHeight : viewportHeight + scrollY - myHeight;
|
|
160
|
+
}
|
|
161
|
+
if (y < scrollY) {
|
|
162
|
+
y = swapY ? alignToElRegion.bottom : scrollY;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return [x,y];
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Anchors an element to another element and realigns it when the window is resized.
|
|
171
|
+
* @param {String/HTMLElement/Ext.Element} element The element to align to.
|
|
172
|
+
* @param {String} position The position to align to.
|
|
173
|
+
* @param {Number[]} [offsets] Offset the positioning by [x, y]
|
|
174
|
+
* @param {Boolean/Object} [animate] True for the default animation or a standard Element animation config object
|
|
175
|
+
* @param {Boolean/Number} [monitorScroll] True to monitor body scroll and reposition. If this parameter
|
|
176
|
+
* is a number, it is used as the buffer delay (defaults to 50ms).
|
|
177
|
+
* @param {Function} [callback] The function to call after the animation finishes
|
|
178
|
+
* @return {Ext.Element} this
|
|
179
|
+
*/
|
|
180
|
+
anchorTo : function(el, alignment, offsets, animate, monitorScroll, callback) {
|
|
181
|
+
var me = this,
|
|
182
|
+
dom = me.dom,
|
|
183
|
+
scroll = !Ext.isEmpty(monitorScroll),
|
|
184
|
+
action = function() {
|
|
185
|
+
Ext.fly(dom).alignTo(el, alignment, offsets, animate);
|
|
186
|
+
Ext.callback(callback, Ext.fly(dom));
|
|
187
|
+
},
|
|
188
|
+
anchor = this.getAnchor();
|
|
189
|
+
|
|
190
|
+
// previous listener anchor, remove it
|
|
191
|
+
this.removeAnchor();
|
|
192
|
+
Ext.apply(anchor, {
|
|
193
|
+
fn: action,
|
|
194
|
+
scroll: scroll
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
Ext.EventManager.onWindowResize(action, null);
|
|
198
|
+
|
|
199
|
+
if (scroll) {
|
|
200
|
+
Ext.EventManager.on(win, 'scroll', action, null,
|
|
201
|
+
{buffer: !isNaN(monitorScroll) ? monitorScroll : 50});
|
|
202
|
+
}
|
|
203
|
+
action.call(me); // align immediately
|
|
204
|
+
return me;
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Remove any anchor to this element. See {@link #anchorTo}.
|
|
209
|
+
* @return {Ext.dom.Element} this
|
|
210
|
+
*/
|
|
211
|
+
removeAnchor : function() {
|
|
212
|
+
var me = this,
|
|
213
|
+
anchor = this.getAnchor();
|
|
214
|
+
|
|
215
|
+
if (anchor && anchor.fn) {
|
|
216
|
+
Ext.EventManager.removeResizeListener(anchor.fn);
|
|
217
|
+
if (anchor.scroll) {
|
|
218
|
+
Ext.EventManager.un(win, 'scroll', anchor.fn);
|
|
219
|
+
}
|
|
220
|
+
delete anchor.fn;
|
|
221
|
+
}
|
|
222
|
+
return me;
|
|
223
|
+
},
|
|
224
|
+
|
|
225
|
+
getAlignVector: function(el, spec, offset) {
|
|
226
|
+
var me = this,
|
|
227
|
+
myPos = me.getXY(),
|
|
228
|
+
alignedPos = me.getAlignToXY(el, spec, offset);
|
|
229
|
+
|
|
230
|
+
el = Ext.get(el);
|
|
231
|
+
//<debug>
|
|
232
|
+
if (!el || !el.dom) {
|
|
233
|
+
Ext.Error.raise({
|
|
234
|
+
sourceClass: 'Ext.dom.Element',
|
|
235
|
+
sourceMethod: 'getAlignVector',
|
|
236
|
+
msg: 'Attempted to align an element that doesn\'t exist'
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
//</debug>
|
|
240
|
+
|
|
241
|
+
alignedPos[0] -= myPos[0];
|
|
242
|
+
alignedPos[1] -= myPos[1];
|
|
243
|
+
return alignedPos;
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Aligns this element with another element relative to the specified anchor points. If the other element is the
|
|
248
|
+
* document it aligns it to the viewport. The position parameter is optional, and can be specified in any one of
|
|
249
|
+
* the following formats:
|
|
250
|
+
*
|
|
251
|
+
* - **Blank**: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").
|
|
252
|
+
* - **One anchor (deprecated)**: The passed anchor position is used as the target element's anchor point.
|
|
253
|
+
* The element being aligned will position its top-left corner (tl) to that point. *This method has been
|
|
254
|
+
* deprecated in favor of the newer two anchor syntax below*.
|
|
255
|
+
* - **Two anchors**: If two values from the table below are passed separated by a dash, the first value is used as the
|
|
256
|
+
* element's anchor point, and the second value is used as the target's anchor point.
|
|
257
|
+
*
|
|
258
|
+
* In addition to the anchor points, the position parameter also supports the "?" character. If "?" is passed at the end of
|
|
259
|
+
* the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to
|
|
260
|
+
* the viewport if necessary. Note that the element being aligned might be swapped to align to a different position than
|
|
261
|
+
* that specified in order to enforce the viewport constraints.
|
|
262
|
+
* Following are all of the supported anchor positions:
|
|
263
|
+
*
|
|
264
|
+
* <pre>
|
|
265
|
+
* Value Description
|
|
266
|
+
* ----- -----------------------------
|
|
267
|
+
* tl The top left corner (default)
|
|
268
|
+
* t The center of the top edge
|
|
269
|
+
* tr The top right corner
|
|
270
|
+
* l The center of the left edge
|
|
271
|
+
* c In the center of the element
|
|
272
|
+
* r The center of the right edge
|
|
273
|
+
* bl The bottom left corner
|
|
274
|
+
* b The center of the bottom edge
|
|
275
|
+
* br The bottom right corner
|
|
276
|
+
* </pre>
|
|
277
|
+
*
|
|
278
|
+
* Example Usage:
|
|
279
|
+
*
|
|
280
|
+
* // align el to other-el using the default positioning ("tl-bl", non-constrained)
|
|
281
|
+
* el.alignTo("other-el");
|
|
282
|
+
*
|
|
283
|
+
* // align the top left corner of el with the top right corner of other-el (constrained to viewport)
|
|
284
|
+
* el.alignTo("other-el", "tr?");
|
|
285
|
+
*
|
|
286
|
+
* // align the bottom right corner of el with the center left edge of other-el
|
|
287
|
+
* el.alignTo("other-el", "br-l?");
|
|
288
|
+
*
|
|
289
|
+
* // align the center of el with the bottom left corner of other-el and
|
|
290
|
+
* // adjust the x position by -6 pixels (and the y position by 0)
|
|
291
|
+
* el.alignTo("other-el", "c-bl", [-6, 0]);
|
|
292
|
+
*
|
|
293
|
+
* @param {String/HTMLElement/Ext.Element} element The element to align to.
|
|
294
|
+
* @param {String} [position="tl-bl?"] The position to align to
|
|
295
|
+
* @param {Number[]} [offsets] Offset the positioning by [x, y]
|
|
296
|
+
* @param {Boolean/Object} [animate] true for the default animation or a standard Element animation config object
|
|
297
|
+
* @return {Ext.Element} this
|
|
298
|
+
*/
|
|
299
|
+
alignTo: function(element, position, offsets, animate) {
|
|
300
|
+
var me = this;
|
|
301
|
+
return me.setXY(me.getAlignToXY(element, position, offsets),
|
|
302
|
+
me.anim && !!animate ? me.anim(animate) : false);
|
|
303
|
+
},
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Returns the `[X, Y]` vector by which this element must be translated to make a best attempt
|
|
307
|
+
* to constrain within the passed constraint. Returns `false` is this element does not need to be moved.
|
|
308
|
+
*
|
|
309
|
+
* Priority is given to constraining the top and left within the constraint.
|
|
310
|
+
*
|
|
311
|
+
* The constraint may either be an existing element into which this element is to be constrained, or
|
|
312
|
+
* an {@link Ext.util.Region Region} into which this element is to be constrained.
|
|
313
|
+
*
|
|
314
|
+
* @param {Ext.Element/Ext.util.Region} constrainTo The Element or Region into which this element is to be constrained.
|
|
315
|
+
* @param {Number[]} proposedPosition A proposed `[X, Y]` position to test for validity and to produce a vector for instead
|
|
316
|
+
* of using this Element's current position;
|
|
317
|
+
* @returns {Number[]/Boolean} **If** this element *needs* to be translated, an `[X, Y]`
|
|
318
|
+
* vector by which this element must be translated. Otherwise, `false`.
|
|
319
|
+
*/
|
|
320
|
+
getConstrainVector: function(constrainTo, proposedPosition) {
|
|
321
|
+
if (!(constrainTo instanceof Ext.util.Region)) {
|
|
322
|
+
constrainTo = Ext.get(constrainTo).getViewRegion();
|
|
323
|
+
}
|
|
324
|
+
var thisRegion = this.getRegion(),
|
|
325
|
+
vector = [0, 0],
|
|
326
|
+
shadowSize = this.shadow && this.shadow.offset,
|
|
327
|
+
overflowed = false;
|
|
328
|
+
|
|
329
|
+
// Shift this region to occupy the proposed position
|
|
330
|
+
if (proposedPosition) {
|
|
331
|
+
thisRegion.translateBy(proposedPosition[0] - thisRegion.x, proposedPosition[1] - thisRegion.y);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// Reduce the constrain region to allow for shadow
|
|
335
|
+
// TODO: Rewrite the Shadow class. When that's done, get the extra for each side from the Shadow.
|
|
336
|
+
if (shadowSize) {
|
|
337
|
+
constrainTo.adjust(0, -shadowSize, -shadowSize, shadowSize);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Constrain the X coordinate by however much this Element overflows
|
|
341
|
+
if (thisRegion.right > constrainTo.right) {
|
|
342
|
+
overflowed = true;
|
|
343
|
+
vector[0] = (constrainTo.right - thisRegion.right); // overflowed the right
|
|
344
|
+
}
|
|
345
|
+
if (thisRegion.left + vector[0] < constrainTo.left) {
|
|
346
|
+
overflowed = true;
|
|
347
|
+
vector[0] = (constrainTo.left - thisRegion.left); // overflowed the left
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// Constrain the Y coordinate by however much this Element overflows
|
|
351
|
+
if (thisRegion.bottom > constrainTo.bottom) {
|
|
352
|
+
overflowed = true;
|
|
353
|
+
vector[1] = (constrainTo.bottom - thisRegion.bottom); // overflowed the bottom
|
|
354
|
+
}
|
|
355
|
+
if (thisRegion.top + vector[1] < constrainTo.top) {
|
|
356
|
+
overflowed = true;
|
|
357
|
+
vector[1] = (constrainTo.top - thisRegion.top); // overflowed the top
|
|
358
|
+
}
|
|
359
|
+
return overflowed ? vector : false;
|
|
360
|
+
},
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Calculates the x, y to center this element on the screen
|
|
364
|
+
* @return {Number[]} The x, y values [x, y]
|
|
365
|
+
*/
|
|
366
|
+
getCenterXY : function(){
|
|
367
|
+
return this.getAlignToXY(doc, 'c-c');
|
|
368
|
+
},
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Centers the Element in either the viewport, or another Element.
|
|
372
|
+
* @param {String/HTMLElement/Ext.Element} [centerIn] The element in which to center the element.
|
|
373
|
+
*/
|
|
374
|
+
center : function(centerIn){
|
|
375
|
+
return this.alignTo(centerIn || doc, 'c-c');
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
}()));
|
|
@@ -0,0 +1,962 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @class Ext.dom.Element
|
|
3
|
+
*/
|
|
4
|
+
/* ================================
|
|
5
|
+
* A Note About Wrapped Animations
|
|
6
|
+
* ================================
|
|
7
|
+
* A few of the effects below implement two different animations per effect, one wrapping
|
|
8
|
+
* animation that performs the visual effect and a "no-op" animation on this Element where
|
|
9
|
+
* no attributes of the element itself actually change. The purpose for this is that the
|
|
10
|
+
* wrapper is required for the effect to work and so it does the actual animation work, but
|
|
11
|
+
* we always animate `this` so that the element's events and callbacks work as expected to
|
|
12
|
+
* the callers of this API.
|
|
13
|
+
*
|
|
14
|
+
* Because of this, we always want each wrap animation to complete first (we don't want to
|
|
15
|
+
* cut off the visual effect early). To ensure that, we arbitrarily increase the duration of
|
|
16
|
+
* the element's no-op animation, also ensuring that it has a decent minimum value -- on slow
|
|
17
|
+
* systems, too-low durations can cause race conditions between the wrap animation and the
|
|
18
|
+
* element animation being removed out of order. Note that in each wrap's `afteranimate`
|
|
19
|
+
* callback it will explicitly terminate the element animation as soon as the wrap is complete,
|
|
20
|
+
* so there's no real danger in making the duration too long.
|
|
21
|
+
*
|
|
22
|
+
* This applies to all effects that get wrapped, including slideIn, slideOut, switchOff and frame.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
Ext.dom.Element.override({
|
|
26
|
+
// @private override base Ext.util.Animate mixin for animate for backwards compatibility
|
|
27
|
+
animate: function(config) {
|
|
28
|
+
var me = this,
|
|
29
|
+
listeners,
|
|
30
|
+
anim,
|
|
31
|
+
animId = me.dom.id || Ext.id(me.dom);
|
|
32
|
+
|
|
33
|
+
if (!Ext.fx.Manager.hasFxBlock(animId)) {
|
|
34
|
+
// Bit of gymnastics here to ensure our internal listeners get bound first
|
|
35
|
+
if (config.listeners) {
|
|
36
|
+
listeners = config.listeners;
|
|
37
|
+
delete config.listeners;
|
|
38
|
+
}
|
|
39
|
+
if (config.internalListeners) {
|
|
40
|
+
config.listeners = config.internalListeners;
|
|
41
|
+
delete config.internalListeners;
|
|
42
|
+
}
|
|
43
|
+
anim = new Ext.fx.Anim(me.anim(config));
|
|
44
|
+
if (listeners) {
|
|
45
|
+
anim.on(listeners);
|
|
46
|
+
}
|
|
47
|
+
Ext.fx.Manager.queueFx(anim);
|
|
48
|
+
}
|
|
49
|
+
return me;
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
// @private override base Ext.util.Animate mixin for animate for backwards compatibility
|
|
53
|
+
anim: function(config) {
|
|
54
|
+
if (!Ext.isObject(config)) {
|
|
55
|
+
return (config) ? {} : false;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var me = this,
|
|
59
|
+
duration = config.duration || Ext.fx.Anim.prototype.duration,
|
|
60
|
+
easing = config.easing || 'ease',
|
|
61
|
+
animConfig;
|
|
62
|
+
|
|
63
|
+
if (config.stopAnimation) {
|
|
64
|
+
me.stopAnimation();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
Ext.applyIf(config, Ext.fx.Manager.getFxDefaults(me.id));
|
|
68
|
+
|
|
69
|
+
// Clear any 'paused' defaults.
|
|
70
|
+
Ext.fx.Manager.setFxDefaults(me.id, {
|
|
71
|
+
delay: 0
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
animConfig = {
|
|
75
|
+
// Pass the DOM reference. That's tested first so will be converted to an Ext.fx.Target fastest.
|
|
76
|
+
target: me.dom,
|
|
77
|
+
remove: config.remove,
|
|
78
|
+
alternate: config.alternate || false,
|
|
79
|
+
duration: duration,
|
|
80
|
+
easing: easing,
|
|
81
|
+
callback: config.callback,
|
|
82
|
+
listeners: config.listeners,
|
|
83
|
+
iterations: config.iterations || 1,
|
|
84
|
+
scope: config.scope,
|
|
85
|
+
block: config.block,
|
|
86
|
+
concurrent: config.concurrent,
|
|
87
|
+
delay: config.delay || 0,
|
|
88
|
+
paused: true,
|
|
89
|
+
keyframes: config.keyframes,
|
|
90
|
+
from: config.from || {},
|
|
91
|
+
to: Ext.apply({}, config)
|
|
92
|
+
};
|
|
93
|
+
Ext.apply(animConfig.to, config.to);
|
|
94
|
+
|
|
95
|
+
// Anim API properties - backward compat
|
|
96
|
+
delete animConfig.to.to;
|
|
97
|
+
delete animConfig.to.from;
|
|
98
|
+
delete animConfig.to.remove;
|
|
99
|
+
delete animConfig.to.alternate;
|
|
100
|
+
delete animConfig.to.keyframes;
|
|
101
|
+
delete animConfig.to.iterations;
|
|
102
|
+
delete animConfig.to.listeners;
|
|
103
|
+
delete animConfig.to.target;
|
|
104
|
+
delete animConfig.to.paused;
|
|
105
|
+
delete animConfig.to.callback;
|
|
106
|
+
delete animConfig.to.scope;
|
|
107
|
+
delete animConfig.to.duration;
|
|
108
|
+
delete animConfig.to.easing;
|
|
109
|
+
delete animConfig.to.concurrent;
|
|
110
|
+
delete animConfig.to.block;
|
|
111
|
+
delete animConfig.to.stopAnimation;
|
|
112
|
+
delete animConfig.to.delay;
|
|
113
|
+
return animConfig;
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Slides the element into view. An anchor point can be optionally passed to set the point of origin for the slide
|
|
118
|
+
* effect. This function automatically handles wrapping the element with a fixed-size container if needed. See the
|
|
119
|
+
* Fx class overview for valid anchor point options. Usage:
|
|
120
|
+
*
|
|
121
|
+
* // default: slide the element in from the top
|
|
122
|
+
* el.slideIn();
|
|
123
|
+
*
|
|
124
|
+
* // custom: slide the element in from the right with a 2-second duration
|
|
125
|
+
* el.slideIn('r', { duration: 2000 });
|
|
126
|
+
*
|
|
127
|
+
* // common config options shown with default values
|
|
128
|
+
* el.slideIn('t', {
|
|
129
|
+
* easing: 'easeOut',
|
|
130
|
+
* duration: 500
|
|
131
|
+
* });
|
|
132
|
+
*
|
|
133
|
+
* @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
|
|
134
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
135
|
+
* @param {Boolean} options.preserveScroll Set to true if preservation of any descendant elements'
|
|
136
|
+
* `scrollTop` values is required. By default the DOM wrapping operation performed by `slideIn` and
|
|
137
|
+
* `slideOut` causes the browser to lose all scroll positions.
|
|
138
|
+
* @return {Ext.dom.Element} The Element
|
|
139
|
+
*/
|
|
140
|
+
slideIn: function(anchor, obj, slideOut) {
|
|
141
|
+
var me = this,
|
|
142
|
+
elStyle = me.dom.style,
|
|
143
|
+
beforeAnim,
|
|
144
|
+
wrapAnim,
|
|
145
|
+
restoreScroll,
|
|
146
|
+
wrapDomParentNode;
|
|
147
|
+
|
|
148
|
+
anchor = anchor || "t";
|
|
149
|
+
obj = obj || {};
|
|
150
|
+
|
|
151
|
+
beforeAnim = function() {
|
|
152
|
+
var animScope = this,
|
|
153
|
+
listeners = obj.listeners,
|
|
154
|
+
box, originalStyles, anim, wrap;
|
|
155
|
+
|
|
156
|
+
if (!slideOut) {
|
|
157
|
+
me.fixDisplay();
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
box = me.getBox();
|
|
161
|
+
if ((anchor == 't' || anchor == 'b') && box.height === 0) {
|
|
162
|
+
box.height = me.dom.scrollHeight;
|
|
163
|
+
}
|
|
164
|
+
else if ((anchor == 'l' || anchor == 'r') && box.width === 0) {
|
|
165
|
+
box.width = me.dom.scrollWidth;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
originalStyles = me.getStyles('width', 'height', 'left', 'right', 'top', 'bottom', 'position', 'z-index', true);
|
|
169
|
+
me.setSize(box.width, box.height);
|
|
170
|
+
|
|
171
|
+
// Cache all descendants' scrollTop & scrollLeft values if configured to preserve scroll.
|
|
172
|
+
if (obj.preserveScroll) {
|
|
173
|
+
restoreScroll = me.cacheScrollValues();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
wrap = me.wrap({
|
|
177
|
+
id: Ext.id() + '-anim-wrap-for-' + me.id,
|
|
178
|
+
style: {
|
|
179
|
+
visibility: slideOut ? 'visible' : 'hidden'
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
wrapDomParentNode = wrap.dom.parentNode;
|
|
183
|
+
wrap.setPositioning(me.getPositioning());
|
|
184
|
+
if (wrap.isStyle('position', 'static')) {
|
|
185
|
+
wrap.position('relative');
|
|
186
|
+
}
|
|
187
|
+
me.clearPositioning('auto');
|
|
188
|
+
wrap.clip();
|
|
189
|
+
|
|
190
|
+
// The wrap will have reset all descendant scrollTops. Restore them if we cached them.
|
|
191
|
+
if (restoreScroll) {
|
|
192
|
+
restoreScroll();
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// This element is temporarily positioned absolute within its wrapper.
|
|
196
|
+
// Restore to its default, CSS-inherited visibility setting.
|
|
197
|
+
// We cannot explicitly poke visibility:visible into its style because that overrides the visibility of the wrap.
|
|
198
|
+
me.setStyle({
|
|
199
|
+
visibility: '',
|
|
200
|
+
position: 'absolute'
|
|
201
|
+
});
|
|
202
|
+
if (slideOut) {
|
|
203
|
+
wrap.setSize(box.width, box.height);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
switch (anchor) {
|
|
207
|
+
case 't':
|
|
208
|
+
anim = {
|
|
209
|
+
from: {
|
|
210
|
+
width: box.width + 'px',
|
|
211
|
+
height: '0px'
|
|
212
|
+
},
|
|
213
|
+
to: {
|
|
214
|
+
width: box.width + 'px',
|
|
215
|
+
height: box.height + 'px'
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
elStyle.bottom = '0px';
|
|
219
|
+
break;
|
|
220
|
+
case 'l':
|
|
221
|
+
anim = {
|
|
222
|
+
from: {
|
|
223
|
+
width: '0px',
|
|
224
|
+
height: box.height + 'px'
|
|
225
|
+
},
|
|
226
|
+
to: {
|
|
227
|
+
width: box.width + 'px',
|
|
228
|
+
height: box.height + 'px'
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
elStyle.right = '0px';
|
|
232
|
+
break;
|
|
233
|
+
case 'r':
|
|
234
|
+
anim = {
|
|
235
|
+
from: {
|
|
236
|
+
x: box.x + box.width,
|
|
237
|
+
width: '0px',
|
|
238
|
+
height: box.height + 'px'
|
|
239
|
+
},
|
|
240
|
+
to: {
|
|
241
|
+
x: box.x,
|
|
242
|
+
width: box.width + 'px',
|
|
243
|
+
height: box.height + 'px'
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
break;
|
|
247
|
+
case 'b':
|
|
248
|
+
anim = {
|
|
249
|
+
from: {
|
|
250
|
+
y: box.y + box.height,
|
|
251
|
+
width: box.width + 'px',
|
|
252
|
+
height: '0px'
|
|
253
|
+
},
|
|
254
|
+
to: {
|
|
255
|
+
y: box.y,
|
|
256
|
+
width: box.width + 'px',
|
|
257
|
+
height: box.height + 'px'
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
break;
|
|
261
|
+
case 'tl':
|
|
262
|
+
anim = {
|
|
263
|
+
from: {
|
|
264
|
+
x: box.x,
|
|
265
|
+
y: box.y,
|
|
266
|
+
width: '0px',
|
|
267
|
+
height: '0px'
|
|
268
|
+
},
|
|
269
|
+
to: {
|
|
270
|
+
width: box.width + 'px',
|
|
271
|
+
height: box.height + 'px'
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
elStyle.bottom = '0px';
|
|
275
|
+
elStyle.right = '0px';
|
|
276
|
+
break;
|
|
277
|
+
case 'bl':
|
|
278
|
+
anim = {
|
|
279
|
+
from: {
|
|
280
|
+
x: box.x + box.width,
|
|
281
|
+
width: '0px',
|
|
282
|
+
height: '0px'
|
|
283
|
+
},
|
|
284
|
+
to: {
|
|
285
|
+
x: box.x,
|
|
286
|
+
width: box.width + 'px',
|
|
287
|
+
height: box.height + 'px'
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
elStyle.right = '0px';
|
|
291
|
+
break;
|
|
292
|
+
case 'br':
|
|
293
|
+
anim = {
|
|
294
|
+
from: {
|
|
295
|
+
x: box.x + box.width,
|
|
296
|
+
y: box.y + box.height,
|
|
297
|
+
width: '0px',
|
|
298
|
+
height: '0px'
|
|
299
|
+
},
|
|
300
|
+
to: {
|
|
301
|
+
x: box.x,
|
|
302
|
+
y: box.y,
|
|
303
|
+
width: box.width + 'px',
|
|
304
|
+
height: box.height + 'px'
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
break;
|
|
308
|
+
case 'tr':
|
|
309
|
+
anim = {
|
|
310
|
+
from: {
|
|
311
|
+
y: box.y + box.height,
|
|
312
|
+
width: '0px',
|
|
313
|
+
height: '0px'
|
|
314
|
+
},
|
|
315
|
+
to: {
|
|
316
|
+
y: box.y,
|
|
317
|
+
width: box.width + 'px',
|
|
318
|
+
height: box.height + 'px'
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
elStyle.bottom = '0px';
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
wrap.show();
|
|
326
|
+
wrapAnim = Ext.apply({}, obj);
|
|
327
|
+
delete wrapAnim.listeners;
|
|
328
|
+
wrapAnim = new Ext.fx.Anim(Ext.applyIf(wrapAnim, {
|
|
329
|
+
target: wrap,
|
|
330
|
+
duration: 500,
|
|
331
|
+
easing: 'ease-out',
|
|
332
|
+
from: slideOut ? anim.to : anim.from,
|
|
333
|
+
to: slideOut ? anim.from : anim.to
|
|
334
|
+
}));
|
|
335
|
+
|
|
336
|
+
// In the absence of a callback, this listener MUST be added first
|
|
337
|
+
wrapAnim.on('afteranimate', function() {
|
|
338
|
+
me.setStyle(originalStyles);
|
|
339
|
+
if (slideOut) {
|
|
340
|
+
if (obj.useDisplay) {
|
|
341
|
+
me.setDisplayed(false);
|
|
342
|
+
} else {
|
|
343
|
+
me.hide();
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
if (wrap.dom) {
|
|
347
|
+
if (wrap.dom.parentNode) {
|
|
348
|
+
wrap.dom.parentNode.insertBefore(me.dom, wrap.dom);
|
|
349
|
+
} else {
|
|
350
|
+
wrapDomParentNode.appendChild(me.dom);
|
|
351
|
+
}
|
|
352
|
+
wrap.remove();
|
|
353
|
+
}
|
|
354
|
+
// The unwrap will have reset all descendant scrollTops. Restore them if we cached them.
|
|
355
|
+
if (restoreScroll) {
|
|
356
|
+
restoreScroll();
|
|
357
|
+
}
|
|
358
|
+
// kill the no-op element animation created below
|
|
359
|
+
animScope.end();
|
|
360
|
+
});
|
|
361
|
+
// Add configured listeners after
|
|
362
|
+
if (listeners) {
|
|
363
|
+
wrapAnim.on(listeners);
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
me.animate({
|
|
368
|
+
// See "A Note About Wrapped Animations" at the top of this class:
|
|
369
|
+
duration: obj.duration ? Math.max(obj.duration, 500) * 2 : 1000,
|
|
370
|
+
listeners: {
|
|
371
|
+
beforeanimate: beforeAnim // kick off the wrap animation
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
return me;
|
|
375
|
+
},
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Slides the element out of view. An anchor point can be optionally passed to set the end point for the slide
|
|
380
|
+
* effect. When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will
|
|
381
|
+
* still take up space in the document. The element must be removed from the DOM using the 'remove' config option if
|
|
382
|
+
* desired. This function automatically handles wrapping the element with a fixed-size container if needed. See the
|
|
383
|
+
* Fx class overview for valid anchor point options. Usage:
|
|
384
|
+
*
|
|
385
|
+
* // default: slide the element out to the top
|
|
386
|
+
* el.slideOut();
|
|
387
|
+
*
|
|
388
|
+
* // custom: slide the element out to the right with a 2-second duration
|
|
389
|
+
* el.slideOut('r', { duration: 2000 });
|
|
390
|
+
*
|
|
391
|
+
* // common config options shown with default values
|
|
392
|
+
* el.slideOut('t', {
|
|
393
|
+
* easing: 'easeOut',
|
|
394
|
+
* duration: 500,
|
|
395
|
+
* remove: false,
|
|
396
|
+
* useDisplay: false
|
|
397
|
+
* });
|
|
398
|
+
*
|
|
399
|
+
* @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to top: 't')
|
|
400
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
401
|
+
* @return {Ext.dom.Element} The Element
|
|
402
|
+
*/
|
|
403
|
+
slideOut: function(anchor, o) {
|
|
404
|
+
return this.slideIn(anchor, o, true);
|
|
405
|
+
},
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Fades the element out while slowly expanding it in all directions. When the effect is completed, the element will
|
|
409
|
+
* be hidden (visibility = 'hidden') but block elements will still take up space in the document. Usage:
|
|
410
|
+
*
|
|
411
|
+
* // default
|
|
412
|
+
* el.puff();
|
|
413
|
+
*
|
|
414
|
+
* // common config options shown with default values
|
|
415
|
+
* el.puff({
|
|
416
|
+
* easing: 'easeOut',
|
|
417
|
+
* duration: 500,
|
|
418
|
+
* useDisplay: false
|
|
419
|
+
* });
|
|
420
|
+
*
|
|
421
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
422
|
+
* @return {Ext.dom.Element} The Element
|
|
423
|
+
*/
|
|
424
|
+
puff: function(obj) {
|
|
425
|
+
var me = this,
|
|
426
|
+
beforeAnim,
|
|
427
|
+
box = me.getBox(),
|
|
428
|
+
originalStyles = me.getStyles('width', 'height', 'left', 'right', 'top', 'bottom', 'position', 'z-index', 'font-size', 'opacity', true);
|
|
429
|
+
|
|
430
|
+
obj = Ext.applyIf(obj || {}, {
|
|
431
|
+
easing: 'ease-out',
|
|
432
|
+
duration: 500,
|
|
433
|
+
useDisplay: false
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
beforeAnim = function() {
|
|
437
|
+
me.clearOpacity();
|
|
438
|
+
me.show();
|
|
439
|
+
this.to = {
|
|
440
|
+
width: box.width * 2,
|
|
441
|
+
height: box.height * 2,
|
|
442
|
+
x: box.x - (box.width / 2),
|
|
443
|
+
y: box.y - (box.height /2),
|
|
444
|
+
opacity: 0,
|
|
445
|
+
fontSize: '200%'
|
|
446
|
+
};
|
|
447
|
+
this.on('afteranimate',function() {
|
|
448
|
+
if (me.dom) {
|
|
449
|
+
if (obj.useDisplay) {
|
|
450
|
+
me.setDisplayed(false);
|
|
451
|
+
} else {
|
|
452
|
+
me.hide();
|
|
453
|
+
}
|
|
454
|
+
me.setStyle(originalStyles);
|
|
455
|
+
obj.callback.call(obj.scope);
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
me.animate({
|
|
461
|
+
duration: obj.duration,
|
|
462
|
+
easing: obj.easing,
|
|
463
|
+
listeners: {
|
|
464
|
+
beforeanimate: {
|
|
465
|
+
fn: beforeAnim
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
return me;
|
|
470
|
+
},
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Blinks the element as if it was clicked and then collapses on its center (similar to switching off a television).
|
|
474
|
+
* When the effect is completed, the element will be hidden (visibility = 'hidden') but block elements will still
|
|
475
|
+
* take up space in the document. The element must be removed from the DOM using the 'remove' config option if
|
|
476
|
+
* desired. Usage:
|
|
477
|
+
*
|
|
478
|
+
* // default
|
|
479
|
+
* el.switchOff();
|
|
480
|
+
*
|
|
481
|
+
* // all config options shown with default values
|
|
482
|
+
* el.switchOff({
|
|
483
|
+
* easing: 'easeIn',
|
|
484
|
+
* duration: .3,
|
|
485
|
+
* remove: false,
|
|
486
|
+
* useDisplay: false
|
|
487
|
+
* });
|
|
488
|
+
*
|
|
489
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
490
|
+
* @return {Ext.dom.Element} The Element
|
|
491
|
+
*/
|
|
492
|
+
switchOff: function(obj) {
|
|
493
|
+
var me = this,
|
|
494
|
+
beforeAnim;
|
|
495
|
+
|
|
496
|
+
obj = Ext.applyIf(obj || {}, {
|
|
497
|
+
easing: 'ease-in',
|
|
498
|
+
duration: 500,
|
|
499
|
+
remove: false,
|
|
500
|
+
useDisplay: false
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
beforeAnim = function() {
|
|
504
|
+
var animScope = this,
|
|
505
|
+
size = me.getSize(),
|
|
506
|
+
xy = me.getXY(),
|
|
507
|
+
keyframe, position;
|
|
508
|
+
me.clearOpacity();
|
|
509
|
+
me.clip();
|
|
510
|
+
position = me.getPositioning();
|
|
511
|
+
|
|
512
|
+
keyframe = new Ext.fx.Animator({
|
|
513
|
+
target: me,
|
|
514
|
+
duration: obj.duration,
|
|
515
|
+
easing: obj.easing,
|
|
516
|
+
keyframes: {
|
|
517
|
+
33: {
|
|
518
|
+
opacity: 0.3
|
|
519
|
+
},
|
|
520
|
+
66: {
|
|
521
|
+
height: 1,
|
|
522
|
+
y: xy[1] + size.height / 2
|
|
523
|
+
},
|
|
524
|
+
100: {
|
|
525
|
+
width: 1,
|
|
526
|
+
x: xy[0] + size.width / 2
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
keyframe.on('afteranimate', function() {
|
|
531
|
+
if (obj.useDisplay) {
|
|
532
|
+
me.setDisplayed(false);
|
|
533
|
+
} else {
|
|
534
|
+
me.hide();
|
|
535
|
+
}
|
|
536
|
+
me.clearOpacity();
|
|
537
|
+
me.setPositioning(position);
|
|
538
|
+
me.setSize(size);
|
|
539
|
+
// kill the no-op element animation created below
|
|
540
|
+
animScope.end();
|
|
541
|
+
});
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
me.animate({
|
|
545
|
+
// See "A Note About Wrapped Animations" at the top of this class:
|
|
546
|
+
duration: (Math.max(obj.duration, 500) * 2),
|
|
547
|
+
listeners: {
|
|
548
|
+
beforeanimate: {
|
|
549
|
+
fn: beforeAnim
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
return me;
|
|
554
|
+
},
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Shows a ripple of exploding, attenuating borders to draw attention to an Element. Usage:
|
|
558
|
+
*
|
|
559
|
+
* // default: a single light blue ripple
|
|
560
|
+
* el.frame();
|
|
561
|
+
*
|
|
562
|
+
* // custom: 3 red ripples lasting 3 seconds total
|
|
563
|
+
* el.frame("#ff0000", 3, { duration: 3 });
|
|
564
|
+
*
|
|
565
|
+
* // common config options shown with default values
|
|
566
|
+
* el.frame("#C3DAF9", 1, {
|
|
567
|
+
* duration: 1 //duration of each individual ripple.
|
|
568
|
+
* // Note: Easing is not configurable and will be ignored if included
|
|
569
|
+
* });
|
|
570
|
+
*
|
|
571
|
+
* @param {String} color (optional) The color of the border. Should be a 6 char hex color without the leading #
|
|
572
|
+
* (defaults to light blue: 'C3DAF9').
|
|
573
|
+
* @param {Number} count (optional) The number of ripples to display (defaults to 1)
|
|
574
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
575
|
+
* @return {Ext.dom.Element} The Element
|
|
576
|
+
*/
|
|
577
|
+
frame : function(color, count, obj){
|
|
578
|
+
var me = this,
|
|
579
|
+
beforeAnim;
|
|
580
|
+
|
|
581
|
+
color = color || '#C3DAF9';
|
|
582
|
+
count = count || 1;
|
|
583
|
+
obj = obj || {};
|
|
584
|
+
|
|
585
|
+
beforeAnim = function() {
|
|
586
|
+
me.show();
|
|
587
|
+
var animScope = this,
|
|
588
|
+
box = me.getBox(),
|
|
589
|
+
proxy = Ext.getBody().createChild({
|
|
590
|
+
id: me.id + '-anim-proxy',
|
|
591
|
+
style: {
|
|
592
|
+
position : 'absolute',
|
|
593
|
+
'pointer-events': 'none',
|
|
594
|
+
'z-index': 35000,
|
|
595
|
+
border : '0px solid ' + color
|
|
596
|
+
}
|
|
597
|
+
}),
|
|
598
|
+
proxyAnim;
|
|
599
|
+
proxyAnim = new Ext.fx.Anim({
|
|
600
|
+
target: proxy,
|
|
601
|
+
duration: obj.duration || 1000,
|
|
602
|
+
iterations: count,
|
|
603
|
+
from: {
|
|
604
|
+
top: box.y,
|
|
605
|
+
left: box.x,
|
|
606
|
+
borderWidth: 0,
|
|
607
|
+
opacity: 1,
|
|
608
|
+
height: box.height,
|
|
609
|
+
width: box.width
|
|
610
|
+
},
|
|
611
|
+
to: {
|
|
612
|
+
top: box.y - 20,
|
|
613
|
+
left: box.x - 20,
|
|
614
|
+
borderWidth: 10,
|
|
615
|
+
opacity: 0,
|
|
616
|
+
height: box.height + 40,
|
|
617
|
+
width: box.width + 40
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
proxyAnim.on('afteranimate', function() {
|
|
621
|
+
proxy.remove();
|
|
622
|
+
// kill the no-op element animation created below
|
|
623
|
+
animScope.end();
|
|
624
|
+
});
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
me.animate({
|
|
628
|
+
// See "A Note About Wrapped Animations" at the top of this class:
|
|
629
|
+
duration: (Math.max(obj.duration, 500) * 2) || 2000,
|
|
630
|
+
listeners: {
|
|
631
|
+
beforeanimate: {
|
|
632
|
+
fn: beforeAnim
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
return me;
|
|
637
|
+
},
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Slides the element while fading it out of view. An anchor point can be optionally passed to set the ending point
|
|
641
|
+
* of the effect. Usage:
|
|
642
|
+
*
|
|
643
|
+
* // default: slide the element downward while fading out
|
|
644
|
+
* el.ghost();
|
|
645
|
+
*
|
|
646
|
+
* // custom: slide the element out to the right with a 2-second duration
|
|
647
|
+
* el.ghost('r', { duration: 2000 });
|
|
648
|
+
*
|
|
649
|
+
* // common config options shown with default values
|
|
650
|
+
* el.ghost('b', {
|
|
651
|
+
* easing: 'easeOut',
|
|
652
|
+
* duration: 500
|
|
653
|
+
* });
|
|
654
|
+
*
|
|
655
|
+
* @param {String} anchor (optional) One of the valid Fx anchor positions (defaults to bottom: 'b')
|
|
656
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
657
|
+
* @return {Ext.dom.Element} The Element
|
|
658
|
+
*/
|
|
659
|
+
ghost: function(anchor, obj) {
|
|
660
|
+
var me = this,
|
|
661
|
+
beforeAnim;
|
|
662
|
+
|
|
663
|
+
anchor = anchor || "b";
|
|
664
|
+
beforeAnim = function() {
|
|
665
|
+
var width = me.getWidth(),
|
|
666
|
+
height = me.getHeight(),
|
|
667
|
+
xy = me.getXY(),
|
|
668
|
+
position = me.getPositioning(),
|
|
669
|
+
to = {
|
|
670
|
+
opacity: 0
|
|
671
|
+
};
|
|
672
|
+
switch (anchor) {
|
|
673
|
+
case 't':
|
|
674
|
+
to.y = xy[1] - height;
|
|
675
|
+
break;
|
|
676
|
+
case 'l':
|
|
677
|
+
to.x = xy[0] - width;
|
|
678
|
+
break;
|
|
679
|
+
case 'r':
|
|
680
|
+
to.x = xy[0] + width;
|
|
681
|
+
break;
|
|
682
|
+
case 'b':
|
|
683
|
+
to.y = xy[1] + height;
|
|
684
|
+
break;
|
|
685
|
+
case 'tl':
|
|
686
|
+
to.x = xy[0] - width;
|
|
687
|
+
to.y = xy[1] - height;
|
|
688
|
+
break;
|
|
689
|
+
case 'bl':
|
|
690
|
+
to.x = xy[0] - width;
|
|
691
|
+
to.y = xy[1] + height;
|
|
692
|
+
break;
|
|
693
|
+
case 'br':
|
|
694
|
+
to.x = xy[0] + width;
|
|
695
|
+
to.y = xy[1] + height;
|
|
696
|
+
break;
|
|
697
|
+
case 'tr':
|
|
698
|
+
to.x = xy[0] + width;
|
|
699
|
+
to.y = xy[1] - height;
|
|
700
|
+
break;
|
|
701
|
+
}
|
|
702
|
+
this.to = to;
|
|
703
|
+
this.on('afteranimate', function () {
|
|
704
|
+
if (me.dom) {
|
|
705
|
+
me.hide();
|
|
706
|
+
me.clearOpacity();
|
|
707
|
+
me.setPositioning(position);
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
me.animate(Ext.applyIf(obj || {}, {
|
|
713
|
+
duration: 500,
|
|
714
|
+
easing: 'ease-out',
|
|
715
|
+
listeners: {
|
|
716
|
+
beforeanimate: {
|
|
717
|
+
fn: beforeAnim
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
}));
|
|
721
|
+
return me;
|
|
722
|
+
},
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Highlights the Element by setting a color (applies to the background-color by default, but can be changed using
|
|
726
|
+
* the "attr" config option) and then fading back to the original color. If no original color is available, you
|
|
727
|
+
* should provide the "endColor" config option which will be cleared after the animation. Usage:
|
|
728
|
+
*
|
|
729
|
+
* // default: highlight background to yellow
|
|
730
|
+
* el.highlight();
|
|
731
|
+
*
|
|
732
|
+
* // custom: highlight foreground text to blue for 2 seconds
|
|
733
|
+
* el.highlight("0000ff", { attr: 'color', duration: 2000 });
|
|
734
|
+
*
|
|
735
|
+
* // common config options shown with default values
|
|
736
|
+
* el.highlight("ffff9c", {
|
|
737
|
+
* attr: "backgroundColor", //can be any valid CSS property (attribute) that supports a color value
|
|
738
|
+
* endColor: (current color) or "ffffff",
|
|
739
|
+
* easing: 'easeIn',
|
|
740
|
+
* duration: 1000
|
|
741
|
+
* });
|
|
742
|
+
*
|
|
743
|
+
* @param {String} color (optional) The highlight color. Should be a 6 char hex color without the leading #
|
|
744
|
+
* (defaults to yellow: 'ffff9c')
|
|
745
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
746
|
+
* @return {Ext.dom.Element} The Element
|
|
747
|
+
*/
|
|
748
|
+
highlight: function(color, o) {
|
|
749
|
+
var me = this,
|
|
750
|
+
dom = me.dom,
|
|
751
|
+
from = {},
|
|
752
|
+
restore, to, attr, lns, event, fn;
|
|
753
|
+
|
|
754
|
+
o = o || {};
|
|
755
|
+
lns = o.listeners || {};
|
|
756
|
+
attr = o.attr || 'backgroundColor';
|
|
757
|
+
from[attr] = color || 'ffff9c';
|
|
758
|
+
|
|
759
|
+
if (!o.to) {
|
|
760
|
+
to = {};
|
|
761
|
+
to[attr] = o.endColor || me.getColor(attr, 'ffffff', '');
|
|
762
|
+
}
|
|
763
|
+
else {
|
|
764
|
+
to = o.to;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
// Don't apply directly on lns, since we reference it in our own callbacks below
|
|
768
|
+
o.listeners = Ext.apply(Ext.apply({}, lns), {
|
|
769
|
+
beforeanimate: function() {
|
|
770
|
+
restore = dom.style[attr];
|
|
771
|
+
me.clearOpacity();
|
|
772
|
+
me.show();
|
|
773
|
+
|
|
774
|
+
event = lns.beforeanimate;
|
|
775
|
+
if (event) {
|
|
776
|
+
fn = event.fn || event;
|
|
777
|
+
return fn.apply(event.scope || lns.scope || window, arguments);
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
afteranimate: function() {
|
|
781
|
+
if (dom) {
|
|
782
|
+
dom.style[attr] = restore;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
event = lns.afteranimate;
|
|
786
|
+
if (event) {
|
|
787
|
+
fn = event.fn || event;
|
|
788
|
+
fn.apply(event.scope || lns.scope || window, arguments);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
me.animate(Ext.apply({}, o, {
|
|
794
|
+
duration: 1000,
|
|
795
|
+
easing: 'ease-in',
|
|
796
|
+
from: from,
|
|
797
|
+
to: to
|
|
798
|
+
}));
|
|
799
|
+
return me;
|
|
800
|
+
},
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* @deprecated 4.0
|
|
804
|
+
* Creates a pause before any subsequent queued effects begin. If there are no effects queued after the pause it will
|
|
805
|
+
* have no effect. Usage:
|
|
806
|
+
*
|
|
807
|
+
* el.pause(1);
|
|
808
|
+
*
|
|
809
|
+
* @param {Number} seconds The length of time to pause (in seconds)
|
|
810
|
+
* @return {Ext.Element} The Element
|
|
811
|
+
*/
|
|
812
|
+
pause: function(ms) {
|
|
813
|
+
var me = this;
|
|
814
|
+
Ext.fx.Manager.setFxDefaults(me.id, {
|
|
815
|
+
delay: ms
|
|
816
|
+
});
|
|
817
|
+
return me;
|
|
818
|
+
},
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Fade an element in (from transparent to opaque). The ending opacity can be specified using the `opacity`
|
|
822
|
+
* config option. Usage:
|
|
823
|
+
*
|
|
824
|
+
* // default: fade in from opacity 0 to 100%
|
|
825
|
+
* el.fadeIn();
|
|
826
|
+
*
|
|
827
|
+
* // custom: fade in from opacity 0 to 75% over 2 seconds
|
|
828
|
+
* el.fadeIn({ opacity: .75, duration: 2000});
|
|
829
|
+
*
|
|
830
|
+
* // common config options shown with default values
|
|
831
|
+
* el.fadeIn({
|
|
832
|
+
* opacity: 1, //can be any value between 0 and 1 (e.g. .5)
|
|
833
|
+
* easing: 'easeOut',
|
|
834
|
+
* duration: 500
|
|
835
|
+
* });
|
|
836
|
+
*
|
|
837
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
838
|
+
* @return {Ext.Element} The Element
|
|
839
|
+
*/
|
|
840
|
+
fadeIn: function(o) {
|
|
841
|
+
var me = this;
|
|
842
|
+
me.animate(Ext.apply({}, o, {
|
|
843
|
+
opacity: 1,
|
|
844
|
+
internalListeners: {
|
|
845
|
+
beforeanimate: function(anim){
|
|
846
|
+
// restore any visibility/display that may have
|
|
847
|
+
// been applied by a fadeout animation
|
|
848
|
+
if (me.isStyle('display', 'none')) {
|
|
849
|
+
me.setDisplayed('');
|
|
850
|
+
} else {
|
|
851
|
+
me.show();
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}));
|
|
856
|
+
return this;
|
|
857
|
+
},
|
|
858
|
+
|
|
859
|
+
/**
|
|
860
|
+
* Fade an element out (from opaque to transparent). The ending opacity can be specified using the `opacity`
|
|
861
|
+
* config option. Note that IE may require `useDisplay:true` in order to redisplay correctly.
|
|
862
|
+
* Usage:
|
|
863
|
+
*
|
|
864
|
+
* // default: fade out from the element's current opacity to 0
|
|
865
|
+
* el.fadeOut();
|
|
866
|
+
*
|
|
867
|
+
* // custom: fade out from the element's current opacity to 25% over 2 seconds
|
|
868
|
+
* el.fadeOut({ opacity: .25, duration: 2000});
|
|
869
|
+
*
|
|
870
|
+
* // common config options shown with default values
|
|
871
|
+
* el.fadeOut({
|
|
872
|
+
* opacity: 0, //can be any value between 0 and 1 (e.g. .5)
|
|
873
|
+
* easing: 'easeOut',
|
|
874
|
+
* duration: 500,
|
|
875
|
+
* remove: false,
|
|
876
|
+
* useDisplay: false
|
|
877
|
+
* });
|
|
878
|
+
*
|
|
879
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
880
|
+
* @return {Ext.Element} The Element
|
|
881
|
+
*/
|
|
882
|
+
fadeOut: function(o) {
|
|
883
|
+
var me = this;
|
|
884
|
+
o = Ext.apply({
|
|
885
|
+
opacity: 0,
|
|
886
|
+
internalListeners: {
|
|
887
|
+
afteranimate: function(anim){
|
|
888
|
+
var dom = me.dom;
|
|
889
|
+
if (dom && anim.to.opacity === 0) {
|
|
890
|
+
if (o.useDisplay) {
|
|
891
|
+
me.setDisplayed(false);
|
|
892
|
+
} else {
|
|
893
|
+
me.hide();
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
}, o);
|
|
899
|
+
me.animate(o);
|
|
900
|
+
return me;
|
|
901
|
+
},
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* @deprecated 4.0
|
|
905
|
+
* Animates the transition of an element's dimensions from a starting height/width to an ending height/width. This
|
|
906
|
+
* method is a convenience implementation of {@link #shift}. Usage:
|
|
907
|
+
*
|
|
908
|
+
* // change height and width to 100x100 pixels
|
|
909
|
+
* el.scale(100, 100);
|
|
910
|
+
*
|
|
911
|
+
* // common config options shown with default values. The height and width will default to
|
|
912
|
+
* // the element's existing values if passed as null.
|
|
913
|
+
* el.scale(
|
|
914
|
+
* [element's width],
|
|
915
|
+
* [element's height], {
|
|
916
|
+
* easing: 'easeOut',
|
|
917
|
+
* duration: .35
|
|
918
|
+
* }
|
|
919
|
+
* );
|
|
920
|
+
*
|
|
921
|
+
* @param {Number} width The new width (pass undefined to keep the original width)
|
|
922
|
+
* @param {Number} height The new height (pass undefined to keep the original height)
|
|
923
|
+
* @param {Object} options (optional) Object literal with any of the Fx config options
|
|
924
|
+
* @return {Ext.Element} The Element
|
|
925
|
+
*/
|
|
926
|
+
scale: function(w, h, o) {
|
|
927
|
+
this.animate(Ext.apply({}, o, {
|
|
928
|
+
width: w,
|
|
929
|
+
height: h
|
|
930
|
+
}));
|
|
931
|
+
return this;
|
|
932
|
+
},
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* @deprecated 4.0
|
|
936
|
+
* Animates the transition of any combination of an element's dimensions, xy position and/or opacity. Any of these
|
|
937
|
+
* properties not specified in the config object will not be changed. This effect requires that at least one new
|
|
938
|
+
* dimension, position or opacity setting must be passed in on the config object in order for the function to have
|
|
939
|
+
* any effect. Usage:
|
|
940
|
+
*
|
|
941
|
+
* // slide the element horizontally to x position 200 while changing the height and opacity
|
|
942
|
+
* el.shift({ x: 200, height: 50, opacity: .8 });
|
|
943
|
+
*
|
|
944
|
+
* // common config options shown with default values.
|
|
945
|
+
* el.shift({
|
|
946
|
+
* width: [element's width],
|
|
947
|
+
* height: [element's height],
|
|
948
|
+
* x: [element's x position],
|
|
949
|
+
* y: [element's y position],
|
|
950
|
+
* opacity: [element's opacity],
|
|
951
|
+
* easing: 'easeOut',
|
|
952
|
+
* duration: .35
|
|
953
|
+
* });
|
|
954
|
+
*
|
|
955
|
+
* @param {Object} options Object literal with any of the Fx config options
|
|
956
|
+
* @return {Ext.Element} The Element
|
|
957
|
+
*/
|
|
958
|
+
shift: function(config) {
|
|
959
|
+
this.animate(config);
|
|
960
|
+
return this;
|
|
961
|
+
}
|
|
962
|
+
});
|