From a741e2512b1d830d506fee1575b6b64ee33c8073 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Tue, 9 Dec 2014 00:24:43 +0100 Subject: [PATCH] site progressif --- app/assets/images/admin/default_image.png | Bin 6483 -> 28345 bytes app/assets/javascripts/admin.coffee | 411 + app/assets/javascripts/admin.js | 34 - app/assets/javascripts/admin/redactor.js | 4210 --------- app/assets/javascripts/bootstrap.js | 13 + app/assets/javascripts/bootstrap/affix.js | 137 + app/assets/javascripts/bootstrap/alert.js | 88 + app/assets/javascripts/bootstrap/button.js | 107 + app/assets/javascripts/bootstrap/carousel.js | 205 + app/assets/javascripts/bootstrap/collapse.js | 170 + .../javascripts/bootstrap/datetimepicker.js | 3652 ++++++++ app/assets/javascripts/bootstrap/dropdown.js | 147 + app/assets/javascripts/bootstrap/modal.js | 243 + app/assets/javascripts/bootstrap/popover.js | 110 + app/assets/javascripts/bootstrap/scrollspy.js | 153 + app/assets/javascripts/bootstrap/tab.js | 125 + app/assets/javascripts/bootstrap/tooltip.js | 399 + .../javascripts/bootstrap/transition.js | 48 + app/assets/javascripts/connexion.coffee | 15 +- app/assets/javascripts/event_form.coffee | 17 + app/assets/javascripts/image_files.js | 191 + app/assets/javascripts/jquery.bxslider.js | 1343 +++ app/assets/javascripts/jquery.easing.1.3.js | 205 + app/assets/javascripts/manager.js | 174 + app/assets/javascripts/nested_fields.coffee | 11 + app/assets/javascripts/pane_hover.js | 55 + app/assets/javascripts/public.js.coffee | 333 +- app/assets/javascripts/redactor.js | 8009 ++++++++--------- .../javascripts/redactor_plugins/fontcolor.js | 73 + .../redactor_plugins/fontfamily.js | 32 + .../javascripts/redactor_plugins/fontsize.js | 75 + .../javascripts/vendor/bootstrap-slider.js | 388 + .../javascripts/vendor/jquery-sortable.js | 598 ++ .../javascripts/vendor/jquery.event.drag.js | 402 + .../vendor/jquery.fileupload-process.js | 164 + .../vendor/jquery.fileupload-ui.js | 638 ++ .../javascripts/vendor/jquery.fileupload.js | 1315 +++ .../vendor/jquery.iframe-transport.js | 205 + .../javascripts/vendor/jquery.ui.widget.js | 530 ++ app/assets/javascripts/vendor/select2.min.js | 3137 +++++++ app/assets/javascripts/vendor/tmpl.min.js | 1 + app/assets/stylesheets/admin.css.scss | 15 +- .../admin/framework/accordion.less | 34 - .../stylesheets/admin/framework/alerts.less | 79 - .../admin/framework/bootstrap.less | 67 - .../admin/framework/breadcrumbs.less | 24 - .../admin/framework/button-groups.less | 229 - .../stylesheets/admin/framework/buttons.less | 228 - .../stylesheets/admin/framework/carousel.less | 158 - .../stylesheets/admin/framework/close.less | 32 - .../stylesheets/admin/framework/code.less | 61 - .../admin/framework/component-animations.less | 22 - .../admin/framework/dropdowns.less | 248 - .../stylesheets/admin/framework/forms.less | 695 -- .../stylesheets/admin/framework/formt.less | 310 - .../stylesheets/admin/framework/grid.less | 21 - .../admin/framework/hero-unit.less | 25 - .../admin/framework/labels-badges.less | 84 - .../stylesheets/admin/framework/layouts.less | 16 - .../stylesheets/admin/framework/media.less | 55 - .../stylesheets/admin/framework/mixins.less | 702 -- .../stylesheets/admin/framework/modals.less | 95 - .../stylesheets/admin/framework/navbar.less | 497 - .../stylesheets/admin/framework/navs.less | 409 - .../stylesheets/admin/framework/pager.less | 43 - .../admin/framework/pagination.less | 123 - .../stylesheets/admin/framework/popovers.less | 133 - .../admin/framework/progress-bars.less | 122 - .../stylesheets/admin/framework/reset.less | 216 - .../framework/responsive-1200px-min.less | 28 - .../admin/framework/responsive-767px-max.less | 193 - .../framework/responsive-768px-979px.less | 19 - .../admin/framework/responsive-navbar.less | 189 - .../admin/framework/responsive-utilities.less | 59 - .../admin/framework/responsive.less | 48 - .../admin/framework/scaffolding.less | 53 - .../stylesheets/admin/framework/slider.less | 104 - .../stylesheets/admin/framework/sprites.less | 197 - .../stylesheets/admin/framework/tables.less | 244 - .../admin/framework/thumbnails.less | 53 - .../stylesheets/admin/framework/tooltip.less | 70 - .../stylesheets/admin/framework/type.less | 247 - .../admin/framework/utilities.less | 30 - .../admin/framework/variables.less | 301 - .../stylesheets/admin/framework/wells.less | 29 - app/assets/stylesheets/admin/lesshat.less | 2200 ----- app/assets/stylesheets/admin/pane_hover.less | 58 - app/assets/stylesheets/jquery.bxslider.css | 213 + .../old.fontawesome/bordered-pulled.less | 16 - .../stylesheets/old.fontawesome/core.less | 12 - .../old.fontawesome/fixed-width.less | 6 - .../old.fontawesome/font-awesome.less | 17 - .../stylesheets/old.fontawesome/icons.less | 412 - .../stylesheets/old.fontawesome/larger.less | 13 - .../stylesheets/old.fontawesome/list.less | 19 - .../stylesheets/old.fontawesome/mixins.less | 20 - .../stylesheets/old.fontawesome/path.less | 14 - .../old.fontawesome/rotated-flipped.less | 9 - .../stylesheets/old.fontawesome/spinning.less | 30 - .../stylesheets/old.fontawesome/stacked.less | 20 - .../old.fontawesome/variables.less | 381 - app/assets/stylesheets/pane_hover.scss | 2 +- app/assets/stylesheets/public.scss | 559 ++ app/assets/stylesheets/redactor.css | 185 +- .../admin/admin_auths_controller.rb | 38 + app/controllers/admin/admins_controller.rb | 160 +- app/controllers/admin/albums_controller.rb | 43 + app/controllers/admin/articles_controller.rb | 124 + app/controllers/admin/blocks_controller.rb | 28 + .../admin/categories_controller.rb | 170 + app/controllers/admin/cibles_controller.rb | 24 + app/controllers/admin/comments_controller.rb | 52 + app/controllers/admin/dashboard_controller.rb | 2 +- .../admin/data_files_controller.rb | 60 + .../admin/external_links_controller.rb | 72 + .../admin/file_folders_controller.rb | 50 + .../admin/image_files_controller.rb | 66 + .../admin/menu_aliases_controller.rb | 15 + .../admin/menu_items_controller.rb | 432 + app/controllers/admin/menu_urls_controller.rb | 14 + app/controllers/admin/menus_controller.rb | 79 + .../admin/newsletters_controller.rb | 2 +- app/controllers/admin/pages_controller.rb | 14 + app/controllers/admin/people_controller.rb | 2 +- app/controllers/admin/petitions_controller.rb | 2 +- .../admin/sheet_years_controller.rb | 2 +- app/controllers/admin/sheets_controller.rb | 2 +- .../admin/survey_types_controller.rb | 2 +- app/controllers/admin/tiny_urls_controller.rb | 2 +- app/controllers/admin/topics_controller.rb | 2 +- app/controllers/application_controller.rb | 43 +- .../portlet/block_contents_controller.rb | 111 + .../portlet/break_contents_controller.rb | 116 + .../portlet/download_contents_controller.rb | 109 + .../portlet/dynamic_contents_controller.rb | 116 + .../portlet/gallery_contents_controller.rb | 109 + .../portlet/gallery_images_controller.rb | 82 + .../portlet/html_contents_controller.rb | 116 + .../portlet/image_contents_controller.rb | 100 + .../portlet/link_contents_controller.rb | 110 + .../portlet/map_contents_controller.rb | 116 + .../portlet/portlets_controller.rb | 124 + .../portlet/table_cols_controller.rb | 35 + .../portlet/table_contents_controller.rb | 108 + .../portlet/table_rows_controller.rb | 106 + .../portlet/text_contents_controller.rb | 116 + .../portlet/title_contents_controller.rb | 116 + app/controllers/public/articles_controller.rb | 100 + app/controllers/public/comments_controller.rb | 19 + app/controllers/public/events_controller.rb | 38 + .../public/menu_items_controller.rb | 79 + app/helpers/application_helper.rb | 12 + app/models/admin.rb | 53 +- app/models/album.rb | 5 + app/models/allowed_block_content.rb | 5 + app/models/article.rb | 116 + app/models/block.rb | 60 + app/models/block_content.rb | 60 + app/models/break_content.rb | 10 + app/models/category.rb | 127 + app/models/cel_table.rb | 90 + app/models/cible_alias.rb | 26 + app/models/cible_url.rb | 11 + app/models/comment.rb | 16 + app/models/data_file.rb | 44 + app/models/download_content.rb | 12 + app/models/dynamic_content.rb | 13 + app/models/external_link.rb | 16 + app/models/file_folder.rb | 3 + app/models/gallery_content.rb | 49 + app/models/gallery_image.rb | 17 + app/models/html_content.rb | 11 + app/models/image_content.rb | 35 + app/models/image_file.rb | 42 + app/models/img_link_content.rb | 39 + app/models/link_content.rb | 45 + app/models/map_content.rb | 16 + app/models/menu.rb | 12 + app/models/menu_alias.rb | 13 + app/models/menu_folder.rb | 8 + app/models/menu_item.rb | 165 + app/models/menu_url.rb | 9 + app/models/page.rb | 43 + app/models/portlet.rb | 39 + app/models/table_content.rb | 51 + app/models/table_row.rb | 82 + app/models/tag.rb | 30 + app/models/tag_taggable.rb | 16 + app/models/text_content.rb | 10 + app/models/title_content.rb | 11 + app/uploaders/file_uploader.rb | 16 +- app/uploaders/image_uploader.rb | 79 + app/views/admin/admin_auths/index.haml | 6 + app/views/admin/admin_auths/new.haml | 19 + app/views/admin/admins/_form.html.haml | 4 +- app/views/admin/albums/_album.html.haml | 4 + app/views/admin/albums/_albums.html.haml | 3 + .../admin/albums/_albums_navbar.html.haml | 4 + app/views/admin/albums/create.js.erb | 2 + app/views/admin/albums/destroy.js.erb | 4 + app/views/admin/albums/edit.js.erb | 16 + app/views/admin/albums/new.js.erb | 16 + app/views/admin/albums/update.js.erb | 2 + app/views/admin/articles/_article.html.haml | 22 + app/views/admin/articles/_form.html.haml | 26 + .../admin/articles/_index_block.html.haml | 30 + app/views/admin/articles/_show.html.haml | 17 + app/views/admin/articles/_tags.html.haml | 14 + app/views/admin/articles/create.js.erb | 5 + app/views/admin/articles/destroy.js.erb | 2 + app/views/admin/articles/edit.html.haml | 81 + app/views/admin/articles/edit.js.erb | 2 + app/views/admin/articles/index.html.haml | 54 + app/views/admin/articles/index.js.erb | 2 + app/views/admin/articles/new.js.erb | 2 + app/views/admin/articles/update.js.erb | 9 + app/views/admin/blocks/_block.html.haml | 7 + .../admin/blocks/_block_allowed.html.haml | 7 + app/views/admin/blocks/_edit.html.haml | 0 app/views/admin/blocks/_form.html.haml | 16 + app/views/admin/blocks/edit.html.haml | 1 + app/views/admin/blocks/edit.js.erb | 8 + app/views/admin/blocks/old.block | 5 + app/views/admin/blocks/old.show.html.haml | 19 + .../admin/categories/_category.html.haml | 26 + app/views/admin/categories/_form.html.haml | 10 + .../admin/categories/_index_block.html.haml | 53 + app/views/admin/categories/cible.html.haml | 6 + app/views/admin/categories/create.js.erb | 3 + app/views/admin/categories/destroy.js.erb | 4 + app/views/admin/categories/edit.js.erb | 1 + app/views/admin/categories/index.html.haml | 6 + app/views/admin/categories/index.js.erb | 13 + app/views/admin/categories/new.js.erb | 1 + app/views/admin/categories/reorder.js.erb | 4 + app/views/admin/categories/update.js.erb | 4 + app/views/admin/categories/update_row.js.erb | 2 + app/views/admin/cibles/_cible_place.html.haml | 10 + app/views/admin/cibles/index.html.haml | 1 + app/views/admin/cibles/index.js.erb | 2 + app/views/admin/cibles/new.html.haml | 15 + app/views/admin/comments/_comment.html.haml | 13 + app/views/admin/comments/_form.html.haml | 15 + app/views/admin/comments/destroy.js.erb | 2 + app/views/admin/comments/edit.js.erb | 1 + app/views/admin/comments/index.html.haml | 13 + app/views/admin/comments/update.js.erb | 3 + app/views/admin/dashboard/index.html.haml | 2 +- .../admin/data_files/_data_file.html.haml | 22 + .../_data_files_container.html.haml | 4 + app/views/admin/data_files/_form.html.haml | 15 + .../admin/data_files/_index_block.html.haml | 150 + app/views/admin/data_files/_show.html.haml | 18 + app/views/admin/data_files/create.js.erb | 4 + app/views/admin/data_files/destroy.js.erb | 2 + app/views/admin/data_files/index.html.haml | 2 + app/views/admin/data_files/index.js.erb | 1 + app/views/admin/data_files/show.js.erb | 3 + app/views/admin/data_files/update.js.erb | 5 + .../external_links/_external_link.html.haml | 11 + .../admin/external_links/_form.html.haml | 14 + .../admin/external_links/cible.html.haml | 11 + app/views/admin/external_links/create.js.erb | 2 + app/views/admin/external_links/destroy.js.erb | 1 + app/views/admin/external_links/edit.html.haml | 6 + app/views/admin/external_links/edit.js.erb | 1 + app/views/admin/external_links/index.js.erb | 2 + app/views/admin/external_links/new.js.erb | 1 + app/views/admin/external_links/show.html.haml | 31 + app/views/admin/external_links/update.js.erb | 2 + .../admin/file_folders/_file_folder.html.haml | 5 + .../file_folders/_file_folders.html.haml | 6 + .../_file_folders_navbar.html.haml | 9 + app/views/admin/file_folders/create.js.erb | 2 + app/views/admin/file_folders/destroy.js.erb | 1 + app/views/admin/file_folders/edit.js.erb | 16 + app/views/admin/file_folders/index.js.erb | 3 + app/views/admin/file_folders/new.js.erb | 16 + app/views/admin/file_folders/update.js.erb | 2 + app/views/admin/image_files/_form.html.haml | 17 + .../admin/image_files/_image_file.html.haml | 10 + .../_image_files_container.html.haml | 4 + .../admin/image_files/_index_block.html.haml | 165 + app/views/admin/image_files/_show.html.haml | 16 + app/views/admin/image_files/create.js.erb | 9 + app/views/admin/image_files/destroy.js.erb | 4 + app/views/admin/image_files/index.html.haml | 3 + app/views/admin/image_files/index.js.erb | 5 + app/views/admin/image_files/rotate.js.erb | 9 + app/views/admin/image_files/show.js.erb | 3 + app/views/admin/image_files/update.js.erb | 5 + app/views/admin/menu_aliases/_form.html.haml | 6 + .../admin/menu_aliases/_menu_alias.html.haml | 4 + app/views/admin/menu_aliases/edit.html.haml | 0 .../admin/menu_items/_cible_line.html.haml | 9 + .../admin/menu_items/_edit_form.html.haml | 12 + app/views/admin/menu_items/_form.html.haml | 16 + .../admin/menu_items/_form_line.html.haml | 7 + .../admin/menu_items/_index_block.html.haml | 55 + .../admin/menu_items/_menu_item.html.haml | 34 + .../_menu_item_content_form.html.haml | 7 + .../admin/menu_items/_new_form.html.haml | 25 + app/views/admin/menu_items/_show.html.haml | 7 + app/views/admin/menu_items/archives.html.haml | 10 + app/views/admin/menu_items/cible.html.haml | 5 + app/views/admin/menu_items/create.js.erb | 4 + app/views/admin/menu_items/edit.html.haml | 14 + app/views/admin/menu_items/edit.js.erb | 3 + app/views/admin/menu_items/import.html.haml | 112 + app/views/admin/menu_items/index.html.haml | 9 + app/views/admin/menu_items/index.js.erb | 13 + app/views/admin/menu_items/new.html.haml | 4 + app/views/admin/menu_items/new.js.erb | 3 + app/views/admin/menu_items/reorder.js.erb | 4 + app/views/admin/menu_items/show.js.erb | 11 + app/views/admin/menu_items/update.js.erb | 4 + .../menu_items/update_reorder_failled.js.erb | 7 + app/views/admin/menu_urls/_form.html.haml | 5 + app/views/admin/menu_urls/_menu_url.html.haml | 4 + app/views/admin/menu_urls/edit.html.haml | 0 app/views/admin/menus/_form.html.haml | 8 + app/views/admin/menus/_index_block.html.haml | 43 + app/views/admin/menus/_menu.html.haml | 9 + app/views/admin/menus/edit.html.haml | 4 + app/views/admin/menus/index.html.haml | 5 + app/views/admin/menus/index.js.erb | 2 + app/views/admin/menus/new.html.haml | 4 + app/views/admin/menus/show.html.haml | 2 + app/views/admin/pages/_form.html.haml | 6 + app/views/admin/pages/_page.html.haml | 78 + app/views/admin/pages/edit.html.haml | 0 app/views/admin/pages/update.html.haml | 2 + .../admin/password_resets/edit.html.haml | 6 + app/views/admin/password_resets/new.html.haml | 6 + app/views/admin/passwords/edit.html.haml | 16 + app/views/admin/passwords/new.html.haml | 11 + app/views/admin/tiny_urls/index.html.haml | 2 +- app/views/layouts/admin.html.haml | 49 +- app/views/layouts/forum.haml | 2 +- app/views/layouts/public.html.haml | 126 + .../block_contents/_block_content.html.haml | 20 + .../portlet/block_contents/_form.html.haml | 84 + .../break_contents/_break_content.html.haml | 1 + .../portlet/break_contents/_form.html.haml | 11 + .../_download_content.html.haml | 8 + .../portlet/download_contents/_form.html.haml | 31 + .../_dynamic_content.html.haml | 1 + .../portlet/dynamic_contents/_form.html.haml | 11 + .../portlet/gallery_contents/_form.html.haml | 10 + .../_gallery_content.html.haml | 18 + .../portlet/gallery_images/_form.html.haml | 19 + .../gallery_images/_gallery_image.html.haml | 9 + .../portlet/gallery_images/create.js.erb | 1 + .../portlet/gallery_images/destroy.js.erb | 4 + app/views/portlet/gallery_images/edit.js.erb | 1 + .../portlet/gallery_images/reorder.js.erb | 0 .../portlet/gallery_images/update.js.erb | 5 + .../portlet/html_contents/_form.html.haml | 53 + .../html_contents/_html_content.html.haml | 11 + .../portlet/image_contents/_form.html.haml | 29 + .../image_contents/_image_content.html.haml | 42 + .../portlet/link_contents/_form.html.haml | 12 + .../link_contents/_link_content.html.haml | 10 + .../portlet/map_contents/_form.html.haml | 22 + .../map_contents/_map_content.html.haml | 64 + app/views/portlet/portlets/_portlet.html.haml | 28 + app/views/portlet/portlets/new.html.haml | 7 + app/views/portlet/portlets/new.js.erb | 12 + app/views/portlet/portlets/update.js.erb | 8 + app/views/portlet/shared/create.js.erb | 18 + app/views/portlet/shared/destroy.js.erb | 13 + app/views/portlet/shared/edit.js.erb | 15 + app/views/portlet/shared/new.js.erb | 7 + app/views/portlet/shared/update.js.erb | 7 + app/views/portlet/table_cols/create.js.erb | 4 + app/views/portlet/table_cols/destroy.js.erb | 4 + .../portlet/table_contents/_form.html.haml | 18 + .../table_contents/_table_content.html.haml | 46 + .../_table_content_edit_pane.html.haml | 33 + .../portlet/table_contents/destroy_row.js.erb | 6 + app/views/portlet/table_rows/create.js.erb | 4 + app/views/portlet/table_rows/destroy.js.erb | 4 + .../portlet/text_contents/_form.html.haml | 78 + .../text_contents/_text_content.html.haml | 2 + .../portlet/title_contents/_form.html.haml | 34 + .../title_contents/_title_content.html.haml | 4 + .../render_public/_blockcontent.html.haml | 36 + .../render_public/_breakcontent.html.haml | 1 + .../render_public/_downloadcontent.html.haml | 11 + .../render_public/_dynamiccontent.html.haml | 3 + .../render_public/_eventcontent.html.haml | 106 + .../render_public/_gallerycontent.html.haml | 130 + .../render_public/_htmlcontent.html.haml | 5 + .../render_public/_imagecontent.html.haml | 62 + .../render_public/_imglinkcontent.html.haml | 27 + .../render_public/_linkcontent.html.haml | 6 + .../render_public/_mapcontent.html.haml | 64 + .../render_public/_tablecontent.html.haml | 74 + .../render_public/_textcontent.html.haml | 4 + .../render_public/_titlecontent.html.haml | 8 + app/views/public/articles/_article.html.haml | 20 + .../public/articles/_article_intro.html.haml | 35 + app/views/public/articles/_index.html.haml | 6 + .../articles/_sidebar_archives.html.haml | 16 + .../articles/_sidebar_categories.html.haml | 7 + .../articles/_sidebar_recents.html.haml | 8 + .../public/articles/_sidebar_tags.html.haml | 7 + app/views/public/articles/archive.html.haml | 19 + app/views/public/articles/feed.rss.builder | 22 + app/views/public/articles/index.html.haml | 4 + app/views/public/articles/index.js.erb | 50 + app/views/public/articles/show.html.haml | 1 + app/views/public/blocks/_block.html.haml | 5 + app/views/public/comments/_comment.html.haml | 26 + app/views/public/comments/_form.html.haml | 32 + app/views/public/comments/create.js.erb | 12 + app/views/public/events/_event.haml | 9 + app/views/public/events/index.html.haml | 2 + app/views/public/events/show.html.haml | 2 + app/views/public/menu_items/show.html.haml | 1 + app/views/public/shared/_first_menu.html.haml | 3 + app/views/public/shared/_ga.html.erb | 13 + config/deploy.rb | 2 +- config/environments/production.rb | 4 +- config/initializers/devise.rb | 241 - config/nginx.conf | 2 +- config/routes.rb | 23 +- db/migrate/0003_create_menu.rb | 15 + db/migrate/0004_menu_items.rb | 46 + db/migrate/0005_create_menu_aliases.rb | 15 + db/migrate/0006_create_menu_urls.rb | 15 + db/migrate/0010_create_pages.rb | 19 + db/migrate/0065_create_blocks.rb | 19 + db/migrate/0070_create_portlets.rb | 19 + db/migrate/0074_create_block_contents.rb | 20 + db/migrate/0075_create_title_contents.rb | 17 + db/migrate/0076_create_text_contents.rb | 16 + db/migrate/0077_create_image_contents.rb | 25 + db/migrate/0078_create_link_contents.rb | 24 + db/migrate/0079_create_break_contents.rb | 16 + db/migrate/0080_create_html_contents.rb | 16 + db/migrate/0081_create_download_contents.rb | 20 + db/migrate/0082_create_gallery_contents.rb | 19 + db/migrate/0090_create_external_links.rb | 21 + db/migrate/0101_create_gallery_images.rb | 20 + db/migrate/0102_create_dynamic_contents.rb | 15 + db/migrate/0105_create_map_contents.rb | 19 + db/migrate/0110_create_table_contents.rb | 17 + db/migrate/0112_create_table_rows.rb | 15 + db/migrate/0114_create_cel_tables.rb | 17 + db/migrate/0200_create_albums.rb | 17 + db/migrate/0210_create_image_files.rb | 22 + db/migrate/0300_create_file_folders.rb | 16 + db/migrate/0310_create_data_files.rb | 19 + db/migrate/1010_create_tags.rb | 19 + db/migrate/1020_create_tag_taggables.rb | 11 + db/migrate/1030_create_categories.rb | 19 + db/migrate/1040_create_articles.rb | 23 + db/migrate/1050_create_comments.rb | 22 + .../20141208202946_add_infos_to_admins.rb | 7 + db/schema.rb | 330 +- public/logo_pic_vert.png | Bin 0 -> 31338 bytes 462 files changed, 30000 insertions(+), 18801 deletions(-) create mode 100644 app/assets/javascripts/admin.coffee delete mode 100644 app/assets/javascripts/admin.js delete mode 100755 app/assets/javascripts/admin/redactor.js create mode 100644 app/assets/javascripts/bootstrap.js create mode 100644 app/assets/javascripts/bootstrap/affix.js create mode 100644 app/assets/javascripts/bootstrap/alert.js create mode 100644 app/assets/javascripts/bootstrap/button.js create mode 100644 app/assets/javascripts/bootstrap/carousel.js create mode 100644 app/assets/javascripts/bootstrap/collapse.js create mode 100755 app/assets/javascripts/bootstrap/datetimepicker.js create mode 100644 app/assets/javascripts/bootstrap/dropdown.js create mode 100644 app/assets/javascripts/bootstrap/modal.js create mode 100644 app/assets/javascripts/bootstrap/popover.js create mode 100644 app/assets/javascripts/bootstrap/scrollspy.js create mode 100644 app/assets/javascripts/bootstrap/tab.js create mode 100644 app/assets/javascripts/bootstrap/tooltip.js create mode 100644 app/assets/javascripts/bootstrap/transition.js create mode 100644 app/assets/javascripts/event_form.coffee create mode 100644 app/assets/javascripts/image_files.js create mode 100644 app/assets/javascripts/jquery.bxslider.js create mode 100755 app/assets/javascripts/jquery.easing.1.3.js create mode 100644 app/assets/javascripts/manager.js create mode 100644 app/assets/javascripts/nested_fields.coffee create mode 100644 app/assets/javascripts/pane_hover.js create mode 100755 app/assets/javascripts/redactor_plugins/fontcolor.js create mode 100755 app/assets/javascripts/redactor_plugins/fontfamily.js create mode 100755 app/assets/javascripts/redactor_plugins/fontsize.js create mode 100755 app/assets/javascripts/vendor/bootstrap-slider.js create mode 100644 app/assets/javascripts/vendor/jquery-sortable.js create mode 100644 app/assets/javascripts/vendor/jquery.event.drag.js create mode 100755 app/assets/javascripts/vendor/jquery.fileupload-process.js create mode 100755 app/assets/javascripts/vendor/jquery.fileupload-ui.js create mode 100755 app/assets/javascripts/vendor/jquery.fileupload.js create mode 100755 app/assets/javascripts/vendor/jquery.iframe-transport.js create mode 100755 app/assets/javascripts/vendor/jquery.ui.widget.js create mode 100755 app/assets/javascripts/vendor/select2.min.js create mode 100644 app/assets/javascripts/vendor/tmpl.min.js delete mode 100755 app/assets/stylesheets/admin/framework/accordion.less delete mode 100755 app/assets/stylesheets/admin/framework/alerts.less delete mode 100755 app/assets/stylesheets/admin/framework/bootstrap.less delete mode 100755 app/assets/stylesheets/admin/framework/breadcrumbs.less delete mode 100755 app/assets/stylesheets/admin/framework/button-groups.less delete mode 100755 app/assets/stylesheets/admin/framework/buttons.less delete mode 100755 app/assets/stylesheets/admin/framework/carousel.less delete mode 100755 app/assets/stylesheets/admin/framework/close.less delete mode 100755 app/assets/stylesheets/admin/framework/code.less delete mode 100755 app/assets/stylesheets/admin/framework/component-animations.less delete mode 100755 app/assets/stylesheets/admin/framework/dropdowns.less delete mode 100755 app/assets/stylesheets/admin/framework/forms.less delete mode 100644 app/assets/stylesheets/admin/framework/formt.less delete mode 100755 app/assets/stylesheets/admin/framework/grid.less delete mode 100755 app/assets/stylesheets/admin/framework/hero-unit.less delete mode 100755 app/assets/stylesheets/admin/framework/labels-badges.less delete mode 100755 app/assets/stylesheets/admin/framework/layouts.less delete mode 100755 app/assets/stylesheets/admin/framework/media.less delete mode 100755 app/assets/stylesheets/admin/framework/mixins.less delete mode 100755 app/assets/stylesheets/admin/framework/modals.less delete mode 100755 app/assets/stylesheets/admin/framework/navbar.less delete mode 100755 app/assets/stylesheets/admin/framework/navs.less delete mode 100755 app/assets/stylesheets/admin/framework/pager.less delete mode 100755 app/assets/stylesheets/admin/framework/pagination.less delete mode 100755 app/assets/stylesheets/admin/framework/popovers.less delete mode 100755 app/assets/stylesheets/admin/framework/progress-bars.less delete mode 100755 app/assets/stylesheets/admin/framework/reset.less delete mode 100755 app/assets/stylesheets/admin/framework/responsive-1200px-min.less delete mode 100755 app/assets/stylesheets/admin/framework/responsive-767px-max.less delete mode 100755 app/assets/stylesheets/admin/framework/responsive-768px-979px.less delete mode 100755 app/assets/stylesheets/admin/framework/responsive-navbar.less delete mode 100755 app/assets/stylesheets/admin/framework/responsive-utilities.less delete mode 100755 app/assets/stylesheets/admin/framework/responsive.less delete mode 100755 app/assets/stylesheets/admin/framework/scaffolding.less delete mode 100755 app/assets/stylesheets/admin/framework/slider.less delete mode 100755 app/assets/stylesheets/admin/framework/sprites.less delete mode 100755 app/assets/stylesheets/admin/framework/tables.less delete mode 100755 app/assets/stylesheets/admin/framework/thumbnails.less delete mode 100755 app/assets/stylesheets/admin/framework/tooltip.less delete mode 100755 app/assets/stylesheets/admin/framework/type.less delete mode 100755 app/assets/stylesheets/admin/framework/utilities.less delete mode 100755 app/assets/stylesheets/admin/framework/variables.less delete mode 100755 app/assets/stylesheets/admin/framework/wells.less delete mode 100755 app/assets/stylesheets/admin/lesshat.less delete mode 100644 app/assets/stylesheets/admin/pane_hover.less create mode 100644 app/assets/stylesheets/jquery.bxslider.css delete mode 100644 app/assets/stylesheets/old.fontawesome/bordered-pulled.less delete mode 100644 app/assets/stylesheets/old.fontawesome/core.less delete mode 100644 app/assets/stylesheets/old.fontawesome/fixed-width.less delete mode 100644 app/assets/stylesheets/old.fontawesome/font-awesome.less delete mode 100644 app/assets/stylesheets/old.fontawesome/icons.less delete mode 100644 app/assets/stylesheets/old.fontawesome/larger.less delete mode 100644 app/assets/stylesheets/old.fontawesome/list.less delete mode 100644 app/assets/stylesheets/old.fontawesome/mixins.less delete mode 100644 app/assets/stylesheets/old.fontawesome/path.less delete mode 100644 app/assets/stylesheets/old.fontawesome/rotated-flipped.less delete mode 100644 app/assets/stylesheets/old.fontawesome/spinning.less delete mode 100644 app/assets/stylesheets/old.fontawesome/stacked.less delete mode 100644 app/assets/stylesheets/old.fontawesome/variables.less create mode 100644 app/assets/stylesheets/public.scss create mode 100644 app/controllers/admin/admin_auths_controller.rb create mode 100644 app/controllers/admin/albums_controller.rb create mode 100644 app/controllers/admin/articles_controller.rb create mode 100644 app/controllers/admin/blocks_controller.rb create mode 100644 app/controllers/admin/categories_controller.rb create mode 100644 app/controllers/admin/cibles_controller.rb create mode 100644 app/controllers/admin/comments_controller.rb create mode 100644 app/controllers/admin/data_files_controller.rb create mode 100644 app/controllers/admin/external_links_controller.rb create mode 100644 app/controllers/admin/file_folders_controller.rb create mode 100644 app/controllers/admin/image_files_controller.rb create mode 100644 app/controllers/admin/menu_aliases_controller.rb create mode 100644 app/controllers/admin/menu_items_controller.rb create mode 100644 app/controllers/admin/menu_urls_controller.rb create mode 100644 app/controllers/admin/menus_controller.rb create mode 100644 app/controllers/admin/pages_controller.rb create mode 100644 app/controllers/portlet/block_contents_controller.rb create mode 100644 app/controllers/portlet/break_contents_controller.rb create mode 100644 app/controllers/portlet/download_contents_controller.rb create mode 100644 app/controllers/portlet/dynamic_contents_controller.rb create mode 100644 app/controllers/portlet/gallery_contents_controller.rb create mode 100644 app/controllers/portlet/gallery_images_controller.rb create mode 100644 app/controllers/portlet/html_contents_controller.rb create mode 100644 app/controllers/portlet/image_contents_controller.rb create mode 100644 app/controllers/portlet/link_contents_controller.rb create mode 100644 app/controllers/portlet/map_contents_controller.rb create mode 100644 app/controllers/portlet/portlets_controller.rb create mode 100644 app/controllers/portlet/table_cols_controller.rb create mode 100644 app/controllers/portlet/table_contents_controller.rb create mode 100644 app/controllers/portlet/table_rows_controller.rb create mode 100644 app/controllers/portlet/text_contents_controller.rb create mode 100644 app/controllers/portlet/title_contents_controller.rb create mode 100644 app/controllers/public/articles_controller.rb create mode 100644 app/controllers/public/comments_controller.rb create mode 100644 app/controllers/public/events_controller.rb create mode 100644 app/controllers/public/menu_items_controller.rb create mode 100644 app/models/album.rb create mode 100644 app/models/allowed_block_content.rb create mode 100644 app/models/article.rb create mode 100644 app/models/block.rb create mode 100644 app/models/block_content.rb create mode 100644 app/models/break_content.rb create mode 100644 app/models/category.rb create mode 100644 app/models/cel_table.rb create mode 100644 app/models/cible_alias.rb create mode 100644 app/models/cible_url.rb create mode 100644 app/models/comment.rb create mode 100644 app/models/data_file.rb create mode 100644 app/models/download_content.rb create mode 100644 app/models/dynamic_content.rb create mode 100644 app/models/external_link.rb create mode 100644 app/models/file_folder.rb create mode 100644 app/models/gallery_content.rb create mode 100644 app/models/gallery_image.rb create mode 100644 app/models/html_content.rb create mode 100644 app/models/image_content.rb create mode 100644 app/models/image_file.rb create mode 100644 app/models/img_link_content.rb create mode 100644 app/models/link_content.rb create mode 100644 app/models/map_content.rb create mode 100644 app/models/menu.rb create mode 100644 app/models/menu_alias.rb create mode 100644 app/models/menu_folder.rb create mode 100644 app/models/menu_item.rb create mode 100644 app/models/menu_url.rb create mode 100644 app/models/page.rb create mode 100644 app/models/portlet.rb create mode 100644 app/models/table_content.rb create mode 100644 app/models/table_row.rb create mode 100644 app/models/tag.rb create mode 100644 app/models/tag_taggable.rb create mode 100644 app/models/text_content.rb create mode 100644 app/models/title_content.rb create mode 100644 app/uploaders/image_uploader.rb create mode 100644 app/views/admin/admin_auths/index.haml create mode 100644 app/views/admin/admin_auths/new.haml create mode 100644 app/views/admin/albums/_album.html.haml create mode 100644 app/views/admin/albums/_albums.html.haml create mode 100644 app/views/admin/albums/_albums_navbar.html.haml create mode 100644 app/views/admin/albums/create.js.erb create mode 100644 app/views/admin/albums/destroy.js.erb create mode 100644 app/views/admin/albums/edit.js.erb create mode 100644 app/views/admin/albums/new.js.erb create mode 100644 app/views/admin/albums/update.js.erb create mode 100644 app/views/admin/articles/_article.html.haml create mode 100644 app/views/admin/articles/_form.html.haml create mode 100644 app/views/admin/articles/_index_block.html.haml create mode 100644 app/views/admin/articles/_show.html.haml create mode 100644 app/views/admin/articles/_tags.html.haml create mode 100644 app/views/admin/articles/create.js.erb create mode 100644 app/views/admin/articles/destroy.js.erb create mode 100644 app/views/admin/articles/edit.html.haml create mode 100644 app/views/admin/articles/edit.js.erb create mode 100644 app/views/admin/articles/index.html.haml create mode 100644 app/views/admin/articles/index.js.erb create mode 100644 app/views/admin/articles/new.js.erb create mode 100644 app/views/admin/articles/update.js.erb create mode 100644 app/views/admin/blocks/_block.html.haml create mode 100644 app/views/admin/blocks/_block_allowed.html.haml create mode 100644 app/views/admin/blocks/_edit.html.haml create mode 100644 app/views/admin/blocks/_form.html.haml create mode 100644 app/views/admin/blocks/edit.html.haml create mode 100644 app/views/admin/blocks/edit.js.erb create mode 100644 app/views/admin/blocks/old.block create mode 100644 app/views/admin/blocks/old.show.html.haml create mode 100644 app/views/admin/categories/_category.html.haml create mode 100644 app/views/admin/categories/_form.html.haml create mode 100644 app/views/admin/categories/_index_block.html.haml create mode 100644 app/views/admin/categories/cible.html.haml create mode 100644 app/views/admin/categories/create.js.erb create mode 100644 app/views/admin/categories/destroy.js.erb create mode 100644 app/views/admin/categories/edit.js.erb create mode 100644 app/views/admin/categories/index.html.haml create mode 100644 app/views/admin/categories/index.js.erb create mode 100644 app/views/admin/categories/new.js.erb create mode 100644 app/views/admin/categories/reorder.js.erb create mode 100644 app/views/admin/categories/update.js.erb create mode 100644 app/views/admin/categories/update_row.js.erb create mode 100644 app/views/admin/cibles/_cible_place.html.haml create mode 100644 app/views/admin/cibles/index.html.haml create mode 100644 app/views/admin/cibles/index.js.erb create mode 100644 app/views/admin/cibles/new.html.haml create mode 100644 app/views/admin/comments/_comment.html.haml create mode 100644 app/views/admin/comments/_form.html.haml create mode 100644 app/views/admin/comments/destroy.js.erb create mode 100644 app/views/admin/comments/edit.js.erb create mode 100644 app/views/admin/comments/index.html.haml create mode 100644 app/views/admin/comments/update.js.erb create mode 100644 app/views/admin/data_files/_data_file.html.haml create mode 100644 app/views/admin/data_files/_data_files_container.html.haml create mode 100644 app/views/admin/data_files/_form.html.haml create mode 100644 app/views/admin/data_files/_index_block.html.haml create mode 100644 app/views/admin/data_files/_show.html.haml create mode 100644 app/views/admin/data_files/create.js.erb create mode 100644 app/views/admin/data_files/destroy.js.erb create mode 100644 app/views/admin/data_files/index.html.haml create mode 100644 app/views/admin/data_files/index.js.erb create mode 100644 app/views/admin/data_files/show.js.erb create mode 100644 app/views/admin/data_files/update.js.erb create mode 100644 app/views/admin/external_links/_external_link.html.haml create mode 100644 app/views/admin/external_links/_form.html.haml create mode 100644 app/views/admin/external_links/cible.html.haml create mode 100644 app/views/admin/external_links/create.js.erb create mode 100644 app/views/admin/external_links/destroy.js.erb create mode 100644 app/views/admin/external_links/edit.html.haml create mode 100644 app/views/admin/external_links/edit.js.erb create mode 100644 app/views/admin/external_links/index.js.erb create mode 100644 app/views/admin/external_links/new.js.erb create mode 100644 app/views/admin/external_links/show.html.haml create mode 100644 app/views/admin/external_links/update.js.erb create mode 100644 app/views/admin/file_folders/_file_folder.html.haml create mode 100644 app/views/admin/file_folders/_file_folders.html.haml create mode 100644 app/views/admin/file_folders/_file_folders_navbar.html.haml create mode 100644 app/views/admin/file_folders/create.js.erb create mode 100644 app/views/admin/file_folders/destroy.js.erb create mode 100644 app/views/admin/file_folders/edit.js.erb create mode 100644 app/views/admin/file_folders/index.js.erb create mode 100644 app/views/admin/file_folders/new.js.erb create mode 100644 app/views/admin/file_folders/update.js.erb create mode 100644 app/views/admin/image_files/_form.html.haml create mode 100644 app/views/admin/image_files/_image_file.html.haml create mode 100644 app/views/admin/image_files/_image_files_container.html.haml create mode 100644 app/views/admin/image_files/_index_block.html.haml create mode 100644 app/views/admin/image_files/_show.html.haml create mode 100644 app/views/admin/image_files/create.js.erb create mode 100644 app/views/admin/image_files/destroy.js.erb create mode 100644 app/views/admin/image_files/index.html.haml create mode 100644 app/views/admin/image_files/index.js.erb create mode 100644 app/views/admin/image_files/rotate.js.erb create mode 100644 app/views/admin/image_files/show.js.erb create mode 100644 app/views/admin/image_files/update.js.erb create mode 100644 app/views/admin/menu_aliases/_form.html.haml create mode 100644 app/views/admin/menu_aliases/_menu_alias.html.haml create mode 100644 app/views/admin/menu_aliases/edit.html.haml create mode 100644 app/views/admin/menu_items/_cible_line.html.haml create mode 100644 app/views/admin/menu_items/_edit_form.html.haml create mode 100644 app/views/admin/menu_items/_form.html.haml create mode 100644 app/views/admin/menu_items/_form_line.html.haml create mode 100644 app/views/admin/menu_items/_index_block.html.haml create mode 100644 app/views/admin/menu_items/_menu_item.html.haml create mode 100644 app/views/admin/menu_items/_menu_item_content_form.html.haml create mode 100644 app/views/admin/menu_items/_new_form.html.haml create mode 100644 app/views/admin/menu_items/_show.html.haml create mode 100644 app/views/admin/menu_items/archives.html.haml create mode 100644 app/views/admin/menu_items/cible.html.haml create mode 100644 app/views/admin/menu_items/create.js.erb create mode 100644 app/views/admin/menu_items/edit.html.haml create mode 100644 app/views/admin/menu_items/edit.js.erb create mode 100644 app/views/admin/menu_items/import.html.haml create mode 100644 app/views/admin/menu_items/index.html.haml create mode 100644 app/views/admin/menu_items/index.js.erb create mode 100644 app/views/admin/menu_items/new.html.haml create mode 100644 app/views/admin/menu_items/new.js.erb create mode 100644 app/views/admin/menu_items/reorder.js.erb create mode 100644 app/views/admin/menu_items/show.js.erb create mode 100644 app/views/admin/menu_items/update.js.erb create mode 100644 app/views/admin/menu_items/update_reorder_failled.js.erb create mode 100644 app/views/admin/menu_urls/_form.html.haml create mode 100644 app/views/admin/menu_urls/_menu_url.html.haml create mode 100644 app/views/admin/menu_urls/edit.html.haml create mode 100644 app/views/admin/menus/_form.html.haml create mode 100644 app/views/admin/menus/_index_block.html.haml create mode 100644 app/views/admin/menus/_menu.html.haml create mode 100644 app/views/admin/menus/edit.html.haml create mode 100644 app/views/admin/menus/index.html.haml create mode 100644 app/views/admin/menus/index.js.erb create mode 100644 app/views/admin/menus/new.html.haml create mode 100644 app/views/admin/menus/show.html.haml create mode 100644 app/views/admin/pages/_form.html.haml create mode 100644 app/views/admin/pages/_page.html.haml create mode 100644 app/views/admin/pages/edit.html.haml create mode 100644 app/views/admin/pages/update.html.haml create mode 100644 app/views/admin/password_resets/edit.html.haml create mode 100644 app/views/admin/password_resets/new.html.haml create mode 100644 app/views/admin/passwords/edit.html.haml create mode 100644 app/views/admin/passwords/new.html.haml create mode 100644 app/views/layouts/public.html.haml create mode 100644 app/views/portlet/block_contents/_block_content.html.haml create mode 100644 app/views/portlet/block_contents/_form.html.haml create mode 100644 app/views/portlet/break_contents/_break_content.html.haml create mode 100644 app/views/portlet/break_contents/_form.html.haml create mode 100644 app/views/portlet/download_contents/_download_content.html.haml create mode 100644 app/views/portlet/download_contents/_form.html.haml create mode 100644 app/views/portlet/dynamic_contents/_dynamic_content.html.haml create mode 100644 app/views/portlet/dynamic_contents/_form.html.haml create mode 100644 app/views/portlet/gallery_contents/_form.html.haml create mode 100644 app/views/portlet/gallery_contents/_gallery_content.html.haml create mode 100644 app/views/portlet/gallery_images/_form.html.haml create mode 100644 app/views/portlet/gallery_images/_gallery_image.html.haml create mode 100644 app/views/portlet/gallery_images/create.js.erb create mode 100644 app/views/portlet/gallery_images/destroy.js.erb create mode 100644 app/views/portlet/gallery_images/edit.js.erb create mode 100644 app/views/portlet/gallery_images/reorder.js.erb create mode 100644 app/views/portlet/gallery_images/update.js.erb create mode 100644 app/views/portlet/html_contents/_form.html.haml create mode 100644 app/views/portlet/html_contents/_html_content.html.haml create mode 100644 app/views/portlet/image_contents/_form.html.haml create mode 100644 app/views/portlet/image_contents/_image_content.html.haml create mode 100644 app/views/portlet/link_contents/_form.html.haml create mode 100644 app/views/portlet/link_contents/_link_content.html.haml create mode 100644 app/views/portlet/map_contents/_form.html.haml create mode 100644 app/views/portlet/map_contents/_map_content.html.haml create mode 100644 app/views/portlet/portlets/_portlet.html.haml create mode 100644 app/views/portlet/portlets/new.html.haml create mode 100644 app/views/portlet/portlets/new.js.erb create mode 100644 app/views/portlet/portlets/update.js.erb create mode 100644 app/views/portlet/shared/create.js.erb create mode 100644 app/views/portlet/shared/destroy.js.erb create mode 100644 app/views/portlet/shared/edit.js.erb create mode 100644 app/views/portlet/shared/new.js.erb create mode 100644 app/views/portlet/shared/update.js.erb create mode 100644 app/views/portlet/table_cols/create.js.erb create mode 100644 app/views/portlet/table_cols/destroy.js.erb create mode 100644 app/views/portlet/table_contents/_form.html.haml create mode 100644 app/views/portlet/table_contents/_table_content.html.haml create mode 100644 app/views/portlet/table_contents/_table_content_edit_pane.html.haml create mode 100644 app/views/portlet/table_contents/destroy_row.js.erb create mode 100644 app/views/portlet/table_rows/create.js.erb create mode 100644 app/views/portlet/table_rows/destroy.js.erb create mode 100644 app/views/portlet/text_contents/_form.html.haml create mode 100644 app/views/portlet/text_contents/_text_content.html.haml create mode 100644 app/views/portlet/title_contents/_form.html.haml create mode 100644 app/views/portlet/title_contents/_title_content.html.haml create mode 100644 app/views/portlets/render_public/_blockcontent.html.haml create mode 100644 app/views/portlets/render_public/_breakcontent.html.haml create mode 100644 app/views/portlets/render_public/_downloadcontent.html.haml create mode 100644 app/views/portlets/render_public/_dynamiccontent.html.haml create mode 100644 app/views/portlets/render_public/_eventcontent.html.haml create mode 100644 app/views/portlets/render_public/_gallerycontent.html.haml create mode 100644 app/views/portlets/render_public/_htmlcontent.html.haml create mode 100644 app/views/portlets/render_public/_imagecontent.html.haml create mode 100644 app/views/portlets/render_public/_imglinkcontent.html.haml create mode 100644 app/views/portlets/render_public/_linkcontent.html.haml create mode 100644 app/views/portlets/render_public/_mapcontent.html.haml create mode 100644 app/views/portlets/render_public/_tablecontent.html.haml create mode 100644 app/views/portlets/render_public/_textcontent.html.haml create mode 100644 app/views/portlets/render_public/_titlecontent.html.haml create mode 100644 app/views/public/articles/_article.html.haml create mode 100644 app/views/public/articles/_article_intro.html.haml create mode 100644 app/views/public/articles/_index.html.haml create mode 100644 app/views/public/articles/_sidebar_archives.html.haml create mode 100644 app/views/public/articles/_sidebar_categories.html.haml create mode 100644 app/views/public/articles/_sidebar_recents.html.haml create mode 100644 app/views/public/articles/_sidebar_tags.html.haml create mode 100644 app/views/public/articles/archive.html.haml create mode 100644 app/views/public/articles/feed.rss.builder create mode 100644 app/views/public/articles/index.html.haml create mode 100644 app/views/public/articles/index.js.erb create mode 100644 app/views/public/articles/show.html.haml create mode 100644 app/views/public/blocks/_block.html.haml create mode 100644 app/views/public/comments/_comment.html.haml create mode 100644 app/views/public/comments/_form.html.haml create mode 100644 app/views/public/comments/create.js.erb create mode 100644 app/views/public/events/_event.haml create mode 100644 app/views/public/events/index.html.haml create mode 100644 app/views/public/events/show.html.haml create mode 100644 app/views/public/menu_items/show.html.haml create mode 100644 app/views/public/shared/_first_menu.html.haml create mode 100644 app/views/public/shared/_ga.html.erb delete mode 100644 config/initializers/devise.rb create mode 100644 db/migrate/0003_create_menu.rb create mode 100644 db/migrate/0004_menu_items.rb create mode 100644 db/migrate/0005_create_menu_aliases.rb create mode 100644 db/migrate/0006_create_menu_urls.rb create mode 100644 db/migrate/0010_create_pages.rb create mode 100644 db/migrate/0065_create_blocks.rb create mode 100644 db/migrate/0070_create_portlets.rb create mode 100644 db/migrate/0074_create_block_contents.rb create mode 100644 db/migrate/0075_create_title_contents.rb create mode 100644 db/migrate/0076_create_text_contents.rb create mode 100644 db/migrate/0077_create_image_contents.rb create mode 100644 db/migrate/0078_create_link_contents.rb create mode 100644 db/migrate/0079_create_break_contents.rb create mode 100644 db/migrate/0080_create_html_contents.rb create mode 100644 db/migrate/0081_create_download_contents.rb create mode 100644 db/migrate/0082_create_gallery_contents.rb create mode 100644 db/migrate/0090_create_external_links.rb create mode 100644 db/migrate/0101_create_gallery_images.rb create mode 100644 db/migrate/0102_create_dynamic_contents.rb create mode 100644 db/migrate/0105_create_map_contents.rb create mode 100644 db/migrate/0110_create_table_contents.rb create mode 100644 db/migrate/0112_create_table_rows.rb create mode 100644 db/migrate/0114_create_cel_tables.rb create mode 100644 db/migrate/0200_create_albums.rb create mode 100644 db/migrate/0210_create_image_files.rb create mode 100644 db/migrate/0300_create_file_folders.rb create mode 100644 db/migrate/0310_create_data_files.rb create mode 100644 db/migrate/1010_create_tags.rb create mode 100644 db/migrate/1020_create_tag_taggables.rb create mode 100644 db/migrate/1030_create_categories.rb create mode 100644 db/migrate/1040_create_articles.rb create mode 100644 db/migrate/1050_create_comments.rb create mode 100644 db/migrate/20141208202946_add_infos_to_admins.rb create mode 100644 public/logo_pic_vert.png diff --git a/app/assets/images/admin/default_image.png b/app/assets/images/admin/default_image.png index a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HbAtEoNmyQ2Bug9?v{nhX*)h08x=#!xCk&zLLI{y<1C8f`j z_+gtTCqBYlj;=Kwz~wDL_~=Cl1@}6au6TW2NOY=Zg}0|CKT`^qZy@b<0N%L0F#I$~ zVx-}S>3HPyo1JliW<_qfbz+T27EC`f-cg)JcF3mQ=*6Qz0#~L|RegPPba7mQ{(dF= z`QLmzv>y62w0A#nfyY*Nt*5~p-&!o6f{37MD%9W<^^I7Q?NiT^`Z&Hcezj)BOQw{o z8%f4L-=7DL>D{N=QwsGsxpr=jbm&uZC%|8`;-dVtcm4!>(+8PHE6WbyYR;35V*x5@ zH(5NypMLvE*&DmH&Q;^utc!5*yF9&zRT`AS+Q4Y--bF)wT3ve_IKD(A86}7f`<)sS zXx7qkhd(sz+oMu5J?nc{)3Y)CV3{DHf9HShaIO#{l$q;fQo{qJVMqg^1lFH C%zuFZ diff --git a/app/assets/javascripts/admin.coffee b/app/assets/javascripts/admin.coffee new file mode 100644 index 0000000..bbe478d --- /dev/null +++ b/app/assets/javascripts/admin.coffee @@ -0,0 +1,411 @@ + +#= require jquery +#= require jquery_ujs +# require turbolinks + +#= require event_form +#= require bootstrap + +#= require vendor/jquery-sortable +#= require vendor/jquery.event.drag.js +#= require vendor/bootstrap-slider +#= require vendor/jquery.ui.widget +#= require vendor/tmpl.min +#= require vendor/jquery.iframe-transport +#= require vendor/jquery.fileupload +#= require vendor/jquery.fileupload-ui +#= require vendor/jquery.fileupload-process +#= require vendor/select2.min + + +#= require manager +#= require image_files +#= require pane_hover + + +#= require redactor +#= require redactor_plugins/fontsize +#= require redactor_plugins/fontfamily +#= require redactor_plugins/fontcolor + +#= require nested_fields +#= require_tree ./admin + +#require ./shared/jquery.strings.js +#require ./shared/jquery.utils.js +#require ./shared/ui.timepickr.js +#require ./shared/modernizr.js + + +#= require ./shared/raphael +#= require ./shared/morris +#= require_tree ./note_files + +portlet_to_move = false +content_type_to_move =false +@open_collapse3 = -> + $("#collapse3 .panel").show() + $("#collapse3").show() + +@reset_edit_pane = -> + $("#element_form").html() + $("#collapse3").hide() + +@unselect_portlet = -> + $(".portlet.active").removeClass("active") + reset_edit_pane() + +@cancel_move_portlet = -> + $(".move_message").show() + $(".cancel_message").hide() + + $(".move").removeClass("move") + $(".portlet_placeholder").remove() + portlet_to_move = false + +$(document).ready -> + + $(document).on 'click', 'input.datepicker', -> + $(this).datetimepicker( + language: 'fr' + pickTime: false + ).focus(); + + $(document).on 'click', 'input.datetimepicker', -> + $(this).datetimepicker( + use24hours: true + format: 'DD/MM/YYYY hh:mm' + minuteStepping:15 + language: 'fr' + ).focus(); + + + $(document).on 'click', 'input.timepicker', -> + $(this).datetimepicker( + use24hours: true + format: 'DD/MM/YYYY hh:mm' + minuteStepping:15 + pickDate: false + language: 'fr' + ).focus(); + + + + + + + $(document).on "click", ".portlet", (event) -> + if !$(this).hasClass("active") and portlet_to_move == false + + $(".portlet.active").removeClass("active") + $(this).addClass("active") + + + $.ajax({url : $(this).data("edit-link"), type: "GET"}); + $("#collapse3 .trash").attr("href", $(this).data("show-link")); + + event.stopPropagation(); + + $(document).on "click", ".block_portlets", (event) -> + portlet_to_move = false + content_type_to_move = false + $("#element_form").html("") + + $(".portlet.active").removeClass("active") + + + + + + $(document).on "click", "#content_types .content_type", -> + cancel_move_portlet() + unselect_portlet() + reset_edit_pane() + + + type = $(this).data("type") + content_type_to_move = type + init_portlets_place_holder() + $(this).addClass("move") + false + + + + $(document).on "click", ".portlet_handle", -> + if portlet_to_move == false + + $(".move_message").hide() + $(".cancel_message").show() + + + id = $(this).data("portlet-id") + portlet_to_move = $("#portlet_"+id) + init_portlets_place_holder() + portlet_to_move.addClass("move") + false + else + cancel_move_portlet() + + false + + $(document).on "click", ".portlet_placeholder", -> + if portlet_to_move != false + $(this).after portlet_to_move + $(".move").removeClass("move") + $(".portlet_placeholder").remove() + update_block_portlet_order(portlet_to_move.closest(".block_portlets").data("block_id")) + cancel_move_portlet() + else + + block_id = $(this).closest(".block_portlets").data("block_id") + + + $(this).replaceWith('
'); + + $.ajax({ + url:"/portlet/portlets/new.js", + type: "GET", + data: { + block_id : block_id, + position : $(this).attr("data_position"), + content_type : content_type_to_move + } + + }) + content_type_to_move = false + $(".portlet_placeholder").remove() + + + + +@init_portlets_place_holder = -> + placeholder = '
' + $(".block_portlets").each -> + $(this).find(".portlet_placeholder").remove() + $(this).prepend(placeholder) + $(this).find(".portlet").each -> + $(this).after(placeholder) + + + + +@flash_delay = -> + $("#flashs").find(".alert").each -> + + if !$(this).hasClass("delay") + $(this).addClass("delay") + $(this).delay(3000).fadeOut(); + + + +@init_menu_items_list = -> + + if $(".prevv_folder").length > 0 + + $(".prevv_folder").sortable({ + group:"menu_items", + containerSelector :".receptable", + itemSelector:".menu_item_row", + handle: ".handle", + nested:false, + placeholder:"
", + + + }) + oldContainer = "" + $("#sortable_menu_item").sortable({ + group:"menu_items", + containerSelector :".receptable", + itemSelector:".menu_item_row", + handle: ".handle", + nested:true, + placeholder:"
", + afterMove: (placeholder, container) -> + if oldContainer != container and container.el.hasClass("prevv_folder") + if oldContainer + oldContainer.el.removeClass("active") + container.el.addClass("active") + oldContainer = container + onDrop: (item, Container, _super) -> + + + if Container + + parent_id = Container.el.data("parent-id") + menu_id = Container.el.data("menu-id") + id = item.data("menu-item-id") + $.ajax({ + url:"/admin/menu_items/"+id+".js", + type: "PUT", + data: { + reorder : true, + menu_item : { + parent_id : parent_id, + menu_id : menu_id + } + }, + success : -> + + + _super(item) + item.remove() + + }) + + + + + + else + + + + + _super(item) + + sortable_data = {parent_id :$("#sortable_menu_item").data("parent-id"), menu_id :$("#sortable_menu_item").data("menu-id") , menu_items_ids : []} + + $("#sortable_menu_item").find(".menu_item_row").each -> + sortable_data.menu_items_ids.push $(this).data("menu-item-id") + + + $.ajax({url : "/admin/menu_items/reorder", data : sortable_data, type: "POST"}); + + }) + + +@update_block_portlet_order = (block_portlet_id) -> + return_order = [] + + block_portlet = $("#block_portlet_"+block_portlet_id) + + block_data = {block_id : block_portlet.data('block_id'), block_portlet_ids : []} + + block_portlet.children('.portlet').each -> + if $(this).data('portlet_id') + block_data.block_portlet_ids.push($(this).data('portlet_id')) + + + + return_order.push(block_data); + + + + $.ajax({url : "/portlet/portlets/reorder", data : {blocks:return_order}, type: "POST"}) + + +jQuery -> + + $(".inline-contenteditable").keypress (e) -> + if e.which == 13 + false + else + $(this).html($(this).text()) + return true + + + $(document).on 'click', ".portlet_title_content .inline-contenteditable", () -> + + $.ajax + url : "/portlet/title_contents/"+$(this).data("title-id")+"/edit.js", + type: "GET", + + $(document).on 'blur keyup paste', ".portlet_title_content .inline-contenteditable", () -> + $(this).html($(this).text()) + $.ajax + url : "/portlet/title_contents/"+$(this).data("title-id"), + type: "PUT", + data : + title_content : + content : $(this).html() + + + + + $(".sortable").sortable({ + + containerSelector :".block", + itemSelector:".portlet", + handle: ".handle", + nested:true, + placeholder:"
" + + }) + + + + + + flash_delay(); + + + item_catched = "" + + + adjustment = "" + + $("#menu_item_inspector_container").sortable({ + + + itemSelector:"#menu_item_informations", + pullPlaceholder :false, + placeholder : "", + handle: ".inspector_handle", + onDragStart: ($item, container, _super) -> + $item.css({ + height: $item.height(), + width: $item.width() + }) + + $("body").addClass("dragging") + + offset = $item.offset() + pointer = container.rootGroup.pointer + adjustment = { + left: pointer.left - offset.left, + top: pointer.top - offset.top + } + + onCancel : ($item, container, _super) -> + $item.css(position) + $item.removeClass("dragged") + $("body").removeClass("dragging") + + onDrag: ($item, position, _super) -> + + $item.css({ + left: position.left - adjustment.left, + top: position.top - adjustment.top - $(window).scrollTop() + }) + + + + + + }) + + + + + + +$(document).on "scroll", () -> + + if( $(this).scrollTop() <= 52 ) + top = 52 - $(this).scrollTop() + else + top = 0 + + $("#toolbar-text, #menu_item_informations").css + top : top + +$(document).on "click", "#menu_item_informations .save", -> + $(this).closest(".panel").find("form").submit() + return false + +$(document).on "click", "#menu_item_informations h4", -> + $(this).next(".panel").toggle() + return false + + + diff --git a/app/assets/javascripts/admin.js b/app/assets/javascripts/admin.js deleted file mode 100644 index 634a807..0000000 --- a/app/assets/javascripts/admin.js +++ /dev/null @@ -1,34 +0,0 @@ -/* -=require jquery -= require twitter/bootstrap - - -require ./shared/jquery.strings.js -require ./shared/jquery.utils.js -require ./shared/ui.timepickr.js -require ./shared/modernizr.js - -*= require jquery_ujs - - -*= require_tree ./admin - - -*= require ./shared/raphael -*= require ./shared/morris - -*= require_tree ./note_files - - - - - - -*/ - - -$(document).ready(function(){ - - - -}); \ No newline at end of file diff --git a/app/assets/javascripts/admin/redactor.js b/app/assets/javascripts/admin/redactor.js deleted file mode 100755 index 08b8ccf..0000000 --- a/app/assets/javascripts/admin/redactor.js +++ /dev/null @@ -1,4210 +0,0 @@ -/* - Redactor v8.2.2 - Updated: January 17, 2013 - - http://redactorjs.com/ - - Copyright (c) 2009-2013, Imperavi Inc. - License: http://redactorjs.com/license/ - - Usage: $('#content').redactor(); -*/ - -var rwindow, rdocument; - -if (typeof RELANG === 'undefined') -{ - var RELANG = {}; -} - -var RLANG = { - html: 'HTML', - video: 'Insert Video', - image: 'Insert Image', - table: 'Table', - link: 'Link', - link_insert: 'Insert link', - unlink: 'Unlink', - formatting: 'Formatting', - paragraph: 'Paragraph', - quote: 'Quote', - code: 'Code', - header1: 'Header 1', - header2: 'Header 2', - header3: 'Header 3', - header4: 'Header 4', - bold: 'Bold', - italic: 'Italic', - fontcolor: 'Font Color', - backcolor: 'Back Color', - unorderedlist: 'Unordered List', - orderedlist: 'Ordered List', - outdent: 'Outdent', - indent: 'Indent', - cancel: 'Cancel', - insert: 'Insert', - save: 'Save', - _delete: 'Delete', - insert_table: 'Insert Table', - insert_row_above: 'Add Row Above', - insert_row_below: 'Add Row Below', - insert_column_left: 'Add Column Left', - insert_column_right: 'Add Column Right', - delete_column: 'Delete Column', - delete_row: 'Delete Row', - delete_table: 'Delete Table', - rows: 'Rows', - columns: 'Columns', - add_head: 'Add Head', - delete_head: 'Delete Head', - title: 'Title', - image_position: 'Position', - none: 'None', - left: 'Left', - right: 'Right', - image_web_link: 'Image Web Link', - text: 'Text', - mailto: 'Email', - web: 'URL', - video_html_code: 'Video Embed Code', - file: 'Insert File', - upload: 'Upload', - download: 'Download', - choose: 'Choose', - or_choose: 'Or choose', - drop_file_here: 'Drop file here', - align_left: 'Align text to the left', - align_center: 'Center text', - align_right: 'Align text to the right', - align_justify: 'Justify text', - horizontalrule: 'Insert Horizontal Rule', - deleted: 'Deleted', - anchor: 'Anchor', - link_new_tab: 'Open link in new tab', - underline: 'Underline', - alignment: 'Alignment' -}; - -(function($){ - - // Plugin - jQuery.fn.redactor = function(option) - { - return this.each(function() - { - var $obj = $(this); - - var data = $obj.data('redactor'); - if (!data) - { - $obj.data('redactor', (data = new Redactor(this, option))); - } - }); - }; - - - // Initialization - var Redactor = function(element, options) - { - // Element - this.$el = $(element); - - // Lang - if (typeof options !== 'undefined' && typeof options.lang !== 'undefined' && options.lang !== 'en' && typeof RELANG[options.lang] !== 'undefined') - { - RLANG = RELANG[options.lang]; - } - - // Options - this.opts = $.extend({ - - iframe: false, - css: false, // url - - lang: 'en', - direction: 'ltr', // ltr or rtl - - callback: false, // function - keyupCallback: false, // function - keydownCallback: false, // function - execCommandCallback: false, // function - - plugins: false, - cleanup: true, - - focus: false, - tabindex: false, - autoresize: true, - minHeight: false, - fixed: false, - fixedTop: 0, // pixels - fixedBox: false, - source: true, - shortcuts: true, - - mobile: true, - air: false, // true or toolbar - wym: false, - - convertLinks: true, - convertDivs: true, - protocol: 'http://', // for links http or https or ftp or false - - autosave: false, // false or url - autosaveCallback: false, // function - interval: 60, // seconds - - imageGetJson: false, // url (ex. /folder/images.json ) or false - - imageUpload: false, // url - imageUploadCallback: false, // function - imageUploadErrorCallback: false, // function - - fileUpload: false, // url - fileUploadCallback: false, // function - fileUploadErrorCallback: false, // function - - uploadCrossDomain: false, - uploadFields: false, - - observeImages: true, - overlay: true, // modal overlay - - allowedTags: ["form", "input", "button", "select", "option", "datalist", "output", "textarea", "fieldset", "legend", - "section", "header", "hgroup", "aside", "footer", "article", "details", "nav", "progress", "time", "canvas", - "code", "span", "div", "label", "a", "br", "p", "b", "i", "del", "strike", "u", - "img", "video", "source", "track", "audio", "iframe", "object", "embed", "param", "blockquote", - "mark", "cite", "small", "ul", "ol", "li", "hr", "dl", "dt", "dd", "sup", "sub", - "big", "pre", "code", "figure", "figcaption", "strong", "em", "table", "tr", "td", - "th", "tbody", "thead", "tfoot", "h1", "h2", "h3", "h4", "h5", "h6"], - - toolbarExternal: false, // ID selector - - buttonsCustom: {}, - buttonsAdd: [], - buttons: ['html', '|', 'formatting', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', - 'image', 'video', 'file', 'table', 'link', '|', - 'fontcolor', 'backcolor', '|', 'alignment', '|', 'horizontalrule'], // 'underline', 'alignleft', 'aligncenter', 'alignright', 'justify' - - airButtons: ['formatting', '|', 'bold', 'italic', 'deleted', '|', 'unorderedlist', 'orderedlist', 'outdent', 'indent', '|', 'fontcolor', 'backcolor'], - - formattingTags: ['p', 'blockquote', 'pre', 'h1', 'h2', 'h3', 'h4'], - - activeButtons: ['deleted', 'italic', 'bold', 'underline', 'unorderedlist', 'orderedlist'], // 'alignleft', 'aligncenter', 'alignright', 'justify' - activeButtonsStates: { - b: 'bold', - strong: 'bold', - i: 'italic', - em: 'italic', - del: 'deleted', - strike: 'deleted', - ul: 'unorderedlist', - ol: 'orderedlist', - u: 'underline' - }, - - colors: [ - '#ffffff', '#000000', '#eeece1', '#1f497d', '#4f81bd', '#c0504d', '#9bbb59', '#8064a2', '#4bacc6', '#f79646', '#ffff00', - '#f2f2f2', '#7f7f7f', '#ddd9c3', '#c6d9f0', '#dbe5f1', '#f2dcdb', '#ebf1dd', '#e5e0ec', '#dbeef3', '#fdeada', '#fff2ca', - '#d8d8d8', '#595959', '#c4bd97', '#8db3e2', '#b8cce4', '#e5b9b7', '#d7e3bc', '#ccc1d9', '#b7dde8', '#fbd5b5', '#ffe694', - '#bfbfbf', '#3f3f3f', '#938953', '#548dd4', '#95b3d7', '#d99694', '#c3d69b', '#b2a2c7', '#b7dde8', '#fac08f', '#f2c314', - '#a5a5a5', '#262626', '#494429', '#17365d', '#366092', '#953734', '#76923c', '#5f497a', '#92cddc', '#e36c09', '#c09100', - '#7f7f7f', '#0c0c0c', '#1d1b10', '#0f243e', '#244061', '#632423', '#4f6128', '#3f3151', '#31859b', '#974806', '#7f6000'], - - // private - emptyHtml: '


