emergent-core 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,65 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<core:EmergentComponent xmlns:core="com.fourD.emergent.core.*"
|
3
|
+
xmlns="http://ns.adobe.com/mxml/2009"
|
4
|
+
xmlns:layouts="com.fourD.layouts.*"
|
5
|
+
xmlns:actions="com.fourD.actions.*"
|
6
|
+
xmlns:presentation="<%= base_package %>.models.presentation.*"
|
7
|
+
width="100%" height="100%" pivotX="center" pivotY="center">
|
8
|
+
|
9
|
+
<Declarations>
|
10
|
+
<presentation:ContactUsModel id="model"/>
|
11
|
+
</Declarations>
|
12
|
+
|
13
|
+
<!-- States ___________________________________________________________________ -->
|
14
|
+
|
15
|
+
<core:states>
|
16
|
+
<State name="show"/>
|
17
|
+
</core:states>
|
18
|
+
|
19
|
+
<!-- GUI ______________________________________________________________________ -->
|
20
|
+
|
21
|
+
<FxPanel width="100%" height="100%">
|
22
|
+
|
23
|
+
<Text width="100%" height="30" text="Contact Us!" styleName="header"/>
|
24
|
+
|
25
|
+
<HRule width="100%"/>
|
26
|
+
|
27
|
+
<Form id="emailForm" width="100%" >
|
28
|
+
|
29
|
+
<FormItem label="Your Name:" horizontalAlign="left" width="100%">
|
30
|
+
<TextInput id="senderName" width="100%"/>
|
31
|
+
</FormItem>
|
32
|
+
|
33
|
+
<FormItem label="Your E-mail:" width="100%">
|
34
|
+
<TextInput id="senderEmail" width="100%"/>
|
35
|
+
</FormItem>
|
36
|
+
|
37
|
+
<FormItem label="Friend's Name:" horizontalAlign="left" width="100%">
|
38
|
+
<TextInput id="sendToName" width="100%"/>
|
39
|
+
</FormItem>
|
40
|
+
|
41
|
+
<FormItem label="Friend's E-mail:" width="100%">
|
42
|
+
<TextInput id="sendToEmail" width="100%"/>
|
43
|
+
</FormItem>
|
44
|
+
|
45
|
+
<FormItem label="Message" horizontalAlign="left" width="100%">
|
46
|
+
<TextArea id="emailMessage" width="100%" height="100"/>
|
47
|
+
</FormItem>
|
48
|
+
|
49
|
+
<FormItem width="100%">
|
50
|
+
<Spacer width="200" />
|
51
|
+
<Button id="submitBtn" label="Submit"/>
|
52
|
+
</FormItem>
|
53
|
+
</Form>
|
54
|
+
|
55
|
+
<HBox styleName="cbStyle">
|
56
|
+
<CheckBox label="Check to send a copy to yourself" id="cb"/>
|
57
|
+
</HBox>
|
58
|
+
|
59
|
+
<HRule width="100%"/>
|
60
|
+
|
61
|
+
<Label styleName="footer">
|
62
|
+
<htmlText><![CDATA[<a href="http://www.4ddesignlab.com" target="_blank" ><b>www.4ddesignlab.com</b></a>]]></htmlText>
|
63
|
+
</Label>
|
64
|
+
</FxPanel>
|
65
|
+
</core:EmergentComponent>
|
data/rails_generators/emergent_config/templates/app/flex/application/views/document/document.mxml
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
|
3
|
+
<!-- Copyright 2008 Theo Hultberg/Iconara -->
|
4
|
+
|
5
|
+
<VBox xmlns="http://ns.adobe.com/mxml/2009" xmlns:map="<%= base_package %>.controllers.map.*"
|
6
|
+
xmlns:presentation="<%= base_package %>.models.presentation.*"
|
7
|
+
xmlns:presenter="<%= base_package %>.views.pages.*"
|
8
|
+
width="100%" height="100%"
|
9
|
+
label="{model.displayTitle}"
|
10
|
+
paddingLeft="5" paddingRight="5" paddingTop="5" paddingBottom="5">
|
11
|
+
|
12
|
+
<Script>
|
13
|
+
<![CDATA[
|
14
|
+
|
15
|
+
import <%= base_package %>.models.domain.Document;
|
16
|
+
|
17
|
+
import <%= base_package %>.controllers.command.Undoable;
|
18
|
+
|
19
|
+
import <%= base_package %>.models.presentation.DocumentModel;
|
20
|
+
|
21
|
+
]]>
|
22
|
+
</Script>
|
23
|
+
|
24
|
+
<Declarations>
|
25
|
+
<presentation:DocumentModel id="model"/>
|
26
|
+
<!--
|
27
|
+
The event map that is the local controller. Notice that the data property
|
28
|
+
is injected into the event map here, as the document.
|
29
|
+
-->
|
30
|
+
<map:DocumentMap dispatcher="{this}" doc="{Document(data)}"/>
|
31
|
+
</Declarations>
|
32
|
+
|
33
|
+
<HBox width="100%" height="100%">
|
34
|
+
<VBox height="100%" width="30%">
|
35
|
+
<TextInput id="titleField" width="100%"
|
36
|
+
text="{model.document.content.title}"
|
37
|
+
change="{model.document.content.title = titleField.text}"/>
|
38
|
+
|
39
|
+
<TextInput id="subTitleField" width="100%"
|
40
|
+
text="{model.document.content.subTitle}"
|
41
|
+
change="{model.document.content.subTitle = subTitleField.text}"/>
|
42
|
+
|
43
|
+
<TextInput id="menuTitleField" width="100%"
|
44
|
+
text="{model.document.content.menuTitle}"
|
45
|
+
change="{model.document.content.menuTitle = menuTitleField.text}"/>
|
46
|
+
|
47
|
+
<TextArea id="abstractTextField" width="100%" height="100%"
|
48
|
+
text="{model.document.content.abstract}"
|
49
|
+
change="{model.document.content.abstract = abstractTextField.text}"/>
|
50
|
+
</VBox>
|
51
|
+
|
52
|
+
<RichTextEditor id="bodyField" width="100%" height="100%"
|
53
|
+
htmlText="{model.document.content.body}"
|
54
|
+
change="{model.document.content.body = bodyField.text}"/>
|
55
|
+
</HBox>
|
56
|
+
|
57
|
+
<HBox width="70%">
|
58
|
+
<Button label="Undo" click="model.undo()" enabled="{model.undoButtonEnabled}"/>
|
59
|
+
<Button label="Redo" click="model.redo()" enabled="{model.redoButtonEnabled}"/>
|
60
|
+
|
61
|
+
<ComboBox id="undoHistory" dataProvider="{model.undoHistory}"
|
62
|
+
labelFunction="{model.labelForUndoable}"
|
63
|
+
prompt="Undo history"
|
64
|
+
change="{model.restore(Undoable(undoHistory.selectedItem))}"/>
|
65
|
+
|
66
|
+
<Spacer width="100%"/>
|
67
|
+
|
68
|
+
<Button label="Save" click="model.save()" enabled="{model.saveButtonEnabled}"/>
|
69
|
+
</HBox>
|
70
|
+
|
71
|
+
</VBox>
|
data/rails_generators/emergent_config/templates/app/flex/application/views/document/documents.mxml
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
|
3
|
+
<!-- Copyright 2008 Theo Hultberg/Iconara -->
|
4
|
+
|
5
|
+
<VBox xmlns="http://www.adobe.com/2006/mxml" xmlns:view="example.view.*"
|
6
|
+
width="100%" height="100%">
|
7
|
+
|
8
|
+
<creationComplete>onCreationComplete(event)</creationComplete>
|
9
|
+
|
10
|
+
<Script>
|
11
|
+
<![CDATA[
|
12
|
+
|
13
|
+
import flash.utils.Dictionary;
|
14
|
+
|
15
|
+
import mx.binding.utils.BindingUtils;
|
16
|
+
|
17
|
+
import mx.events.CollectionEvent;
|
18
|
+
|
19
|
+
import mx.collections.ICollectionView;
|
20
|
+
|
21
|
+
import mx.core.UIComponent;
|
22
|
+
import mx.core.Container;
|
23
|
+
|
24
|
+
import <%= base_package %>.models.factory.DocumentViewFactory;
|
25
|
+
import <%= base_package %>.models.domain.Document;
|
26
|
+
import <%= base_package %>.models.presentation.DocumentsModel;
|
27
|
+
|
28
|
+
|
29
|
+
/** This is the presentation model object for this view, it is injected by the application controller when view is created. */
|
30
|
+
[Bindable]
|
31
|
+
public var model:DocumentsModel;
|
32
|
+
|
33
|
+
/** This factory is used to create document views, it is injected by the application controller when the view is created. */
|
34
|
+
[Bindable]
|
35
|
+
public var documentViewFactory:DocumentViewFactory;
|
36
|
+
|
37
|
+
|
38
|
+
/**
|
39
|
+
* A dictionary to keep track of which document is displayed in which view.
|
40
|
+
*/
|
41
|
+
private var documentToView : Dictionary;
|
42
|
+
|
43
|
+
|
44
|
+
private function onCreationComplete( event : Event ) : void {
|
45
|
+
// we want to be notified when the open documents collection object changes,
|
46
|
+
// note that this is not the same as listening for when the collection changes,
|
47
|
+
// see openDocumentsChanged for further explanation
|
48
|
+
BindingUtils.bindSetter(openDocumentsChanged, this, ["model", "openDocuments"]);
|
49
|
+
|
50
|
+
// we also want to know when the current document changes
|
51
|
+
BindingUtils.bindSetter(currentDocumentChanged, this, ["model", "currentDocument"]);
|
52
|
+
|
53
|
+
documentToView = new Dictionary();
|
54
|
+
}
|
55
|
+
|
56
|
+
private function openDocumentsChanged( openDocuments : ICollectionView ) : void {
|
57
|
+
// this is run when the openDocuments property on the presentation model changes, which
|
58
|
+
// should only be once (but we can't assume that), it is not the same as when the collection
|
59
|
+
// changes (e.g. when an item is added or removed from the collection).
|
60
|
+
|
61
|
+
if ( openDocuments != null ) {
|
62
|
+
// listen for change events to be able to react to the opening and closing of documents
|
63
|
+
// the listener is weakly referenced because we are only notified after the collection object
|
64
|
+
// has changed, not before, and so have no possibility of removing the listener cleanly
|
65
|
+
openDocuments.addEventListener(CollectionEvent.COLLECTION_CHANGE, onOpenDocumentsChanged, false, 0, true);
|
66
|
+
|
67
|
+
syncDocuments();
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
private function currentDocumentChanged( d : Document ) : void {
|
72
|
+
syncDocuments();
|
73
|
+
}
|
74
|
+
|
75
|
+
private function onOpenDocumentsChanged( event : Event ) : void {
|
76
|
+
syncDocuments();
|
77
|
+
}
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Calls a method by the same name on the presentation model, but also resets the
|
81
|
+
* selected item on the open documents selector.
|
82
|
+
*/
|
83
|
+
private function openDocument( doc : Document ) : void {
|
84
|
+
model.openDocument(doc);
|
85
|
+
|
86
|
+
// make sure the documents selector always shows the prompt
|
87
|
+
documentsSelector.selectedIndex = -1;
|
88
|
+
}
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Synchronizes the application state version of which documents are open with this view's state by
|
92
|
+
* removing any document views whose document is no longer open, creates views for open documents
|
93
|
+
* that don't have a view yet, and makes sure that the current document is the selected tab.
|
94
|
+
*/
|
95
|
+
private function syncDocuments( ) : void {
|
96
|
+
removeClosedDocuments();
|
97
|
+
createOpenedDocuments();
|
98
|
+
selectCurrentDocument();
|
99
|
+
}
|
100
|
+
|
101
|
+
/**
|
102
|
+
* See syncDocuments.
|
103
|
+
*/
|
104
|
+
private function removeClosedDocuments( ) : void {
|
105
|
+
for ( var doc : * in documentToView ) {
|
106
|
+
// for each child in documentToView see if it is in the openDocuments collection
|
107
|
+
// if not remove it from both documentToView and documentsContainer
|
108
|
+
// (the "doc" variable is untyped because of a bug in the compiler, the variable of
|
109
|
+
// a for-in-loop has to be typed as string)
|
110
|
+
|
111
|
+
if ( ! model.isOpen(doc) ) {
|
112
|
+
var view : Container = documentToView[doc];
|
113
|
+
|
114
|
+
documentsContainer.removeChild(view);
|
115
|
+
|
116
|
+
delete documentToView[doc];
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
/**
|
122
|
+
* See syncDocuments.
|
123
|
+
*/
|
124
|
+
private function createOpenedDocuments( ) : void {
|
125
|
+
for each ( var doc : Document in model.openDocuments ) {
|
126
|
+
// for each document in openDocuments see if it is in the documentToView dictionary
|
127
|
+
// if not create a new view and add it to both documentToView and documentsContainer
|
128
|
+
|
129
|
+
if ( documentToView[doc] == null ) {
|
130
|
+
var view : Container = documentViewFactory.createDocumentView(doc);
|
131
|
+
|
132
|
+
documentsContainer.addChild(view);
|
133
|
+
documentsContainer.selectedIndex = documentsContainer.numChildren - 1;
|
134
|
+
|
135
|
+
documentToView[doc] = view;
|
136
|
+
}
|
137
|
+
}
|
138
|
+
}
|
139
|
+
|
140
|
+
/**
|
141
|
+
* See syncDocuments.
|
142
|
+
*/
|
143
|
+
private function selectCurrentDocument( ) : void {
|
144
|
+
if ( model.currentDocument != null ) {
|
145
|
+
var documentView : Container = documentToView[model.currentDocument];
|
146
|
+
|
147
|
+
if ( documentView != null ) {
|
148
|
+
documentsContainer.selectedChild = documentView;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
]]>
|
154
|
+
</Script>
|
155
|
+
|
156
|
+
<HBox width="100%">
|
157
|
+
<ComboBox id="documentsSelector">
|
158
|
+
<prompt>Open document</prompt>
|
159
|
+
<dataProvider>{model.documents}</dataProvider>
|
160
|
+
<labelField>title</labelField>
|
161
|
+
<change>openDocument(Document(documentsSelector.selectedItem))</change>
|
162
|
+
<enabled>{model.openSelectorEnabled}</enabled>
|
163
|
+
</ComboBox>
|
164
|
+
|
165
|
+
<Button>
|
166
|
+
<label>Delete current document</label>
|
167
|
+
<click>model.deleteCurrentDocument()</click>
|
168
|
+
<enabled>{model.deleteButtonEnabled}</enabled>
|
169
|
+
</Button>
|
170
|
+
|
171
|
+
<Button>
|
172
|
+
<label>Close current document</label>
|
173
|
+
<click>model.closeCurrentDocument()</click>
|
174
|
+
<enabled>{model.closeButtonEnabled}</enabled>
|
175
|
+
</Button>
|
176
|
+
|
177
|
+
<Spacer width="100%"/>
|
178
|
+
|
179
|
+
<!--
|
180
|
+
Currently only plain documents are supported, but in the future you will be able
|
181
|
+
to choose between plain and rich text documents.
|
182
|
+
|
183
|
+
<Button>
|
184
|
+
<label>New plain document</label>
|
185
|
+
<click>model.newPlainDocument()</click>
|
186
|
+
</Button>
|
187
|
+
<Button>
|
188
|
+
<label>New rich text document</label>
|
189
|
+
<click>model.newRichDocument()</click>
|
190
|
+
</Button>
|
191
|
+
-->
|
192
|
+
|
193
|
+
<Button>
|
194
|
+
<label>New document</label>
|
195
|
+
<click>model.newPlainDocument()</click>
|
196
|
+
</Button>
|
197
|
+
</HBox>
|
198
|
+
|
199
|
+
<TabNavigator id="documentsContainer" width="100%" height="100%"/>
|
200
|
+
|
201
|
+
</VBox>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
|
3
|
+
<!-- Copyright 2008 Theo Hultberg/Iconara -->
|
4
|
+
|
5
|
+
<view:DocumentView
|
6
|
+
xmlns:view="<%= base_package %>.views.document.*"
|
7
|
+
xmlns:mx="http://ns.adobe.com/mxml/2009">
|
8
|
+
<!--
|
9
|
+
This view currently does nothing different from PlainDocumentView, but the idea is that
|
10
|
+
in the future it will support rich tex editing.
|
11
|
+
-->
|
12
|
+
</view:DocumentView>
|
data/rails_generators/emergent_config/templates/app/flex/application/views/gallery/gallery.mxml
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<core:EmergentComponent xmlns:core="com.fourD.emergent.core.*"
|
3
|
+
xmlns:mx="http://ns.adobe.com/mxml/2009"
|
4
|
+
xmlns:layouts="com.fourD.layouts.*"
|
5
|
+
xmlns:actions="com.fourD.actions.*"
|
6
|
+
width="100%" height="100%" pivotX="center" pivotY="center">
|
7
|
+
|
8
|
+
<!-- States ___________________________________________________________________ -->
|
9
|
+
|
10
|
+
<core:states>
|
11
|
+
<mx:State name="show"/>
|
12
|
+
</core:states>
|
13
|
+
|
14
|
+
<!-- GUI ______________________________________________________________________ -->
|
15
|
+
|
16
|
+
<mx:Group width="100%" height="100%">
|
17
|
+
<mx:layout>
|
18
|
+
<layouts:CarouselLayout container="{this}">
|
19
|
+
<layouts:action>
|
20
|
+
<actions:SimpleLayoutAction/>
|
21
|
+
</layouts:action>
|
22
|
+
</layouts:CarouselLayout>
|
23
|
+
</mx:layout>
|
24
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture3.png')"/>
|
25
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture4.png')"/>
|
26
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture5.png')"/>
|
27
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture6.png')"/>
|
28
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture7.png')"/>
|
29
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture8.png')"/>
|
30
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture9.png')"/>
|
31
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture10.png')"/>
|
32
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture11.png')"/>
|
33
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture12.png')"/>
|
34
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture13.png')"/>
|
35
|
+
<mx:Image source="@Embed('assets/images/alexgrey/Picture14.png')"/>
|
36
|
+
</mx:Group>
|
37
|
+
</core:EmergentComponent>
|
@@ -0,0 +1,58 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<core:EmergentComponent xmlns:core="com.fourD.emergent.core.*"
|
3
|
+
xmlns="http://ns.adobe.com/mxml/2009"
|
4
|
+
xmlns:layouts="com.fourD.emergent.layouts.*"
|
5
|
+
xmlns:actions="com.fourD.emergent.actions.*"
|
6
|
+
xmlns:presentation="<%= base_package %>.models.presentation.*"
|
7
|
+
xmlns:url="http://www.allurent.com/2006/urlkit"
|
8
|
+
width="100%" height="100%" pivotX="center" pivotY="center">
|
9
|
+
|
10
|
+
<Declarations>
|
11
|
+
<presentation:HomeModel id="model"/>
|
12
|
+
|
13
|
+
<!-- Used to set the current component in the states -->
|
14
|
+
<Object id="urlComponent"/>
|
15
|
+
|
16
|
+
<url:UrlRuleSet id="urlRules">
|
17
|
+
<url:UrlValueRule urlFormat="/*" sourceValue="currentState" />
|
18
|
+
<url:UrlDelegateRule rule="{urlComponent.urlRules}"/>
|
19
|
+
</url:UrlRuleSet>
|
20
|
+
</Declarations>
|
21
|
+
|
22
|
+
<!-- States ___________________________________________________________________ -->
|
23
|
+
|
24
|
+
<core:states>
|
25
|
+
<State name="show"/>
|
26
|
+
</core:states>
|
27
|
+
|
28
|
+
<!-- GUI ______________________________________________________________________ -->
|
29
|
+
|
30
|
+
<FxPanel width="100%" height="100%">
|
31
|
+
<core:EmergentComponent id="container" pivotX="center" pivotY="top"
|
32
|
+
width="100%" height="100%" x="{this.width/2}" y="120">
|
33
|
+
<Group width="100%" height="20%">
|
34
|
+
<layout>
|
35
|
+
<layouts:CarouselLayout radius="{this.width/4}" container="{container}">
|
36
|
+
<layouts:action>
|
37
|
+
<actions:SimpleLayoutAction/>
|
38
|
+
</layouts:action>
|
39
|
+
</layouts:CarouselLayout>
|
40
|
+
</layout>
|
41
|
+
<Image source="@Embed('assets/images/alexgrey/Picture3.png')"/>
|
42
|
+
<Image source="@Embed('assets/images/alexgrey/Picture4.png')"/>
|
43
|
+
<Image source="@Embed('assets/images/alexgrey/Picture5.png')"/>
|
44
|
+
<Image source="@Embed('assets/images/alexgrey/Picture6.png')"/>
|
45
|
+
<Image source="@Embed('assets/images/alexgrey/Picture7.png')"/>
|
46
|
+
<Image source="@Embed('assets/images/alexgrey/Picture8.png')"/>
|
47
|
+
<Image source="@Embed('assets/images/alexgrey/Picture9.png')"/>
|
48
|
+
<Image source="@Embed('assets/images/alexgrey/Picture10.png')"/>
|
49
|
+
</Group>
|
50
|
+
</core:EmergentComponent>
|
51
|
+
|
52
|
+
<FxTextArea id="textArea" width="100%" height="100%">
|
53
|
+
<content>
|
54
|
+
<String source="assets/html/lorem.html" />
|
55
|
+
</content>
|
56
|
+
</FxTextArea>
|
57
|
+
</FxPanel>
|
58
|
+
</core:EmergentComponent>
|
data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_presenter.as
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
package <%= base_package %>.views.home {
|
2
|
+
|
3
|
+
import com.fourD.emergent.animators.FourDTweenCollection;
|
4
|
+
import com.fourD.emergent.core.EmergentPresenter;
|
5
|
+
|
6
|
+
import flash.utils.*;
|
7
|
+
import flash.display.MovieClip;
|
8
|
+
|
9
|
+
import mx.core.Container;
|
10
|
+
import mx.core.UIComponent;
|
11
|
+
import mx.events.FlexEvent;
|
12
|
+
import mx.events.PropertyChangeEvent
|
13
|
+
|
14
|
+
import <%= base_package %>.views.pages.PagesView;
|
15
|
+
import <%= base_package %>.views.home.HomeView;
|
16
|
+
|
17
|
+
public class HomePresenter extends EmergentPresenter
|
18
|
+
{
|
19
|
+
// all the tweens you could ever desire :)
|
20
|
+
public var t:FourDTweenCollection;
|
21
|
+
public var troparchy:PagesTroparchy;
|
22
|
+
|
23
|
+
// possible refactor so these are injected from somewhere?!
|
24
|
+
public function get homeView():HomeView { return this.view as HomeView; }
|
25
|
+
public function get homeModel():HomeModel { return view.model as HomeModel; }
|
26
|
+
|
27
|
+
public function HomePresenter() {
|
28
|
+
t = new FourDTweenCollection();
|
29
|
+
|
30
|
+
//ChangeWatcher.watch(model, ['pages'], initialize);
|
31
|
+
//ChangeWatcher.watch(model, ['currentPage'], initialize);
|
32
|
+
}
|
33
|
+
|
34
|
+
override protected function onCreationComplete(event:FlexEvent):void
|
35
|
+
{
|
36
|
+
troparchy = new HomeTroparchy();
|
37
|
+
troparchy.presenter = this;
|
38
|
+
troparchy.model = model;
|
39
|
+
troparchy.view = homeView;
|
40
|
+
troparchy.dispatcher = this; //localDispatcher;
|
41
|
+
}
|
42
|
+
|
43
|
+
override public function render(content:*):IFactory
|
44
|
+
{
|
45
|
+
if (content.renderer == "HomeTemplate")
|
46
|
+
return new ClassFactory(HomeView);
|
47
|
+
else
|
48
|
+
return new ClassFactory(HomeView);
|
49
|
+
}
|
50
|
+
|
51
|
+
override public function initialize(event:PropertyChangeEvent):void {
|
52
|
+
// property is string of property, like object['property']
|
53
|
+
// source is the object that the property is on
|
54
|
+
var property:* = event.property, source:* = event.source;
|
55
|
+
var newValue:* = event.newValue, oldValue:* = event.oldValue;
|
56
|
+
if (!source[property]) { return; }
|
57
|
+
else {
|
58
|
+
var token:*, data:*;
|
59
|
+
run(troparchy.showLogin, data, token);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
/** This is where you define what can be found in that params object */
|
64
|
+
override protected function executeTweenParams(p:Object=null):void
|
65
|
+
{
|
66
|
+
if (p.callBack) { p.callBack(p.callBackParams); }
|
67
|
+
if (p.view) {
|
68
|
+
if (p.visible) {
|
69
|
+
p.view.visible = p.visible;
|
70
|
+
}
|
71
|
+
if (p.state) {
|
72
|
+
p.view.currentState = p.state;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
public function showPage(args:*):void
|
78
|
+
{
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
data/rails_generators/emergent_config/templates/app/flex/application/views/home/home_troparchy.mxml
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!--
|
3
|
+
* Copyright 2008-2009 (c) Lance Pollard
|
4
|
+
* www.systemsofseven.com/blog
|
5
|
+
* www.4ddesignlab.com
|
6
|
+
* lancejpollard@gmail.com
|
7
|
+
*
|
8
|
+
* Permission is hereby granted, free of charge, to any person
|
9
|
+
* obtaining a copy of this software and associated documentation
|
10
|
+
* files (the "Software"), to deal in the Software without
|
11
|
+
* restriction, including without limitation the rights to use,
|
12
|
+
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
13
|
+
* copies of the Software, and to permit persons to whom the
|
14
|
+
* Software is furnished to do so, subject to the following
|
15
|
+
* conditions:
|
16
|
+
*
|
17
|
+
* The above copyright notice and this permission notice shall be
|
18
|
+
* included in all copies or substantial portions of the Software.
|
19
|
+
*
|
20
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
21
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
22
|
+
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
23
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
24
|
+
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
25
|
+
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
26
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
27
|
+
* OTHER DEALINGS IN THE SOFTWARE.
|
28
|
+
-->
|
29
|
+
<LocalEventMap xmlns="http://mate.asfusion.com/"
|
30
|
+
xmlns:core="com.fourD.emergent.core.*"
|
31
|
+
xmlns:event="com.fourD.emergent.events.*"
|
32
|
+
xmlns:mx="http://ns.adobe.com/mxml/2009">
|
33
|
+
|
34
|
+
<mx:Script>
|
35
|
+
<![CDATA[
|
36
|
+
|
37
|
+
import mx.events.FlexEvent;
|
38
|
+
|
39
|
+
import <%= base_package %>.models.presentation.HomeModel;
|
40
|
+
import <%= base_package %>.views.home.HomeView;
|
41
|
+
import <%= base_package %>.controller.manager.HomeManager;
|
42
|
+
|
43
|
+
[Bindable] public var presenter:HomePresenter;
|
44
|
+
[Bindable] public var view:HomeView;
|
45
|
+
[Bindable] public var manager:HomeManager = new HomeManager();
|
46
|
+
[Bindable] public var model:HomeModel;
|
47
|
+
[Bindable] public var someOtherTroparchy:* = new Object;
|
48
|
+
|
49
|
+
]]>
|
50
|
+
</mx:Script>
|
51
|
+
|
52
|
+
<mx:Declarations>
|
53
|
+
|
54
|
+
<EventHandlers type="{FlexEvent.PREINITIALIZE}">
|
55
|
+
</EventHandlers>
|
56
|
+
|
57
|
+
<Injectors target="{HomeModel}">
|
58
|
+
<PropertyInjector targetKey="content" source="{view}" sourceKey="data"/>
|
59
|
+
</Injectors>
|
60
|
+
|
61
|
+
<core:Tecton id="flipPicture"
|
62
|
+
activateBefore="{[someOtherTroparchy.hideChat]}"
|
63
|
+
activateDuring="{[someOtherTroparchy.showMenu]}"
|
64
|
+
activateAfter="{[someOtherTroparchy.showOtherThing]}">
|
65
|
+
<InlineInvoker method="{presenter.show}"
|
66
|
+
arguments="{['lance']}"/>
|
67
|
+
</core:Tecton>
|
68
|
+
|
69
|
+
<mx:Declarations>
|
70
|
+
|
71
|
+
</LocalEventMap>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<core:EmergentComponent xmlns:core="com.fourD.emergent.core.*"
|
3
|
+
xmlns:mx="http://ns.adobe.com/mxml/2009"
|
4
|
+
xmlns:validators="org.restfulx.validators.*"
|
5
|
+
xmlns:layouts="com.fourD.layouts.*"
|
6
|
+
xmlns:actions="com.fourD.actions.*"
|
7
|
+
xmlns:presentation="<%= base_package %>.models.presentation.*"
|
8
|
+
width="100%" height="100%" pivotX="center" pivotY="center"
|
9
|
+
currentState="login">
|
10
|
+
|
11
|
+
<mx:Script>
|
12
|
+
<![CDATA[
|
13
|
+
import org.restfulx.Rx;
|
14
|
+
]]>
|
15
|
+
</mx:Script>
|
16
|
+
|
17
|
+
<mx:Declarations>
|
18
|
+
<presentation:AuthenticationModel id="model"/>
|
19
|
+
</mx:Declarations>
|
20
|
+
|
21
|
+
<!-- States ___________________________________________________________________ -->
|
22
|
+
|
23
|
+
<core:states>
|
24
|
+
<mx:State name="login"/>
|
25
|
+
</core:states>
|
26
|
+
|
27
|
+
<!-- GUI ______________________________________________________________________ -->
|
28
|
+
|
29
|
+
<mx:Canvas id="loginView" width="100%" height="100%">
|
30
|
+
<mx:Form verticalCenter="0" horizontalCenter="0" id="loginForm" borderStyle="solid" errorString="{model.loginErrorString}">
|
31
|
+
<mx:Canvas backgroundColor="#000000" width="100%" height="50">
|
32
|
+
<mx:Label text="Lance3 / Welcome" styleName="appTitle" x="4" y="2" selectable="false"/>
|
33
|
+
<mx:Label text="A New Universe" styleName="appDescription" x="4" y="27" selectable="false"/>
|
34
|
+
</mx:Canvas>
|
35
|
+
<mx:FormItem label="Username">
|
36
|
+
<mx:TextInput width="190" id="userTextInput" change="{model.session.login = userTextInput.text; model.loginDirty = true}"/>
|
37
|
+
</mx:FormItem>
|
38
|
+
<mx:FormItem label="Password">
|
39
|
+
<mx:TextInput width="190" displayAsPassword="true" id="passwordTextInput"
|
40
|
+
change="{model.session.password = passwordTextInput.text; model.loginDirty = true}"
|
41
|
+
keyDown="model.loginOnEnter(event)"/>
|
42
|
+
</mx:FormItem>
|
43
|
+
<mx:FormItem label="">
|
44
|
+
<mx:Button label="Login" click="model.login()" keyDown="model.loginOnEnter(event)"/>
|
45
|
+
</mx:FormItem>
|
46
|
+
</mx:Form>
|
47
|
+
<mx:Text text="Don't have an account?" verticalCenter="101" horizontalCenter="-80"/>
|
48
|
+
<mx:LinkButton label="Sign Up!" horizontalCenter="18" verticalCenter="101"/>
|
49
|
+
</mx:Canvas>
|
50
|
+
</core:EmergentComponent>
|