browsercms 3.3.4 → 3.4.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +24 -0
- data/.rvmrc +2 -0
- data/COPYRIGHT.txt +26 -0
- data/GPL.txt +674 -0
- data/Gemfile +29 -0
- data/Gemfile.lock +192 -0
- data/README.markdown +4 -14
- data/Rakefile +97 -0
- data/app/assets/images/browsercms/.gitkeep +0 -0
- data/{public → app/assets}/images/cms/administration/user_browser_bg.gif +0 -0
- data/{public → app/assets}/images/cms/bg.png +0 -0
- data/{public → app/assets}/images/cms/bl_curve.png +0 -0
- data/{public → app/assets}/images/cms/bottom_cap.png +0 -0
- data/{public → app/assets}/images/cms/bottom_cap_content.png +0 -0
- data/{public → app/assets}/images/cms/browse.gif +0 -0
- data/{public → app/assets}/images/cms/browser_media_logo.png +0 -0
- data/{public → app/assets}/images/cms/browsercms_logo.png +0 -0
- data/{public → app/assets}/images/cms/buttons/button.png +0 -0
- data/{public → app/assets}/images/cms/buttons/button_bg.png +0 -0
- data/{public → app/assets}/images/cms/buttons/button_cap.png +0 -0
- data/{public → app/assets}/images/cms/buttons/button_cap_h.png +0 -0
- data/{public → app/assets}/images/cms/buttons/button_cap_off.gif +0 -0
- data/{public → app/assets}/images/cms/buttons/button_cap_off_middle.gif +0 -0
- data/{public → app/assets}/images/cms/buttons/button_h.png +0 -0
- data/{public → app/assets}/images/cms/buttons/button_left_bg.png +0 -0
- data/{public → app/assets}/images/cms/buttons/button_off.png +0 -0
- data/{public → app/assets}/images/cms/buttons/button_off_middle.png +0 -0
- data/{public → app/assets}/images/cms/buttons/delete_x.png +0 -0
- data/{public → app/assets}/images/cms/buttons/delete_x_disabled.png +0 -0
- data/{public → app/assets}/images/cms/buttons/delete_x_h.png +0 -0
- data/{public → app/assets}/images/cms/buttons/sm_button.gif +0 -0
- data/{public → app/assets}/images/cms/buttons/sm_button_2.gif +0 -0
- data/{public → app/assets}/images/cms/buttons/sm_button_2_h.gif +0 -0
- data/{public → app/assets}/images/cms/buttons/sm_button_h.gif +0 -0
- data/{public → app/assets}/images/cms/containers/add.gif +0 -0
- data/{public → app/assets}/images/cms/containers/alpha.png +0 -0
- data/{public → app/assets}/images/cms/containers/beta.png +0 -0
- data/{public → app/assets}/images/cms/containers/delete.gif +0 -0
- data/{public → app/assets}/images/cms/containers/down.gif +0 -0
- data/{public → app/assets}/images/cms/containers/edit.gif +0 -0
- data/{public → app/assets}/images/cms/containers/up.gif +0 -0
- data/{public → app/assets}/images/cms/containers/view.gif +0 -0
- data/{public → app/assets}/images/cms/content_bg.gif +0 -0
- data/{public → app/assets}/images/cms/dashboard/bottom_cap.png +0 -0
- data/{public → app/assets}/images/cms/dashboard/bottom_cap_content.png +0 -0
- data/{public → app/assets}/images/cms/dashboard/header_bg.gif +0 -0
- data/{public → app/assets}/images/cms/dashboard/header_left_bg.gif +0 -0
- data/{public → app/assets}/images/cms/dashboard/table_header_bg.gif +0 -0
- data/{public → app/assets}/images/cms/dashboard/top_cap.png +0 -0
- data/{public → app/assets}/images/cms/dashed.gif +0 -0
- data/{public → app/assets}/images/cms/datepicker/clear.gif +0 -0
- data/{public → app/assets}/images/cms/datepicker/close.gif +0 -0
- data/{public → app/assets}/images/cms/dk_button_l.gif +0 -0
- data/{public → app/assets}/images/cms/dk_button_r.gif +0 -0
- data/{public → app/assets}/images/cms/dot.png +0 -0
- data/{public → app/assets}/images/cms/draft_status.gif +0 -0
- data/{public → app/assets}/images/cms/gray_long_bg.gif +0 -0
- data/{public → app/assets}/images/cms/icons/actions/add.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/config.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/connect.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/delete.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/down.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/edit.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/folder.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/folder_add.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/folder_delete.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/folder_edit.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/folder_move.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/folder_open.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/history.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/home.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/left.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/link.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/page.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/page_add.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/page_edit.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/page_move.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/redo.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/refresh.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/right.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/root_folder.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/root_link.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/root_page.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/undo.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/up.png +0 -0
- data/{public → app/assets}/images/cms/icons/actions/view.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/doc.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/file.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/gif.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/htm.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/pdf.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/ppt.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/swf.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/txt.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/xls.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/xml.png +0 -0
- data/{public → app/assets}/images/cms/icons/file_types/zip.png +0 -0
- data/{public → app/assets}/images/cms/icons/status/archived.gif +0 -0
- data/{public → app/assets}/images/cms/icons/status/draft.gif +0 -0
- data/{public → app/assets}/images/cms/icons/status/hidden.gif +0 -0
- data/{public → app/assets}/images/cms/icons/status/locked.gif +0 -0
- data/{public → app/assets}/images/cms/icons/status/published.gif +0 -0
- data/{public → app/assets}/images/cms/icons/status/unlocked.gif +0 -0
- data/{public → app/assets}/images/cms/icons/user.png +0 -0
- data/{public → app/assets}/images/cms/login_bg.jpg +0 -0
- data/{public → app/assets}/images/cms/login_bottom.jpg +0 -0
- data/{public → app/assets}/images/cms/login_top.gif +0 -0
- data/{public → app/assets}/images/cms/lt_button_bg.gif +0 -0
- data/{public → app/assets}/images/cms/lt_button_l.gif +0 -0
- data/{public → app/assets}/images/cms/lt_button_r.gif +0 -0
- data/{public → app/assets}/images/cms/menu.png +0 -0
- data/{public → app/assets}/images/cms/menu/block_cap_h.gif +0 -0
- data/{public → app/assets}/images/cms/menu/bottom_cap.png +0 -0
- data/{public → app/assets}/images/cms/menu/bottom_cap_menu.png +0 -0
- data/{public → app/assets}/images/cms/menu/bottom_cap_menu_first.png +0 -0
- data/{public → app/assets}/images/cms/menu/menu_header_first_bg.gif +0 -0
- data/{public → app/assets}/images/cms/menu/selected_block_cap.gif +0 -0
- data/{public → app/assets}/images/cms/menu/top_cap.png +0 -0
- data/{public → app/assets}/images/cms/menu/top_cap_menu_header.png +0 -0
- data/{public → app/assets}/images/cms/menu_h.gif +0 -0
- data/{public → app/assets}/images/cms/menu_header.png +0 -0
- data/{public → app/assets}/images/cms/menu_open.png +0 -0
- data/{public → app/assets}/images/cms/menu_open_bg.gif +0 -0
- data/{public → app/assets}/images/cms/nav.png +0 -0
- data/{public → app/assets}/images/cms/nav/on_bg.gif +0 -0
- data/{public → app/assets}/images/cms/nav_admin.gif +0 -0
- data/{public → app/assets}/images/cms/nav_admin_h.gif +0 -0
- data/{public → app/assets}/images/cms/nav_admin_on.gif +0 -0
- data/{public → app/assets}/images/cms/nav_cap.png +0 -0
- data/{public → app/assets}/images/cms/nav_cap_h.gif +0 -0
- data/{public → app/assets}/images/cms/nav_content_library.gif +0 -0
- data/{public → app/assets}/images/cms/nav_content_library_h.gif +0 -0
- data/{public → app/assets}/images/cms/nav_content_library_on.gif +0 -0
- data/{public → app/assets}/images/cms/nav_dash.gif +0 -0
- data/{public → app/assets}/images/cms/nav_dash_h.gif +0 -0
- data/{public → app/assets}/images/cms/nav_dash_on.gif +0 -0
- data/{public → app/assets}/images/cms/nav_h.gif +0 -0
- data/{public → app/assets}/images/cms/nav_sitemap.gif +0 -0
- data/{public → app/assets}/images/cms/nav_sitemap_h.gif +0 -0
- data/{public → app/assets}/images/cms/nav_sitemap_on.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_bg.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_inset_bg.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_inset_draft_bg.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_inset_draft_l.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_inset_draft_r.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_inset_l.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_inset_published_bg.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_inset_published_l.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_inset_published_r.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_inset_r.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_l.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/page_toolbar_r.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/status_draft_bg.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/status_draft_l.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/status_l.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/status_published_bg.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/status_published_l.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/visual_editor_bg.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/visual_editor_end.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/visual_editor_r.gif +0 -0
- data/{public → app/assets}/images/cms/page_toolbar/visual_editor_state_bg.gif +0 -0
- data/{public → app/assets}/images/cms/pages/add_connectable.gif +0 -0
- data/{public → app/assets}/images/cms/pages/connect_connectable.gif +0 -0
- data/{public → app/assets}/images/cms/pages/container_border.gif +0 -0
- data/{public → app/assets}/images/cms/pages/container_border_l.gif +0 -0
- data/{public → app/assets}/images/cms/pages/container_border_r.gif +0 -0
- data/{public → app/assets}/images/cms/pages/delete_connectable.gif +0 -0
- data/{public → app/assets}/images/cms/pages/down_connectable.gif +0 -0
- data/{public → app/assets}/images/cms/pages/down_connectable_disabled.gif +0 -0
- data/{public → app/assets}/images/cms/pages/edit_connectable.gif +0 -0
- data/{public → app/assets}/images/cms/pages/edit_connectable_2.gif +0 -0
- data/{public → app/assets}/images/cms/pages/show_connectable.gif +0 -0
- data/{public → app/assets}/images/cms/pages/up_connectable.gif +0 -0
- data/{public → app/assets}/images/cms/pages/up_connectable_disabled.gif +0 -0
- data/{public → app/assets}/images/cms/pagination/first.gif +0 -0
- data/{public → app/assets}/images/cms/pagination/first_h.gif +0 -0
- data/{public → app/assets}/images/cms/pagination/input.gif +0 -0
- data/{public → app/assets}/images/cms/pagination/last.gif +0 -0
- data/{public → app/assets}/images/cms/pagination/last_h.gif +0 -0
- data/{public → app/assets}/images/cms/pagination/next.gif +0 -0
- data/{public → app/assets}/images/cms/pagination/next_h.gif +0 -0
- data/{public → app/assets}/images/cms/pagination/previous.gif +0 -0
- data/{public → app/assets}/images/cms/pagination/previous_h.gif +0 -0
- data/{public → app/assets}/images/cms/published_status.gif +0 -0
- data/{public → app/assets}/images/cms/search.png +0 -0
- data/{public → app/assets}/images/cms/search_submit.gif +0 -0
- data/{public → app/assets}/images/cms/search_submit_h.gif +0 -0
- data/{public → app/assets}/images/cms/searchbox_gradient.gif +0 -0
- data/{public → app/assets}/images/cms/select_bg.gif +0 -0
- data/{public → app/assets}/images/cms/select_bg_2.gif +0 -0
- data/{public → app/assets}/images/cms/sitemap/bottom_cap.png +0 -0
- data/{public → app/assets}/images/cms/sitemap/buffer_caps.png +0 -0
- data/{public → app/assets}/images/cms/sitemap/contract.png +0 -0
- data/{public → app/assets}/images/cms/sitemap/corners.gif +0 -0
- data/{public → app/assets}/images/cms/sitemap/corners_hover.gif +0 -0
- data/{public → app/assets}/images/cms/sitemap/divider.gif +0 -0
- data/{public → app/assets}/images/cms/sitemap/expand.png +0 -0
- data/{public → app/assets}/images/cms/sitemap/gradient.gif +0 -0
- data/{public → app/assets}/images/cms/sitemap/gray_contract.png +0 -0
- data/{public → app/assets}/images/cms/sitemap/gray_expand.png +0 -0
- data/{public → app/assets}/images/cms/sitemap/no_contents.png +0 -0
- data/{public → app/assets}/images/cms/sitemap/site_root_cap.png +0 -0
- data/{public → app/assets}/images/cms/sitemap/tooltip.gif +0 -0
- data/{public → app/assets}/images/cms/sitemap/top_cap_content.png +0 -0
- data/{public → app/assets}/images/cms/solid.gif +0 -0
- data/{public → app/assets}/images/cms/table/bl.gif +0 -0
- data/{public → app/assets}/images/cms/table/br.gif +0 -0
- data/{public → app/assets}/images/cms/table/divider.gif +0 -0
- data/{public → app/assets}/images/cms/table/td_cap_first_h.gif +0 -0
- data/{public → app/assets}/images/cms/table/td_cap_first_s.gif +0 -0
- data/{public → app/assets}/images/cms/table/td_cap_last_h.gif +0 -0
- data/{public → app/assets}/images/cms/table/td_cap_last_s.gif +0 -0
- data/{public → app/assets}/images/cms/table/td_last_bg.gif +0 -0
- data/{public → app/assets}/images/cms/table/th_bg.gif +0 -0
- data/{public → app/assets}/images/cms/table/th_divider.gif +0 -0
- data/{public → app/assets}/images/cms/table/th_last_bg.gif +0 -0
- data/{public → app/assets}/images/cms/table/tl.gif +0 -0
- data/{public → app/assets}/images/cms/table/tr.gif +0 -0
- data/{public → app/assets}/images/cms/table/tr_bg.gif +0 -0
- data/{public → app/assets}/images/cms/toolbar_bg.png +0 -0
- data/{public → app/assets}/images/cms/top_cap.png +0 -0
- data/{public → app/assets}/images/cms/top_cap_content.png +0 -0
- data/{public → app/assets}/images/cms/top_cap_menu_header.png +0 -0
- data/{public → app/assets}/images/cms/user_search_submit.gif +0 -0
- data/{public → app/assets}/images/cms/usercontrols_bg.png +0 -0
- data/{public → app/assets}/images/cms/usercontrols_bg_cap.png +0 -0
- data/app/assets/javascripts/browsercms/application.js +9 -0
- data/app/assets/javascripts/cms/application.js +11 -0
- data/app/assets/javascripts/cms/content_library.js +102 -0
- data/app/assets/javascripts/cms/core_library.js +158 -0
- data/app/assets/javascripts/cms/sitemap.js.erb +464 -0
- data/app/assets/javascripts/cms/toolbar.js +5 -0
- data/app/assets/javascripts/jquery.taglist.js +143 -0
- data/app/assets/stylesheets/browsercms/application.css +7 -0
- data/app/assets/stylesheets/cms/administration.css.erb +91 -0
- data/app/assets/stylesheets/cms/application.css.erb +170 -0
- data/{public → app/assets}/stylesheets/cms/block.css +0 -0
- data/app/assets/stylesheets/cms/buttons.css.erb +120 -0
- data/app/assets/stylesheets/cms/content_library.css.erb +139 -0
- data/{public → app/assets}/stylesheets/cms/content_types.css +0 -0
- data/app/assets/stylesheets/cms/dashboard.css.erb +118 -0
- data/app/assets/stylesheets/cms/data_table.css.erb.erb +156 -0
- data/app/assets/stylesheets/cms/date_picker.css.erb +82 -0
- data/app/assets/stylesheets/cms/form_layout.css.erb +281 -0
- data/app/assets/stylesheets/cms/login.css.erb +78 -0
- data/app/assets/stylesheets/cms/menu.css.erb +116 -0
- data/app/assets/stylesheets/cms/nav.css.erb +99 -0
- data/app/assets/stylesheets/cms/page_toolbar.css.erb +135 -0
- data/{public → app/assets}/stylesheets/cms/reset.css +0 -0
- data/app/assets/stylesheets/cms/selectbox.css.erb +56 -0
- data/app/assets/stylesheets/cms/sitemap.css.erb +390 -0
- data/{public → app/assets}/stylesheets/cms/taglist.css +0 -0
- data/app/controllers/browsercms/application_controller.rb +4 -0
- data/app/controllers/cms/application_controller.rb +5 -2
- data/app/controllers/cms/attachments_controller.rb +3 -1
- data/app/controllers/cms/base_controller.rb +3 -1
- data/app/controllers/cms/cache_controller.rb +3 -1
- data/app/controllers/cms/categories_controller.rb +6 -4
- data/app/controllers/cms/category_types_controller.rb +5 -3
- data/app/controllers/cms/connectors_controller.rb +3 -1
- data/app/controllers/cms/content_block_controller.rb +26 -21
- data/app/controllers/cms/content_controller.rb +14 -7
- data/app/controllers/cms/content_types_controller.rb +3 -1
- data/app/controllers/cms/dashboard_controller.rb +5 -3
- data/app/controllers/cms/dynamic_views_controller.rb +58 -51
- data/app/controllers/cms/email_messages_controller.rb +3 -1
- data/app/controllers/cms/file_blocks_controller.rb +3 -1
- data/app/controllers/cms/groups_controller.rb +4 -2
- data/app/controllers/cms/home_controller.rb +5 -3
- data/app/controllers/cms/html_blocks_controller.rb +4 -2
- data/app/controllers/cms/image_blocks_controller.rb +3 -1
- data/app/controllers/cms/links_controller.rb +9 -7
- data/app/controllers/cms/page_route_conditions_controller.rb +3 -1
- data/app/controllers/cms/page_route_options_controller.rb +3 -1
- data/app/controllers/cms/page_route_requirements_controller.rb +3 -1
- data/app/controllers/cms/page_routes_controller.rb +6 -4
- data/app/controllers/cms/pages_controller.rb +8 -6
- data/app/controllers/cms/portlet_controller.rb +18 -15
- data/app/controllers/cms/portlets_controller.rb +8 -6
- data/app/controllers/cms/redirects_controller.rb +3 -1
- data/app/controllers/cms/resource_controller.rb +10 -4
- data/app/controllers/cms/routes_controller.rb +4 -2
- data/app/controllers/cms/section_nodes_controller.rb +3 -1
- data/app/controllers/cms/sections_controller.rb +12 -12
- data/app/controllers/cms/sessions_controller.rb +4 -2
- data/app/controllers/cms/tags_controller.rb +5 -1
- data/app/controllers/cms/tasks_controller.rb +6 -4
- data/app/controllers/cms/toolbar_controller.rb +4 -2
- data/app/controllers/cms/users_controller.rb +8 -6
- data/app/helpers/cms/application_helper.rb +17 -25
- data/app/helpers/cms/content_block_helper.rb +27 -0
- data/app/helpers/cms/menu_helper.rb +1 -1
- data/app/helpers/cms/page_helper.rb +13 -12
- data/app/helpers/cms/path_helper.rb +59 -24
- data/app/helpers/cms/rendering_helper.rb +1 -0
- data/app/helpers/cms/template_support.rb +4 -1
- data/app/helpers/cms/ui_elements_helper.rb +21 -0
- data/app/models/cms/abstract_file_block.rb +41 -0
- data/app/models/cms/attachment.rb +184 -0
- data/app/models/cms/category.rb +41 -0
- data/app/models/cms/category_type.rb +37 -0
- data/app/models/cms/connector.rb +83 -0
- data/app/models/cms/content_type.rb +130 -0
- data/app/models/cms/content_type_group.rb +13 -0
- data/app/models/cms/dynamic_view.rb +102 -0
- data/app/models/cms/email_message.rb +31 -0
- data/app/models/cms/email_message_mailer.rb +12 -0
- data/app/models/cms/file_block.rb +11 -0
- data/app/models/cms/forgot_password_mailer.rb +14 -0
- data/app/models/cms/group.rb +49 -0
- data/app/models/cms/group_permission.rb +10 -0
- data/app/models/cms/group_section.rb +6 -0
- data/app/models/cms/group_type.rb +14 -0
- data/app/models/cms/group_type_permission.rb +6 -0
- data/app/models/cms/guest_user.rb +57 -0
- data/app/models/cms/html_block.rb +42 -0
- data/app/models/cms/image_block.rb +11 -0
- data/app/models/cms/link.rb +18 -0
- data/app/models/cms/page.rb +321 -0
- data/app/models/cms/page_partial.rb +32 -0
- data/app/models/cms/page_route.rb +136 -0
- data/app/models/cms/page_route_condition.rb +4 -0
- data/app/models/cms/page_route_option.rb +5 -0
- data/app/models/cms/page_route_requirement.rb +4 -0
- data/app/models/cms/page_template.rb +40 -0
- data/app/models/cms/permission.rb +12 -0
- data/app/models/cms/portlet.rb +182 -0
- data/app/models/cms/redirect.rb +6 -0
- data/app/models/cms/section.rb +199 -0
- data/app/models/cms/section_node.rb +108 -0
- data/app/models/cms/site.rb +42 -0
- data/app/models/cms/tag.rb +65 -0
- data/app/models/cms/tagging.rb +11 -0
- data/app/models/cms/task.rb +78 -0
- data/app/models/cms/templates.rb +32 -0
- data/app/models/cms/user.rb +173 -0
- data/app/models/cms/user_group_membership.rb +6 -0
- data/app/models/cms/view_context.rb +1 -1
- data/app/portlets/dynamic_portlet.rb +2 -2
- data/app/portlets/email_page_portlet.rb +8 -7
- data/app/portlets/forgot_password_portlet.rb +4 -3
- data/app/portlets/login_portlet.rb +2 -2
- data/app/portlets/reset_password_portlet.rb +2 -2
- data/app/portlets/tag_cloud_portlet.rb +3 -3
- data/app/views/cms/blocks/_toolbar_for_member.html.erb +6 -6
- data/app/views/cms/blocks/edit.html.erb +2 -4
- data/app/views/cms/blocks/index.html.erb +14 -54
- data/app/views/cms/blocks/new.html.erb +1 -3
- data/app/views/cms/blocks/show.html.erb +1 -1
- data/app/views/cms/blocks/versions.html.erb +2 -2
- data/app/views/cms/cache/show.html.erb +1 -1
- data/app/views/cms/categories/_form.html.erb +8 -8
- data/app/views/cms/connectors/new.html.erb +4 -4
- data/app/views/cms/content_types/index.html.erb +3 -3
- 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 +2 -2
- data/app/views/cms/dynamic_views/_form.html.erb +2 -2
- data/app/views/cms/dynamic_views/index.html.erb +7 -7
- data/app/views/cms/dynamic_views/new.html.erb +1 -1
- data/app/views/cms/email_messages/index.html.erb +2 -2
- data/app/views/cms/file_blocks/_form.html.erb +4 -3
- data/app/views/cms/file_blocks/render.html.erb +1 -1
- data/app/views/cms/form_builder/_cms_template_editor.html.erb +1 -0
- data/app/views/cms/groups/_form.html.erb +4 -5
- data/app/views/cms/groups/_permissions.html.erb +2 -2
- data/app/views/cms/groups/_sections.html.erb +1 -1
- data/app/views/cms/groups/index.html.erb +5 -5
- data/app/views/cms/image_blocks/_form.html.erb +1 -1
- data/app/views/cms/links/edit.html.erb +3 -4
- data/app/views/cms/links/new.html.erb +3 -4
- data/app/views/cms/page_routes/_form.html.erb +3 -3
- data/app/views/cms/page_routes/edit.html.erb +1 -1
- data/app/views/cms/page_routes/index.html.erb +2 -2
- data/app/views/cms/page_routes/new.html.erb +1 -1
- data/app/views/cms/page_routes/show.html.erb +5 -6
- data/app/views/cms/pages/_edit_connector.html.erb +5 -5
- data/app/views/cms/pages/_edit_container.html.erb +3 -3
- data/app/views/cms/pages/_form.html.erb +1 -1
- data/app/views/cms/pages/edit.html.erb +2 -2
- data/app/views/cms/pages/new.html.erb +3 -3
- data/app/views/cms/redirects/_form.html.erb +1 -1
- data/app/views/cms/redirects/index.html.erb +1 -1
- data/app/views/cms/redirects/new.html.erb +1 -1
- data/app/views/cms/routes/index.html.erb +1 -1
- data/app/views/cms/section_nodes/_section_node.html.erb +10 -0
- data/app/views/cms/sections/edit.html.erb +2 -3
- data/app/views/cms/sections/new.html.erb +2 -2
- data/app/views/cms/sessions/new.html.erb +1 -1
- data/app/views/cms/shared/_admin_sidebar.html.erb +8 -8
- data/app/views/cms/tags/render.html.erb +2 -2
- data/app/views/cms/tasks/new.html.erb +2 -2
- data/app/views/cms/users/_form.html.erb +1 -1
- data/app/views/cms/users/_groups.html.erb +1 -1
- data/app/views/cms/users/_toolbar.html.erb +4 -2
- data/app/views/cms/users/change_password.html.erb +3 -3
- data/app/views/cms/users/edit.html.erb +2 -2
- data/app/views/cms/users/index.html.erb +5 -5
- data/app/views/cms/users/new.html.erb +1 -1
- data/app/views/cms/users/show.html.erb +2 -2
- data/app/views/layouts/_cms_toolbar.html.erb +14 -14
- data/app/views/layouts/_page_toolbar.html.erb +8 -8
- data/app/views/layouts/browsercms/application.html.erb +14 -0
- data/app/views/layouts/cms/_head.html.erb +1 -1
- data/app/views/layouts/cms/content_library.html.erb +10 -8
- data/app/views/layouts/cms/toolbar.html.erb +1 -2
- data/app/views/portlets/email_page/_form.html.erb +1 -2
- data/app/views/portlets/email_page/render.html.erb +2 -2
- data/app/views/portlets/login/render.html.erb +2 -2
- data/app/views/portlets/portlets/_form.html.erb +4 -4
- data/app/views/portlets/reset_password/_form.html.erb +2 -2
- data/bin/bcms +212 -47
- data/bin/bcms-upgrade +118 -17
- data/browsercms.gemspec +7 -20
- data/config/cucumber.yml +8 -0
- data/config/database.jdbcmysql.yml +30 -0
- data/config/database.mysql.yml +27 -0
- data/config/database.postgres.yml +25 -0
- data/config/database.sqlite3.yml +11 -0
- data/config/environment.rb +6 -0
- data/config/initializers/query_reviewer_patch.rb +12 -0
- data/config/initializers/rack_1_2_1_patch.rb +12 -0
- data/config/locales/en.yml +5 -0
- data/config/routes.rb +101 -0
- data/db/browsercms.seeds.rb +64 -0
- data/db/migrate/20080815014337_browsercms_3_0_0.rb +68 -76
- data/db/migrate/20091109175123_browsercms_3_0_5.rb +2 -2
- data/db/migrate/20100117144039_browsercms315.rb +22 -21
- data/db/migrate/20100705083859_browsercms_3_3_0.rb +5 -5
- data/db/migrate/20111130221145_browsercms340.rb +59 -0
- data/db/seeds.rb +1 -58
- data/doc/README_FOR_APP +6 -0
- data/doc/design/blue_button.psd +0 -0
- data/doc/design/gray_box.psd +0 -0
- data/doc/design/main_nav.psd +0 -0
- data/doc/installing_browsercms_in_project.md +7 -0
- data/doc/release_notes.md +390 -0
- data/doc/test_procedure.txt +141 -0
- data/doc/upgrading_to_3_3.txt +90 -0
- data/doc/upgrading_to_3_4.md +19 -0
- data/features/acts_as_content_page.feature +48 -0
- data/features/add_content_to_pages.feature +46 -0
- data/features/caching.feature +13 -0
- data/features/ckeditor.feature +11 -0
- data/features/commands/confirm_aruba_works.feature +24 -0
- data/features/commands/generate_module.feature +54 -0
- data/features/commands/install_browsercms.feature +21 -0
- data/features/commands/new_demo_project.feature +30 -0
- data/features/commands/new_projects.feature +43 -0
- data/features/commands/upgrade_modules_from_3_1_to_3_4.feature +19 -0
- data/features/commands/upgrading_modules.feature +66 -0
- data/features/content_blocks/manage_custom_blocks.feature +48 -0
- data/features/content_blocks/manage_html_blocks.feature +42 -0
- data/features/content_blocks/manage_image_blocks.feature +41 -0
- data/features/content_files.feature +37 -0
- data/features/content_pages.feature +21 -0
- data/features/create_pages.feature +15 -0
- data/features/generators/content_blocks_for_modules.feature +58 -0
- data/features/generators/content_blocks_for_projects.feature +109 -0
- data/features/install_content.feature +25 -0
- data/features/jquery-testplan.txt +12 -0
- data/features/manage_groups.feature +33 -0
- data/features/manage_page_routes.feature +72 -0
- data/features/manage_redirects.feature +20 -0
- data/features/manage_sections.feature +12 -0
- data/features/page_templates.feature +25 -0
- data/features/portlets/email_friend_portlet.feature +29 -0
- data/features/portlets/portlets.feature +93 -0
- data/features/portlets/tag_cloud_portlet.feature +28 -0
- data/features/sitemap.feature +18 -0
- data/features/step_definitions/acts_as_content_page_steps.rb.rb +3 -0
- data/features/step_definitions/ckeditor_steps.rb +13 -0
- data/features/step_definitions/command_line_steps.rb +115 -0
- data/features/step_definitions/content_pages_steps.rb +149 -0
- data/features/step_definitions/data_steps.rb +48 -0
- data/features/step_definitions/html_blocks_steps.rb +9 -0
- data/features/step_definitions/install_content_steps.rb +4 -0
- data/features/step_definitions/manage_content_blocks_steps.rb +26 -0
- data/features/step_definitions/manage_image_blocks_steps.rb +31 -0
- data/features/step_definitions/manage_sections_steps.rb +18 -0
- data/features/step_definitions/page_route_steps.rb +65 -0
- data/features/step_definitions/page_template_steps.rb +5 -0
- data/features/step_definitions/permissions_steps.rb +13 -0
- data/features/step_definitions/portlets_steps.rb +64 -0
- data/features/step_definitions/redirect_steps.rb +12 -0
- data/features/step_definitions/sitemap_steps.rb +18 -0
- data/features/step_definitions/tag_cloud_steps.rb +11 -0
- data/features/step_definitions/taxonomy_steps.rb +16 -0
- data/features/step_definitions/upgrade_module_steps.rb +74 -0
- data/features/step_definitions/web_steps.rb +211 -0
- data/features/support/command_line_helpers.rb +45 -0
- data/features/support/debug_formatter.rb +7 -0
- data/features/support/debugging.rb +28 -0
- data/features/support/env.rb +73 -0
- data/features/support/git_api.rb +9 -0
- data/features/support/open_on_first_failure.rb +25 -0
- data/features/support/paths.rb +32 -0
- data/features/support/rails_api.rb +8 -0
- data/features/support/selectors.rb +39 -0
- data/features/support/transforms.rb +7 -0
- data/features/taxonomy/add_content_with_category.feature +30 -0
- data/features/taxonomy/manage_categories.feature +20 -0
- data/features/taxonomy/manage_category_types.feature +16 -0
- data/lib/browsercms.rb +9 -2
- data/lib/cms/acts/cms_user.rb +118 -0
- data/lib/cms/acts/content_block.rb +15 -3
- data/lib/cms/addressable.rb +62 -60
- data/lib/cms/authentication/controller.rb +20 -20
- data/lib/cms/authoring.rb +9 -0
- data/lib/cms/behaviors/attaching.rb +5 -4
- data/lib/cms/behaviors/categorizing.rb +1 -1
- data/lib/cms/behaviors/connecting.rb +9 -4
- data/lib/cms/behaviors/dynamic_attributes.rb +77 -66
- data/lib/cms/behaviors/namespacing.rb +45 -0
- data/lib/cms/behaviors/publishing.rb +1 -1
- data/lib/cms/behaviors/rendering.rb +38 -52
- data/lib/cms/behaviors/searching.rb +8 -3
- data/lib/cms/behaviors/taggable.rb +7 -7
- data/lib/cms/behaviors/userstamping.rb +4 -3
- data/lib/cms/behaviors/versioning.rb +9 -6
- data/lib/cms/commands/actions.rb +37 -0
- data/lib/cms/content_rendering_support.rb +2 -2
- data/lib/cms/data_loader.rb +12 -5
- data/lib/cms/engine.rb +13 -9
- data/lib/cms/engine_helper.rb +59 -0
- data/lib/cms/extensions/active_record/connection_adapters/abstract/schema_statements.rb +37 -9
- data/lib/cms/extensions/active_support/dependencies.rb +21 -0
- data/lib/cms/init.rb +11 -36
- data/lib/cms/installation_actions.rb +8 -0
- data/lib/cms/module.rb +20 -1
- data/lib/cms/module_installation.rb +11 -18
- data/lib/cms/route_extensions.rb +60 -0
- data/lib/cms/version.rb +1 -1
- data/lib/generators/browser_cms/cms/cms_generator.rb +5 -18
- data/lib/generators/browser_cms/demo_site/USAGE +3 -1
- data/lib/generators/browser_cms/demo_site/templates/demo.seeds.rb +251 -0
- data/{public/themes/blue_steel/images → lib/generators/browser_cms/demo_site/templates}/logo.jpg +0 -0
- data/{public/themes/blue_steel/images → lib/generators/browser_cms/demo_site/templates}/splash.jpg +0 -0
- data/{public/themes/blue_steel/stylesheets → lib/generators/browser_cms/demo_site/templates}/style.css +0 -0
- data/lib/generators/cms/content_block/content_block_generator.rb +73 -24
- data/lib/generators/cms/install/install_generator.rb +0 -2
- data/lib/generators/cms/portlet/templates/portlet.rb +1 -1
- data/lib/generators/cms/project/USAGE +1 -0
- data/lib/generators/cms/{upgrade_module → project}/templates/COPYRIGHT.txt +0 -0
- data/lib/generators/cms/{upgrade_module → project}/templates/GPL.txt +0 -0
- data/lib/generators/cms/{upgrade_module → project}/templates/LICENSE.txt +0 -0
- data/lib/generators/cms/{upgrade_module → project}/templates/README +0 -0
- data/lib/generators/cms/project/templates/USAGE +3 -0
- data/lib/generators/cms/{upgrade_module → project}/templates/gitignore.erb +0 -0
- data/lib/generators/cms/project/templates/install_generator.erb +21 -0
- data/lib/generators/cms/project/templates/module_tasks.rake +10 -0
- data/lib/generators/cms/template/template_generator.rb +3 -1
- data/lib/generators/cms/template/templates/template.erb +2 -2
- data/lib/tasks/db.rake +1 -1
- data/lib/templates/active_record/model/model.rb +11 -0
- data/log/.gitignore +0 -0
- data/performance_tuning_notes.md +12 -0
- data/public/styled_file_field/index.html +72 -0
- data/script/cucumber +10 -0
- data/script/rails +6 -0
- data/test/console_helper.rb +5 -0
- data/test/custom_assertions.rb +84 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +9 -0
- data/test/dummy/app/assets/stylesheets/application.css +7 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/cms/products_controller.rb +2 -0
- data/test/dummy/app/controllers/cms/sample_blocks_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/app/models/cms/sample_block.rb +22 -0
- data/test/dummy/app/models/product.rb +5 -0
- data/test/dummy/app/views/cms/products/_form.html.erb +7 -0
- data/test/dummy/app/views/cms/products/render.html.erb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/test_route/index.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +45 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +27 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +32 -0
- data/test/dummy/config/environments/production.rb +60 -0
- data/test/dummy/config/environments/test.rb +46 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/browsercms.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +10 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/quiet_sprocket_assets.rb +8 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +20 -0
- data/test/dummy/db/migrate/20111228141250_create_products.rb +16 -0
- data/test/dummy/db/schema.rb +524 -0
- data/test/dummy/db/seeds.rb +1 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +26 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/factories.rb +234 -0
- data/test/fixtures/multipart/foo.jpg +0 -0
- data/test/fixtures/multipart/sample_upload.txt +1 -0
- data/test/fixtures/multipart/second_upload.txt +1 -0
- data/test/fixtures/multipart/test.jpg +0 -0
- data/test/fixtures/multipart/version1.txt +1 -0
- data/test/fixtures/multipart/version2.txt +1 -0
- data/test/functional/cms/cache_controller_test.rb +16 -0
- data/test/functional/cms/categories_controller_test.rb +28 -0
- data/test/functional/cms/connectors_controller_test.rb +64 -0
- data/test/functional/cms/content_block_controller_test.rb +127 -0
- data/test/functional/cms/content_controller_test.rb +351 -0
- data/test/functional/cms/dashboard_controller_test.rb +20 -0
- data/test/functional/cms/file_blocks_controller_test.rb +55 -0
- data/test/functional/cms/home_controller_test.rb +160 -0
- data/test/functional/cms/html_blocks_controller_test.rb +159 -0
- data/test/functional/cms/image_blocks_controller_test.rb +78 -0
- data/test/functional/cms/links_controller_test.rb +151 -0
- data/test/functional/cms/log/test.log +0 -0
- data/test/functional/cms/pages_controller_test.rb +233 -0
- data/test/functional/cms/portlets_controller_test.rb +57 -0
- data/test/functional/cms/sections_controller_test.rb +234 -0
- data/test/functional/cms/sessions_controller_test.rb +80 -0
- data/test/functional/cms/tasks_controller_test.rb +64 -0
- data/test/functional/cms/toolbar_controller_test.rb +76 -0
- data/test/functional/cms/users_controller_test.rb +242 -0
- data/test/integration/cms/password_management_test.rb +66 -0
- data/test/integration/sitemap_performance_test.rb +26 -0
- data/test/mock_file.rb +33 -0
- data/test/performance/browsing_test.rb +9 -0
- data/test/support/engine_controller_hacks.rb +34 -0
- data/test/support/factory_helpers.rb +57 -0
- data/test/support/rails_3_1_routes_hack.rb +70 -0
- data/test/test_helper.rb +199 -0
- data/test/test_logging.rb +67 -0
- data/test/unit/active_record_callbacks.rb +50 -0
- data/test/unit/behaviors/attaching_test.rb +370 -0
- data/test/unit/behaviors/cms_user_test.rb +67 -0
- data/test/unit/behaviors/connectable_test.rb +32 -0
- data/test/unit/behaviors/connecting_test.rb +56 -0
- data/test/unit/behaviors/dynamic_attributes_test.rb +74 -0
- data/test/unit/behaviors/namespacing_test.rb +76 -0
- data/test/unit/behaviors/publishable_test.rb +83 -0
- data/test/unit/behaviors/rendering_test.rb +68 -0
- data/test/unit/behaviors/searching_test.rb +102 -0
- data/test/unit/behaviors/taggable_test.rb +110 -0
- data/test/unit/behaviors/userstamping_test.rb +27 -0
- data/test/unit/behaviors/versioning_test.rb +102 -0
- data/test/unit/extensions/active_record/base_test.rb +25 -0
- data/test/unit/extensions/hash_test.rb +26 -0
- data/test/unit/extensions/integer_test.rb +10 -0
- data/test/unit/extensions/string_test.rb +14 -0
- data/test/unit/factories_test.rb +50 -0
- data/test/unit/generators/cms_generator_test.rb +44 -0
- data/test/unit/generators/install_generator_test.rb +15 -0
- data/test/unit/helpers/application_helper_test.rb +104 -0
- data/test/unit/helpers/date_picker_test.rb +17 -0
- data/test/unit/helpers/menu_helper_test.rb +240 -0
- data/test/unit/helpers/page_helper_test.rb +69 -0
- data/test/unit/helpers/path_helper_test.rb +58 -0
- data/test/unit/helpers/rendering_helper_test.rb +8 -0
- data/test/unit/lib/acts_as_content_page_test.rb +72 -0
- data/test/unit/lib/cms/authentication/controller_test.rb +20 -0
- data/test/unit/lib/cms/engine_helper_test.rb +119 -0
- data/test/unit/lib/cms/sitemap_test.rb +210 -0
- data/test/unit/lib/cms_domain_support_test.rb +44 -0
- data/test/unit/lib/command_line_test.rb +70 -0
- data/test/unit/lib/content_block_test.rb +304 -0
- data/test/unit/lib/content_rendering_support_test.rb +40 -0
- data/test/unit/lib/generators_test.rb +40 -0
- data/test/unit/lib/routes_test.rb +98 -0
- data/test/unit/mock_file_test.rb +19 -0
- data/test/unit/models/attachment_test.rb +160 -0
- data/test/unit/models/category_test.rb +40 -0
- data/test/unit/models/category_type_test.rb +8 -0
- data/test/unit/models/connector_test.rb +152 -0
- data/test/unit/models/content_type_group_test.rb +26 -0
- data/test/unit/models/content_type_test.rb +150 -0
- data/test/unit/models/dynamic_views_test.rb +36 -0
- data/test/unit/models/email_page_portlet_test.rb +20 -0
- data/test/unit/models/file_block_test.rb +246 -0
- data/test/unit/models/group_test.rb +29 -0
- data/test/unit/models/html_block_test.rb +121 -0
- data/test/unit/models/image_block_test.rb +35 -0
- data/test/unit/models/link_test.rb +52 -0
- data/test/unit/models/namespaces_test.rb +57 -0
- data/test/unit/models/page_partial_test.rb +37 -0
- data/test/unit/models/page_route_test.rb +113 -0
- data/test/unit/models/page_template_test.rb +50 -0
- data/test/unit/models/page_test.rb +879 -0
- data/test/unit/models/permission_test.rb +10 -0
- data/test/unit/models/portlet_test.rb +99 -0
- data/test/unit/models/sections_test.rb +278 -0
- data/test/unit/models/site_test.rb +50 -0
- data/test/unit/models/task_test.rb +150 -0
- data/test/unit/models/user_test.rb +358 -0
- data/test/unit/schema_statements_test.rb +137 -0
- data/todo_list.markdown +68 -0
- data/vendor/assets/javascripts/bcms/ckeditor.js +6 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/ckeditor.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/config.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/_bootstrap.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/ajax.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/ckeditor.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/ckeditor_base.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/ckeditor_basic.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/command.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/commanddefinition.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/config.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/document.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/documentfragment.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/domobject.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/element.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/elementpath.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/event.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/node.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/nodelist.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/range.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/text.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/walker.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dom/window.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/dtd.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/editor.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/editor_basic.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/env.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/event.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/eventInfo.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/focusmanager.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/htmlparser.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/htmlparser/basicwriter.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/htmlparser/cdata.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/htmlparser/comment.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/htmlparser/element.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/htmlparser/filter.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/htmlparser/fragment.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/htmlparser/text.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/imagecacher.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/lang.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/loader.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/plugindefinition.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/plugins.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/resourcemanager.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/scriptloader.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/skins.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/test.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/themes.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/tools.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/ui.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/core/xml.js +0 -0
- data/vendor/assets/javascripts/bcms/ckeditor/editor.js +54 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/_languages.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/_translationstatus.txt +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/af.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/ar.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/bg.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/bn.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/bs.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/ca.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/cs.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/da.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/de.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/el.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/en-au.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/en-ca.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/en-uk.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/en.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/eo.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/es.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/et.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/eu.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/fa.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/fi.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/fo.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/fr-ca.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/fr.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/gl.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/gu.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/he.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/hi.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/hr.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/hu.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/is.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/it.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/ja.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/km.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/ko.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/lt.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/lv.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/mn.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/ms.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/nb.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/nl.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/no.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/pl.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/pt-br.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/pt.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/ro.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/ru.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/sk.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/sl.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/sr-latn.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/sr.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/sv.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/th.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/tr.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/uk.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/vi.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/zh-cn.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/lang/zh.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/about/dialogs/about.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/about/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/basicstyles/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/blockquote/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/button/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/clipboard/dialogs/paste.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/clipboard/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/colorbutton/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/contextmenu/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/dialog/dialogDefinition.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/dialog/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/dialogui/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/domiterator/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/editingblock/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/elementspath/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/enterkey/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/entities/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/fakeobjects/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/filebrowser/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/find/dialogs/find.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/find/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/flash/dialogs/flash.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/flash/images/placeholder.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/flash/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/floatpanel/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/font/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/format/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/forms/dialogs/button.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/forms/dialogs/checkbox.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/forms/dialogs/form.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/forms/dialogs/hiddenfield.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/forms/dialogs/radio.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/forms/dialogs/select.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/forms/dialogs/textarea.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/forms/dialogs/textfield.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/forms/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/horizontalrule/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/htmldataprocessor/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/htmlwriter/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/iframedialog/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/image/dialogs/image.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/image/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/indent/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/justify/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/keystrokes/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/link/dialogs/anchor.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/link/dialogs/link.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/link/images/anchor.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/link/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/list/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/listblock/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/maximize/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/menu/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/menubutton/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/newpage/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/pagebreak/images/pagebreak.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/pagebreak/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/panel/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/panelbutton/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/pastefromword/dialogs/pastefromword.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/pastefromword/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/pastetext/dialogs/pastetext.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/pastetext/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/popup/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/preview/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/print/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/removeformat/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/resize/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/richcombo/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/save/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/scayt/dialogs/options.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/scayt/dialogs/toolbar.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/scayt/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/selection/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_address.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_blockquote.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_div.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_h1.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_h2.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_h3.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_h4.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_h5.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_h6.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_p.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/images/block_pre.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/showblocks/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/dialogs/smiley.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/angel_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/angry_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/broken_heart.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/confused_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/cry_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/devil_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/embaressed_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/envelope.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/heart.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/kiss.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/lightbulb.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/omg_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/regular_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/sad_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/shades_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/teeth_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/thumbs_down.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/thumbs_up.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/tounge_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/whatchutalkingabout_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/images/wink_smile.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/smiley/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/sourcearea/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/specialchar/dialogs/specialchar.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/specialchar/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/styles/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/stylescombo/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/stylescombo/styles/default.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/tab/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/table/dialogs/table.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/table/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/tabletools/dialogs/tableCell.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/tabletools/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/templates/dialogs/templates.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/templates/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/templates/templates/default.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/toolbar/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/dialogs/uicolor.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/lang/en.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/uicolor.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/yui/assets/hue_bg.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/yui/assets/hue_thumb.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/yui/assets/picker_mask.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/yui/assets/picker_thumb.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/yui/assets/yui.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/uicolor/yui/yui.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/undo/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/wsc/dialogs/ciframe.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/wsc/dialogs/wsc.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/wsc/dialogs/wsc.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/wsc/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/plugins/wysiwygarea/plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/dialog.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/editor.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/elementspath.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/icons.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/icons.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/images/dialog_sides.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/images/dialog_sides.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/images/dialog_sides_rtl.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/images/mini.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/images/noimage.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/images/sprites.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/images/sprites_ie6.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/images/toolbar_start.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/mainui.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/menu.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/panel.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/presets.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/reset.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/richcombo.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/skin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/templates.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/kama/toolbar.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/dialog.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/editor.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/elementspath.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/icons.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/icons.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/images/dialog_sides.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/images/dialog_sides.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/images/dialog_sides_rtl.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/images/mini.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/images/noimage.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/images/sprites.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/images/sprites_ie6.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/mainui.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/menu.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/panel.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/presets.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/reset.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/richcombo.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/skin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/templates.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/office2003/toolbar.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/dialog.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/editor.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/elementspath.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/icons.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/icons.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/images/dialog_sides.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/images/dialog_sides.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/images/dialog_sides_rtl.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/images/mini.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/images/noimage.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/images/sprites.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/images/sprites_ie6.png +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/images/toolbar_start.gif +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/mainui.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/menu.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/panel.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/presets.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/reset.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/richcombo.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/skin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/templates.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/skins/v2/toolbar.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/_assets/sample.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/_assets/sample.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/_assets/sample.txt +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/_assets/sample.xml +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/_assets/sample_xml.txt +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/_editor/custom_config_1.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/_editor/custom_config_2.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/ajax.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/bootstrap.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/ckeditor.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/dom/document.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/dom/documentfragment.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/dom/element.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/dom/node.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/dom/range.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/dom/text.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/dom/walker.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/dom/window.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/editor.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/env.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/event.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/htmlparser/fragment.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/htmlparser/htmlparser.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/plugins.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/plugins/myplugins/sample/my_plugin.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/scriptloader.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/tools.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/core/xml.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/plugins/domiterator/domiterator.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/plugins/htmldataprocessor/htmldataprocessor.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/plugins/link/link.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/plugins/list/list.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/plugins/selection/selection.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/plugins/styles/styles.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/test.css +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/test.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/testall.html +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/tests/yuitest.js +0 -0
- data/{public → vendor/assets/javascripts}/bcms/ckeditor/themes/default/theme.js +0 -0
- data/{public → vendor/assets}/javascripts/jquery.cookie.js +0 -0
- data/{public/javascripts/jquery.selectbox-0.5.js → vendor/assets/javascripts/jquery.selectbox.js} +0 -0
- data/vendor/plugins/.gitkeep +0 -0
- metadata +1386 -939
- data/app/models/abstract_file_block.rb +0 -32
- data/app/models/attachment.rb +0 -192
- data/app/models/category.rb +0 -40
- data/app/models/category_type.rb +0 -34
- data/app/models/connector.rb +0 -81
- data/app/models/content_type.rb +0 -95
- data/app/models/content_type_group.rb +0 -3
- data/app/models/dynamic_view.rb +0 -80
- data/app/models/email_message.rb +0 -31
- data/app/models/email_message_mailer.rb +0 -11
- data/app/models/file_block.rb +0 -9
- data/app/models/forgot_password_mailer.rb +0 -12
- data/app/models/group.rb +0 -41
- data/app/models/group_permission.rb +0 -7
- data/app/models/group_section.rb +0 -4
- data/app/models/group_type.rb +0 -12
- data/app/models/group_type_permission.rb +0 -4
- data/app/models/guest_user.rb +0 -53
- data/app/models/html_block.rb +0 -40
- data/app/models/image_block.rb +0 -10
- data/app/models/link.rb +0 -18
- data/app/models/page.rb +0 -319
- data/app/models/page_partial.rb +0 -22
- data/app/models/page_route.rb +0 -122
- data/app/models/page_route_condition.rb +0 -2
- data/app/models/page_route_option.rb +0 -3
- data/app/models/page_route_requirement.rb +0 -2
- data/app/models/page_template.rb +0 -31
- data/app/models/permission.rb +0 -10
- data/app/models/portlet.rb +0 -177
- data/app/models/redirect.rb +0 -4
- data/app/models/section.rb +0 -195
- data/app/models/section_node.rb +0 -110
- data/app/models/site.rb +0 -41
- data/app/models/tag.rb +0 -62
- data/app/models/tagging.rb +0 -9
- data/app/models/task.rb +0 -74
- data/app/models/templates.rb +0 -31
- data/app/models/user.rb +0 -169
- data/app/models/user_group_membership.rb +0 -4
- data/db/demo/data.rb +0 -97
- data/db/demo/page_partials/_footer.html.erb +0 -6
- data/db/demo/page_partials/_header.html.erb +0 -24
- data/db/demo/page_templates/home_page.html.erb +0 -49
- data/db/demo/page_templates/sub_page.html.erb +0 -37
- data/lib/cms/routes.rb +0 -145
- data/lib/generators/browser_cms/demo_site/demo_site_generator.rb +0 -138
- data/lib/generators/browser_cms/demo_site/templates/migration.erb +0 -15
- data/lib/generators/cms/content_block/templates/content_block.rb +0 -27
- data/lib/generators/cms/content_block/templates/controller.rb +0 -2
- data/lib/generators/cms/content_block/templates/functional_test.erb +0 -11
- data/lib/generators/cms/content_block/templates/migration.erb +0 -38
- data/lib/generators/cms/content_block/templates/unit_test.erb +0 -9
- data/lib/generators/cms/upgrade_module/README.txt +0 -3
- data/lib/generators/cms/upgrade_module/templates/20100705083859_browsercms_3_3_0.rb +0 -56
- data/lib/generators/cms/upgrade_module/templates/USAGE.erb +0 -10
- data/lib/generators/cms/upgrade_module/templates/build_gem.rake +0 -5
- data/lib/generators/cms/upgrade_module/templates/engine.erb +0 -7
- data/lib/generators/cms/upgrade_module/templates/gemspec.erb +0 -25
- data/lib/generators/cms/upgrade_module/templates/install.erb +0 -9
- data/lib/generators/cms/upgrade_module/templates/module_file.erb +0 -3
- data/lib/generators/cms/upgrade_module/templates/routes.erb +0 -7
- data/lib/generators/cms/upgrade_module/upgrade_module_generator.rb +0 -61
- data/public/bcms/ckeditor/editor.js +0 -51
- data/public/javascripts/cms/application.js +0 -157
- data/public/javascripts/cms/content_library.js +0 -36
- data/public/javascripts/cms/sitemap.js +0 -464
- data/public/javascripts/jquery-ui.js +0 -782
- data/public/javascripts/jquery.js +0 -16
- data/public/javascripts/jquery.taglist.js +0 -143
- data/public/site/customconfig.js +0 -1
- data/public/stylesheets/cms/administration.css +0 -91
- data/public/stylesheets/cms/application.css +0 -166
- data/public/stylesheets/cms/buttons.css +0 -120
- data/public/stylesheets/cms/content_library.css +0 -139
- data/public/stylesheets/cms/dashboard.css +0 -118
- data/public/stylesheets/cms/data_table.css +0 -156
- data/public/stylesheets/cms/date_picker.css +0 -82
- data/public/stylesheets/cms/form_layout.css +0 -279
- data/public/stylesheets/cms/login.css +0 -78
- data/public/stylesheets/cms/menu.css +0 -116
- data/public/stylesheets/cms/nav.css +0 -99
- data/public/stylesheets/cms/page_toolbar.css +0 -135
- data/public/stylesheets/cms/selectbox.css +0 -56
- data/public/stylesheets/cms/sitemap.css +0 -390
- data/rails/init.rb +0 -2
@@ -0,0 +1,102 @@
|
|
1
|
+
jQuery(function($) {
|
2
|
+
|
3
|
+
//----- Helper Functions -----------------------------------------------------
|
4
|
+
//In all of this code, we are defining functions that we use later
|
5
|
+
//None of this actually manipulates the DOM in any way
|
6
|
+
|
7
|
+
//This is used to get the id part of an elementId
|
8
|
+
//For example, if you have section_node_5,
|
9
|
+
//you pass this 'section_node_5', 'section_node'
|
10
|
+
//and this returns 5
|
11
|
+
var getId = function(elementId, s) {
|
12
|
+
return elementId.replace(s, '')
|
13
|
+
}
|
14
|
+
|
15
|
+
|
16
|
+
var nodeOnDoubleClick = function() {
|
17
|
+
if ($('#edit_button').hasClass('disabled')) {
|
18
|
+
//$('#view_button').click()
|
19
|
+
location.href = $('#view_button')[0].href
|
20
|
+
} else {
|
21
|
+
//$('#edit_button').click()
|
22
|
+
location.href = $('#edit_button')[0].href
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
var addNodeOnDoubleClick = function() {
|
27
|
+
$('#blocks tr').dblclick(nodeOnDoubleClick)
|
28
|
+
}
|
29
|
+
|
30
|
+
//----- Init -----------------------------------------------------------------
|
31
|
+
//In other words, stuff that happens when the page loads
|
32
|
+
//This is where we actually manipulate the DOM, fire events, etc.
|
33
|
+
|
34
|
+
addNodeOnDoubleClick()
|
35
|
+
|
36
|
+
});
|
37
|
+
|
38
|
+
// Makes the toolbar for the Content table correctly work based on the selected row.
|
39
|
+
// I.e. Select a row, the 'View' button becomes active and the URL goes to the right path.
|
40
|
+
//
|
41
|
+
// Any element with class='cms-content-table' will have this applied to it.
|
42
|
+
(function($) {
|
43
|
+
$.fn.cmsContentToolbar = function() {
|
44
|
+
|
45
|
+
var content_type = this.data('content_type')
|
46
|
+
var is_versioned = this.data('versioned')
|
47
|
+
var can_publish = this.data('can_publish')
|
48
|
+
var plural_title = this.data('plural_title')
|
49
|
+
|
50
|
+
$('table.data tbody tr').hover(
|
51
|
+
function() {
|
52
|
+
$(this).addClass('hover')
|
53
|
+
},
|
54
|
+
function() {
|
55
|
+
$(this).removeClass('hover')
|
56
|
+
}).click(function() {
|
57
|
+
var view_path = $(this).data('view_path');
|
58
|
+
var edit_path = $(this).data('edit_path');
|
59
|
+
var delete_path = $(this).data('delete_path');
|
60
|
+
var new_path = $(this).data('new_path');
|
61
|
+
var versions_path = $(this).data('versions_path');
|
62
|
+
var publish_path = $(this).data('publish_path') + '?_redirect_to=' + location.href;
|
63
|
+
var status = $(this).data('status');
|
64
|
+
|
65
|
+
var editable = !$(this).hasClass("non-editable");
|
66
|
+
var publishable = !$(this).hasClass("non-publishable");
|
67
|
+
$('table.data tbody tr').removeClass('selected');
|
68
|
+
$(this).addClass('selected');
|
69
|
+
$('#functions .button').addClass('disabled').attr('href', '#');
|
70
|
+
$('#add_button').removeClass('disabled').attr('href', new_path);
|
71
|
+
$('#view_button').removeClass('disabled').attr('href', view_path);
|
72
|
+
if (editable) $('#edit_button').removeClass('disabled').attr('href', edit_path);
|
73
|
+
if (is_versioned) {
|
74
|
+
$('#revisions_button').removeClass('disabled').attr('href', versions_path);
|
75
|
+
} else {
|
76
|
+
$('#revisions_button').addClass('disabled')
|
77
|
+
.attr('title', plural_title + ' are not versioned');
|
78
|
+
}
|
79
|
+
var cannot_be_deleted_message = $(this).find('.cannot_be_deleted_message');
|
80
|
+
if (cannot_be_deleted_message.length > 0) {
|
81
|
+
$('#delete_button').addClass('disabled')
|
82
|
+
.attr('title', $.trim(cannot_be_deleted_message.text()));
|
83
|
+
} else {
|
84
|
+
if (publishable) {
|
85
|
+
$('#delete_button').removeClass('disabled')
|
86
|
+
.attr('href', delete_path)
|
87
|
+
.attr('title', 'Are You Sure You Want To Delete This Record?');
|
88
|
+
}
|
89
|
+
}
|
90
|
+
if (can_publish) {
|
91
|
+
if (status == 'draft' && publishable) {
|
92
|
+
$('#publish_button').removeClass('disabled').attr('href', publish_path);
|
93
|
+
}
|
94
|
+
}
|
95
|
+
})
|
96
|
+
};
|
97
|
+
})(jQuery);
|
98
|
+
|
99
|
+
$(function() {
|
100
|
+
$('.cms-content-table').cmsContentToolbar();
|
101
|
+
});
|
102
|
+
|
@@ -0,0 +1,158 @@
|
|
1
|
+
//
|
2
|
+
// Defines Core BrowserCMS functions used throughout the application.
|
3
|
+
//
|
4
|
+
//= require jquery
|
5
|
+
//
|
6
|
+
jQuery(function($) {
|
7
|
+
|
8
|
+
//It would be cool if these were added to the real jQuery
|
9
|
+
//You can call this a few ways:
|
10
|
+
//createElement('p') => "<p/>"
|
11
|
+
//createElement('p','hi') => "<p>hi</p>"
|
12
|
+
//createElement('p', {align: 'center'}) => "<p align="center"/>"
|
13
|
+
//createElement('p','hi',{align: 'center'}) => "<p align="center">hi</p>"
|
14
|
+
$.createElement = function(tag_name, tag_value, tag_attrs) {
|
15
|
+
var name = tag_name
|
16
|
+
if (typeof tag_value == "object") {
|
17
|
+
var value = null
|
18
|
+
var attrs = tag_value
|
19
|
+
} else {
|
20
|
+
var value = tag_value
|
21
|
+
var attrs = tag_attrs
|
22
|
+
}
|
23
|
+
var element = $(document.createElement(tag_name))
|
24
|
+
if (attrs) {
|
25
|
+
$.each(attrs, function(k, v) {
|
26
|
+
element.attr(k, v)
|
27
|
+
})
|
28
|
+
}
|
29
|
+
if (value) {
|
30
|
+
element.html(value)
|
31
|
+
}
|
32
|
+
return element
|
33
|
+
}
|
34
|
+
|
35
|
+
|
36
|
+
var sanitizationRegexes = [
|
37
|
+
[/\s/, "_"],
|
38
|
+
[/[&+()]/, "-"],
|
39
|
+
[/[=?!'"{}\[\]#<>%]/, ""]
|
40
|
+
]
|
41
|
+
|
42
|
+
$.cms = {
|
43
|
+
sanitizeFileName: function(s) {
|
44
|
+
var split = s.split(/\/|\\/)
|
45
|
+
s = split[split.length - 1]
|
46
|
+
$.each(sanitizationRegexes, function(i, e) {
|
47
|
+
var r = new RegExp(e[0].source, 'g')
|
48
|
+
s = s.replace(r, e[1])
|
49
|
+
})
|
50
|
+
return s;
|
51
|
+
},
|
52
|
+
slug: function(s) {
|
53
|
+
return $.trim(s.toLowerCase().replace(/[^a-zA-Z0-9_\s]+/g, '')).replace(/\ +/g, '-')
|
54
|
+
},
|
55
|
+
showNotice: function(msg) {
|
56
|
+
$('#message').removeClass('error').addClass('notice').html(msg).parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
|
57
|
+
},
|
58
|
+
showError: function(msg) {
|
59
|
+
$('#message').removeClass('notice').addClass('error').html(msg).parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
|
60
|
+
},
|
61
|
+
attachEventHandlers: function(context) {
|
62
|
+
$('a.button', context).click(function() {
|
63
|
+
if ($(this).hasClass('disabled')) return false;
|
64
|
+
});
|
65
|
+
$('a.http_post, a.http_put, a.http_delete', context).click(function() {
|
66
|
+
if ($(this).hasClass('disabled')) return false;
|
67
|
+
if ($(this).hasClass('confirm_with_title') ? confirm(this.title) : true) {
|
68
|
+
|
69
|
+
// Create the form
|
70
|
+
var f = document.createElement('form')
|
71
|
+
f.style.display = 'none'
|
72
|
+
this.parentNode.appendChild(f)
|
73
|
+
f.method = "POST"
|
74
|
+
f.action = this.href
|
75
|
+
$(f).attr('target', $(this).attr('target'))
|
76
|
+
|
77
|
+
//Create the _method hidden input
|
78
|
+
var m = document.createElement('input')
|
79
|
+
var http_method = $(this).attr('class').match(/http_([^ ]*)/)[1]
|
80
|
+
$(m).attr('type', 'hidden').attr('name', '_method').attr('value', http_method)
|
81
|
+
f.appendChild(m)
|
82
|
+
|
83
|
+
//Create the authenticity_token hidden input
|
84
|
+
if ($.cms.authenticity_token && $.cms.authenticity_token != '') {
|
85
|
+
var m = document.createElement('input')
|
86
|
+
$(m).attr('type', 'hidden').attr('name', 'authenticity_token').attr('value', $.cms.authenticity_token)
|
87
|
+
f.appendChild(m)
|
88
|
+
}
|
89
|
+
|
90
|
+
f.submit()
|
91
|
+
}
|
92
|
+
return false
|
93
|
+
})
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
$.cms.attachEventHandlers(document);
|
98
|
+
|
99
|
+
$('#message.notice').parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
|
100
|
+
$('#message.error').parent().show().animate({opacity: 1.0}, 3000).fadeOut("normal")
|
101
|
+
|
102
|
+
});
|
103
|
+
|
104
|
+
//CookieSet allows us to treat one cookie value as a set of values
|
105
|
+
jQuery(function($) {
|
106
|
+
var sep = '|'
|
107
|
+
|
108
|
+
$.cookieSet = {
|
109
|
+
//Treats the cookie as an array
|
110
|
+
add: function(name, value, options) {
|
111
|
+
this.remove(name, value, options)
|
112
|
+
var set = this.get(name)
|
113
|
+
if (set) {
|
114
|
+
set.push(value)
|
115
|
+
} else {
|
116
|
+
var set = [value]
|
117
|
+
}
|
118
|
+
$.cookie(name, set.join(sep), options)
|
119
|
+
return this.get(name)
|
120
|
+
},
|
121
|
+
|
122
|
+
get: function(name) {
|
123
|
+
var val = $.cookie(name)
|
124
|
+
if (val) {
|
125
|
+
return val.split(sep)
|
126
|
+
} else {
|
127
|
+
return null
|
128
|
+
}
|
129
|
+
},
|
130
|
+
|
131
|
+
remove: function(name, value, options) {
|
132
|
+
var set = this.get(name)
|
133
|
+
if (set) {
|
134
|
+
var arr = []
|
135
|
+
$.each(set, function() {
|
136
|
+
if (this != value + '') {
|
137
|
+
arr.push(this)
|
138
|
+
}
|
139
|
+
})
|
140
|
+
$.cookie(name, arr.join(sep), options)
|
141
|
+
return this.get(name)
|
142
|
+
} else {
|
143
|
+
return null
|
144
|
+
}
|
145
|
+
},
|
146
|
+
|
147
|
+
//Treats the cookie as an array
|
148
|
+
contains: function(name, value) {
|
149
|
+
var set = this.get(name)
|
150
|
+
if (set) {
|
151
|
+
return $.inArray(value + '', set) > -1
|
152
|
+
} else {
|
153
|
+
return false
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
});
|
@@ -0,0 +1,464 @@
|
|
1
|
+
jQuery(function($) {
|
2
|
+
|
3
|
+
//----- Helper Functions -----------------------------------------------------
|
4
|
+
//In all of this code, we are defining functions that we use later
|
5
|
+
//None of this actually manipulates the DOM in any way
|
6
|
+
|
7
|
+
//This is used to get the id part of an elementId
|
8
|
+
//For example, if you have section_node_5,
|
9
|
+
//you pass this 'section_node_5', 'section_node'
|
10
|
+
//and this returns 5
|
11
|
+
var getId = function(elementId, s) {
|
12
|
+
return elementId.replace(s, '')
|
13
|
+
}
|
14
|
+
|
15
|
+
var addHoverToSectionNodes = function() {
|
16
|
+
$('#sitemap div.roundedcorners').hover(
|
17
|
+
function() {
|
18
|
+
$(this).find('table.section_node').addClass('hover');
|
19
|
+
$(this).addClass('over')
|
20
|
+
},
|
21
|
+
function() {
|
22
|
+
$(this).find('table.section_node').removeClass('hover');
|
23
|
+
$(this).removeClass('over')
|
24
|
+
}
|
25
|
+
)
|
26
|
+
}
|
27
|
+
|
28
|
+
var disableButtons = function() {
|
29
|
+
$('a.button').addClass('disabled').click(function() {
|
30
|
+
return false
|
31
|
+
})
|
32
|
+
}
|
33
|
+
|
34
|
+
var makeMovableRowsDraggable = function() {
|
35
|
+
$('#sitemap table.movable').draggable({
|
36
|
+
revert: 'invalid',
|
37
|
+
revertDuration: 200,
|
38
|
+
helper: 'clone',
|
39
|
+
delay: 200,
|
40
|
+
start: function(event, ui) {
|
41
|
+
ui.helper.removeClass('hover').removeClass('selected')
|
42
|
+
}
|
43
|
+
})
|
44
|
+
}
|
45
|
+
|
46
|
+
var jsonPost = function(url, params) {
|
47
|
+
if ($.cms.authenticity_token && $.cms.authenticity_token != '') {
|
48
|
+
params['authenticity_token'] = $.cms.authenticity_token
|
49
|
+
}
|
50
|
+
$.post(url, params,
|
51
|
+
function(data) {
|
52
|
+
if (data.success) {
|
53
|
+
$.cms.showNotice(data.message)
|
54
|
+
} else {
|
55
|
+
$.cms.showError(data.message)
|
56
|
+
}
|
57
|
+
}, "json"
|
58
|
+
);
|
59
|
+
}
|
60
|
+
|
61
|
+
var moveSectionNode = function(sectionNodeId, move, otherSectionNodeId) {
|
62
|
+
var url = '/cms/section_nodes/' + sectionNodeId + '/move_' + move
|
63
|
+
var params = { _method: "PUT", section_node_id: otherSectionNodeId }
|
64
|
+
jsonPost(url, params)
|
65
|
+
}
|
66
|
+
|
67
|
+
var moveSectionNodeToRoot = function(sectionNodeId, rootSectionId) {
|
68
|
+
var url = '/cms/section_nodes/' + sectionNodeId + '/move_to_root'
|
69
|
+
var params = { _method: "PUT", section_id: rootSectionId }
|
70
|
+
jsonPost(url, params)
|
71
|
+
}
|
72
|
+
|
73
|
+
var nodeOnDrop = function(e, ui) {
|
74
|
+
//Remove any drop zone highlights still hanging out
|
75
|
+
$('#sitemap td.drop-before, #sitemap td.node, #sitemap td.drop-after').removeClass('drop-over')
|
76
|
+
|
77
|
+
//Get the object and the id for the src (what we are droping)
|
78
|
+
//and the dest (where we are dropping)
|
79
|
+
var src = ui.draggable.parents('ul:first') //The UL the TD is in
|
80
|
+
var sid = getId(src[0].id, 'section_node_')
|
81
|
+
var dest = $(this).parents('ul:first') //The UL the drop zone is in
|
82
|
+
var did = getId(dest[0].id, 'section_node_')
|
83
|
+
|
84
|
+
//If the src is a descendant of the dest, then forget it
|
85
|
+
if (src == dest || $.inArray(src[0], dest.parents()) > -1) {
|
86
|
+
return true;
|
87
|
+
}
|
88
|
+
|
89
|
+
if (dest.hasClass('root')) {
|
90
|
+
src.insertAfter(dest)
|
91
|
+
makeRootlet(src);
|
92
|
+
var rid = getId(dest[0].id, 'root_')
|
93
|
+
moveSectionNodeToRoot(sid, rid)
|
94
|
+
//Move to a section if the drop zone is the section
|
95
|
+
} else {
|
96
|
+
unMakeRootlet(src);
|
97
|
+
if ($(this).hasClass('node') && $(this).hasClass('section')) {
|
98
|
+
makeExpandable(dest);
|
99
|
+
var move = 'to_end'
|
100
|
+
dest.find('li:first').append(src)
|
101
|
+
openSection(dest[0])
|
102
|
+
//If the drop zone is directly after an open section,
|
103
|
+
//move this to the beginning of the section
|
104
|
+
} else if ($(this).hasClass('drop-after') && dest.find('table:first img.folder-open').length > 0) {
|
105
|
+
var move = 'to_beginning'
|
106
|
+
src.insertAfter(dest.find('table:first'))
|
107
|
+
} else {
|
108
|
+
//insert before or after, based on the class of the drop zone
|
109
|
+
if (dest.hasClass('rootlet')) {
|
110
|
+
makeRootlet(src);
|
111
|
+
}
|
112
|
+
|
113
|
+
if ($(this).hasClass('drop-before')) {
|
114
|
+
var move = 'before'
|
115
|
+
src.insertBefore(dest)
|
116
|
+
} else {
|
117
|
+
var move = 'after'
|
118
|
+
src.insertAfter(dest)
|
119
|
+
}
|
120
|
+
|
121
|
+
}
|
122
|
+
//Make the ajax call
|
123
|
+
moveSectionNode(sid, move, did)
|
124
|
+
|
125
|
+
}
|
126
|
+
|
127
|
+
//Make the thing we are dropping be selected
|
128
|
+
selectSectionNode(src)
|
129
|
+
|
130
|
+
}
|
131
|
+
|
132
|
+
var makeExpandable = function(dest) {
|
133
|
+
var dest_toggle = dest.find('td.node:first img:first');
|
134
|
+
dest_toggle.removeClass('no_folder_toggle');
|
135
|
+
dest_toggle.addClass('folder_toggle');
|
136
|
+
dest_toggle.click(toggleSectionOnClick);
|
137
|
+
if (dest_toggle.hasClass('large')) {
|
138
|
+
dest_toggle.attr('src', '<%= asset_path "cms/sitemap/gray_contract.png" %>');
|
139
|
+
} else {
|
140
|
+
dest_toggle.attr('src', '<%= asset_path "cms/sitemap/contract.png" %>');
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
var makeRootlet = function(src) {
|
145
|
+
src.addClass('rootlet')
|
146
|
+
var src_icon = src.find('td.node:first img:last')
|
147
|
+
var src_icon_src = src_icon.attr('src')
|
148
|
+
if (src_icon_src.indexOf('/root_') == -1) {
|
149
|
+
src_icon.attr('src', src_icon_src.replace(/\/([^/]+\.png).*/, '/root_$1'))
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
var unMakeRootlet = function (src) {
|
154
|
+
src.removeClass('rootlet')
|
155
|
+
var src_icon = src.find('td.node:first img:last')
|
156
|
+
var src_icon_src = src_icon.attr('src')
|
157
|
+
if (src_icon_src.indexOf('/root_') > -1) {
|
158
|
+
src_icon.attr('src', src_icon_src.replace(/\/root_([^/]+\.png).*/, '/$1'))
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
var enableDropZones = function() {
|
163
|
+
$('#sitemap td.drop-before, #sitemap td.node, #sitemap td.drop-after').droppable({
|
164
|
+
accept: 'table',
|
165
|
+
tolerance: 'pointer',
|
166
|
+
over: function(e, ui) {
|
167
|
+
$(this).addClass('drop-over')
|
168
|
+
},
|
169
|
+
out: function(e, ui) {
|
170
|
+
$(this).removeClass('drop-over')
|
171
|
+
},
|
172
|
+
drop: nodeOnDrop
|
173
|
+
});
|
174
|
+
}
|
175
|
+
|
176
|
+
var clearSelectedSectionNode = function() {
|
177
|
+
disableButtons()
|
178
|
+
$('#sitemap table.section_node').removeClass('selected');
|
179
|
+
$('.roundedcorners').removeClass('on')
|
180
|
+
}
|
181
|
+
|
182
|
+
var selectSectionNode = function(sectionNode) {
|
183
|
+
clearSelectedSectionNode(sectionNode)
|
184
|
+
enableButtonsForSectionNode(sectionNode)
|
185
|
+
$(sectionNode).find('table:first').addClass('selected');
|
186
|
+
$(sectionNode).find('div.roundedcorners:first').addClass('on')
|
187
|
+
}
|
188
|
+
|
189
|
+
var isSectionEmpty = function(id) {
|
190
|
+
return $('#section_' + id).parents('li:first').find('ul').length == 0
|
191
|
+
}
|
192
|
+
|
193
|
+
var enableButtonsForSectionNode = function(sectionNode) {
|
194
|
+
enableButtonsForNode($(sectionNode).find('td.node')[0])
|
195
|
+
}
|
196
|
+
|
197
|
+
var enableButtonsForNode = function(node) {
|
198
|
+
var id = getId(node.id, /(section|page|link)_/);
|
199
|
+
if (!$(node).is(".non-editable")) {
|
200
|
+
if ($(node).hasClass('section')) {
|
201
|
+
enableButtonsForSection(id);
|
202
|
+
} else if ($(node).hasClass('page')) {
|
203
|
+
enableButtonsForPage(id);
|
204
|
+
} else if ($(node).hasClass('link')) {
|
205
|
+
enableButtonsForLink(id);
|
206
|
+
}
|
207
|
+
} else if ($(node).hasClass('page')) {
|
208
|
+
$('#edit-button')
|
209
|
+
.html('<span>View Page</span>')
|
210
|
+
.removeClass('disabled')
|
211
|
+
.attr('href', '/cms/pages/' + id)
|
212
|
+
.unbind('click')
|
213
|
+
.click(function() {
|
214
|
+
return true
|
215
|
+
});
|
216
|
+
} else {
|
217
|
+
$('#properties-button').attr('href', '/cms/sitemap');
|
218
|
+
}
|
219
|
+
};
|
220
|
+
|
221
|
+
var enableButtonsForSection = function(id) {
|
222
|
+
$('#properties-button')
|
223
|
+
.removeClass('disabled')
|
224
|
+
.attr('href', '/cms/sections/' + id + '/edit')
|
225
|
+
.unbind('click')
|
226
|
+
.click(function() {
|
227
|
+
return true
|
228
|
+
})
|
229
|
+
|
230
|
+
$('#add-page-button')
|
231
|
+
.removeClass('disabled')
|
232
|
+
.attr('href', '/cms/sections/' + id + '/pages/new')
|
233
|
+
.unbind('click')
|
234
|
+
.click(function() {
|
235
|
+
return true
|
236
|
+
})
|
237
|
+
|
238
|
+
$('#add-section-button')
|
239
|
+
.removeClass('disabled')
|
240
|
+
.attr('href', '/cms/sections/new?section_id=' + id)
|
241
|
+
.unbind('click')
|
242
|
+
.click(function() {
|
243
|
+
return true
|
244
|
+
})
|
245
|
+
|
246
|
+
$('#add-link-button')
|
247
|
+
.removeClass('disabled')
|
248
|
+
.attr('href', '/cms/sections/' + id + '/links/new')
|
249
|
+
.unbind('click')
|
250
|
+
.click(function() {
|
251
|
+
return true
|
252
|
+
})
|
253
|
+
|
254
|
+
if (isSectionEmpty(id)) {
|
255
|
+
$('#delete_button')
|
256
|
+
.removeClass('disabled')
|
257
|
+
.attr('href', '/cms/sections/' + id + '.json')
|
258
|
+
.unbind('click')
|
259
|
+
.click(function() {
|
260
|
+
if (confirm('Are you sure you want to delete this section?')) {
|
261
|
+
var params = { _method: "DELETE" }
|
262
|
+
if ($.cms.authenticity_token && $.cms.authenticity_token != '') {
|
263
|
+
params['authenticity_token'] = $.cms.authenticity_token
|
264
|
+
}
|
265
|
+
$.post($(this).attr('href'), params,
|
266
|
+
function(data) {
|
267
|
+
if (data.success) {
|
268
|
+
$.cms.showNotice(data.message)
|
269
|
+
} else {
|
270
|
+
$.cms.showError(data.message)
|
271
|
+
}
|
272
|
+
}, "json");
|
273
|
+
$('#section_' + id).parents('ul.section_node:first').remove()
|
274
|
+
}
|
275
|
+
return false;
|
276
|
+
})
|
277
|
+
} else {
|
278
|
+
$('#delete_button').addClass('disabled').unbind('click').click(function() {
|
279
|
+
return false
|
280
|
+
})
|
281
|
+
}
|
282
|
+
|
283
|
+
}
|
284
|
+
|
285
|
+
var enableButtonsForPage = function(id) {
|
286
|
+
$('#edit-button')
|
287
|
+
.html('<span>Edit Page</span>')
|
288
|
+
.removeClass('disabled')
|
289
|
+
.attr('href', '/cms/pages/' + id)
|
290
|
+
.unbind('click')
|
291
|
+
.click(function() {
|
292
|
+
return true
|
293
|
+
})
|
294
|
+
|
295
|
+
$('#properties-button')
|
296
|
+
.removeClass('disabled')
|
297
|
+
.attr('href', '/cms/pages/' + id + '/edit')
|
298
|
+
.unbind('click')
|
299
|
+
.click(function() {
|
300
|
+
return true
|
301
|
+
})
|
302
|
+
|
303
|
+
$('#delete_button')
|
304
|
+
.removeClass('disabled')
|
305
|
+
.attr('href', '/cms/pages/' + id + '.json')
|
306
|
+
.unbind('click')
|
307
|
+
.click(function() {
|
308
|
+
if (confirm('Are you sure you want to delete this page?')) {
|
309
|
+
var params = { _method: "DELETE" }
|
310
|
+
if ($.cms.authenticity_token && $.cms.authenticity_token != '') {
|
311
|
+
params['authenticity_token'] = $.cms.authenticity_token
|
312
|
+
}
|
313
|
+
$.post($(this).attr('href'), params,
|
314
|
+
function(data) {
|
315
|
+
if (data.success) {
|
316
|
+
$.cms.showNotice(data.message)
|
317
|
+
} else {
|
318
|
+
$.cms.showError(data.message)
|
319
|
+
}
|
320
|
+
}, "json");
|
321
|
+
$('#page_' + id).parents('ul.section_node:first').remove()
|
322
|
+
}
|
323
|
+
return false;
|
324
|
+
})
|
325
|
+
}
|
326
|
+
|
327
|
+
var enableButtonsForLink = function(id) {
|
328
|
+
$('#properties-button')
|
329
|
+
.removeClass('disabled')
|
330
|
+
.attr('href', '/cms/links/' + id + '/edit')
|
331
|
+
.unbind('click')
|
332
|
+
.click(function() {
|
333
|
+
return true
|
334
|
+
})
|
335
|
+
|
336
|
+
$('#delete_button')
|
337
|
+
.removeClass('disabled')
|
338
|
+
.attr('href', '/cms/links/' + id + '.json')
|
339
|
+
.unbind('click')
|
340
|
+
.click(function() {
|
341
|
+
if (confirm('Are you sure you want to delete this link?')) {
|
342
|
+
var params = { _method: "DELETE" }
|
343
|
+
if ($.cms.authenticity_token && $.cms.authenticity_token != '') {
|
344
|
+
params['authenticity_token'] = $.cms.authenticity_token
|
345
|
+
}
|
346
|
+
$.post($(this).attr('href'), params,
|
347
|
+
function(data) {
|
348
|
+
if (data.success) {
|
349
|
+
$.cms.showNotice(data.message)
|
350
|
+
} else {
|
351
|
+
$.cms.showError(data.message)
|
352
|
+
}
|
353
|
+
}, "json");
|
354
|
+
$('#link_' + id).parents('ul.section_node:first').remove()
|
355
|
+
}
|
356
|
+
return false;
|
357
|
+
})
|
358
|
+
|
359
|
+
}
|
360
|
+
|
361
|
+
var openSection = function(sectionNode) {
|
362
|
+
var id = getId(sectionNode.id, 'section_node_')
|
363
|
+
|
364
|
+
//Remember to re-open this section
|
365
|
+
$.cookieSet.add('openSectionNodes', id, {path: '/'})
|
366
|
+
|
367
|
+
$(sectionNode).addClass('open')
|
368
|
+
$(sectionNode).find('li:first > ul').show();
|
369
|
+
var img = $(sectionNode).find('li:first table:first img.folder_toggle');
|
370
|
+
if (img.hasClass('large')) {
|
371
|
+
img.attr('src', '<%= asset_path "cms/sitemap/gray_contract.png" %>').addClass("folder-open")
|
372
|
+
} else {
|
373
|
+
img.attr('src', '<%= asset_path "cms/sitemap/contract.png" %>').addClass("folder-open")
|
374
|
+
}
|
375
|
+
}
|
376
|
+
|
377
|
+
var closeSection = function(sectionNode) {
|
378
|
+
var id = getId(sectionNode.id, 'section_node_')
|
379
|
+
|
380
|
+
//Remove this section from the set of open nodes
|
381
|
+
$.cookieSet.remove('openSectionNodes', id, {path: '/'})
|
382
|
+
|
383
|
+
//close this
|
384
|
+
$(sectionNode).removeClass('open')
|
385
|
+
$(sectionNode).find('li:first > ul').hide()
|
386
|
+
var img = $(sectionNode).find('li:first table:first img.folder_toggle');
|
387
|
+
if (img.hasClass('large')) {
|
388
|
+
img.attr('src', '<%= asset_path "cms/sitemap/gray_expand.png" %>').removeClass("folder-open")
|
389
|
+
} else {
|
390
|
+
img.attr('src', '<%= asset_path "cms/sitemap/expand.png" %>').removeClass("folder-open")
|
391
|
+
}
|
392
|
+
}
|
393
|
+
|
394
|
+
var sectionNodeIsOpen = function(sectionNode) {
|
395
|
+
return $(sectionNode).find('li:first table:first img.folder-open').length
|
396
|
+
}
|
397
|
+
|
398
|
+
var nodeOnClick = function() {
|
399
|
+
|
400
|
+
var selected = $(this).hasClass('selected')
|
401
|
+
clearSelectedSectionNode()
|
402
|
+
$(this).addClass('selected')
|
403
|
+
|
404
|
+
var node = $(this).find('td.node')[0]
|
405
|
+
var id = getId(node.id, /(section|page|link)_/)
|
406
|
+
var sectionNode = $(this).parents('ul:first')[0]
|
407
|
+
|
408
|
+
selectSectionNode(sectionNode)
|
409
|
+
}
|
410
|
+
|
411
|
+
var toggleSectionOnClick = function() {
|
412
|
+
var sectionNode = $(this).parents('ul:first')[0]
|
413
|
+
if (sectionNodeIsOpen(sectionNode)) {
|
414
|
+
closeSection(sectionNode)
|
415
|
+
} else {
|
416
|
+
openSection(sectionNode)
|
417
|
+
}
|
418
|
+
}
|
419
|
+
|
420
|
+
var nodeOnDoubleClick = function() {
|
421
|
+
if ($('#edit-button').hasClass('disabled')) {
|
422
|
+
//$('#properties-button').click()
|
423
|
+
location.href = $('#properties-button')[0].href
|
424
|
+
} else {
|
425
|
+
//$('#edit-button').click()
|
426
|
+
location.href = $('#edit-button')[0].href
|
427
|
+
}
|
428
|
+
}
|
429
|
+
|
430
|
+
var addNodeOnClick = function() {
|
431
|
+
$('#sitemap table.section_node').click(nodeOnClick).dblclick(nodeOnDoubleClick)
|
432
|
+
}
|
433
|
+
|
434
|
+
var addToggleSectionOnClick = function() {
|
435
|
+
$('#sitemap img.folder_toggle').click(toggleSectionOnClick);
|
436
|
+
}
|
437
|
+
|
438
|
+
//Whenever you open a section, a cookie is updated so that next time you view the sitemap
|
439
|
+
//that section will start in open state
|
440
|
+
var fireOnClickForOpenSectionNodes = function() {
|
441
|
+
var openSectionNodeIds = $.cookieSet.get('openSectionNodes')
|
442
|
+
var selectedSectionSelector = '.root table:first'
|
443
|
+
if (openSectionNodeIds) {
|
444
|
+
$.each(openSectionNodeIds, function(i, e) {
|
445
|
+
$('#section_node_' + e + ' table:first img.folder_toggle').click()
|
446
|
+
})
|
447
|
+
selectedSectionSelector = '#section_node_' + openSectionNodeIds[openSectionNodeIds.length - 1] + ' table:first'
|
448
|
+
}
|
449
|
+
$(selectedSectionSelector).click()
|
450
|
+
}
|
451
|
+
|
452
|
+
//----- Init -----------------------------------------------------------------
|
453
|
+
//In other words, stuff that happens when the page loads
|
454
|
+
//This is where we actually manipulate the DOM, fire events, etc.
|
455
|
+
|
456
|
+
addHoverToSectionNodes()
|
457
|
+
disableButtons()
|
458
|
+
makeMovableRowsDraggable()
|
459
|
+
enableDropZones()
|
460
|
+
addNodeOnClick()
|
461
|
+
addToggleSectionOnClick()
|
462
|
+
fireOnClickForOpenSectionNodes()
|
463
|
+
|
464
|
+
})
|