', - buffer: false, - visual: true, - - // modal windows container - modal_file: String() + - '
' + - '
' + - '' + - '' + - '
' + - '' + - '
' + - '

' + - '
', - - modal_image_edit: String() + - '
' + - '' + - '' + - '' + - '' + - '' + - '' + - '
' + - '', - - modal_image: String() + - '
' + - '' + - '
' + - '
' + - '' + - '
' + - '' + - '
' + - '' + - '
' + - '', - - modal_link: String() + - '
' + - '
' + - '
' + - 'URL' + - 'Email' + - '' + RLANG.anchor + '' + - '
' + - '' + - '
' + - '' + - '' + - '' + - '
' + - '' + - '' + - '
' + - '
' + - '', - - modal_table: String() + - '
' + - '' + - '' + - '' + - '' + - '
' + - '', - - modal_video: String() + - '
' + - '
' + - '' + - '' + - '
' + - '
'+ - '', - - toolbar: { - html: - { - title: RLANG.html, - func: 'toggle' - }, - formatting: - { - title: RLANG.formatting, - func: 'show', - dropdown: - { - p: - { - title: RLANG.paragraph, - exec: 'formatblock' - }, - blockquote: - { - title: RLANG.quote, - exec: 'formatblock', - className: 'redactor_format_blockquote' - }, - pre: - { - title: RLANG.code, - exec: 'formatblock', - className: 'redactor_format_pre' - }, - h1: - { - title: RLANG.header1, - exec: 'formatblock', - className: 'redactor_format_h1' - }, - h2: - { - title: RLANG.header2, - exec: 'formatblock', - className: 'redactor_format_h2' - }, - h3: - { - title: RLANG.header3, - exec: 'formatblock', - className: 'redactor_format_h3' - }, - h4: - { - title: RLANG.header4, - exec: 'formatblock', - className: 'redactor_format_h4' - } - } - }, - bold: - { - title: RLANG.bold, - exec: 'bold' - }, - italic: - { - title: RLANG.italic, - exec: 'italic' - }, - deleted: - { - title: RLANG.deleted, - exec: 'strikethrough' - }, - underline: - { - title: RLANG.underline, - exec: 'underline' - }, - unorderedlist: - { - title: '• ' + RLANG.unorderedlist, - exec: 'insertunorderedlist' - }, - orderedlist: - { - title: '1. ' + RLANG.orderedlist, - exec: 'insertorderedlist' - }, - outdent: - { - title: '< ' + RLANG.outdent, - exec: 'outdent' - }, - indent: - { - title: '> ' + RLANG.indent, - exec: 'indent' - }, - image: - { - title: RLANG.image, - func: 'showImage' - }, - video: - { - title: RLANG.video, - func: 'showVideo' - }, - file: - { - title: RLANG.file, - func: 'showFile' - }, - table: - { - title: RLANG.table, - func: 'show', - dropdown: - { - insert_table: - { - title: RLANG.insert_table, - func: 'showTable' - }, - separator_drop1: - { - name: 'separator' - }, - insert_row_above: - { - title: RLANG.insert_row_above, - func: 'insertRowAbove' - }, - insert_row_below: - { - title: RLANG.insert_row_below, - func: 'insertRowBelow' - }, - insert_column_left: - { - title: RLANG.insert_column_left, - func: 'insertColumnLeft' - }, - insert_column_right: - { - title: RLANG.insert_column_right, - func: 'insertColumnRight' - }, - separator_drop2: - { - name: 'separator' - }, - add_head: - { - title: RLANG.add_head, - func: 'addHead' - }, - delete_head: - { - title: RLANG.delete_head, - func: 'deleteHead' - }, - separator_drop3: - { - name: 'separator' - }, - delete_column: - { - title: RLANG.delete_column, - func: 'deleteColumn' - }, - delete_row: - { - title: RLANG.delete_row, - func: 'deleteRow' - }, - delete_table: - { - title: RLANG.delete_table, - func: 'deleteTable' - } - } - }, - link: - { - title: RLANG.link, - func: 'show', - dropdown: - { - link: - { - title: RLANG.link_insert, - func: 'showLink' - }, - unlink: - { - title: RLANG.unlink, - exec: 'unlink' - } - } - }, - fontcolor: - { - title: RLANG.fontcolor, - func: 'show' - }, - backcolor: - { - title: RLANG.backcolor, - func: 'show' - }, - alignment: - { - title: RLANG.alignment, - func: 'show', - dropdown: - { - alignleft: - { - title: RLANG.align_left, - exec: 'JustifyLeft' - }, - aligncenter: - { - title: RLANG.align_center, - exec: 'JustifyCenter' - }, - alignright: - { - title: RLANG.align_right, - exec: 'JustifyRight' - }, - justify: - { - title: RLANG.align_justify, - exec: 'JustifyFull' - } - } - }, - alignleft: - { - exec: 'JustifyLeft', - title: RLANG.align_left - }, - aligncenter: - { - exec: 'JustifyCenter', - title: RLANG.align_center - }, - alignright: - { - exec: 'JustifyRight', - title: RLANG.align_right - }, - justify: - { - exec: 'JustifyFull', - title: RLANG.align_justify - }, - horizontalrule: - { - exec: 'inserthorizontalrule', - title: RLANG.horizontalrule - } - } - - - }, options, this.$el.data()); - - this.dropdowns = []; - - // Init - this.init(); - }; - - // Functionality - Redactor.prototype = { - - - // Initialization - init: function() - { - // get dimensions - this.height = this.$el.css('height'); - this.width = this.$el.css('width'); - - rdocument = this.document = document; - rwindow = this.window = window; - - // mobile - if (this.opts.mobile === false && this.isMobile()) - { - this.build(true); - return false; - } - - // iframe - if (this.opts.iframe) - { - this.opts.autoresize = false; - } - - // extend buttons - if (this.opts.air) - { - this.opts.buttons = this.opts.airButtons; - } - else if (this.opts.toolbar !== false) - { - if (this.opts.source === false) - { - var index = this.opts.buttons.indexOf('html'); - var next = this.opts.buttons[index+1]; - this.opts.buttons.splice(index, 1); - if (typeof next !== 'undefined' && next === '|') - { - this.opts.buttons.splice(index, 1); - } - } - - $.extend(this.opts.toolbar, this.opts.buttonsCustom); - $.each(this.opts.buttonsAdd, $.proxy(function(i,s) - { - this.opts.buttons.push(s); - - }, this)); - } - - // formatting tags - if (this.opts.toolbar !== false) - { - $.each(this.opts.toolbar.formatting.dropdown, $.proxy(function(i,s) - { - if ($.inArray(i, this.opts.formattingTags) == '-1') - { - delete this.opts.toolbar.formatting.dropdown[i]; - } - - }, this)); - } - - function afterBuild() - { - // air enable - this.enableAir(); - - // toolbar - this.buildToolbar(); - - // PLUGINS - if (typeof this.opts.plugins === 'object') - { - $.each(this.opts.plugins, $.proxy(function(i,s) - { - if (typeof RedactorPlugins[s] !== 'undefined') - { - $.extend(this, RedactorPlugins[s]); - - if (typeof RedactorPlugins[s].init !== 'undefined') - { - this.init(); - } - } - - }, this)); - } - - // buttons response - if (this.opts.activeButtons !== false && this.opts.toolbar !== false) - { - var observeFormatting = $.proxy(function() { this.observeFormatting(); }, this); - this.$editor.click(observeFormatting).keyup(observeFormatting); - } - - // paste - var oldsafari = false; - if (this.browser('webkit') && navigator.userAgent.indexOf('Chrome') === -1) - { - var arr = this.browser('version').split('.'); - if (arr[0] < 536) oldsafari = true; - } - - if (this.isMobile(true) === false && oldsafari === false) - { - this.$editor.bind('paste', $.proxy(function(e) - { - if (this.opts.cleanup === false) - { - return true; - } - - this.pasteRunning = true; - - this.setBuffer(); - - if (this.opts.autoresize === true) - { - this.saveScroll = this.document.body.scrollTop; - } - else - { - this.saveScroll = this.$editor.scrollTop(); - } - - var frag = this.extractContent(); - - setTimeout($.proxy(function() - { - var pastedFrag = this.extractContent(); - this.$editor.append(frag); - - this.restoreSelection(); - - var html = this.getFragmentHtml(pastedFrag); - this.pasteCleanUp(html); - this.pasteRunning = false; - - }, this), 1); - - }, this)); - } - - // key handlers - this.keyup(); - this.keydown(); - - // autosave - if (this.opts.autosave !== false) - { - this.autoSave(); - } - - // observers - setTimeout($.proxy(function() - { - this.observeImages(); - this.observeTables(); - - }, this), 1); - - // FF fix - if (this.browser('mozilla')) - { - this.$editor.click($.proxy(function() - { - this.saveSelection(); - }, this)); - - try - { - this.document.execCommand('enableObjectResizing', false, false); - this.document.execCommand('enableInlineTableEditing', false, false); - } - catch (e) {} - } - - // focus - if (this.opts.focus) - { - setTimeout($.proxy(function(){ - this.$editor.focus(); - }, this), 1); - } - - // fixed - if (this.opts.fixed) - { - this.observeScroll(); - $(document).scroll($.proxy(this.observeScroll, this)); - } - - // callback - if (typeof this.opts.callback === 'function') - { - this.opts.callback(this); - } - - if (this.opts.toolbar !== false) - { - this.$toolbar.find('a').attr('tabindex', '-1'); - } - } - - // construct editor - this.build(false, afterBuild); - - }, - shortcuts: function(e, cmd) - { - e.preventDefault(); - this.execCommand(cmd, false); - }, - keyup: function() - { - this.$editor.keyup($.proxy(function(e) - { - var key = e.keyCode || e.which; - - if (this.browser('mozilla') && !this.pasteRunning) - { - this.saveSelection(); - } - - // callback as you type - if (typeof this.opts.keyupCallback === 'function') - { - this.opts.keyupCallback(this, e); - } - - // if empty - if (key === 8 || key === 46) - { - this.observeImages(); - return this.formatEmpty(e); - } - - // new line p - if (key === 13 && !e.shiftKey && !e.ctrlKey && !e.metaKey) - { - if (this.browser('webkit')) - { - this.formatNewLine(e); - } - - // convert links - if (this.opts.convertLinks) - { - this.$editor.linkify(); - } - } - - this.syncCode(); - - }, this)); - }, - keydown: function() - { - this.$editor.keydown($.proxy(function(e) - { - var key = e.keyCode || e.which; - var parent = this.getParentNode(); - var current = this.getCurrentNode(); - var pre = false; - var ctrl = e.ctrlKey || e.metaKey; - - if ((parent || current) && ($(parent).get(0).tagName === 'PRE' || $(current).get(0).tagName === 'PRE')) - { - pre = true; - } - - // callback keydown - if (typeof this.opts.keydownCallback === 'function') - { - this.opts.keydownCallback(this, e); - } - - if (ctrl && this.opts.shortcuts) - { - if (key === 90) - { - if (this.opts.buffer !== false) - { - e.preventDefault(); - this.getBuffer(); - } - else if (e.shiftKey) - { - this.shortcuts(e, 'redo'); // Ctrl + Shift + z - } - else - { - this.shortcuts(e, 'undo'); // Ctrl + z - } - } - else if (key === 77) - { - this.shortcuts(e, 'removeFormat'); // Ctrl + m - } - else if (key === 66) - { - this.shortcuts(e, 'bold'); // Ctrl + b - } - else if (key === 73) - { - this.shortcuts(e, 'italic'); // Ctrl + i - } - else if (key === 74) - { - this.shortcuts(e, 'insertunorderedlist'); // Ctrl + j - } - else if (key === 75) - { - this.shortcuts(e, 'insertorderedlist'); // Ctrl + k - } - else if (key === 76) - { - this.shortcuts(e, 'superscript'); // Ctrl + l - } - else if (key === 72) - { - this.shortcuts(e, 'subscript'); // Ctrl + h - } - } - - // clear undo buffer - if (!ctrl && key !== 90) - { - this.opts.buffer = false; - } - - // enter - if (pre === true && key === 13) - { - e.preventDefault(); - - var html = $(current).parent().text(); - this.insertNodeAtCaret(this.document.createTextNode('\r\n')); - if (html.search(/\s$/) == -1) - { - this.insertNodeAtCaret(this.document.createTextNode('\r\n')); - } - this.syncCode(); - - return false; - } - - // tab - if (this.opts.shortcuts && !e.shiftKey && key === 9) - { - if (pre === false) - { - this.shortcuts(e, 'indent'); // Tab - } - else - { - e.preventDefault(); - this.insertNodeAtCaret(this.document.createTextNode('\t')); - this.syncCode(); - return false; - } - } - else if (this.opts.shortcuts && e.shiftKey && key === 9 ) - { - this.shortcuts(e, 'outdent'); // Shift + tab - } - - // safari shift key + enter - if (this.browser('webkit') && navigator.userAgent.indexOf('Chrome') === -1) - { - return this.safariShiftKeyEnter(e, key); - } - }, this)); - }, - build: function(mobile, whendone) - { - if (mobile !== true) - { - // container - this.$box = $('
'); - - // air box - if (this.opts.air) - { - this.air = $(''); - } - - this.$content = null; - - function initFrame() - { - this.$editor = this.$content.contents().find("body").attr('contenteditable', true).attr('dir', this.opts.direction); - - rdocument = this.document = this.$editor[0].ownerDocument; - rwindow = this.window = this.document.defaultView || window; - - if (this.opts.css !== false) - { - this.$content.contents().find('head').append(''); - } - - this.$editor.html(html); - - if (whendone) - { - whendone.call(this); - whendone = null; - } - } - - // editor - this.textareamode = true; - if (this.$el.get(0).tagName === 'TEXTAREA') - { - if(this.opts.iframe) - { - var me = this; - this.$content = $('').load(function() - { - initFrame.call(me); - }); - } - else - { - this.$content = this.$editor = $('
'); - } - - var classlist = this.$el.get(0).className.split(/\s+/); - $.each(classlist, $.proxy(function(i,s) - { - this.$content.addClass('redactor_' + s); - }, this)); - } - else - { - this.textareamode = false; - this.$content = this.$editor = this.$el; - this.$el = $('').css('height', this.height); - } - - if (this.$editor) - { - this.$editor.addClass('redactor_editor').attr('contenteditable', true).attr('dir', this.opts.direction); - } - - if (this.opts.tabindex !== false) - { - this.$content.attr('tabindex', this.opts.tabindex); - } - - if (this.opts.minHeight !== false) - { - this.$content.css('min-height', this.opts.minHeight + 'px'); - } - - if (this.opts.wym === true) - { - this.$content.addClass('redactor_editor_wym'); - } - - if (this.opts.autoresize === false) - { - this.$content.css('height', this.height); - } - - // hide textarea - this.$el.hide(); - - // append box and frame - var html = ''; - if (this.textareamode) - { - // get html - html = this.$el.val(); - html = this.savePreCode(html); - - this.$box.insertAfter(this.$el).append(this.$content).append(this.$el); - } - else - { - // get html - html = this.$editor.html(); - html = this.savePreCode(html); - - this.$box.insertAfter(this.$content).append(this.$el).append(this.$editor); - - } - - // conver newlines to p - html = this.paragraphy(html); - - // enable - if (this.$editor) - { - this.$editor.html(html); - } - - if (this.textareamode === false) - { - this.syncCode(); - } - } - else - { - if (this.$el.get(0).tagName !== 'TEXTAREA') - { - var html = this.$el.val(); - var textarea = $('').css('height', this.height).val(html); - this.$el.hide(); - this.$el.after(textarea); - } - } - - if (whendone && this.$editor) - { - whendone.call(this); - } - - }, - enableAir: function() - { - if (this.opts.air === false) - { - return false; - } - - this.air.hide(); - - this.$editor.bind('textselect', $.proxy(function(e) - { - this.showAir(e); - - }, this)); - - this.$editor.bind('textunselect', $.proxy(function() - { - this.air.hide(); - - }, this)); - - }, - showAir: function(e) - { - $('.redactor_air').hide(); - - var width = this.air.innerWidth(); - var left = e.clientX; - - if ($(this.document).width() < (left + width)) - { - left = left - width; - } - - var top = e.clientY + $(document).scrollTop() + 14; - if (this.opts.iframe === true) - { - top = top + this.$box.position().top; - left = left + this.$box.position().left; - } - - this.air.css({ left: left + 'px', top: top + 'px' }).show(); - }, - syncCode: function() - { - this.$el.val(this.$editor.html()); - }, - - // API functions - setCode: function(html) - { - html = this.stripTags(html); - this.$editor.html(html).focus(); - - this.syncCode(); - }, - getCode: function() - { - var html = ''; - if (this.opts.visual) - { - html = this.$editor.html() - } - else - { - html = this.$el.val(); - } - - return this.stripTags(html); - }, - insertHtml: function(html) - { - this.$editor.focus(); - this.pasteHtmlAtCaret(html); - this.observeImages(); - this.syncCode(); - }, - - pasteHtmlAtCaret: function (html) - { - var sel, range; - if (this.document.getSelection) - { - sel = this.window.getSelection(); - if (sel.getRangeAt && sel.rangeCount) - { - range = sel.getRangeAt(0); - range.deleteContents(); - var el = this.document.createElement("div"); - el.innerHTML = html; - var frag = this.document.createDocumentFragment(), node, lastNode; - while (node = el.firstChild) - { - lastNode = frag.appendChild(node); - } - range.insertNode(frag); - - if (lastNode) - { - range = range.cloneRange(); - range.setStartAfter(lastNode); - range.collapse(true); - sel.removeAllRanges(); - sel.addRange(range); - } - } - } - else if (this.document.selection && this.document.selection.type != "Control") - { - this.document.selection.createRange().pasteHTML(html); - } - }, - - destroy: function() - { - var html = this.getCode(); - - if (this.textareamode) - { - this.$box.after(this.$el); - this.$box.remove(); - this.$el.height(this.height).val(html).show(); - } - else - { - this.$box.after(this.$editor); - this.$box.remove(); - this.$editor.removeClass('redactor_editor').removeClass('redactor_editor_wym').attr('contenteditable', false).html(html).show(); - } - - if (this.opts.toolbarExternal) - { - $(this.opts.toolbarExternal).empty(); - } - - $('.redactor_air').remove(); - - for (var i = 0; i < this.dropdowns.length; i++) - { - this.dropdowns[i].remove(); - delete(this.dropdowns[i]); - } - - if (this.opts.autosave !== false) - { - clearInterval(this.autosaveInterval); - } - - }, - // end API functions - - // OBSERVERS - observeFormatting: function() - { - var parent = this.getCurrentNode(); - - this.inactiveAllButtons(); - - $.each(this.opts.activeButtonsStates, $.proxy(function(i,s) - { - if ($(parent).closest(i,this.$editor.get()[0]).length != 0) - { - this.setBtnActive(s); - } - - }, this)); - - var tag = $(parent).closest(['p', 'div', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'td']); - - if (typeof tag[0] !== 'undefined' && typeof tag[0].elem !== 'undefined' && $(tag[0].elem).size() != 0) - { - var align = $(tag[0].elem).css('text-align'); - - switch (align) - { - case 'right': - this.setBtnActive('alignright'); - break; - case 'center': - this.setBtnActive('aligncenter'); - break; - case 'justify': - this.setBtnActive('justify'); - break; - default: - this.setBtnActive('alignleft'); - break; - } - } - }, - observeImages: function() - { - if (this.opts.observeImages === false) - { - return false; - } - - this.$editor.find('img').each($.proxy(function(i,s) - { - if (this.browser('msie')) - { - $(s).attr('unselectable', 'on'); - } - - this.resizeImage(s); - - }, this)); - - }, - observeTables: function() - { - this.$editor.find('table').click($.proxy(this.tableObserver, this)); - }, - observeScroll: function() - { - var scrolltop = $(this.document).scrollTop(); - var boxtop = this.$box.offset().top; - var left = 0; - - if (scrolltop > boxtop) - { - var width = '100%'; - if (this.opts.fixedBox) - { - left = this.$box.offset().left; - width = this.$box.innerWidth(); - } - - this.fixed = true; - this.$toolbar.css({ position: 'fixed', width: width, zIndex: 1005, top: this.opts.fixedTop + 'px', left: left }); - } - else - { - this.fixed = false; - this.$toolbar.css({ position: 'relative', width: 'auto', zIndex: 1, top: 0, left: left }); - } - }, - - // BUFFER - setBuffer: function() - { - this.saveSelection(); - this.opts.buffer = this.$editor.html(); - }, - getBuffer: function() - { - if (this.opts.buffer === false) - { - return false; - } - - this.$editor.html(this.opts.buffer); - - if (!this.browser('msie')) - { - this.restoreSelection(); - } - - this.opts.buffer = false; - }, - - - - // EXECCOMMAND - execCommand: function(cmd, param) - { - if (this.opts.visual == false) - { - this.$el.focus(); - return false; - } - - try - { - - var parent; - - if (cmd === 'inserthtml') - { - if (this.browser('msie')) - { - this.$editor.focus(); - this.document.selection.createRange().pasteHTML(param); - } - else - { - this.pasteHtmlAtCaret(param); - //this.execRun(cmd, param); - } - - this.observeImages(); - } - else if (cmd === 'unlink') - { - parent = this.getParentNode(); - if ($(parent).get(0).tagName === 'A') - { - $(parent).replaceWith($(parent).text()); - } - else - { - this.execRun(cmd, param); - } - } - else if (cmd === 'JustifyLeft' || cmd === 'JustifyCenter' || cmd === 'JustifyRight' || cmd === 'JustifyFull') - { - parent = this.getCurrentNode(); - var tag = $(parent).get(0).tagName; - - if (this.opts.iframe === false && $(parent).parents('.redactor_editor').size() == 0) - { - return false; - } - - var tagsArray = ['P', 'DIV', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'BLOCKQUOTE', 'TD']; - if ($.inArray(tag, tagsArray) != -1) - { - var align = false; - - if (cmd === 'JustifyCenter') - { - align = 'center'; - } - else if (cmd === 'JustifyRight') - { - align = 'right'; - } - else if (cmd === 'JustifyFull') - { - align = 'justify'; - } - - if (align === false) - { - $(parent).css('text-align', ''); - } - else - { - $(parent).css('text-align', align); - } - } - else - { - this.execRun(cmd, param); - } - } - else if (cmd === 'formatblock' && param === 'blockquote') - { - parent = this.getCurrentNode(); - if ($(parent).get(0).tagName === 'BLOCKQUOTE') - { - if (this.browser('msie')) - { - var node = $('

