emergent-core 0.1.0
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/.bnsignore +16 -0
- data/History.txt +4 -0
- data/Manifest.txt +348 -0
- data/README.rdoc +47 -0
- data/Rakefile +39 -0
- data/app_generators/emergent_core/USAGE +5 -0
- data/app_generators/emergent_core/emergent_core_generator.rb +73 -0
- data/app_generators/emergent_core/templates/core/actionscript.properties +16 -0
- data/app_generators/emergent_core/templates/core/actionscriptair.properties +16 -0
- data/app_generators/emergent_core/templates/core/app.yaml.erb +12 -0
- data/app_generators/emergent_core/templates/core/default_tasks.rake +51 -0
- data/app_generators/emergent_core/templates/core/empty.txt +0 -0
- data/app_generators/emergent_core/templates/core/expressInstall.swf +0 -0
- data/app_generators/emergent_core/templates/core/flex.properties +2 -0
- data/app_generators/emergent_core/templates/core/generate.rb +17 -0
- data/app_generators/emergent_core/templates/core/html-template/AC_OETags.js +276 -0
- data/app_generators/emergent_core/templates/core/html-template/history/history.css +6 -0
- data/app_generators/emergent_core/templates/core/html-template/history/history.js +645 -0
- data/app_generators/emergent_core/templates/core/html-template/history/historyFrame.html +29 -0
- data/app_generators/emergent_core/templates/core/html-template/index.template.html +121 -0
- data/app_generators/emergent_core/templates/core/html-template/playerProductInstall.swf +0 -0
- data/app_generators/emergent_core/templates/core/index.html.erb +18 -0
- data/app_generators/emergent_core/templates/core/index.yaml +11 -0
- data/app_generators/emergent_core/templates/core/mainair-app.xml +134 -0
- data/app_generators/emergent_core/templates/core/mainapp-config.xml +21 -0
- data/app_generators/emergent_core/templates/core/mainapp.mxml +106 -0
- data/app_generators/emergent_core/templates/core/project-textmate.erb +52 -0
- data/app_generators/emergent_core/templates/core/project.properties +18 -0
- data/app_generators/emergent_core/templates/core/projectair.properties +24 -0
- data/app_generators/emergent_core/templates/core/swfobject.js +5 -0
- data/bin/emergent +17 -0
- data/lib/emergent_core.rb +49 -0
- data/lib/restfulx/active_foo.rb +194 -0
- data/lib/restfulx/active_record_tasks.rb +81 -0
- data/lib/restfulx/configuration.rb +76 -0
- data/lib/restfulx/datamapper_foo.rb +31 -0
- data/lib/restfulx/rails/recipes.rb +60 -0
- data/lib/restfulx/rails/swf_helper.rb +60 -0
- data/lib/restfulx/tasks.rb +85 -0
- data/lib/restfulx.rb +117 -0
- data/rails_generators/emergent_cms/USAGE +5 -0
- data/rails_generators/emergent_cms/emergent_cms_generator.rb +21 -0
- data/rails_generators/emergent_cms/templates/PagesEditModel.as +114 -0
- data/rails_generators/emergent_cms/templates/PagesEditView.mxml +102 -0
- data/rails_generators/emergent_config/USAGE +5 -0
- data/rails_generators/emergent_config/emergent_config_generator.rb +330 -0
- data/rails_generators/emergent_config/templates/app/controllers/accounts_controller.rb +104 -0
- data/rails_generators/emergent_config/templates/app/controllers/addresses_controller.rb +97 -0
- data/rails_generators/emergent_config/templates/app/controllers/application.rb +26 -0
- data/rails_generators/emergent_config/templates/app/controllers/assets_controller.rb +1 -0
- data/rails_generators/emergent_config/templates/app/controllers/content_assignments_controller.rb +97 -0
- data/rails_generators/emergent_config/templates/app/controllers/contents_controller.rb +114 -0
- data/rails_generators/emergent_config/templates/app/controllers/sessions_controller.rb +72 -0
- data/rails_generators/emergent_config/templates/app/controllers/sites_controller.rb +1 -0
- data/rails_generators/emergent_config/templates/app/controllers/users_controller.rb +97 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/ICommand.as +16 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/Undoable.as +46 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/command/UpdateDocumentCommand.as +73 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/DocumentEvent.as +46 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/NavigationEvent.as +31 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/ResourceEvent.as +27 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/event/UndoEvent.as +36 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AboutUsManager.as +15 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AccountManager.as +31 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/AuthenticationManager.as +76 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/ContentManager.as +92 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/DocumentManager.as +131 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/DocumentsManager.as +156 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/HomeManager.as +18 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/MainManager.as +23 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/PagesManager.as +71 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/ResourceManager.as +195 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/SiteManager.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/manager/UndoManager.as +143 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/DocumentMap.mxml +123 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/DocumentsMap.mxml +134 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/ManagerPresentationModelMap.mxml +59 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/ObjectMap.mxml +75 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/PresentationModelViewMap.mxml +81 -0
- data/rails_generators/emergent_config/templates/app/flex/application/controllers/map/PresenterViewMap.mxml +67 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/DocumentType.as +52 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/Resource.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/ResourceAction.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/constant/ResourceResult.as +8 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Account.as +32 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Address.as +26 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Asset.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/AssetAssignment.as +25 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Content.as +46 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/ContentAssignment.as +33 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Document.as +131 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/PlainDocument.as +19 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/RichDocument.as +19 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Session.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/Snapshot.as +21 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/domain/User.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/factory/DocumentFactory.as +61 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/factory/DocumentViewFactory.as +59 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/factory/ResourceFactory.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AboutUsModel.as +22 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AccountModel.as +68 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/AuthenticationModel.as +44 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ContactUsModel.as +45 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ContentModel.as +70 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/DocumentModel.as +235 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/DocumentsModel.as +169 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/HomeModel.as +23 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/MainModel.as +35 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/PagesModel.as +44 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ProfileModel.as +99 -0
- data/rails_generators/emergent_config/templates/app/flex/application/models/presentation/ResourceModel.as +100 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/about_us/about_us.mxml +105 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/account/account.mxml +97 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/contact_us/contact_us.mxml +65 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/document.mxml +71 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/documents.mxml +201 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/plain_document.mxml +9 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/document/rich_document.mxml +12 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/gallery/gallery.mxml +37 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/home/home.mxml +58 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_presenter.as +81 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_troparchy.mxml +71 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/login/login.mxml +50 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main.mxml +131 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_presenter.as +166 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/main/main_troparchy.mxml +74 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_bottom_view.mxml +48 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_left_view.mxml +43 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_right_view.mxml +47 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_model.as +13 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_presenter.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bar_top_view.mxml +49 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_presenter.as +63 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_troparchy.mxml +63 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/navigation/navigation_bars_view.mxml +59 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages.mxml +44 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages_presenter.as +83 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/pages/pages_troparchy.mxml +62 -0
- data/rails_generators/emergent_config/templates/app/flex/application/views/profile/profile.mxml +73 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/fonts/MyriadPro-Bold.otf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/fonts/MyriadPro-Regular.otf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/html/lorem.html +3 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture10.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture11.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture12.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture13.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture14.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture3.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture4.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture5.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture6.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture7.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture8.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/alexgrey/Picture9.png +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_0.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_180.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_270.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_90.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_bottom.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/images/hot_nebula_top.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/itunes7Bg.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/jukebox.css +764 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/jukeboxGfx.swf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidian.css +734 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidianBg.jpg +0 -0
- data/rails_generators/emergent_config/templates/app/flex/assets/styles/obsidianGfx.swf +0 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/actions/LayoutAction.as +377 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/actions/SimpleLayoutAction.as +210 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/FourDTweenCollection.mxml +50 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/IAnimator.as +39 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/animators/TweenMaxAnimator.as +269 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/cameras/AstroCamera.as +177 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/components/FourDDataGrid.mxml +105 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/components/FourDItemRenderer.mxml +54 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/CenterPerspectiveProjection.as +72 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/ComplexCondition.as +44 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/ConditionsUtil.as +82 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/FourDComponent.as +309 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/InstanceMethodInvoker.as +50 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/InstancePropertyInjector.as +43 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/MethodCaller.as +51 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pathway.as +10 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/PathwayEvent.as +28 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pheron.as +34 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Pheron2.as +41 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/PheronReceptor.as +125 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Properties.as +57 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Router.as +50 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/RouterUtil.as +70 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleCondition.as +42 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleZSortVO.as +1 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/SimpleZSorter.as +1 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Tecton.as +70 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/Tecton2.as +234 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonCache.as +111 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonEvent.as +39 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMap.as +515 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMap2.as +289 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonMapSample.mxml +73 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonReceptor.as +43 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonScope.as +38 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonScopeProperties.as +18 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonUtils.as +51 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/events/LayoutActionEvent.as +75 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CarouselLayout.as +85 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CircleLayout.as +102 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/CoverFlowLayout.as +136 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/layouts/FourDLayout.as +272 -0
- data/rails_generators/emergent_config/templates/app/flex/com/fourD/utils/TweenUtil.as +110 -0
- data/rails_generators/emergent_config/templates/app/helpers/accounts_helper.rb +93 -0
- data/rails_generators/emergent_config/templates/app/helpers/application_helper.rb +3 -0
- data/rails_generators/emergent_config/templates/app/models/account.rb +84 -0
- data/rails_generators/emergent_config/templates/app/models/account_mailer.rb +24 -0
- data/rails_generators/emergent_config/templates/app/models/account_observer.rb +17 -0
- data/rails_generators/emergent_config/templates/app/models/address.rb +2 -0
- data/rails_generators/emergent_config/templates/app/models/asset.rb +6 -0
- data/rails_generators/emergent_config/templates/app/models/asset_assignment.rb +4 -0
- data/rails_generators/emergent_config/templates/app/models/category.rb +35 -0
- data/rails_generators/emergent_config/templates/app/models/comment.rb +98 -0
- data/rails_generators/emergent_config/templates/app/models/content.rb +89 -0
- data/rails_generators/emergent_config/templates/app/models/content_assignment.rb +21 -0
- data/rails_generators/emergent_config/templates/app/models/image.rb +3 -0
- data/rails_generators/emergent_config/templates/app/models/post.rb +76 -0
- data/rails_generators/emergent_config/templates/app/models/section.rb +97 -0
- data/rails_generators/emergent_config/templates/app/models/site.rb +1 -0
- data/rails_generators/emergent_config/templates/app/models/tag.rb +1 -0
- data/rails_generators/emergent_config/templates/app/models/user.rb +4 -0
- data/rails_generators/emergent_config/templates/app/views/account_mailer/activation.erb +3 -0
- data/rails_generators/emergent_config/templates/app/views/account_mailer/signup_notification.erb +8 -0
- data/rails_generators/emergent_config/templates/config/Capfile +4 -0
- data/rails_generators/emergent_config/templates/config/README.txt +18 -0
- data/rails_generators/emergent_config/templates/config/deploy.rb +36 -0
- data/rails_generators/emergent_config/templates/config/routes.rb +72 -0
- data/rails_generators/emergent_config/templates/core/actionscript.properties +16 -0
- data/rails_generators/emergent_config/templates/core/actionscriptair.properties +16 -0
- data/rails_generators/emergent_config/templates/core/app.yaml.erb +12 -0
- data/rails_generators/emergent_config/templates/core/default_tasks.rake +51 -0
- data/rails_generators/emergent_config/templates/core/emergent_tasks.rake +42 -0
- data/rails_generators/emergent_config/templates/core/empty.txt +0 -0
- data/rails_generators/emergent_config/templates/core/expressInstall.swf +0 -0
- data/rails_generators/emergent_config/templates/core/flex.properties +2 -0
- data/rails_generators/emergent_config/templates/core/generate.rb +17 -0
- data/rails_generators/emergent_config/templates/core/html-template/AC_OETags.js +276 -0
- data/rails_generators/emergent_config/templates/core/html-template/history/history.css +6 -0
- data/rails_generators/emergent_config/templates/core/html-template/history/history.js +645 -0
- data/rails_generators/emergent_config/templates/core/html-template/history/historyFrame.html +29 -0
- data/rails_generators/emergent_config/templates/core/html-template/index.template.html +121 -0
- data/rails_generators/emergent_config/templates/core/html-template/playerProductInstall.swf +0 -0
- data/rails_generators/emergent_config/templates/core/index.html.erb +18 -0
- data/rails_generators/emergent_config/templates/core/index.yaml +11 -0
- data/rails_generators/emergent_config/templates/core/mainair-app.xml +134 -0
- data/rails_generators/emergent_config/templates/core/mainapp-config.xml +21 -0
- data/rails_generators/emergent_config/templates/core/mainapp.mxml +101 -0
- data/rails_generators/emergent_config/templates/core/project-textmate.erb +52 -0
- data/rails_generators/emergent_config/templates/core/project.properties +18 -0
- data/rails_generators/emergent_config/templates/core/projectair.properties +24 -0
- data/rails_generators/emergent_config/templates/core/restfulx.yml +14 -0
- data/rails_generators/emergent_config/templates/core/restfulx_tasks.rake +6 -0
- data/rails_generators/emergent_config/templates/core/swfobject.js +5 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_accounts.rb +40 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_addresses.rb +18 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_asset_assignments.rb +19 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_assets.rb +20 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_content_assignments.rb +26 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_contents.rb +21 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_sessions.rb +16 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_sites.rb +27 -0
- data/rails_generators/emergent_config/templates/db/migrate/create_users.rb +15 -0
- data/rails_generators/emergent_config/templates/lib/analytics.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/app_controller.rb.erb +26 -0
- data/rails_generators/emergent_config/templates/lib/as3corelib-0.92.1.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3crypto-1.3patched.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3crypto.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3ds-1.04.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/as3httpclientlib-1.0.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/authenticated_system.rb +189 -0
- data/rails_generators/emergent_config/templates/lib/authenticated_test_helper.rb +11 -0
- data/rails_generators/emergent_config/templates/lib/containerEx.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/flare.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/flash_session_hack.rb +27 -0
- data/rails_generators/emergent_config/templates/lib/flex2BrowserManager.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/flexlib.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/fluint.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/mate_0_8_6_enhanced.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/openflux.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/pv3d.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/restfulx.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/site_keys.rb +38 -0
- data/rails_generators/emergent_config/templates/lib/tweenMax.swc +0 -0
- data/rails_generators/emergent_config/templates/lib/urlkitFlex3.swc +0 -0
- data/rails_generators/emergent_config/templates/shell_script +31 -0
- data/rails_generators/emergent_controller/USAGE +5 -0
- data/rails_generators/emergent_controller/emergent_controller_generator.rb +25 -0
- data/rails_generators/emergent_controller/templates/controller.as.erb +37 -0
- data/rails_generators/emergent_core/USAGE +5 -0
- data/rails_generators/emergent_core/emergent_core_generator.rb +157 -0
- data/rails_generators/emergent_iphone/USAGE +5 -0
- data/rails_generators/emergent_iphone/emergent_iphone_generator.rb +27 -0
- data/rails_generators/emergent_scaffold/USAGE +5 -0
- data/rails_generators/emergent_scaffold/emergent_scaffold_generator.rb +157 -0
- data/rails_generators/emergent_scaffold/templates/component.mxml.erb +101 -0
- data/rails_generators/emergent_scaffold/templates/controller.rb.erb +101 -0
- data/rails_generators/emergent_scaffold/templates/edit_index_view.mxml.erb +114 -0
- data/rails_generators/emergent_scaffold/templates/edit_show_view.mxml.erb +84 -0
- data/rails_generators/emergent_scaffold/templates/filter_view.mxml.erb +1 -0
- data/rails_generators/emergent_scaffold/templates/fixtures.yml.erb +128 -0
- data/rails_generators/emergent_scaffold/templates/index_view.mxml.erb +58 -0
- data/rails_generators/emergent_scaffold/templates/item_renderer.mxml.erb +53 -0
- data/rails_generators/emergent_scaffold/templates/manager.as.erb +31 -0
- data/rails_generators/emergent_scaffold/templates/migration.rb.erb +22 -0
- data/rails_generators/emergent_scaffold/templates/model.as.erb +42 -0
- data/rails_generators/emergent_scaffold/templates/model.rb.erb +11 -0
- data/rails_generators/emergent_scaffold/templates/presentation_model.as.erb +33 -0
- data/rails_generators/emergent_scaffold/templates/presenter.as.erb +98 -0
- data/rails_generators/emergent_scaffold/templates/show_view.mxml.erb +50 -0
- data/rails_generators/emergent_scaffold/templates/view_map.mxml.erb +40 -0
- data/rails_generators/emergent_scaffold/templates/views_panel.mxml.erb +64 -0
- data/rails_generators/emergent_styler/USAGE +5 -0
- data/rails_generators/emergent_styler/emergent_styler_generator.rb +21 -0
- data/rails_generators/rx_yaml_scaffold/USAGE +51 -0
- data/rails_generators/rx_yaml_scaffold/rx_yaml_scaffold_generator.rb +49 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/emergent_core_spec.rb +7 -0
- data/spec/spec_helper.rb +16 -0
- data/tasks/ann.rake +80 -0
- data/tasks/bones.rake +20 -0
- data/tasks/gem.rake +201 -0
- data/tasks/git.rake +40 -0
- data/tasks/manifest.rake +48 -0
- data/tasks/notes.rake +27 -0
- data/tasks/post_load.rake +39 -0
- data/tasks/rdoc.rake +50 -0
- data/tasks/rubyforge.rake +55 -0
- data/tasks/setup.rb +279 -0
- data/tasks/spec.rake +54 -0
- data/tasks/svn.rake +47 -0
- data/tasks/test.rake +40 -0
- data/test/test_emergent_core.rb +0 -0
- data/test/test_emergent_iphone_generator.rb +46 -0
- data/test/test_generator_helper.rb +29 -0
- metadata +437 -0
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
|
|
2
|
+
package com.fourD.core
|
|
3
|
+
{
|
|
4
|
+
import flash.events.IEventDispatcher;
|
|
5
|
+
import flash.utils.Dictionary;
|
|
6
|
+
|
|
7
|
+
import mx.core.Application;
|
|
8
|
+
|
|
9
|
+
public class TectonMap2 extends EventMap {
|
|
10
|
+
|
|
11
|
+
/** map of tectons to kanon (parent), tropon (child), and action (string) */
|
|
12
|
+
public var genericTectonMap:Dictionary;
|
|
13
|
+
|
|
14
|
+
public var tectonMap:Dictionary;
|
|
15
|
+
|
|
16
|
+
/** the tectons that are listening for tectons to start and whatnot */
|
|
17
|
+
public var tectonReceptors:Dictionary;
|
|
18
|
+
|
|
19
|
+
public var activeReceptors:Dictionary;
|
|
20
|
+
|
|
21
|
+
/** pathway of tectons to be run */
|
|
22
|
+
public var tectonPathway:Dictionary;
|
|
23
|
+
|
|
24
|
+
private var _dispatcher:IEventDispatcher;
|
|
25
|
+
|
|
26
|
+
private var firstTectonsInTree:Array;
|
|
27
|
+
private var numLevelsUp:int; // how many levels we've climbed in the tree
|
|
28
|
+
private var maxLevels:int; // max number of levels in the tree
|
|
29
|
+
|
|
30
|
+
private var pathwayActive:Boolean;
|
|
31
|
+
|
|
32
|
+
private var _presenter:SmartObject = new SmartObject(TectonScopeProperties.PRESENTER);
|
|
33
|
+
[Bindable(event="propertyChange")]
|
|
34
|
+
public function get presenter():* { return _presenter; }
|
|
35
|
+
|
|
36
|
+
private var _tropon:SmartObject = new SmartObject(TectonScopeProperties.TROPON);
|
|
37
|
+
[Bindable(event="propertyChange")]
|
|
38
|
+
public function get tropon():* { return _tropon; }
|
|
39
|
+
|
|
40
|
+
private var _kanon:SmartObject = new SmartObject(TectonScopeProperties.KANON);
|
|
41
|
+
[Bindable(event="propertyChange")]
|
|
42
|
+
public function get kanon():* { return _kanon; }
|
|
43
|
+
|
|
44
|
+
/** holds our tecton objects from XML (easily done in RestfulX) */
|
|
45
|
+
private var _tectons:Array; [Bindable]
|
|
46
|
+
public function get tectons():Array { return _tectons; }
|
|
47
|
+
public function set tectons(value:Array):void {
|
|
48
|
+
_tectons = value;
|
|
49
|
+
trace("TECTONS SET");
|
|
50
|
+
if (_tectons) { initializeMaps(); }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public function TectonMap2() {
|
|
54
|
+
tectonClassMap = new Dictionary(true);
|
|
55
|
+
tectonMap = new Dictionary(true);
|
|
56
|
+
tectonReceptors = new Dictionary(true);
|
|
57
|
+
tectonPathway = new Dictionary(true);
|
|
58
|
+
activeReceptors = new Dictionary(true);
|
|
59
|
+
|
|
60
|
+
_dispatcher = this.getDispatcher();
|
|
61
|
+
_dispatcher.addEventListener(PathwayEvent.TRAVERSE, buildPathway);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// constructs the tectons required into a pathway object and then runs them in order...
|
|
65
|
+
/**
|
|
66
|
+
* 1) Find all Tectons that are assigned to the initialize of another Tecton
|
|
67
|
+
* 2) Eliminate those Tectons that are already active or initialized
|
|
68
|
+
* 3) Add event listener to the the current Tecton for each of the ones listening for it's initialize...
|
|
69
|
+
* That is, addEventListener for super Tecton.COMPLETE
|
|
70
|
+
* 4) Create a PathwayDictionary that has in there all the COMPLETE events the currentTecton is listening for
|
|
71
|
+
* 5) Repeat
|
|
72
|
+
* 6) For every COMPLETE the currentTecton hears, remove that one from the Dictionary
|
|
73
|
+
* 7) Once all of them are removed from the Dictionary (by checking after every removal),
|
|
74
|
+
* 8) Run the current Tecton.
|
|
75
|
+
*/
|
|
76
|
+
private function buildPathway(event:PathwayEvent):void {
|
|
77
|
+
if (pathwayActive) { return; }
|
|
78
|
+
trace("pathwayEvent");
|
|
79
|
+
var type:String = event.type;
|
|
80
|
+
var url:Array = event.url;
|
|
81
|
+
var tropon:*, action:String, tecton:Tecton, kanon:*;
|
|
82
|
+
var fqnTropon:String, fqnKanon:String;
|
|
83
|
+
var tectonName:String;
|
|
84
|
+
var lastTecton:Tecton;
|
|
85
|
+
// [{view:target, action:"show"}, {view:anotherTarget, action:"flip"}]
|
|
86
|
+
// for loop is going from end to beginning! Provides space for initialization...
|
|
87
|
+
if (url.tropon) { tropon = url.tropon; }
|
|
88
|
+
if (url.action) { action = url.action; }
|
|
89
|
+
if (url.kanon) { kanon = url.kanon; }
|
|
90
|
+
// figure out what the tropon and action are:
|
|
91
|
+
// 1) if it's multiple tropons, then must be part of the same kanon
|
|
92
|
+
// to figure this out, chop the tropon off so we have the Sos.mainView,
|
|
93
|
+
// then find a className based on that
|
|
94
|
+
// that's where the tecton is sent. Tectons must know the parent "Kanon"
|
|
95
|
+
//var className:String = getQualifiedClassName( event.target ).replace( "::", "." );
|
|
96
|
+
var path:String = tropon.toString();
|
|
97
|
+
kanonClass = RouterUtil.getClassKanonName((path);
|
|
98
|
+
troponClass = RouterUtil.getClassTroponName(path);
|
|
99
|
+
tectonName = RouterUtil.getTectonName(path, action);
|
|
100
|
+
if (tropon.parent) { kanon = tropon.parent; }
|
|
101
|
+
else if (url[i - 1].view) { kanon = url[i - 1].view; }
|
|
102
|
+
else { kanon = "somethingElse"; }
|
|
103
|
+
|
|
104
|
+
tectonName = tropon.toString() + "." + action;
|
|
105
|
+
|
|
106
|
+
if (tectonMap[tectonName]) {
|
|
107
|
+
tecton = tectonMap[tectonName];
|
|
108
|
+
} else {
|
|
109
|
+
// create a new tecton for that tropon instance...
|
|
110
|
+
fqnTropon = getQualifiedClassName(tropon);
|
|
111
|
+
fqnKanon = (kanon is String) ? kanon : getQualifiedClassName(kanon);
|
|
112
|
+
var appName:String = getQualifiedClassName(Application.application);
|
|
113
|
+
|
|
114
|
+
var genericName:String = appName + "." + fqnKanon + "." + fqnTropon + "." + action;
|
|
115
|
+
|
|
116
|
+
tecton = tectonClassMap[genericName];
|
|
117
|
+
// create a new one and then store it in the dictionary...
|
|
118
|
+
tecton = TectonUtils.clone(tecton) as Tecton;
|
|
119
|
+
tecton.tropon = tropon;
|
|
120
|
+
|
|
121
|
+
tectonMap[tectonName] = tecton;
|
|
122
|
+
// probably should add to the initialize and complete of other Tectons this
|
|
123
|
+
// newly generated one...
|
|
124
|
+
var baseName:String = "tecton" // split off the numbers from the instances in the class path
|
|
125
|
+
var initializePheronType:String = baseName + Pheron2.INITIALIZE;
|
|
126
|
+
var intializeTectons:Array = tectonPheronMap[initializePheronType];
|
|
127
|
+
var startPheronType:String = baseName + Pheron2.START;
|
|
128
|
+
var startTectons:Array = tectonPheronMap[startPheronType];
|
|
129
|
+
var completePheronType:String = baseName + Pheron2.COMPLETE;
|
|
130
|
+
var completeTectons:Array = tectonPheronMap[completePheronType];
|
|
131
|
+
// add the new tecton to all of the tecton listener handlers in the application
|
|
132
|
+
// might be expensive?
|
|
133
|
+
addTectonToHandlers(initializeTectons, Pheron2.INITIALIZE);
|
|
134
|
+
addTectonToHandlers(startTectons, Pheron2.START);
|
|
135
|
+
addTectonToHandlers(completeTectons, Pheron2.COMPLETE);
|
|
136
|
+
}
|
|
137
|
+
firstInTree = null;
|
|
138
|
+
numLevelsUp = 0;
|
|
139
|
+
maxLevels = 0;
|
|
140
|
+
initialize(tecton);
|
|
141
|
+
// this initialize function will create basically a preordered tree
|
|
142
|
+
// and after tons of recursion, it will get here,
|
|
143
|
+
// and we know the tree has been built.
|
|
144
|
+
}
|
|
145
|
+
pathwayActive = true;
|
|
146
|
+
// finally, initialize the sequence and the rest will be handled by events!
|
|
147
|
+
i=0, len = firstTectonsInTree.length;
|
|
148
|
+
for (i; i < len; i++) {
|
|
149
|
+
tecton = firstTectonsInTree[i];
|
|
150
|
+
tecton.runSequence(scope);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
private function addTectonToHandlers(handlerTectons:Array, phase:String):void {
|
|
155
|
+
if (handlerTectons == null) { return; }
|
|
156
|
+
var i:int=0, len:int = handlerTectons.length;
|
|
157
|
+
for (i; i < len; i++) {
|
|
158
|
+
var tect:Tecton = handlerTectons[i];
|
|
159
|
+
if (phase == Pheron2.INITIALIZE) { tect.initializeHandlers.push(tecton); }
|
|
160
|
+
else if (phase == Pheron2.START) { tect.startHandlers.push(tecton); }
|
|
161
|
+
else if (phase == Pheron2.COMPLETE) { tect.completeHandlers.push(tecton); }
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
public function getTecton(fqnKanon:String, fqnTropon:String, action:String):Tecton {
|
|
166
|
+
return TectonUtils.clone(tectonClassMap[fqnKanon][fqnTropon][action]) as Tecton
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
public function initialize(tecton:Tecton):void {
|
|
170
|
+
if (!tecton) { return; } // throw error
|
|
171
|
+
|
|
172
|
+
// 2) validate tecton conditions to see if it's viable
|
|
173
|
+
var conditions:Array = tecton.conditions;
|
|
174
|
+
if (conditions != null) {
|
|
175
|
+
var value:Boolean = ConditionsUtil.validateConditions(conditions)
|
|
176
|
+
if (!value) { return; }
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
tecton.isInitialized = true;
|
|
180
|
+
var initializePheronType:String = tecton.toString() + Pheron2.INITIALIZE;
|
|
181
|
+
|
|
182
|
+
// 4) Find tectons that are listening for this tecton to initialize
|
|
183
|
+
initializeReceptorTectons(tecton, initializePheronType);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
private function initializeReceptorTectons(tecton:Tecton, pheronType:String):Array {
|
|
187
|
+
var receptorTectons:Array;
|
|
188
|
+
if (pathwayMap[numLevelsUp] == undefined) {
|
|
189
|
+
// then it's a new level!
|
|
190
|
+
pathwayMap[numLevelsUp] = new Array();
|
|
191
|
+
numLevelsUp ++;
|
|
192
|
+
pathwayMap[numLevelsUp].push(tecton);
|
|
193
|
+
}
|
|
194
|
+
if (tectonReceptors[pheronType] != undefined) {
|
|
195
|
+
receptorTectons = tectonReceptors[pheronType];
|
|
196
|
+
}
|
|
197
|
+
if (receptorTectons != null) {
|
|
198
|
+
var i:int=0, len:int = receptorTectons.length;
|
|
199
|
+
for (i; i < len; i++) {
|
|
200
|
+
var receptorTecton:Tecton = receptorTectons[i];
|
|
201
|
+
// if it's already active, forget about it
|
|
202
|
+
if (receptorTecton.isActive || receptorTecton.isInitialized) { continue; }
|
|
203
|
+
var completePheronType:String = receptorTecton.toString() + Pheron2.COMPLETE;
|
|
204
|
+
tecton.addEventListener(completePheronType, tecton.tectonate);
|
|
205
|
+
initialize(receptorTecton);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if (numLevelsUp > maxLevels) {
|
|
210
|
+
// since the initialize() method will create another loop,
|
|
211
|
+
// this value will only be calculated when it reaches the leaf of the tree.
|
|
212
|
+
maxLevels = numLevelsUp;
|
|
213
|
+
firstTectonsInTree = pathwayMap[maxLevels];
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
private function initializeMaps():void {
|
|
218
|
+
var fqnTecton:String = getQualifiedClassName(tecton);
|
|
219
|
+
registerClassAlias(fqnTecton.replace("::","."), Tecton);
|
|
220
|
+
var i:int=0, len:int = tectons.length;
|
|
221
|
+
trace("INITIALIZE MAPS!");
|
|
222
|
+
// 1) create map of tectonReceptors to tectons
|
|
223
|
+
// 2) create map of tropons (from the troponTree) to tectons
|
|
224
|
+
var tecton:Tecton, tropon:*, tropons:Array, action:String, kanon:*;
|
|
225
|
+
for (i; i < len; i++) {
|
|
226
|
+
tecton = tectons[i];
|
|
227
|
+
action = tecton.actionName;
|
|
228
|
+
if (tecton.tropon) {
|
|
229
|
+
trace("tecton exists");
|
|
230
|
+
tropon = tecton.tropon;
|
|
231
|
+
if (!tropon is Class) {
|
|
232
|
+
trace("tropon is displayObject");
|
|
233
|
+
trace(tropon);
|
|
234
|
+
if (!tecton.kanon) {
|
|
235
|
+
trace("kanon wasn't explicitly defined");
|
|
236
|
+
kanon = (tropon.parent) || null;
|
|
237
|
+
}
|
|
238
|
+
} else if (tropon is Class) {
|
|
239
|
+
trace("tropon is class = " + tropon);
|
|
240
|
+
if (!tecton.kanon) {
|
|
241
|
+
trace("kanon doesn't exist for class");
|
|
242
|
+
//THROW ERROR, try to find it some other way, via the content map?
|
|
243
|
+
} else {
|
|
244
|
+
kanon = tecton.kanon;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
else if (tecton.tropons) {
|
|
249
|
+
tropons = tecton.tropons;
|
|
250
|
+
}
|
|
251
|
+
// doesn't matter if it's a Class or DisplayObject :)
|
|
252
|
+
var fqnKanon:String = getQualifiedClassName(kanon);
|
|
253
|
+
var fqnTropon:String = getQualifiedClassName(tropon);
|
|
254
|
+
var fqnApp:String = getQualifiedClassName(Application.application);
|
|
255
|
+
var genericName:String = fqnApp + "." + fqnKanon + "." + fqnTropon + "." + action;
|
|
256
|
+
var baseName:String = "something" // figure out something like Sos.mainView.button.panel
|
|
257
|
+
genericTectonMap[genericName] = tecton;
|
|
258
|
+
genericTectonMap[baseName] = tecton;
|
|
259
|
+
|
|
260
|
+
var j:int=0, lenj:int;
|
|
261
|
+
trace(tropon);
|
|
262
|
+
if (tropon != null) {
|
|
263
|
+
trace("Tropon is not equal to null");
|
|
264
|
+
fqnTropon = getQualifiedClassName(tropon);
|
|
265
|
+
if (tectonClassMap[fqnKanon] == undefined) {
|
|
266
|
+
tectonClassMap[fqnKanon] = new Dictionary(true); trace("first dictionary");
|
|
267
|
+
}
|
|
268
|
+
if (tectonClassMap[fqnKanon][fqnTropon] == undefined) {
|
|
269
|
+
tectonClassMap[fqnKanon][fqnTropon] = new Dictionary(true); trace("second dictionary");
|
|
270
|
+
}
|
|
271
|
+
if (action) {
|
|
272
|
+
tectonClassMap[fqnKanon][fqnTropon][action] = tecton;
|
|
273
|
+
trace("ALL OF IT: " + "\nKanon = " + fqnKanon + "\nTropon = " + fqnTropon + "\nAction = " + action);
|
|
274
|
+
}
|
|
275
|
+
} else if (tropons != null && tropon == null) {
|
|
276
|
+
lenj = tropons.length;
|
|
277
|
+
for (j; j < lenj; j++) {
|
|
278
|
+
tropon = tropons[j];
|
|
279
|
+
fqnTropon = getQualifiedClassName(tropon);
|
|
280
|
+
if (tectonClassMap[fqnKanon] == undefined) { tectonClassMap[fqnKanon] = new Dictionary(true); }
|
|
281
|
+
if (tectonClassMap[fqnKanon][fqnTropon] == undefined) { tectonClassMap[fqnKanon][fqnTropon] = new Dictionary(true); }
|
|
282
|
+
if (action) { tectonClassMap[fqnKanon][fqnTropon][action] = tecton; }
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
}
|
|
289
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<TectonMap xmlns="com.fourD.core.*" xmlns:mx="http://www.adobe.com/2006/mxml">
|
|
3
|
+
|
|
4
|
+
<mx:Script>
|
|
5
|
+
<![CDATA[
|
|
6
|
+
|
|
7
|
+
import mx.events.FlexEvent;
|
|
8
|
+
|
|
9
|
+
import sos.views.main.MainView;
|
|
10
|
+
import sos.views.main.MainPresenter;
|
|
11
|
+
import mx.controls.Button;
|
|
12
|
+
|
|
13
|
+
]]>
|
|
14
|
+
</mx:Script>
|
|
15
|
+
|
|
16
|
+
<!-- <Debugger level="{Debugger.ALL}"/> -->
|
|
17
|
+
<tectons>
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
<Tecton id="showLogin" tropon="{Button}" kanon="{MainView}" actionName="show">
|
|
21
|
+
<!--<conditions>
|
|
22
|
+
<SimpleCondition property="spinLogin.isActive" value="false"/>
|
|
23
|
+
<ComplexCondition firstItem="{event.tropon}" secondItem="" operator=""/>
|
|
24
|
+
</conditions> -->
|
|
25
|
+
<actions>
|
|
26
|
+
<InstanceMethodInvoker method="instant" instance="{event.tropon.parent.presenter}"
|
|
27
|
+
arguments="{[event.tropon]}"/>
|
|
28
|
+
</actions>
|
|
29
|
+
</Tecton>
|
|
30
|
+
|
|
31
|
+
<Tecton id="showPage">
|
|
32
|
+
<conditions>
|
|
33
|
+
<ComplexCondition firstItem="{event.tropon}" secondItem="" operator=""/>
|
|
34
|
+
</conditions>
|
|
35
|
+
<actions>
|
|
36
|
+
<InstanceMethodInvoker method="index" instance="{event.target.parent.presenter}"
|
|
37
|
+
arguments="{[event.tropon]}"/>
|
|
38
|
+
</actions>
|
|
39
|
+
</Tecton>
|
|
40
|
+
|
|
41
|
+
<!--<Tecton id="showAllPages">
|
|
42
|
+
<receptors>
|
|
43
|
+
<TectonReceptor tecton="{hideLogin}" eventType="{TectonEvent.RUN_COMPLETE}"/>
|
|
44
|
+
</receptors>
|
|
45
|
+
<conditions>
|
|
46
|
+
<ComplexCondition firstItem="{event.tropon}" secondItem="" operator=""/>
|
|
47
|
+
<SimpleCondition property="{showLogin.isActive}" value="false"/>
|
|
48
|
+
</conditions>
|
|
49
|
+
<actions>
|
|
50
|
+
<InstanceMethodInvoker method="index" instance="{event.tropons[0].parent.presenter}"
|
|
51
|
+
arguments="{[event.tropons]}"/>
|
|
52
|
+
</actions>
|
|
53
|
+
<complete>
|
|
54
|
+
<InstancePropertyInjector instance="{event.tropons[0].parent}">
|
|
55
|
+
<Properties currentState="index"/>
|
|
56
|
+
</InstancePropertyInjector>
|
|
57
|
+
</complete>
|
|
58
|
+
</Tecton>
|
|
59
|
+
|
|
60
|
+
<Tecton id="introCarousel">
|
|
61
|
+
<conditions>
|
|
62
|
+
<SimpleCondition property="introCarousel.isActive" value="false"/>
|
|
63
|
+
</conditions>
|
|
64
|
+
<actions>
|
|
65
|
+
<InstanceMethodInvoker method="intro" instance="{event.target}"
|
|
66
|
+
arguments="{[event.tropons]}"/>
|
|
67
|
+
</actions>
|
|
68
|
+
<receptors>
|
|
69
|
+
<TectonReceptor tecton="{hideLogin}" eventType="{TectonEvent.RUN_COMPLETE}"/>
|
|
70
|
+
</receptors>
|
|
71
|
+
</Tecton> -->
|
|
72
|
+
</tectons>
|
|
73
|
+
</TectonMap>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2008-2009 (c) Lance Pollard
|
|
3
|
+
* www.systemsofseven.com/blog
|
|
4
|
+
* www.4ddesignlab.com
|
|
5
|
+
* LanceJPollard@gmail.com
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person
|
|
8
|
+
* obtaining a copy of this software and associated documentation
|
|
9
|
+
* files (the "Software"), to deal in the Software without
|
|
10
|
+
* restriction, including without limitation the rights to use,
|
|
11
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the
|
|
13
|
+
* Software is furnished to do so, subject to the following
|
|
14
|
+
* conditions:
|
|
15
|
+
*
|
|
16
|
+
* The above copyright notice and this permission notice shall be
|
|
17
|
+
* included in all copies or substantial portions of the Software.
|
|
18
|
+
*
|
|
19
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
20
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
21
|
+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
22
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
23
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
24
|
+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
25
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
26
|
+
* OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
package com.fourD.core {
|
|
30
|
+
|
|
31
|
+
import flash.display.DisplayObject;
|
|
32
|
+
|
|
33
|
+
[Bindable]
|
|
34
|
+
public class TectonReceptor {
|
|
35
|
+
|
|
36
|
+
public var tectons:Array;
|
|
37
|
+
|
|
38
|
+
public var tecton:Tecton;
|
|
39
|
+
|
|
40
|
+
public var eventType:String;
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
package com.fourD.core {
|
|
3
|
+
import com.asfusion.mate.core.IEventMap;
|
|
4
|
+
|
|
5
|
+
import flash.display.DisplayObjectContainer;
|
|
6
|
+
import flash.events.Event;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* <code>MessageScope</code> is an object created by the <code>MessageHandlers</code>.
|
|
10
|
+
* <p>It represents the running scope of a <code>IActionList</code>.
|
|
11
|
+
* The <code>IActionList</code> and its actions share this object to transfer data
|
|
12
|
+
* between them.</p>
|
|
13
|
+
*/
|
|
14
|
+
public class TectonScope extends Scope
|
|
15
|
+
{
|
|
16
|
+
public var tecton:Tecton;
|
|
17
|
+
|
|
18
|
+
public var tropon:DisplayObjectContainer;
|
|
19
|
+
|
|
20
|
+
public var kanon:DisplayObjectContainer;
|
|
21
|
+
|
|
22
|
+
public var action:String;
|
|
23
|
+
|
|
24
|
+
public var presenter:*;
|
|
25
|
+
|
|
26
|
+
/*-----------------------------------------------------------------------------------------------------------
|
|
27
|
+
* Constructor
|
|
28
|
+
-------------------------------------------------------------------------------------------------------------*/
|
|
29
|
+
/**
|
|
30
|
+
* Constructor
|
|
31
|
+
*/
|
|
32
|
+
public function TectonScope(event:Event, active:Boolean, map:IEventMap, inheritScope:IScope = null)
|
|
33
|
+
{
|
|
34
|
+
super(event, active, map, inheritScope);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
}
|
|
38
|
+
}
|
data/rails_generators/emergent_config/templates/app/flex/com/fourD/core/TectonScopeProperties.as
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
package com.fourD.core
|
|
2
|
+
{
|
|
3
|
+
public final class TectonScopeProperties
|
|
4
|
+
{
|
|
5
|
+
|
|
6
|
+
public static const PRESENTER:String = "presenter";
|
|
7
|
+
|
|
8
|
+
public static const TROPON:String = "tropon";
|
|
9
|
+
|
|
10
|
+
public static const KANON:String = "kanon";
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
public function TectonScopeProperties()
|
|
14
|
+
{
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
package com.fourD.core
|
|
2
|
+
{
|
|
3
|
+
import mx.utils.ObjectUtil;
|
|
4
|
+
import flash.utils.getDefinitionByName;
|
|
5
|
+
import flash.utils.getQualifiedClassName;
|
|
6
|
+
|
|
7
|
+
public class TectonUtils
|
|
8
|
+
{
|
|
9
|
+
public function TectonUtils()
|
|
10
|
+
{
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public static function clone(object:Object):Object {
|
|
14
|
+
if (object is Tecton) {
|
|
15
|
+
var fqn:String = getQualifiedClassName(object);
|
|
16
|
+
var clazz:Class = getDefinitionByName(fqn) as Class;
|
|
17
|
+
var cloned:Object = new clazz;
|
|
18
|
+
cloned["tropon"] = object["tropon"];
|
|
19
|
+
cloned["actions"] = object["actions"];
|
|
20
|
+
cloned["actionParams"] = object["actionParams"];
|
|
21
|
+
cloned["kanon"] = object["kanon"];
|
|
22
|
+
cloned["tropons"] = object["tropons"];
|
|
23
|
+
cloned["name"] = object["name"];
|
|
24
|
+
cloned["actionName"] = object["actionName"];
|
|
25
|
+
cloned["conditions"] = object["conditions"];
|
|
26
|
+
cloned["receptors"] = object["receptors"];
|
|
27
|
+
cloned["initialize"] = object["initialize"];
|
|
28
|
+
cloned["start"] = object["start"];
|
|
29
|
+
cloned["complete"] = object["complete"];
|
|
30
|
+
cloned["isInitialized"] = object["isInitialized"];
|
|
31
|
+
cloned["isRunning"] = object["isRunning"];
|
|
32
|
+
cloned["isComplete"] = object["isComplete"];
|
|
33
|
+
cloned["isActive"] = object["isActive"];
|
|
34
|
+
/* for each (var node:XML in describeType(object)..accessor) {
|
|
35
|
+
if (!isInvalidPropertyName(node.@name) && !RxUtils.isIgnored(node)) {
|
|
36
|
+
try {
|
|
37
|
+
var name:String = node.@name;
|
|
38
|
+
cloned[name] = object[name];
|
|
39
|
+
} catch (e:Error) {
|
|
40
|
+
// we can fail cloning if the property is read-only, etc.
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
} */
|
|
44
|
+
return cloned;
|
|
45
|
+
} else {
|
|
46
|
+
return ObjectUtil.copy(object);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
}
|
data/rails_generators/emergent_config/templates/app/flex/com/fourD/events/LayoutActionEvent.as
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2008 (c) Lance Pollard
|
|
3
|
+
* www.systemsofseven.com/blog
|
|
4
|
+
* www.4ddesignlab.com
|
|
5
|
+
* LanceJPollard@gmail.com
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person
|
|
8
|
+
* obtaining a copy of this software and associated documentation
|
|
9
|
+
* files (the "Software"), to deal in the Software without
|
|
10
|
+
* restriction, including without limitation the rights to use,
|
|
11
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the
|
|
13
|
+
* Software is furnished to do so, subject to the following
|
|
14
|
+
* conditions:
|
|
15
|
+
*
|
|
16
|
+
* The above copyright notice and this permission notice shall be
|
|
17
|
+
* included in all copies or substantial portions of the Software.
|
|
18
|
+
*
|
|
19
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
20
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
21
|
+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
22
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
23
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
24
|
+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
25
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
26
|
+
* OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
package com.fourD.events {
|
|
30
|
+
|
|
31
|
+
import flash.events.*;
|
|
32
|
+
|
|
33
|
+
public class LayoutActionEvent extends Event {
|
|
34
|
+
|
|
35
|
+
/** Lifecycle for a LayoutActionEvent
|
|
36
|
+
* First layoutStart is dispatched, causing the items to be layed out first, called by
|
|
37
|
+
* updateDisplayList. Then layoutEnd invokes introStart (so you can do custom flows in and such).
|
|
38
|
+
* Once the introCompletes, ambientStart is dispatched, invoking enterframe handlers
|
|
39
|
+
* or whatever you have configured to run during the application life. When you click an item,
|
|
40
|
+
* you endAmbiend, and the ambientEnd dispatches itemSelectedStart. And on and on.
|
|
41
|
+
*/
|
|
42
|
+
public static const LAYOUT_START:String = "layoutStartTweenActionEvent";
|
|
43
|
+
public static const LAYOUT_COMPLETE:String = "layoutCompleteTweenActionEvent";
|
|
44
|
+
|
|
45
|
+
public static const INTRO_START:String = "introStartTweenActionEvent";
|
|
46
|
+
public static const INTRO_END:String = "introEndTweenActionEvent";
|
|
47
|
+
public static const INTRO_COMPLETE:String = "introCompleteTweenActionEvent";
|
|
48
|
+
|
|
49
|
+
public static const AMBIENT_START:String = "ambientStartTweenActionEvent";
|
|
50
|
+
public static const AMBIENT_END:String = "ambiendEndTweenActionEvent";
|
|
51
|
+
public static const AMBIENT_COMPLETE:String = "ambientCompleteTweenActionEvent";
|
|
52
|
+
|
|
53
|
+
public static const ITEM_SELECTED_START:String = "itemSelectedStartTweenActionEvent";
|
|
54
|
+
public static const ITEM_SELECTED_END:String = "itemSelectedEndTweenActionEvent";
|
|
55
|
+
public static const ITEM_SELECTED_COMPLETE:String = "itemSelectedCompleteTweenActionEvent";
|
|
56
|
+
|
|
57
|
+
public static const ITEM_DESELECTED_START:String = "itemDeselectedStartTweenActionEvent";
|
|
58
|
+
public static const ITEM_DESELECTED_END:String = "itemDeselectedEndTweenActionEvent";
|
|
59
|
+
public static const ITEM_DESELECTED_COMPLETE:String = "itemDeselectedCompleteTweenActionEvent";
|
|
60
|
+
|
|
61
|
+
public static const OUTRO_START:String = "outroStartTweenActionEvent";
|
|
62
|
+
public static const OUTRO_END:String = "outroEndTweenActionEvent";
|
|
63
|
+
public static const OUTRO_COMPLETE:String = "outroCompleteTweenActionEvent";
|
|
64
|
+
|
|
65
|
+
public function LayoutActionEvent(type:String, bubbles:Boolean = false)
|
|
66
|
+
{
|
|
67
|
+
super(type, bubbles);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
override public function clone():Event
|
|
71
|
+
{
|
|
72
|
+
return new LayoutActionEvent(type, bubbles);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2008 (c) Lance Pollard
|
|
3
|
+
* www.systemsofseven.com/blog
|
|
4
|
+
* www.4ddesignlab.com
|
|
5
|
+
* LanceJPollard@gmail.com
|
|
6
|
+
*
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person
|
|
8
|
+
* obtaining a copy of this software and associated documentation
|
|
9
|
+
* files (the "Software"), to deal in the Software without
|
|
10
|
+
* restriction, including without limitation the rights to use,
|
|
11
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the
|
|
13
|
+
* Software is furnished to do so, subject to the following
|
|
14
|
+
* conditions:
|
|
15
|
+
*
|
|
16
|
+
* The above copyright notice and this permission notice shall be
|
|
17
|
+
* included in all copies or substantial portions of the Software.
|
|
18
|
+
*
|
|
19
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
20
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
21
|
+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
22
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
23
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
24
|
+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
25
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
26
|
+
* OTHER DEALINGS IN THE SOFTWARE.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
package com.fourD.layouts
|
|
30
|
+
{
|
|
31
|
+
import com.fourD.animators.TweenMaxAnimator;
|
|
32
|
+
|
|
33
|
+
import flash.display.DisplayObject;
|
|
34
|
+
|
|
35
|
+
import mx.core.ILayoutElement;
|
|
36
|
+
import mx.core.UIComponent;
|
|
37
|
+
|
|
38
|
+
public class CarouselLayout extends FourDLayout {
|
|
39
|
+
|
|
40
|
+
[Bindable] public var spiralAmount:Number = 0;
|
|
41
|
+
[Bindable] public var speed:Number = 1/300;
|
|
42
|
+
[Bindable] public var radius:Number;
|
|
43
|
+
[Bindable] public var anglePer:Number;
|
|
44
|
+
|
|
45
|
+
public function CarouselLayout() {
|
|
46
|
+
super();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override public function initializeLayoutEquation():void {
|
|
50
|
+
if (animator) {
|
|
51
|
+
(animator as TweenMaxAnimator).layoutAlign = "alignStart";
|
|
52
|
+
}
|
|
53
|
+
numOfItems = target.numLayoutElements;
|
|
54
|
+
preferredLayoutElementWidth = 120;
|
|
55
|
+
preferredLayoutElementHeight = 120;
|
|
56
|
+
selectedChild = target.getLayoutElementAt(selectedIndex) as DisplayObject;
|
|
57
|
+
if (!radius) {
|
|
58
|
+
radius = target.width/2 + 100;
|
|
59
|
+
}
|
|
60
|
+
if (!anglePer) {
|
|
61
|
+
anglePer = (Math.PI * 2) / numOfItems;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
override public function getLayoutElementToken(layoutElement:ILayoutElement, index:int):Object {
|
|
66
|
+
var token:Object = new Object();
|
|
67
|
+
|
|
68
|
+
// must do this to set the element width and height before anything else
|
|
69
|
+
setLayoutElementWidth(layoutElement, preferredLayoutElementWidth, token, target.width);
|
|
70
|
+
setLayoutElementHeight(layoutElement, preferredLayoutElementHeight, token, target.height);
|
|
71
|
+
|
|
72
|
+
(layoutElement as UIComponent).includeInLayout = false;
|
|
73
|
+
|
|
74
|
+
// then this is the equation for each item
|
|
75
|
+
token.x = Math.sin((index-selectedIndex) * anglePer) * radius;
|
|
76
|
+
token.z = -(Math.cos((index-selectedIndex) * anglePer) * radius);
|
|
77
|
+
var rot:Number = (-(index-selectedIndex) * anglePer) * (180 / Math.PI);
|
|
78
|
+
token.rotationY = rot;
|
|
79
|
+
token.x = token.x + target.width/2;
|
|
80
|
+
token.y = target.height/2 - token.height/2 + (index * spiralAmount);
|
|
81
|
+
|
|
82
|
+
return token;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|