browsercms 3.1.5 → 3.3.0.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/cms/base_controller.rb +3 -3
- data/app/controllers/cms/content_block_controller.rb +2 -2
- data/app/controllers/cms/content_controller.rb +5 -4
- data/app/controllers/cms/error_handling.rb +1 -1
- data/app/controllers/cms/routes_controller.rb +4 -5
- data/app/controllers/cms/section_nodes_controller.rb +1 -6
- data/app/controllers/cms/sections_controller.rb +2 -3
- data/app/controllers/cms/tasks_controller.rb +3 -0
- data/app/controllers/cms/users_controller.rb +1 -1
- data/app/helpers/cms/application_helper.rb +137 -34
- data/app/helpers/cms/form_builder.rb +33 -21
- data/app/helpers/cms/page_helper.rb +43 -10
- data/app/helpers/cms/path_helper.rb +1 -1
- data/app/helpers/cms/rendering_helper.rb +3 -4
- data/app/helpers/cms/section_nodes_helper.rb +5 -43
- data/app/models/abstract_file_block.rb +1 -16
- data/app/models/attachment.rb +57 -22
- data/app/models/category.rb +4 -4
- data/app/models/category_type.rb +2 -2
- data/app/models/cms/view_context.rb +46 -0
- data/app/models/connector.rb +7 -6
- data/app/models/content_type.rb +3 -3
- data/app/models/dynamic_view.rb +1 -1
- data/app/models/email_message.rb +2 -2
- data/app/models/file_block.rb +12 -0
- data/app/models/group.rb +4 -4
- data/app/models/group_type.rb +4 -4
- data/app/models/html_block.rb +1 -1
- data/app/models/image_block.rb +12 -0
- data/app/models/link.rb +22 -5
- data/app/models/page.rb +87 -46
- data/app/models/page_route.rb +61 -6
- data/app/models/permission.rb +1 -1
- data/app/models/portlet.rb +14 -4
- data/app/models/section.rb +48 -86
- data/app/models/section_node.rb +25 -40
- data/app/models/site.rb +1 -1
- data/app/models/tag.rb +1 -1
- data/app/models/task.rb +8 -7
- data/app/models/user.rb +2 -7
- data/app/portlets/forgot_password_portlet.rb +6 -2
- data/app/portlets/reset_password_portlet.rb +1 -1
- data/app/views/cms/blocks/_toolbar.html.erb +1 -1
- data/app/views/cms/blocks/_toolbar_for_collection.html.erb +3 -6
- data/app/views/cms/blocks/_toolbar_for_member.html.erb +3 -5
- data/app/views/cms/blocks/edit.html.erb +4 -4
- data/app/views/cms/blocks/index.html.erb +7 -7
- data/app/views/cms/blocks/new.html.erb +4 -4
- data/app/views/cms/blocks/show.html.erb +2 -2
- data/app/views/cms/blocks/usages.html.erb +2 -2
- data/app/views/cms/blocks/versions.html.erb +4 -4
- data/app/views/cms/cache/show.html.erb +2 -2
- data/app/views/cms/categories/_form.html.erb +2 -2
- data/app/views/cms/connectors/new.html.erb +6 -8
- data/app/views/cms/content/no_page.html.erb +1 -1
- data/app/views/cms/content/show.html.erb +2 -7
- data/app/views/cms/dashboard/_page_drafts.html.erb +1 -1
- data/app/views/cms/dashboard/_tasks.html.erb +1 -1
- data/app/views/cms/dashboard/index.html.erb +1 -1
- data/app/views/cms/dynamic_views/_form.html.erb +2 -2
- data/app/views/cms/dynamic_views/index.html.erb +7 -10
- data/app/views/cms/email_messages/show.html.erb +2 -2
- data/app/views/cms/file_blocks/_form.html.erb +4 -4
- data/app/views/cms/form_builder/_cms_fancy_drop_down.html.erb +2 -2
- data/app/views/cms/form_builder/_cms_file_field.html.erb +2 -2
- data/app/views/cms/form_builder/_cms_tag_list.html.erb +2 -2
- data/app/views/cms/form_builder/_cms_text_editor.html.erb +2 -2
- data/app/views/cms/groups/_form.html.erb +5 -5
- data/app/views/cms/groups/_permissions.html.erb +4 -4
- data/app/views/cms/groups/_sections.html.erb +1 -2
- data/app/views/cms/groups/index.html.erb +1 -1
- data/app/views/cms/html_blocks/render.html.erb +1 -1
- data/app/views/cms/image_blocks/_form.html.erb +4 -5
- data/app/views/cms/links/_form.html.erb +1 -1
- data/app/views/cms/links/edit.html.erb +2 -2
- data/app/views/cms/links/new.html.erb +2 -2
- data/app/views/cms/page_routes/_form.html.erb +2 -2
- data/app/views/cms/page_routes/index.html.erb +6 -9
- data/app/views/cms/page_routes/show.html.erb +5 -8
- data/app/views/cms/pages/_edit_connector.html.erb +1 -1
- data/app/views/cms/pages/_form.html.erb +3 -3
- data/app/views/cms/pages/edit.html.erb +2 -2
- data/app/views/cms/pages/new.html.erb +7 -7
- data/app/views/cms/pages/versions.html.erb +4 -4
- data/app/views/cms/redirects/_form.html.erb +2 -2
- data/app/views/cms/redirects/index.html.erb +8 -7
- data/app/views/cms/routes/index.html.erb +2 -2
- data/app/views/cms/section_nodes/_link.html.erb +3 -6
- data/app/views/cms/section_nodes/_node.html.erb +4 -13
- data/app/views/cms/section_nodes/_page.html.erb +7 -13
- data/app/views/cms/section_nodes/_section.html.erb +8 -24
- data/app/views/cms/section_nodes/_section_node.html.erb +10 -0
- data/app/views/cms/section_nodes/index.html.erb +18 -30
- data/app/views/cms/sections/_form.html.erb +4 -6
- data/app/views/cms/sections/edit.html.erb +2 -2
- data/app/views/cms/sections/index.html.erb +3 -3
- data/app/views/cms/sections/new.html.erb +3 -3
- data/app/views/cms/sessions/new.html.erb +3 -3
- data/app/views/cms/shared/_pagination.html.erb +1 -1
- data/app/views/cms/shared/error.html.erb +1 -1
- data/app/views/cms/tags/render.html.erb +2 -2
- data/app/views/cms/tasks/new.html.erb +4 -4
- data/app/views/cms/users/_form.html.erb +3 -3
- data/app/views/cms/users/_toolbar.html.erb +3 -3
- data/app/views/cms/users/change_password.html.erb +5 -5
- data/app/views/cms/users/edit.html.erb +2 -2
- data/app/views/cms/users/index.html.erb +4 -4
- data/app/views/cms/users/new.html.erb +2 -2
- data/app/views/cms/users/show.html.erb +16 -16
- data/app/views/layouts/_cms_toolbar.html.erb +5 -5
- data/app/views/layouts/_page_toolbar.html.erb +11 -11
- data/app/views/layouts/cms/_footer.erb +1 -1
- data/app/views/layouts/cms/_head.html.erb +2 -6
- data/app/views/layouts/cms/administration.html.erb +32 -32
- data/app/views/layouts/cms/content_library.html.erb +5 -5
- data/app/views/layouts/cms/toolbar.html.erb +1 -1
- data/app/views/portlets/email_page/render.html.erb +2 -2
- data/app/views/portlets/forgot_password/render.html.erb +1 -1
- data/app/views/portlets/login/render.html.erb +4 -2
- data/app/views/portlets/reset_password/render.html.erb +1 -1
- data/app/views/tests/pretend/open_with_layout.html.erb +1 -1
- data/bin/bcms +0 -0
- data/bin/bcms-upgrade +232 -0
- data/bin/browsercms +2 -2
- data/browsercms.gemspec +16 -14
- data/db/migrate/20100705083859_browsercms_3_3_0.rb +56 -0
- data/db/seeds.rb +58 -0
- data/doc/guides/html/authentication.html +448 -192
- data/doc/guides/html/build_it_yourself.html +454 -175
- data/doc/guides/html/building_modules.html +451 -220
- data/doc/guides/html/building_templates.html +448 -498
- data/doc/guides/html/content_blocks.html +450 -470
- data/doc/guides/html/customizing_browsercms.html +453 -169
- data/doc/guides/html/deployment_guide.html +443 -82
- data/doc/guides/html/files/bcmsorg.js +28 -0
- data/doc/guides/html/files/clearfix.css +8 -0
- data/doc/guides/html/files/cufon.js +7 -0
- data/doc/guides/html/files/global.css +190 -0
- data/doc/guides/html/files/helvetica.js +91 -0
- data/doc/guides/html/files/jquery.js +11 -0
- data/doc/guides/html/getting_started.html +454 -213
- data/doc/guides/html/index.html +454 -174
- data/doc/guides/html/installing_modules.html +454 -186
- data/doc/guides/html/portlets.html +451 -232
- data/doc/guides/html/user_guide.html +452 -270
- data/doc/guides/html/writing_guides.html +454 -161
- data/lib/acts_as_list.rb +1 -1
- data/lib/browsercms.rb +10 -6
- data/lib/cms/acts.rb +7 -0
- data/lib/cms/authentication.rb +4 -0
- data/lib/cms/authentication/controller.rb +1 -1
- data/lib/cms/behaviors.rb +1 -1
- data/lib/cms/behaviors/archiving.rb +2 -2
- data/lib/cms/behaviors/attaching.rb +28 -43
- data/lib/cms/behaviors/categorizing.rb +1 -1
- data/lib/cms/behaviors/connecting.rb +27 -12
- data/lib/cms/behaviors/dynamic_attributes.rb +8 -5
- data/lib/cms/behaviors/hiding.rb +2 -2
- data/lib/cms/behaviors/publishing.rb +32 -22
- data/lib/cms/behaviors/rendering.rb +41 -18
- data/lib/cms/behaviors/searching.rb +1 -1
- data/lib/cms/behaviors/soft_deleting.rb +58 -29
- data/lib/cms/behaviors/taggable.rb +1 -1
- data/lib/cms/behaviors/userstamping.rb +5 -4
- data/lib/cms/behaviors/versioning.rb +192 -111
- data/lib/cms/content_rendering_support.rb +3 -3
- data/lib/cms/date_picker.rb +23 -0
- data/lib/cms/engine.rb +46 -0
- data/lib/cms/extensions.rb +1 -1
- data/lib/cms/extensions/active_record/errors.rb +2 -2
- data/lib/cms/extensions/hash.rb +4 -2
- data/lib/cms/extensions/string.rb +7 -2
- data/lib/cms/init.rb +32 -21
- data/lib/cms/module.rb +22 -0
- data/lib/cms/module_installation.rb +38 -0
- data/lib/cms/routes.rb +127 -115
- data/lib/cms/version.rb +2 -2
- data/lib/generators/browser_cms.rb +12 -0
- data/lib/generators/browser_cms/cms/USAGE +2 -0
- data/lib/generators/browser_cms/cms/cms_generator.rb +36 -0
- data/{rails_generators/browser_cms → lib/generators/browser_cms/cms}/templates/README +0 -0
- data/{rails_generators/browser_cms_demo_site → lib/generators/browser_cms/demo_site}/USAGE +0 -0
- data/lib/generators/browser_cms/demo_site/demo_site_generator.rb +138 -0
- data/lib/generators/browser_cms/demo_site/templates/demo_site.rake +11 -0
- data/{rails_generators/browser_cms_demo_site/templates/migration.rb → lib/generators/browser_cms/demo_site/templates/migration.erb} +2 -8
- data/lib/generators/cms/content_block/USAGE +22 -0
- data/lib/generators/cms/content_block/content_block_generator.rb +55 -0
- data/{rails_generators → lib/generators/cms}/content_block/templates/_form.html.erb +0 -0
- data/{rails_generators → lib/generators/cms}/content_block/templates/content_block.rb +0 -0
- data/{rails_generators → lib/generators/cms}/content_block/templates/controller.rb +0 -0
- data/{rails_generators → lib/generators/cms}/content_block/templates/functional_test.erb +0 -0
- data/{rails_generators/content_block/templates/migration.rb → lib/generators/cms/content_block/templates/migration.erb} +1 -1
- data/{rails_generators → lib/generators/cms}/content_block/templates/render.html.erb +0 -0
- data/{rails_generators → lib/generators/cms}/content_block/templates/unit_test.erb +0 -0
- data/lib/generators/cms/install/USAGE +8 -0
- data/lib/generators/cms/install/install_generator.rb +20 -0
- data/{rails_generators → lib/generators/cms}/portlet/USAGE +3 -16
- data/lib/generators/cms/portlet/portlet_generator.rb +38 -0
- data/{rails_generators → lib/generators/cms}/portlet/templates/_form.html.erb +0 -0
- data/{rails_generators → lib/generators/cms}/portlet/templates/portlet.rb +0 -0
- data/{rails_generators → lib/generators/cms}/portlet/templates/portlet_helper.rb +0 -0
- data/{rails_generators → lib/generators/cms}/portlet/templates/render.html.erb +0 -0
- data/{rails_generators → lib/generators/cms}/portlet/templates/unit_test.erb +0 -0
- data/{rails_generators → lib/generators/cms}/template/USAGE +1 -1
- data/lib/generators/cms/template/template_generator.rb +18 -0
- data/lib/generators/cms/template/templates/template.erb +2 -0
- data/lib/generators/cms/upgrade_module/README.txt +3 -0
- data/lib/generators/cms/upgrade_module/templates/20100705083859_browsercms_3_3_0.rb +56 -0
- data/lib/generators/cms/upgrade_module/templates/README +1 -0
- data/lib/generators/cms/upgrade_module/templates/USAGE.erb +10 -0
- data/lib/generators/cms/upgrade_module/templates/build_gem.rake +5 -0
- data/lib/generators/cms/upgrade_module/templates/engine.erb +7 -0
- data/lib/generators/cms/upgrade_module/templates/gemspec.erb +25 -0
- data/lib/generators/cms/upgrade_module/templates/gitignore.erb +11 -0
- data/lib/generators/cms/upgrade_module/templates/install.erb +9 -0
- data/lib/generators/cms/upgrade_module/templates/module_file.erb +3 -0
- data/lib/generators/cms/upgrade_module/templates/routes.erb +7 -0
- data/lib/generators/cms/upgrade_module/upgrade_module_generator.rb +61 -0
- data/lib/tasks/build_gem.rake +1 -0
- data/lib/tasks/cms.rake +34 -6
- data/lib/tasks/cucumber.rake +53 -0
- data/lib/tasks/db.rake +2 -2
- data/public/javascripts/cms/application.js +144 -135
- data/public/javascripts/cms/sitemap.js +383 -357
- data/public/javascripts/jquery-ui.js +782 -591
- data/public/javascripts/jquery.cookie.js +38 -43
- data/public/javascripts/jquery.js +13 -8
- data/public/javascripts/jquery.taglist.js +7 -0
- data/public/stylesheets/cms/date_picker.css +49 -40
- data/rails/init.rb +2 -3
- data/templates/blank.rb +13 -7
- data/templates/demo.rb +15 -7
- data/templates/module.rb +12 -75
- metadata +87 -407
- data/app/helpers/cms/content_block_helper.rb +0 -27
- data/app/views/layouts/cms/thickbox.html.erb +0 -24
- data/db/migrate/20120117144039_browsercms315.rb +0 -94
- data/db/migrate/20121114172307_load_seeds.rb +0 -70
- data/lib/cms/addressable.rb +0 -83
- data/lib/cms/error_pages.rb +0 -8
- data/public/images/cms/thickbox/loadingAnimation.gif +0 -0
- data/public/images/cms/thickbox/macFFBgHack.png +0 -0
- data/public/javascripts/jquery.contextMenu.js +0 -211
- data/public/javascripts/jquery.dimensions.js +0 -119
- data/public/javascripts/jquery.thickbox.js +0 -10
- data/public/stylesheets/cms/jquery.contextMenu.css +0 -61
- data/public/stylesheets/cms/thickbox.css +0 -163
- data/rails_generators/browser_cms/USAGE +0 -2
- data/rails_generators/browser_cms/browser_cms_generator.rb +0 -35
- data/rails_generators/browser_cms_demo_site/browser_cms_demo_site_generator.rb +0 -63
- data/rails_generators/content_block/USAGE +0 -32
- data/rails_generators/content_block/content_block_generator.rb +0 -69
- data/rails_generators/portlet/portlet_generator.rb +0 -35
- data/rails_generators/template/template_generator.rb +0 -18
- data/rails_generators/template/templates/template.erb +0 -3
- data/test/custom_assertions.rb +0 -74
- data/test/factories.rb +0 -111
- data/test/factories/sitemap_factories.rb +0 -28
- data/test/fixtures/connectors.yml +0 -97
- data/test/fixtures/content_type_groups.yml +0 -13
- data/test/fixtures/content_types.yml +0 -50
- data/test/fixtures/dynamic_view_versions.yml +0 -26
- data/test/fixtures/dynamic_views.yml +0 -26
- data/test/fixtures/group_permissions.yml +0 -16
- data/test/fixtures/group_sections.yml +0 -31
- data/test/fixtures/group_type_permissions.yml +0 -11
- data/test/fixtures/group_types.yml +0 -25
- data/test/fixtures/groups.yml +0 -25
- data/test/fixtures/html_block_versions.yml +0 -67
- data/test/fixtures/html_blocks.yml +0 -63
- data/test/fixtures/page_versions.yml +0 -265
- data/test/fixtures/pages.yml +0 -85
- data/test/fixtures/permissions.yml +0 -28
- data/test/fixtures/section_nodes.yml +0 -46
- data/test/fixtures/sections.yml +0 -19
- data/test/fixtures/sites.yml +0 -9
- data/test/fixtures/user_group_memberships.yml +0 -11
- data/test/fixtures/users.yml +0 -15
- data/test/functional/cms/cache_controller_test.rb +0 -14
- data/test/functional/cms/categories_controller_test.rb +0 -25
- data/test/functional/cms/connectors_controller_test.rb +0 -60
- data/test/functional/cms/content_block_controller_test.rb +0 -120
- data/test/functional/cms/content_controller_test.rb +0 -439
- data/test/functional/cms/content_types_controller_test.rb +0 -18
- data/test/functional/cms/dashboard_controller_test.rb +0 -16
- data/test/functional/cms/dynamic_views_controller_test.rb +0 -52
- data/test/functional/cms/file_blocks_controller_test.rb +0 -52
- data/test/functional/cms/groups_controller_test.rb +0 -50
- data/test/functional/cms/home_controller_test.rb +0 -156
- data/test/functional/cms/html_blocks_controller_test.rb +0 -164
- data/test/functional/cms/image_blocks_controller_test.rb +0 -82
- data/test/functional/cms/links_controller_test.rb +0 -148
- data/test/functional/cms/pages_controller_test.rb +0 -227
- data/test/functional/cms/portlets_controller_test.rb +0 -67
- data/test/functional/cms/section_nodes_controller_test.rb +0 -112
- data/test/functional/cms/sections_controller_test.rb +0 -227
- data/test/functional/cms/sessions_controller_test.rb +0 -76
- data/test/functional/cms/toolbar_controller_test.rb +0 -64
- data/test/functional/cms/users_controller_test.rb +0 -231
- data/test/functional/tests/pretend_controller_test.rb +0 -57
- data/test/integration/cms/ckeditor_test.rb +0 -30
- data/test/integration/cms/password_management_test.rb +0 -56
- data/test/integration/login_test.rb +0 -14
- data/test/integration/sitemap_performance_test.rb +0 -26
- data/test/selenium-core/Blank.html +0 -7
- data/test/selenium-core/InjectedRemoteRunner.html +0 -8
- data/test/selenium-core/RemoteRunner.html +0 -110
- data/test/selenium-core/SeleniumLog.html +0 -109
- data/test/selenium-core/TestPrompt.html +0 -145
- data/test/selenium-core/TestRunner-splash.html +0 -55
- data/test/selenium-core/TestRunner.hta +0 -176
- data/test/selenium-core/TestRunner.html +0 -176
- data/test/selenium-core/domviewer/butmin.gif +0 -0
- data/test/selenium-core/domviewer/butplus.gif +0 -0
- data/test/selenium-core/domviewer/domviewer.css +0 -298
- data/test/selenium-core/domviewer/domviewer.html +0 -16
- data/test/selenium-core/domviewer/selenium-domviewer.js +0 -205
- data/test/selenium-core/icons/all.png +0 -0
- data/test/selenium-core/icons/continue.png +0 -0
- data/test/selenium-core/icons/continue_disabled.png +0 -0
- data/test/selenium-core/icons/pause.png +0 -0
- data/test/selenium-core/icons/pause_disabled.png +0 -0
- data/test/selenium-core/icons/selected.png +0 -0
- data/test/selenium-core/icons/step.png +0 -0
- data/test/selenium-core/icons/step_disabled.png +0 -0
- data/test/selenium-core/iedoc-core.xml +0 -1515
- data/test/selenium-core/iedoc.xml +0 -1469
- data/test/selenium-core/lib/cssQuery/cssQuery-p.js +0 -6
- data/test/selenium-core/lib/cssQuery/src/cssQuery-level2.js +0 -142
- data/test/selenium-core/lib/cssQuery/src/cssQuery-level3.js +0 -150
- data/test/selenium-core/lib/cssQuery/src/cssQuery-standard.js +0 -53
- data/test/selenium-core/lib/cssQuery/src/cssQuery.js +0 -356
- data/test/selenium-core/lib/prototype.js +0 -2006
- data/test/selenium-core/lib/scriptaculous/builder.js +0 -101
- data/test/selenium-core/lib/scriptaculous/controls.js +0 -815
- data/test/selenium-core/lib/scriptaculous/dragdrop.js +0 -915
- data/test/selenium-core/lib/scriptaculous/effects.js +0 -958
- data/test/selenium-core/lib/scriptaculous/scriptaculous.js +0 -47
- data/test/selenium-core/lib/scriptaculous/slider.js +0 -283
- data/test/selenium-core/lib/scriptaculous/unittest.js +0 -383
- data/test/selenium-core/scripts/find_matching_child.js +0 -69
- data/test/selenium-core/scripts/htmlutils.js +0 -894
- data/test/selenium-core/scripts/injection.html +0 -72
- data/test/selenium-core/scripts/js2html.js +0 -70
- data/test/selenium-core/scripts/narcissus-defs.js +0 -175
- data/test/selenium-core/scripts/narcissus-exec.js +0 -1054
- data/test/selenium-core/scripts/narcissus-parse.js +0 -1003
- data/test/selenium-core/scripts/se2html.js +0 -63
- data/test/selenium-core/scripts/selenium-api.js +0 -2409
- data/test/selenium-core/scripts/selenium-browserbot.js +0 -2203
- data/test/selenium-core/scripts/selenium-browserdetect.js +0 -150
- data/test/selenium-core/scripts/selenium-commandhandlers.js +0 -377
- data/test/selenium-core/scripts/selenium-executionloop.js +0 -175
- data/test/selenium-core/scripts/selenium-logging.js +0 -147
- data/test/selenium-core/scripts/selenium-remoterunner.js +0 -571
- data/test/selenium-core/scripts/selenium-testrunner.js +0 -1333
- data/test/selenium-core/scripts/selenium-version.js +0 -5
- data/test/selenium-core/scripts/user-extensions.js +0 -3
- data/test/selenium-core/scripts/user-extensions.js.sample +0 -75
- data/test/selenium-core/scripts/xmlextras.js +0 -153
- data/test/selenium-core/selenium-logo.png +0 -0
- data/test/selenium-core/selenium-test.css +0 -43
- data/test/selenium-core/selenium.css +0 -299
- data/test/selenium-core/xpath/dom.js +0 -428
- data/test/selenium-core/xpath/misc.js +0 -252
- data/test/selenium-core/xpath/xpath.js +0 -2223
- data/test/selenium/_login_as_cmsadmin.rsel +0 -4
- data/test/selenium/dashboard.rsel +0 -5
- data/test/selenium/html_blocks.rsel +0 -4
- data/test/selenium/login/failed_login.rsel +0 -8
- data/test/selenium/login/successful_login.rsel +0 -9
- data/test/selenium/page_templates.rsel +0 -12
- data/test/selenium/pages/edit_properties.rsel +0 -5
- data/test/selenium/site/view_home_page.rsel +0 -4
- data/test/selenium/sitemap/move_page.rsel +0 -9
- data/test/selenium/sitemap/open_section.rsel +0 -6
- data/test/selenium/sitemap/select_page.rsel +0 -12
- data/test/selenium/sitemap/select_section.rsel +0 -17
- data/test/test_helper.rb +0 -193
- data/test/test_logging.rb +0 -67
- data/test/unit/behaviors/attaching_test.rb +0 -357
- data/test/unit/behaviors/connectable_test.rb +0 -29
- data/test/unit/behaviors/dynamic_attributes_test.rb +0 -38
- data/test/unit/behaviors/publishable_test.rb +0 -84
- data/test/unit/behaviors/searching_test.rb +0 -102
- data/test/unit/behaviors/taggable_test.rb +0 -109
- data/test/unit/behaviors/versioning_test.rb +0 -36
- data/test/unit/extensions/active_record/base_test.rb +0 -10
- data/test/unit/extensions/hash_test.rb +0 -17
- data/test/unit/extensions/integer_test.rb +0 -10
- data/test/unit/helpers/application_helper_test.rb +0 -77
- data/test/unit/helpers/form_builder_test.rb +0 -36
- data/test/unit/helpers/menu_helper_test.rb +0 -242
- data/test/unit/helpers/page_helper_test.rb +0 -67
- data/test/unit/helpers/path_helper_test.rb +0 -57
- data/test/unit/lib/acts_as_content_page_test.rb +0 -72
- data/test/unit/lib/cms/authentication/controller_test.rb +0 -20
- data/test/unit/lib/cms/sitemap_test.rb +0 -206
- data/test/unit/lib/cms_domain_support_test.rb +0 -43
- data/test/unit/lib/command_line_test.rb +0 -70
- data/test/unit/lib/content_block_test.rb +0 -203
- data/test/unit/lib/content_rendering_support_test.rb +0 -40
- data/test/unit/lib/generators_test.rb +0 -40
- data/test/unit/lib/routes_test.rb +0 -57
- data/test/unit/models/attachment_test.rb +0 -116
- data/test/unit/models/category_test.rb +0 -40
- data/test/unit/models/category_type_test.rb +0 -8
- data/test/unit/models/connector_test.rb +0 -152
- data/test/unit/models/content_type_test.rb +0 -56
- data/test/unit/models/email_page_portlet_test.rb +0 -14
- data/test/unit/models/file_block_test.rb +0 -230
- data/test/unit/models/group_test.rb +0 -13
- data/test/unit/models/html_block_test.rb +0 -102
- data/test/unit/models/link_test.rb +0 -52
- data/test/unit/models/page_partial_test.rb +0 -29
- data/test/unit/models/page_route_test.rb +0 -29
- data/test/unit/models/page_template_test.rb +0 -40
- data/test/unit/models/page_test.rb +0 -792
- data/test/unit/models/permission_test.rb +0 -10
- data/test/unit/models/portlet_test.rb +0 -69
- data/test/unit/models/sections_test.rb +0 -264
- data/test/unit/models/site_test.rb +0 -50
- data/test/unit/models/task_test.rb +0 -141
- data/test/unit/models/user_test.rb +0 -352
- data/test/unit/schema_statements_test.rb +0 -41
@@ -1,119 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
|
2
|
-
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
3
|
-
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
4
|
-
*
|
5
|
-
* $LastChangedDate: 2007-12-20 08:46:55 -0600 (Thu, 20 Dec 2007) $
|
6
|
-
* $Rev: 4259 $
|
7
|
-
*
|
8
|
-
* Version: 1.2
|
9
|
-
*
|
10
|
-
* Requires: jQuery 1.2+
|
11
|
-
*/
|
12
|
-
|
13
|
-
(function($){
|
14
|
-
|
15
|
-
$.dimensions = {
|
16
|
-
version: '1.2'
|
17
|
-
};
|
18
|
-
|
19
|
-
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
|
20
|
-
$.each( [ 'Height', 'Width' ], function(i, name){
|
21
|
-
|
22
|
-
// innerHeight and innerWidth
|
23
|
-
$.fn[ 'inner' + name ] = function() {
|
24
|
-
if (!this[0]) return;
|
25
|
-
|
26
|
-
var torl = name == 'Height' ? 'Top' : 'Left', // top or left
|
27
|
-
borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
|
28
|
-
|
29
|
-
return this.is(':visible') ? this[0]['client' + name] : num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
|
30
|
-
};
|
31
|
-
|
32
|
-
// outerHeight and outerWidth
|
33
|
-
$.fn[ 'outer' + name ] = function(options) {
|
34
|
-
if (!this[0]) return;
|
35
|
-
|
36
|
-
var torl = name == 'Height' ? 'Top' : 'Left', // top or left
|
37
|
-
borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
|
38
|
-
|
39
|
-
options = $.extend({ margin: false }, options || {});
|
40
|
-
|
41
|
-
var val = this.is(':visible') ?
|
42
|
-
this[0]['offset' + name] :
|
43
|
-
num( this, name.toLowerCase() )
|
44
|
-
+ num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')
|
45
|
-
+ num(this, 'padding' + torl) + num(this, 'padding' + borr);
|
46
|
-
|
47
|
-
return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
|
48
|
-
};
|
49
|
-
});
|
50
|
-
|
51
|
-
// Create scrollLeft and scrollTop methods
|
52
|
-
$.each( ['Left', 'Top'], function(i, name) {
|
53
|
-
$.fn[ 'scroll' + name ] = function(val) {
|
54
|
-
if (!this[0]) return;
|
55
|
-
|
56
|
-
return val != undefined ?
|
57
|
-
|
58
|
-
// Set the scroll offset
|
59
|
-
this.each(function() {
|
60
|
-
this == window || this == document ?
|
61
|
-
window.scrollTo(
|
62
|
-
name == 'Left' ? val : $(window)[ 'scrollLeft' ](),
|
63
|
-
name == 'Top' ? val : $(window)[ 'scrollTop' ]()
|
64
|
-
) :
|
65
|
-
this[ 'scroll' + name ] = val;
|
66
|
-
}) :
|
67
|
-
|
68
|
-
// Return the scroll offset
|
69
|
-
this[0] == window || this[0] == document ?
|
70
|
-
self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] ||
|
71
|
-
$.boxModel && document.documentElement[ 'scroll' + name ] ||
|
72
|
-
document.body[ 'scroll' + name ] :
|
73
|
-
this[0][ 'scroll' + name ];
|
74
|
-
};
|
75
|
-
});
|
76
|
-
|
77
|
-
$.fn.extend({
|
78
|
-
position: function() {
|
79
|
-
var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;
|
80
|
-
|
81
|
-
if (elem) {
|
82
|
-
// Get *real* offsetParent
|
83
|
-
offsetParent = this.offsetParent();
|
84
|
-
|
85
|
-
// Get correct offsets
|
86
|
-
offset = this.offset();
|
87
|
-
parentOffset = offsetParent.offset();
|
88
|
-
|
89
|
-
// Subtract element margins
|
90
|
-
offset.top -= num(elem, 'marginTop');
|
91
|
-
offset.left -= num(elem, 'marginLeft');
|
92
|
-
|
93
|
-
// Add offsetParent borders
|
94
|
-
parentOffset.top += num(offsetParent, 'borderTopWidth');
|
95
|
-
parentOffset.left += num(offsetParent, 'borderLeftWidth');
|
96
|
-
|
97
|
-
// Subtract the two offsets
|
98
|
-
results = {
|
99
|
-
top: offset.top - parentOffset.top,
|
100
|
-
left: offset.left - parentOffset.left
|
101
|
-
};
|
102
|
-
}
|
103
|
-
|
104
|
-
return results;
|
105
|
-
},
|
106
|
-
|
107
|
-
offsetParent: function() {
|
108
|
-
var offsetParent = this[0].offsetParent;
|
109
|
-
while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') )
|
110
|
-
offsetParent = offsetParent.offsetParent;
|
111
|
-
return $(offsetParent);
|
112
|
-
}
|
113
|
-
});
|
114
|
-
|
115
|
-
function num(el, prop) {
|
116
|
-
return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;
|
117
|
-
};
|
118
|
-
|
119
|
-
})(jQuery);
|
@@ -1,10 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Thickbox 3 - One Box To Rule Them All.
|
3
|
-
* By Cody Lindley (http://www.codylindley.com)
|
4
|
-
* Copyright (c) 2007 cody lindley
|
5
|
-
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
|
6
|
-
*/
|
7
|
-
|
8
|
-
var tb_pathToImage = "/images/cms/thickbox/loadingAnimation.gif";
|
9
|
-
|
10
|
-
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('$(o).2S(9(){1u(\'a.18, 3n.18, 3i.18\');1w=1p 1t();1w.L=2H});9 1u(b){$(b).s(9(){6 t=X.Q||X.1v||M;6 a=X.u||X.23;6 g=X.1N||P;19(t,a,g);X.2E();H P})}9 19(d,f,g){3m{3(2t o.v.J.2i==="2g"){$("v","11").r({A:"28%",z:"28%"});$("11").r("22","2Z");3(o.1Y("1F")===M){$("v").q("<U 5=\'1F\'></U><4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}n{3(o.1Y("B")===M){$("v").q("<4 5=\'B\'></4><4 5=\'8\'></4>");$("#B").s(G)}}3(1K()){$("#B").1J("2B")}n{$("#B").1J("2z")}3(d===M){d=""}$("v").q("<4 5=\'K\'><1I L=\'"+1w.L+"\' /></4>");$(\'#K\').2y();6 h;3(f.O("?")!==-1){h=f.3l(0,f.O("?"))}n{h=f}6 i=/\\.2s$|\\.2q$|\\.2m$|\\.2l$|\\.2k$/;6 j=h.1C().2h(i);3(j==\'.2s\'||j==\'.2q\'||j==\'.2m\'||j==\'.2l\'||j==\'.2k\'){1D="";1G="";14="";1z="";1x="";R="";1n="";1r=P;3(g){E=$("a[@1N="+g+"]").36();25(D=0;((D<E.1c)&&(R===""));D++){6 k=E[D].u.1C().2h(i);3(!(E[D].u==f)){3(1r){1z=E[D].Q;1x=E[D].u;R="<1e 5=\'1X\'>&1d;&1d;<a u=\'#\'>2T &2R;</a></1e>"}n{1D=E[D].Q;1G=E[D].u;14="<1e 5=\'1U\'>&1d;&1d;<a u=\'#\'>&2O; 2N</a></1e>"}}n{1r=1b;1n="1t "+(D+1)+" 2L "+(E.1c)}}}S=1p 1t();S.1g=9(){S.1g=M;6 a=2x();6 x=a[0]-1M;6 y=a[1]-1M;6 b=S.z;6 c=S.A;3(b>x){c=c*(x/b);b=x;3(c>y){b=b*(y/c);c=y}}n 3(c>y){b=b*(y/c);c=y;3(b>x){c=c*(x/b);b=x}}13=b+30;1a=c+2G;$("#8").q("<a u=\'\' 5=\'1L\' Q=\'1o\'><1I 5=\'2F\' L=\'"+f+"\' z=\'"+b+"\' A=\'"+c+"\' 23=\'"+d+"\'/></a>"+"<4 5=\'2D\'>"+d+"<4 5=\'2C\'>"+1n+14+R+"</4></4><4 5=\'2A\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4>");$("#Z").s(G);3(!(14==="")){9 12(){3($(o).N("s",12)){$(o).N("s",12)}$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1D,1G,g);H P}$("#1U").s(12)}3(!(R==="")){9 1i(){$("#8").C();$("v").q("<4 5=\'8\'></4>");19(1z,1x,g);H P}$("#1X").s(1i)}o.1h=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}n 3(I==3k){3(!(R=="")){o.1h="";1i()}}n 3(I==3j){3(!(14=="")){o.1h="";12()}}};16();$("#K").C();$("#1L").s(G);$("#8").r({Y:"T"})};S.L=f}n{6 l=f.2r(/^[^\\?]+\\??/,\'\');6 m=2p(l);13=(m[\'z\']*1)+30||3h;1a=(m[\'A\']*1)+3g||3f;W=13-30;V=1a-3e;3(f.O(\'2j\')!=-1){1E=f.1B(\'3d\');$("#15").C();3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\' Q=\'1o\'>1l</a> 1k 1j 1s</4></4><U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\' > </U>")}n{$("#B").N();$("#8").q("<U 1W=\'0\' 2d=\'0\' L=\'"+1E[0]+"\' 5=\'15\' 1v=\'15"+1f.2c(1f.1y()*2b)+"\' 1g=\'1m()\' J=\'z:"+(W+29)+"p;A:"+(V+17)+"p;\'> </U>")}}n{3($("#8").r("Y")!="T"){3(m[\'1A\']!="1b"){$("#8").q("<4 5=\'2f\'><4 5=\'1H\'>"+d+"</4><4 5=\'2e\'><a u=\'#\' 5=\'Z\'>1l</a> 1k 1j 1s</4></4><4 5=\'F\' J=\'z:"+W+"p;A:"+V+"p\'></4>")}n{$("#B").N();$("#8").q("<4 5=\'F\' 3c=\'3b\' J=\'z:"+W+"p;A:"+V+"p;\'></4>")}}n{$("#F")[0].J.z=W+"p";$("#F")[0].J.A=V+"p";$("#F")[0].3a=0;$("#1H").11(d)}}$("#Z").s(G);3(f.O(\'37\')!=-1){$("#F").q($(\'#\'+m[\'26\']).1T());$("#8").24(9(){$(\'#\'+m[\'26\']).q($("#F").1T())});16();$("#K").C();$("#8").r({Y:"T"})}n 3(f.O(\'2j\')!=-1){16();3($.1q.35){$("#K").C();$("#8").r({Y:"T"})}}n{$("#F").34(f+="&1y="+(1p 33().32()),9(){16();$("#K").C();1u("#F a.18");$("#8").r({Y:"T"})})}}3(!m[\'1A\']){o.21=9(e){3(e==M){I=2w.2v}n{I=e.2u}3(I==27){G()}}}}31(e){}}9 1m(){$("#K").C();$("#8").r({Y:"T"})}9 G(){$("#2Y").N("s");$("#Z").N("s");$("#8").2X("2W",9(){$(\'#8,#B,#1F\').2V("24").N().C()});$("#K").C();3(2t o.v.J.2i=="2g"){$("v","11").r({A:"1Z",z:"1Z"});$("11").r("22","")}o.1h="";o.21="";H P}9 16(){$("#8").r({2U:\'-\'+20((13/2),10)+\'p\',z:13+\'p\'});3(!(1V.1q.2Q&&1V.1q.2P<7)){$("#8").r({38:\'-\'+20((1a/2),10)+\'p\'})}}9 2p(a){6 b={};3(!a){H b}6 c=a.1B(/[;&]/);25(6 i=0;i<c.1c;i++){6 d=c[i].1B(\'=\');3(!d||d.1c!=2){39}6 e=2a(d[0]);6 f=2a(d[1]);f=f.2r(/\\+/g,\' \');b[e]=f}H b}9 2x(){6 a=o.2M;6 w=1S.2o||1R.2o||(a&&a.1Q)||o.v.1Q;6 h=1S.1P||1R.1P||(a&&a.2n)||o.v.2n;1O=[w,h];H 1O}9 1K(){6 a=2K.2J.1C();3(a.O(\'2I\')!=-1&&a.O(\'3o\')!=-1){H 1b}}',62,211,'|||if|div|id|var||TB_window|function||||||||||||||else|document|px|append|css|click||href|body||||width|height|TB_overlay|remove|TB_Counter|TB_TempArray|TB_ajaxContent|tb_remove|return|keycode|style|TB_load|src|null|unbind|indexOf|false|title|TB_NextHTML|imgPreloader|block|iframe|ajaxContentH|ajaxContentW|this|display|TB_closeWindowButton||html|goPrev|TB_WIDTH|TB_PrevHTML|TB_iframeContent|tb_position||thickbox|tb_show|TB_HEIGHT|true|length|nbsp|span|Math|onload|onkeydown|goNext|Esc|or|close|tb_showIframe|TB_imageCount|Close|new|browser|TB_FoundURL|Key|Image|tb_init|name|imgLoader|TB_NextURL|random|TB_NextCaption|modal|split|toLowerCase|TB_PrevCaption|urlNoQuery|TB_HideSelect|TB_PrevURL|TB_ajaxWindowTitle|img|addClass|tb_detectMacXFF|TB_ImageOff|150|rel|arrayPageSize|innerHeight|clientWidth|self|window|children|TB_prev|jQuery|frameborder|TB_next|getElementById|auto|parseInt|onkeyup|overflow|alt|unload|for|inlineId||100||unescape|1000|round|hspace|TB_closeAjaxWindow|TB_title|undefined|match|maxHeight|TB_iframe|bmp|gif|png|clientHeight|innerWidth|tb_parseQuery|jpeg|replace|jpg|typeof|which|keyCode|event|tb_getPageSize|show|TB_overlayBG|TB_closeWindow|TB_overlayMacFFBGHack|TB_secondLine|TB_caption|blur|TB_Image|60|tb_pathToImage|mac|userAgent|navigator|of|documentElement|Prev|lt|version|msie|gt|ready|Next|marginLeft|trigger|fast|fadeOut|TB_imageOff|hidden||catch|getTime|Date|load|safari|get|TB_inline|marginTop|continue|scrollTop|TB_modal|class|TB_|45|440|40|630|input|188|190|substr|try|area|firefox'.split('|'),0,{}))
|
@@ -1,61 +0,0 @@
|
|
1
|
-
/* Generic context menu styles */
|
2
|
-
.contextMenu {
|
3
|
-
position: absolute;
|
4
|
-
width: 120px;
|
5
|
-
z-index: 99999;
|
6
|
-
border: solid 1px #CCC;
|
7
|
-
background: #EEE;
|
8
|
-
padding: 0px;
|
9
|
-
margin: 0px;
|
10
|
-
display: none;
|
11
|
-
}
|
12
|
-
|
13
|
-
.contextMenu LI {
|
14
|
-
list-style: none;
|
15
|
-
padding: 0px;
|
16
|
-
margin: 0px;
|
17
|
-
}
|
18
|
-
|
19
|
-
.contextMenu A {
|
20
|
-
color: #333;
|
21
|
-
text-decoration: none;
|
22
|
-
display: block;
|
23
|
-
line-height: 20px;
|
24
|
-
height: 20px;
|
25
|
-
background-position: 6px center;
|
26
|
-
background-repeat: no-repeat;
|
27
|
-
outline: none;
|
28
|
-
padding: 1px 5px;
|
29
|
-
padding-left: 28px;
|
30
|
-
}
|
31
|
-
|
32
|
-
.contextMenu LI.hover A {
|
33
|
-
color: #FFF;
|
34
|
-
background-color: #3399FF;
|
35
|
-
}
|
36
|
-
|
37
|
-
.contextMenu LI.disabled A {
|
38
|
-
color: #AAA;
|
39
|
-
cursor: default;
|
40
|
-
}
|
41
|
-
|
42
|
-
.contextMenu LI.hover.disabled A {
|
43
|
-
background-color: transparent;
|
44
|
-
}
|
45
|
-
|
46
|
-
.contextMenu LI.separator {
|
47
|
-
border-top: solid 1px #CCC;
|
48
|
-
}
|
49
|
-
|
50
|
-
/*
|
51
|
-
Adding Icons
|
52
|
-
|
53
|
-
You can add icons to the context menu by adding
|
54
|
-
classes to the respective LI element(s)
|
55
|
-
*/
|
56
|
-
|
57
|
-
.contextMenu LI.view A { background-image: url(/images/cms/icons/actions/view.png); }
|
58
|
-
.contextMenu LI.publish A { background-image: url(/images/cms/icons/status/published.gif); }
|
59
|
-
.contextMenu LI.edit A { background-image: url(/images/cms/icons/actions/edit.png); }
|
60
|
-
.contextMenu LI.delete A { background-image: url(/images/cms/icons/actions/delete.png); }
|
61
|
-
|
@@ -1,163 +0,0 @@
|
|
1
|
-
/* ----------------------------------------------------------------------------------------------------------------*/
|
2
|
-
/* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/
|
3
|
-
/* ----------------------------------------------------------------------------------------------------------------*/
|
4
|
-
*{padding: 0; margin: 0;}
|
5
|
-
|
6
|
-
/* ----------------------------------------------------------------------------------------------------------------*/
|
7
|
-
/* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/
|
8
|
-
/* ----------------------------------------------------------------------------------------------------------------*/
|
9
|
-
#TB_window {
|
10
|
-
font: 12px Arial, Helvetica, sans-serif;
|
11
|
-
color: #333333;
|
12
|
-
}
|
13
|
-
|
14
|
-
#TB_secondLine {
|
15
|
-
font: 10px Arial, Helvetica, sans-serif;
|
16
|
-
color:#666666;
|
17
|
-
}
|
18
|
-
|
19
|
-
#TB_window a:link {color: #666666;}
|
20
|
-
#TB_window a:visited {color: #666666;}
|
21
|
-
#TB_window a:hover {color: #000;}
|
22
|
-
#TB_window a:active {color: #666666;}
|
23
|
-
#TB_window a:focus{color: #666666;}
|
24
|
-
|
25
|
-
/* ----------------------------------------------------------------------------------------------------------------*/
|
26
|
-
/* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/
|
27
|
-
/* ----------------------------------------------------------------------------------------------------------------*/
|
28
|
-
#TB_overlay {
|
29
|
-
position: fixed;
|
30
|
-
z-index:100;
|
31
|
-
top: 0px;
|
32
|
-
left: 0px;
|
33
|
-
height:100%;
|
34
|
-
width:100%;
|
35
|
-
}
|
36
|
-
|
37
|
-
.TB_overlayMacFFBGHack {background: url(/images/cms/thickbox/macFFBgHack.png) repeat;}
|
38
|
-
.TB_overlayBG {
|
39
|
-
background-color:#000;
|
40
|
-
filter:alpha(opacity=75);
|
41
|
-
-moz-opacity: 0.75;
|
42
|
-
opacity: 0.75;
|
43
|
-
}
|
44
|
-
|
45
|
-
* html #TB_overlay { /* ie6 hack */
|
46
|
-
position: absolute;
|
47
|
-
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
|
48
|
-
}
|
49
|
-
|
50
|
-
#TB_window {
|
51
|
-
position: fixed;
|
52
|
-
background: #ffffff;
|
53
|
-
z-index: 102;
|
54
|
-
color:#000000;
|
55
|
-
display:none;
|
56
|
-
border: 4px solid #525252;
|
57
|
-
text-align:left;
|
58
|
-
top:50%;
|
59
|
-
left:50%;
|
60
|
-
}
|
61
|
-
|
62
|
-
* html #TB_window { /* ie6 hack */
|
63
|
-
position: absolute;
|
64
|
-
margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
|
65
|
-
}
|
66
|
-
|
67
|
-
#TB_window img#TB_Image {
|
68
|
-
display:block;
|
69
|
-
margin: 15px 0 0 15px;
|
70
|
-
border-right: 1px solid #ccc;
|
71
|
-
border-bottom: 1px solid #ccc;
|
72
|
-
border-top: 1px solid #666;
|
73
|
-
border-left: 1px solid #666;
|
74
|
-
}
|
75
|
-
|
76
|
-
#TB_caption{
|
77
|
-
height:25px;
|
78
|
-
padding:7px 30px 10px 25px;
|
79
|
-
float:left;
|
80
|
-
}
|
81
|
-
|
82
|
-
#TB_closeWindow{
|
83
|
-
height:25px;
|
84
|
-
padding:11px 25px 10px 0;
|
85
|
-
float:right;
|
86
|
-
}
|
87
|
-
|
88
|
-
#TB_closeAjaxWindow{
|
89
|
-
padding:7px 10px 5px 0;
|
90
|
-
margin-bottom:1px;
|
91
|
-
text-align:right;
|
92
|
-
float:right;
|
93
|
-
}
|
94
|
-
|
95
|
-
#TB_ajaxWindowTitle{
|
96
|
-
float:left;
|
97
|
-
padding:7px 0 5px 10px;
|
98
|
-
margin-bottom:1px;
|
99
|
-
}
|
100
|
-
|
101
|
-
#TB_title{
|
102
|
-
background-color:#e8e8e8;
|
103
|
-
height:27px;
|
104
|
-
}
|
105
|
-
|
106
|
-
#TB_ajaxContent{
|
107
|
-
clear:both;
|
108
|
-
padding:2px 15px 15px 15px;
|
109
|
-
overflow:auto;
|
110
|
-
text-align:left;
|
111
|
-
line-height:1.4em;
|
112
|
-
}
|
113
|
-
|
114
|
-
#TB_ajaxContent.TB_modal{
|
115
|
-
padding:15px;
|
116
|
-
}
|
117
|
-
|
118
|
-
#TB_ajaxContent p{
|
119
|
-
padding:5px 0px 5px 0px;
|
120
|
-
}
|
121
|
-
|
122
|
-
#TB_load{
|
123
|
-
position: fixed;
|
124
|
-
display:none;
|
125
|
-
height:13px;
|
126
|
-
width:208px;
|
127
|
-
z-index:103;
|
128
|
-
top: 50%;
|
129
|
-
left: 50%;
|
130
|
-
margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */
|
131
|
-
}
|
132
|
-
|
133
|
-
* html #TB_load { /* ie6 hack */
|
134
|
-
position: absolute;
|
135
|
-
margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
|
136
|
-
}
|
137
|
-
|
138
|
-
#TB_HideSelect{
|
139
|
-
z-index:99;
|
140
|
-
position:fixed;
|
141
|
-
top: 0;
|
142
|
-
left: 0;
|
143
|
-
background-color:#fff;
|
144
|
-
border:none;
|
145
|
-
filter:alpha(opacity=0);
|
146
|
-
-moz-opacity: 0;
|
147
|
-
opacity: 0;
|
148
|
-
height:100%;
|
149
|
-
width:100%;
|
150
|
-
}
|
151
|
-
|
152
|
-
* html #TB_HideSelect { /* ie6 hack */
|
153
|
-
position: absolute;
|
154
|
-
height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px');
|
155
|
-
}
|
156
|
-
|
157
|
-
#TB_iframeContent{
|
158
|
-
clear:both;
|
159
|
-
border:none;
|
160
|
-
margin-bottom:-1px;
|
161
|
-
margin-top:1px;
|
162
|
-
_margin-bottom:1px;
|
163
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
class BrowserCmsGenerator < Rails::Generator::Base
|
2
|
-
#We need to be able to define a different source root for each gem
|
3
|
-
#So we'll just set the baseline source root to "/",
|
4
|
-
#and append the appropriate path when we call file
|
5
|
-
def source_root
|
6
|
-
"/"
|
7
|
-
end
|
8
|
-
def manifest
|
9
|
-
record do |m|
|
10
|
-
#Cms.generator_paths is an Array of Arrays
|
11
|
-
#Each Array has the root as the first element
|
12
|
-
#and the array of "files" as the second element
|
13
|
-
#Each element in files is actually a Dir.glob pattern string
|
14
|
-
Cms.generator_paths.each do |src_root, files|
|
15
|
-
copy_files m, src_root, files
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
def copy_files(m, src_root, files)
|
20
|
-
dirs = []
|
21
|
-
files.each do |d|
|
22
|
-
Dir[File.join(src_root, d)].each do |f|
|
23
|
-
if File.file?(f)
|
24
|
-
dir = File.dirname(f.gsub("#{src_root}/",''))
|
25
|
-
unless dirs.include?(dir)
|
26
|
-
m.directory dir
|
27
|
-
dirs << dir
|
28
|
-
end
|
29
|
-
relative_dest_file_name = f.gsub("#{src_root}/", "")
|
30
|
-
m.file Cms.scrub_path(f), relative_dest_file_name
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,63 +0,0 @@
|
|
1
|
-
class BrowserCmsDemoSiteGenerator < Rails::Generator::Base
|
2
|
-
|
3
|
-
def source_root
|
4
|
-
"/"
|
5
|
-
end
|
6
|
-
|
7
|
-
def templates_dir(file=nil)
|
8
|
-
f = File.expand_path(File.join(File.dirname(__FILE__), "templates", file))
|
9
|
-
Cms.scrub_path(f)
|
10
|
-
end
|
11
|
-
|
12
|
-
def manifest
|
13
|
-
record do |m|
|
14
|
-
# Copy all public files
|
15
|
-
Dir["#{Cms.root}/public/themes/blue_steel/**/*"].each do |f|
|
16
|
-
if File.file?(f)
|
17
|
-
file_name = f.sub("#{Cms.root}/", '')
|
18
|
-
m.directory File.dirname(file_name)
|
19
|
-
m.file Cms.scrub_path(f), file_name
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
m.migration_template templates_dir('migration.rb'), 'db/migrate', :assigns => {
|
24
|
-
:data => data,
|
25
|
-
:page_templates => page_templates,
|
26
|
-
:page_partials => page_partials
|
27
|
-
}, :migration_file_name => "load_demo_site_data"
|
28
|
-
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def data
|
33
|
-
open(File.join(Cms.root, "db", "demo", "data.rb")){|f| f.read}
|
34
|
-
end
|
35
|
-
|
36
|
-
# Returns an array of strings that are ruby code.
|
37
|
-
# Each string is a hash that should be passed to the create_page_template method
|
38
|
-
# in the migration
|
39
|
-
def page_templates
|
40
|
-
Dir["#{Cms.root}/db/demo/page_templates/*.erb"].map do |f|
|
41
|
-
name, format, handler = File.basename(f).split('.')
|
42
|
-
%Q{create_page_template(:#{name},
|
43
|
-
:name => "#{name}", :format => "#{format}", :handler => "#{handler}",
|
44
|
-
:body => <<-HTML
|
45
|
-
#{open(f){|f| f.read}}
|
46
|
-
HTML
|
47
|
-
)}
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
def page_partials
|
52
|
-
Dir["#{Cms.root}/db/demo/page_partials/*.erb"].map do |f|
|
53
|
-
name, format, handler = File.basename(f).split('.')
|
54
|
-
%Q{create_page_partial(:#{name},
|
55
|
-
:name => "#{name}", :format => "#{format}", :handler => "#{handler}",
|
56
|
-
:body => <<-HTML
|
57
|
-
#{open(f){|f| f.read}}
|
58
|
-
HTML
|
59
|
-
)}
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
end
|