' + $(parent).html() + '

'); - $(parent).replaceWith(node); - } - else - { - this.execRun(cmd, 'p'); - } - } - else if ($(parent).get(0).tagName === 'P') - { - var parent2 = $(parent).parent(); - if ($(parent2).get(0).tagName === 'BLOCKQUOTE') - { - var node = $('

' + $(parent).html() + '

'); - $(parent2).replaceWith(node); - this.setSelection(node[0], 0, node[0], 0); - } - else - { - if (this.browser('msie')) - { - var node = $('
' + $(parent).html() + '
'); - $(parent).replaceWith(node); - } - else - { - this.execRun(cmd, param); - } - } - } - else - { - this.execRun(cmd, param); - } - } - else if (cmd === 'formatblock' && (param === 'pre' || param === 'p')) - { - parent = this.getParentNode(); - - if ($(parent).get(0).tagName === 'PRE') - { - $(parent).replaceWith('

' + this.encodeEntities($(parent).text()) + '

'); - } - else - { - this.execRun(cmd, param); - } - } - else - { - if (cmd === 'inserthorizontalrule' && this.browser('msie')) - { - this.$editor.focus(); - } - - if (cmd === 'formatblock' && this.browser('mozilla')) - { - this.$editor.focus(); - } - - this.execRun(cmd, param); - } - - if (cmd === 'inserthorizontalrule') - { - this.$editor.find('hr').removeAttr('id'); - } - - this.syncCode(); - - if (this.oldIE()) - { - this.$editor.focus(); - } - - if (typeof this.opts.execCommandCallback === 'function') - { - this.opts.execCommandCallback(this, cmd); - } - - if (this.opts.air) - { - this.air.hide(); - } - } - catch (e) { } - }, - execRun: function(cmd, param) - { - if (cmd === 'formatblock' && this.browser('msie')) - { - param = '<' + param + '>'; - } - - this.document.execCommand(cmd, false, param); - }, - - // FORMAT NEW LINE - formatNewLine: function(e) - { - var parent = this.getParentNode(); - - if (parent.nodeName === 'DIV' && parent.className === 'redactor_editor') - { - var element = $(this.getCurrentNode()); - - if (element.get(0).tagName === 'DIV' && (element.html() === '' || element.html() === '
')) - { - var newElement = $('

').append(element.clone().get(0).childNodes); - element.replaceWith(newElement); - newElement.html('
'); - this.setSelection(newElement[0], 0, newElement[0], 0); - } - } - }, - - // SAFARI SHIFT KEY + ENTER - safariShiftKeyEnter: function(e, key) - { - if (e.shiftKey && key === 13) - { - e.preventDefault(); - this.insertNodeAtCaret($('
').get(0)); - this.syncCode(); - return false; - } - else - { - return true; - } - }, - - // FORMAT EMPTY - formatEmpty: function(e) - { - var html = $.trim(this.$editor.html()); - - if (this.browser('mozilla')) - { - html = html.replace(/
/i, ''); - } - - var thtml = html.replace(/<(?:.|\n)*?>/gm, ''); - - if (html === '' || thtml === '') - { - e.preventDefault(); - - var node = $(this.opts.emptyHtml).get(0); - this.$editor.html(node); - this.setSelection(node, 0, node, 0); - - this.syncCode(); - return false; - } - else - { - this.syncCode(); - } - }, - - // PARAGRAPHY - paragraphy: function (str) - { - str = $.trim(str); - if (str === '' || str === '

') - { - return this.opts.emptyHtml; - } - - // convert div to p - if (this.opts.convertDivs) - { - str = str.replace(/([\w\W]*?)<\/div>/gi, '

$2

'); - } - - // inner functions - var X = function(x, a, b) { return x.replace(new RegExp(a, 'g'), b); }; - var R = function(a, b) { return X(str, a, b); }; - - // block elements - var blocks = '(table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|address|math|style|script|object|input|param|p|h[1-6])'; - - //str = '

' + str; - str += '\n'; - - R('
\\s*
', '\n\n'); - R('(<' + blocks + '[^>]*>)', '\n$1'); - R('()', '$1\n\n'); - R('\r\n|\r', '\n'); // newlines - R('\n\n+', '\n\n'); // remove duplicates - R('\n?((.|\n)+?)$', '

$1

\n'); // including one at the end - R('

\\s*?

', ''); // remove empty p - R('

(]*>\\s*)', '$1

'); - R('

([^<]+)\\s*?(]*>)', '

$1

$2'); - R('

\\s*(]*>)\\s*

', '$1'); - R('

(', '$1'); - R('

\\s*(]*>)', '$1'); - R('(]*>)\\s*

', '$1'); - R('(]*>)\\s*
', '$1'); - R('
(\\s*]*>)', '$1'); - - // pre - if (str.indexOf(')((.|\n)*?)', function(m0, m1, m2, m3) - { - return X(m1, '\\\\([\'\"\\\\])', '$1') + X(X(X(m3, '

', '\n'), '

|
', ''), '\\\\([\'\"\\\\])', '$1') + ''; - }); - } - - return R('\n

$', '

'); - }, - - // REMOVE TAGS - stripTags: function(html) - { - var allowed = this.opts.allowedTags; - var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi; - return html.replace(tags, function ($0, $1) - { - return $.inArray($1.toLowerCase(), allowed) > '-1' ? $0 : ''; - }); - }, - - - savePreCode: function(html) - { - var pre = html.match(/([\w\W]*?)<\/pre>/gi); - if (pre !== null) - { - $.each(pre, $.proxy(function(i,s) - { - var arr = s.match(/([\w\W]*?)<\/pre>/i); - arr[2] = this.encodeEntities(arr[2]); - html = html.replace(s, '' + arr[2] + ''); - }, this)); - } - - return html; - }, - encodeEntities: function(str) - { - str = String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"'); - return String(str).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); - }, - cleanupPre: function(s) - { - s = s.replace(/
/gi, '\n'); - s = s.replace(/<\/p>/gi, '\n'); - s = s.replace(/<\/div>/gi, '\n'); - - var tmp = this.document.createElement("div"); - tmp.innerHTML = s; - return tmp.textContent||tmp.innerText; - - }, - - - // PASTE CLEANUP - pasteCleanUp: function(html) - { - var parent = this.getParentNode(); - - // clean up pre - if ($(parent).get(0).tagName === 'PRE') - { - html = this.cleanupPre(html); - this.pasteCleanUpInsert(html); - return true; - } - - // remove comments and php tags - html = html.replace(/|<\?(?:php)?[\s\S]*?\?>/gi, ''); - - // remove nbsp - html = html.replace(/( ){2,}/gi, ' '); - - // remove google docs marker - html = html.replace(/([\w\W]*?)<\/b>/gi, "$2"); - - // strip tags - html = this.stripTags(html); - - // prevert - html = html.replace(/<\/td>/gi, '[td]'); - html = html.replace(/ <\/td>/gi, '[td]'); - html = html.replace(/
<\/td>/gi, '[td]'); - html = html.replace(/([\w\W]*?)<\/a>/gi, '[a href="$2"]$4[/a]'); - html = html.replace(/([\w\W]*?)<\/iframe>/gi, '[iframe$1]$2[/iframe]'); - html = html.replace(/([\w\W]*?)<\/video>/gi, '[video$1]$2[/video]'); - html = html.replace(/([\w\W]*?)<\/audio>/gi, '[audio$1]$2[/audio]'); - html = html.replace(/([\w\W]*?)<\/embed>/gi, '[embed$1]$2[/embed]'); - html = html.replace(/([\w\W]*?)<\/object>/gi, '[object$1]$2[/object]'); - html = html.replace(//gi, '[param$1]'); - html = html.replace(//gi, '[img$1$3]'); - - // remove attributes - html = html.replace(/<(\w+)([\w\W]*?)>/gi, '<$1>'); - - // remove empty - html = html.replace(/<[^\/>][^>]*>(\s*|\t*|\n*| |
)<\/[^>]+>/gi, ''); - html = html.replace(/<[^\/>][^>]*>(\s*|\t*|\n*| |
)<\/[^>]+>/gi, ''); - - // revert - html = html.replace(/\[td\]/gi, ' '); - html = html.replace(/\[a href="(.*?)"\]([\w\W]*?)\[\/a\]/gi, '$2'); - html = html.replace(/\[iframe(.*?)\]([\w\W]*?)\[\/iframe\]/gi, '$2'); - html = html.replace(/\[video(.*?)\]([\w\W]*?)\[\/video\]/gi, '$2'); - html = html.replace(/\[audio(.*?)\]([\w\W]*?)\[\/audio\]/gi, '$2'); - html = html.replace(/\[embed(.*?)\]([\w\W]*?)\[\/embed\]/gi, '$2'); - html = html.replace(/\[object(.*?)\]([\w\W]*?)\[\/object\]/gi, '$2'); - html = html.replace(/\[param(.*?)\]/gi, ''); - html = html.replace(/\[img(.*?)\]/gi, ''); - - - // convert div to p - if (this.opts.convertDivs) - { - html = html.replace(/([\w\W]*?)<\/div>/gi, '

$2

'); - } - - // remove span - html = html.replace(/([\w\W]*?)<\/span>/gi, '$1'); - - html = html.replace(/\n{3,}/gi, '\n'); - - // remove dirty p - html = html.replace(/

/gi, '

'); - html = html.replace(/<\/p><\/p>/gi, '

'); - - // FF fix - if (this.browser('mozilla')) - { - html = html.replace(/
$/gi, ''); - } - - this.pasteCleanUpInsert(html); - - }, - - pasteCleanUpInsert: function(html) - { - this.execCommand('inserthtml', html); - - if (this.opts.autoresize === true) - { - $(this.document.body).scrollTop(this.saveScroll); - } - else - { - this.$editor.scrollTop(this.saveScroll); - } - }, - - - // TEXTAREA CODE FORMATTING - formattingRemove: function(html) - { - // save pre - var prebuffer = []; - var pre = html.match(/([\w\W]*?)<\/pre>/gi); - if (pre !== null) - { - $.each(pre, function(i,s) - { - html = html.replace(s, 'prebuffer_' + i); - prebuffer.push(s); - }); - } - - html = html.replace(/\s{2,}/g, ' '); - html = html.replace(/\n/g, ' '); - html = html.replace(/[\t]*/g, ''); - html = html.replace(/\n\s*\n/g, "\n"); - html = html.replace(/^[\s\n]*/g, ''); - html = html.replace(/[\s\n]*$/g, ''); - html = html.replace(/>\s+<'); - - if (prebuffer) - { - $.each(prebuffer, function(i,s) - { - html = html.replace('prebuffer_' + i, s); - }); - - prebuffer = []; - } - - return html; - }, - formattingIndenting: function(html) - { - html = html.replace(/
  • /g, "\t"); - - return html; - }, - formattingEmptyTags: function(html) - { - var etags = ["
    ","
    \\s*
    ","\\s*","
      ","
        ","
      1. ","
        ","","\\s*", " ", "\\s*", " ", "

        \\s*

        ", "

         

        ", "

        \\s*
        \\s*

        ", "
        \\s*
        ", "
        \\s*
        \\s*
        "]; - for (var i = 0; i < etags.length; ++i) - { - var bbb = etags[i]; - html = html.replace(new RegExp(bbb,'gi'), ""); - } - - return html; - }, - formattingAddBefore: function(html) - { - var lb = '\r\n'; - var btags = ["", '', "","', '', '

        ', '', '', '', '', '', '
        ', '
        ', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']; - for (var i = 0; i < atags.length; ++i) - { - var aaa = atags[i]; - html = html.replace(new RegExp(aaa,'gi'),aaa+lb); - } - - return html; - }, - formatting: function(html) - { - html = this.formattingRemove(html); - - // empty tags - html = this.formattingEmptyTags(html); - - // add formatting before - html = this.formattingAddBefore(html); - - // add formatting after - html = this.formattingAddAfter(html); - - // indenting - html = this.formattingIndenting(html); - - return html; - }, - - // TOGGLE - toggle: function() - { - var html; - - if (this.opts.visual) - { - var height = this.$editor.innerHeight(); - - this.$editor.hide(); - this.$content.hide(); - - html = this.$editor.html(); - //html = $.trim(this.formatting(html)); - - this.$el.height(height).val(html).show().focus(); - - this.setBtnActive('html'); - this.opts.visual = false; - } - else - { - this.$el.hide(); - var html = this.$el.val(); - - //html = this.savePreCode(html); - - // clean up - //html = this.stripTags(html); - - // set code - this.$editor.html(html).show(); - this.$content.show(); - - if (this.$editor.html() === '') - { - this.setCode(this.opts.emptyHtml); - } - - this.$editor.focus(); - - this.setBtnInactive('html'); - this.opts.visual = true; - - this.observeImages(); - this.observeTables(); - } - }, - - // AUTOSAVE - autoSave: function() - { - this.autosaveInterval = setInterval($.proxy(function() - { - $.ajax({ - url: this.opts.autosave, - type: 'post', - data: this.$el.attr('name') + '=' + escape(encodeURIComponent(this.getCode())), - success: $.proxy(function(data) - { - // callback - if (typeof this.opts.autosaveCallback === 'function') - { - this.opts.autosaveCallback(data, this); - } - - }, this) - }); - - - }, this), this.opts.interval*1000); - }, - - // TOOLBAR - buildToolbar: function() - { - if (this.opts.toolbar === false) - { - return false; - } - - this.$toolbar = $('
          ').addClass('redactor_toolbar'); - - if (this.opts.air) - { - $(this.air).append(this.$toolbar); - $('body').append(this.air); - } - else - { - if (this.opts.toolbarExternal === false) - { - this.$box.prepend(this.$toolbar); - } - else - { - $(this.opts.toolbarExternal).html(this.$toolbar); - } - } - - $.each(this.opts.buttons, $.proxy(function(i,key) - { - - if (key !== '|' && typeof this.opts.toolbar[key] !== 'undefined') - { - var s = this.opts.toolbar[key]; - - if (this.opts.fileUpload === false && key === 'file') - { - return true; - } - - this.$toolbar.append($('
        • ').append(this.buildButton(key, s))); - } - - - if (key === '|') - { - this.$toolbar.append($('
        • ')); - } - - }, this)); - - }, - buildButton: function(key, s) - { - var button = $(''); - - if (typeof s.func === 'undefined') - { - button.click($.proxy(function() - { - if ($.inArray(key, this.opts.activeButtons) != -1) - { - this.inactiveAllButtons(); - this.setBtnActive(key); - } - - if (this.browser('mozilla')) - { - this.$editor.focus(); - //this.restoreSelection(); - } - - this.execCommand(s.exec, key); - - }, this)); - } - else if (s.func !== 'show') - { - button.click($.proxy(function(e) { - - this[s.func](e); - - }, this)); - } - - if (typeof s.callback !== 'undefined' && s.callback !== false) - { - button.click($.proxy(function(e) { s.callback(this, e, key); }, this)); - } - - // dropdown - if (key === 'backcolor' || key === 'fontcolor' || typeof(s.dropdown) !== 'undefined') - { - var dropdown = $('