refinerycms-core 2.1.5 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/images/refinery/add.png +0 -0
- data/app/assets/images/refinery/admin_bg.png +0 -0
- data/app/assets/images/refinery/ajax-loader.gif +0 -0
- data/app/assets/images/refinery/branch-end.gif +0 -0
- data/app/assets/images/refinery/branch.gif +0 -0
- data/app/assets/images/refinery/cross.png +0 -0
- data/app/assets/images/refinery/dialogLoadingAnimation.gif +0 -0
- data/app/assets/images/refinery/header_background.png +0 -0
- data/app/assets/images/refinery/hover-gradient.jpg +0 -0
- data/app/assets/images/refinery/icons/accept.png +0 -0
- data/app/assets/images/refinery/icons/add.png +0 -0
- data/app/assets/images/refinery/icons/ajax-loader.gif +0 -0
- data/app/assets/images/refinery/icons/application_edit.png +0 -0
- data/app/assets/images/refinery/icons/application_go.png +0 -0
- data/app/assets/images/refinery/icons/arrow_left.png +0 -0
- data/app/assets/images/refinery/icons/arrow_left_right.png +0 -0
- data/app/assets/images/refinery/icons/arrow_switch.png +0 -0
- data/app/assets/images/refinery/icons/arrow_up.png +0 -0
- data/app/assets/images/refinery/icons/arrow_up_down.png +0 -0
- data/app/assets/images/refinery/icons/bin.png +0 -0
- data/app/assets/images/refinery/icons/bin_closed.png +0 -0
- data/app/assets/images/refinery/icons/cancel.png +0 -0
- data/app/assets/images/refinery/icons/cog_add.png +0 -0
- data/app/assets/images/refinery/icons/cog_edit.png +0 -0
- data/app/assets/images/refinery/icons/cross.png +0 -0
- data/app/assets/images/refinery/icons/delete.png +0 -0
- data/app/assets/images/refinery/icons/doc.png +0 -0
- data/app/assets/images/refinery/icons/down.gif +0 -0
- data/app/assets/images/refinery/icons/edit.png +0 -0
- data/app/assets/images/refinery/icons/email.png +0 -0
- data/app/assets/images/refinery/icons/email_edit.png +0 -0
- data/app/assets/images/refinery/icons/email_go.png +0 -0
- data/app/assets/images/refinery/icons/email_open.png +0 -0
- data/app/assets/images/refinery/icons/eye.png +0 -0
- data/app/assets/images/refinery/icons/folder.png +0 -0
- data/app/assets/images/refinery/icons/folder_open.png +0 -0
- data/app/assets/images/refinery/icons/folder_page_white.png +0 -0
- data/app/assets/images/refinery/icons/image_add.png +0 -0
- data/app/assets/images/refinery/icons/image_edit.png +0 -0
- data/app/assets/images/refinery/icons/img.png +0 -0
- data/app/assets/images/refinery/icons/information.png +0 -0
- data/app/assets/images/refinery/icons/layout_add.png +0 -0
- data/app/assets/images/refinery/icons/layout_edit.png +0 -0
- data/app/assets/images/refinery/icons/locale-blue.svg +15 -0
- data/app/assets/images/refinery/icons/locale.svg +11 -0
- data/app/assets/images/refinery/icons/music.png +0 -0
- data/app/assets/images/refinery/icons/page.png +0 -0
- data/app/assets/images/refinery/icons/page_add.png +0 -0
- data/app/assets/images/refinery/icons/page_edit.png +0 -0
- data/app/assets/images/refinery/icons/page_white_edit.png +0 -0
- data/app/assets/images/refinery/icons/page_white_gear.png +0 -0
- data/app/assets/images/refinery/icons/page_white_put.png +0 -0
- data/app/assets/images/refinery/icons/pdf.png +0 -0
- data/app/assets/images/refinery/icons/ppt.png +0 -0
- data/app/assets/images/refinery/icons/star.png +0 -0
- data/app/assets/images/refinery/icons/tick.png +0 -0
- data/app/assets/images/refinery/icons/up.gif +0 -0
- data/app/assets/images/refinery/icons/user_add.png +0 -0
- data/app/assets/images/refinery/icons/user_comment.png +0 -0
- data/app/assets/images/refinery/icons/user_edit.png +0 -0
- data/app/assets/images/refinery/icons/xls.png +0 -0
- data/app/assets/images/refinery/icons/zip.png +0 -0
- data/app/assets/images/refinery/icons/zoom.png +0 -0
- data/app/assets/images/refinery/logo-large.png +0 -0
- data/app/assets/images/refinery/logo-medium.png +0 -0
- data/app/assets/images/refinery/logo-site-bar.png +0 -0
- data/app/assets/images/refinery/logo-small-medium.png +0 -0
- data/app/assets/images/refinery/logo-small.png +0 -0
- data/app/assets/images/refinery/logo-tiny.png +0 -0
- data/app/assets/images/refinery/logo.png +0 -0
- data/app/assets/images/refinery/nav-3-background.gif +0 -0
- data/app/assets/images/refinery/nav_inactive_background.png +0 -0
- data/app/assets/images/refinery/orange_button.png +0 -0
- data/app/assets/images/refinery/page_bg.png +0 -0
- data/app/assets/images/refinery/text_field_background.png +0 -0
- data/app/assets/images/refinery/tooltip-nib.gif +0 -0
- data/app/assets/images/refinery/tooltip-nib.png +0 -0
- data/app/assets/javascripts/admin.js +7 -6
- data/app/assets/javascripts/refinery/admin.js.erb +99 -60
- data/app/assets/javascripts/refinery/ajaxy_pagination.js.coffee +2 -5
- data/app/assets/javascripts/refinery/application.js +8 -0
- data/app/assets/javascripts/refinery/core.js +4 -18
- data/app/assets/javascripts/refinery/interface.js.coffee.erb +5 -29
- data/app/assets/javascripts/refinery/modal_dialogs.js.erb +0 -105
- data/app/assets/javascripts/refinery/nestedsortables.js +183 -110
- data/app/assets/javascripts/refinery/refinery.js.erb +3 -9
- data/app/assets/javascripts/refinery/serializelist.js +1 -1
- data/app/assets/javascripts/refinery/site_bar.js +0 -5
- data/app/assets/javascripts/refinery/sortable_list.js +10 -11
- data/app/assets/javascripts/refinery/submit_continue.js.coffee.erb +1 -1
- data/app/assets/stylesheets/application.scss +2 -0
- data/app/assets/stylesheets/refinery/_colours.scss +18 -0
- data/app/assets/stylesheets/refinery/_icons.scss +85 -0
- data/app/assets/stylesheets/refinery/{layout.css.scss → _layout.scss} +306 -338
- data/app/assets/stylesheets/refinery/_mixins.scss +84 -0
- data/app/assets/stylesheets/refinery/{submenu.css.scss → _submenu.scss} +2 -2
- data/app/assets/stylesheets/refinery/{tooltips.css.scss → _tooltips.scss} +0 -0
- data/app/assets/stylesheets/refinery/_ui.scss +252 -0
- data/app/assets/stylesheets/refinery/{formatting.css.scss → formatting.scss} +0 -0
- data/app/assets/stylesheets/refinery/refinery.scss +10 -0
- data/app/assets/stylesheets/refinery/site_bar.scss +126 -0
- data/app/assets/stylesheets/refinery/{theme.css.scss → theme.scss} +0 -0
- data/app/controllers/refinery/admin/core_controller.rb +2 -7
- data/app/controllers/refinery/admin/dialogs_controller.rb +4 -3
- data/app/controllers/refinery/admin_controller.rb +0 -1
- data/app/controllers/refinery/fast_controller.rb +0 -4
- data/app/helpers/refinery/admin/visual_editor_helper.rb +13 -0
- data/app/helpers/refinery/admin_helper.rb +4 -0
- data/app/helpers/refinery/custom_assets_helper.rb +2 -2
- data/app/helpers/refinery/image_helper.rb +9 -8
- data/app/helpers/refinery/meta_helper.rb +1 -1
- data/app/helpers/refinery/site_bar_helper.rb +16 -2
- data/app/helpers/refinery/tag_helper.rb +38 -5
- data/app/models/refinery/core/base_model.rb +3 -1
- data/app/views/layouts/refinery/admin.html.erb +12 -10
- data/app/views/layouts/refinery/admin_dialog.html.erb +1 -4
- data/app/views/refinery/_content_page.html.erb +1 -1
- data/app/views/refinery/_google_analytics.html.erb +8 -9
- data/app/views/refinery/_head.html.erb +1 -1
- data/app/views/refinery/_javascripts.html.erb +0 -15
- data/app/views/refinery/_message.html.erb +1 -1
- data/app/views/refinery/_site_bar.html.erb +9 -6
- data/app/views/refinery/admin/_error_messages.html.erb +4 -4
- data/app/views/refinery/admin/_form_actions.html.erb +1 -0
- data/app/views/refinery/admin/_form_advanced_options_menu.html.erb +3 -4
- data/app/views/refinery/admin/_head.html.erb +3 -0
- data/app/views/refinery/admin/_image_picker.html.erb +4 -5
- data/app/views/refinery/admin/_javascripts.html.erb +4 -9
- data/app/views/refinery/admin/_locale_picker.html.erb +9 -2
- data/app/views/refinery/admin/_make_sortable.html.erb +8 -6
- data/app/views/refinery/admin/_menu.html.erb +2 -15
- data/app/views/refinery/admin/_menu_item.html.erb +3 -0
- data/app/views/refinery/admin/_resource_picker.html.erb +12 -22
- data/app/views/refinery/admin/_search.html.erb +1 -1
- data/app/views/refinery/admin/_tabbed_fields.html.erb +2 -2
- data/app/views/refinery/admin/_wysiwyg.html.erb +1 -1
- data/{lib/generators/refinery/cms/templates/app/decorators/controllers/refinery/.gitkeep → app/views/refinery/admin/dialog_success.html.erb} +0 -0
- data/app/views/refinery/admin/dialogs/show.html.erb +1 -19
- data/config/initializers/assets.rb +6 -0
- data/config/locales/ca.yml +84 -0
- data/config/locales/cs.yml +12 -5
- data/config/locales/en.yml +6 -2
- data/config/locales/fr.yml +15 -11
- data/config/locales/hu.yml +3 -1
- data/config/locales/it.yml +5 -1
- data/config/locales/ja.yml +2 -2
- data/config/locales/pt.yml +5 -3
- data/config/locales/ru.yml +7 -0
- data/config/locales/sl.yml +0 -3
- data/config/locales/tr.yml +43 -41
- data/config/routes.rb +1 -4
- data/lib/generators/refinery/cms/cms_generator.rb +68 -26
- data/lib/generators/refinery/cms/templates/app/decorators/{models/refinery/.gitkeep → controllers/refinery/.keep} +0 -0
- data/lib/generators/refinery/{form/templates/.gitkeep → cms/templates/app/decorators/models/refinery/.keep} +0 -0
- data/lib/generators/refinery/cms/templates/config/database.yml.mysql +3 -3
- data/lib/generators/refinery/cms/templates/config/database.yml.postgresql +3 -3
- data/lib/generators/refinery/core/templates/config/initializers/refinery/core.rb.erb +18 -5
- data/lib/generators/refinery/dummy/dummy_generator.rb +3 -1
- data/lib/generators/refinery/dummy/templates/rails/application.js +3 -0
- data/lib/generators/refinery/dummy/templates/rails/application.rb.erb +0 -2
- data/lib/generators/refinery/dummy/templates/rails/blank.png +0 -0
- data/lib/generators/refinery/dummy/templates/rails/routes.rb +1 -1
- data/lib/generators/refinery/engine/engine_generator.rb +3 -2
- data/lib/generators/refinery/engine/templates/Gemfile +9 -4
- data/lib/generators/refinery/engine/templates/Rakefile +3 -4
- data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb.erb +11 -2
- data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/plural_name_controller.rb.erb +2 -2
- data/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb.erb +5 -5
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_actions.html.erb +7 -12
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb +8 -8
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +3 -3
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_singular_name.html.erb +6 -11
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/index.html.erb +1 -1
- data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/plural_name/show.html.erb +4 -4
- data/lib/generators/refinery/engine/templates/db/migrate/1_create_namespace_plural_name.rb.erb +2 -9
- data/lib/generators/refinery/engine/templates/db/seeds.rb.erb +13 -19
- data/lib/generators/refinery/engine/templates/lib/refinery/plural_name/engine.rb.erb +0 -4
- data/lib/generators/refinery/engine/templates/readme.md +3 -3
- data/lib/generators/refinery/engine/templates/refinerycms-extension_plural_name.gemspec +1 -0
- data/lib/generators/refinery/engine/templates/spec/features/refinery/namespace/admin/plural_name_spec.rb.erb +25 -28
- data/lib/generators/refinery/engine/templates/spec/models/refinery/namespace/singular_name_spec.rb.erb +1 -1
- data/lib/generators/refinery/engine/templates/spec/spec_helper.rb +1 -1
- data/lib/refinery.rb +7 -9
- data/lib/refinery/admin/base_controller.rb +42 -32
- data/lib/refinery/application_controller.rb +25 -17
- data/lib/refinery/cli.rb +54 -19
- data/lib/refinery/core.rb +5 -0
- data/lib/refinery/core/authorisation_adapter.rb +11 -0
- data/lib/refinery/core/authorisation_manager.rb +14 -0
- data/lib/refinery/core/configuration.rb +25 -4
- data/lib/refinery/core/default_route.rb +16 -0
- data/lib/refinery/core/engine.rb +44 -25
- data/lib/refinery/core/nil_user.rb +42 -0
- data/lib/refinery/crud.rb +40 -29
- data/lib/refinery/extension_generation.rb +11 -22
- data/lib/refinery/generators/generated_attribute.rb +54 -0
- data/lib/refinery/generators/named_base.rb +16 -0
- data/lib/refinery/menu.rb +3 -2
- data/lib/refinery/menu_item.rb +1 -1
- data/lib/refinery/plugin.rb +27 -43
- data/lib/refinery/plugins.rb +22 -26
- data/lib/refinery/users_manager.rb +8 -0
- data/lib/refinery/version.rb +7 -3
- data/lib/tasks/refinery.rake +7 -0
- data/license.md +1 -1
- data/refinerycms-core.gemspec +11 -8
- data/spec/controllers/refinery/admin/dummy_controller_spec.rb +23 -11
- data/spec/controllers/refinery/sitemap_controller_spec.rb +2 -2
- data/spec/features/refinery/admin/custom_assets_spec.rb +12 -10
- data/spec/features/refinery/admin/dialogs_spec.rb +5 -5
- data/spec/features/refinery/admin/xhr_paging_spec.rb +24 -38
- data/spec/features/refinery/application_layout_spec.rb +3 -3
- data/spec/features/refinery/core_spec.rb +1 -1
- data/spec/features/refinery/site_bar_spec.rb +44 -23
- data/spec/helpers/refinery/admin_helper_spec.rb +15 -0
- data/spec/helpers/refinery/custom_assets_helper_spec.rb +15 -23
- data/spec/helpers/refinery/html_truncation_helper_spec.rb +10 -5
- data/spec/helpers/refinery/meta_helper_spec.rb +3 -3
- data/spec/helpers/refinery/pagination_helper_spec.rb +7 -7
- data/spec/helpers/refinery/tag_helper_spec.rb +4 -4
- data/spec/helpers/refinery/translation_helper_spec.rb +3 -3
- data/spec/lib/generators/refinery/cms/cms_generator_spec.rb +30 -25
- data/spec/lib/generators/refinery/core/core_generator_spec.rb +1 -1
- data/spec/lib/generators/refinery/engine/engine_generator_multiple_resources_spec.rb +7 -8
- data/spec/lib/generators/refinery/engine/engine_generator_sanity_check_spec.rb +15 -15
- data/spec/lib/generators/refinery/engine/engine_generator_spec.rb +9 -9
- data/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb +1 -1
- data/spec/lib/generators/refinery/engine/engine_generator_without_frontend_spec.rb +1 -1
- data/spec/lib/refinery/application_controller_spec.rb +16 -16
- data/spec/lib/refinery/authorisation_manager_spec.rb +10 -0
- data/spec/lib/refinery/cli_spec.rb +83 -21
- data/spec/lib/refinery/core/configuration_spec.rb +5 -5
- data/spec/lib/refinery/core/nil_user_spec.rb +39 -0
- data/spec/lib/refinery/core_spec.rb +39 -30
- data/spec/lib/refinery/crud_spec.rb +70 -59
- data/spec/lib/refinery/menu_spec.rb +4 -4
- data/spec/lib/refinery/plugin_spec.rb +56 -45
- data/spec/lib/refinery/plugins_spec.rb +39 -87
- data/spec/lib/refinery/users_manager_spec.rb +9 -0
- data/spec/support/refinery.rb +3 -8
- data/vendor/assets/fonts/font-awesome/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.svg +565 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/stylesheets/_font-awesome-compass.scss +5 -0
- data/vendor/assets/stylesheets/_font-awesome-sprockets.scss +5 -0
- data/vendor/assets/stylesheets/_font-awesome.scss +17 -0
- data/vendor/assets/stylesheets/font-awesome/_animated.scss +34 -0
- data/vendor/assets/stylesheets/font-awesome/_bordered-pulled.scss +16 -0
- data/vendor/assets/stylesheets/font-awesome/_core.scss +12 -0
- data/vendor/assets/stylesheets/font-awesome/_extras.scss +44 -0
- data/vendor/assets/stylesheets/font-awesome/_fixed-width.scss +6 -0
- data/vendor/assets/stylesheets/font-awesome/_icons.scss +596 -0
- data/vendor/assets/stylesheets/font-awesome/_larger.scss +13 -0
- data/vendor/assets/stylesheets/font-awesome/_list.scss +19 -0
- data/vendor/assets/stylesheets/font-awesome/_mixins.scss +26 -0
- data/vendor/assets/stylesheets/font-awesome/_path.scss +14 -0
- data/vendor/assets/stylesheets/font-awesome/_rotated-flipped.scss +20 -0
- data/vendor/assets/stylesheets/font-awesome/_stacked.scss +20 -0
- data/vendor/assets/stylesheets/font-awesome/_variables.scss +606 -0
- metadata +144 -441
- data/app/assets/images/refinery/carousel-left.png +0 -0
- data/app/assets/images/refinery/carousel-right.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/arrow_redo.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/arrow_undo.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/eye.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/article.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/aside.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/blockquote.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/command.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/details.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/figcaption.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/figure.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/footer.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h1.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h2.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h3.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h4.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h5.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/h6.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/header.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/hgroup.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/mark.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/meter.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/nav.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/p.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/pre.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/progress.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/readme.md +0 -1
- data/app/assets/images/wymeditor/skins/refinery/html5/rp.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/rt.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/ruby.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/section.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/summary.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/html5/time.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-blockquote.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h1.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h2.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h3.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h4.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h5.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h6.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-p.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-pre.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/link_add.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/link_break.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/page_code.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/page_paste.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/photo_add.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/right.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/style.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/table_add.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_align_center.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_align_justify.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_align_left.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_align_right.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_bold.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_1.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_2.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_3.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_4.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_5.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_heading_6.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_indent.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_italic.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_list_bullets.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_list_numbers.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_paragraph.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_strikethrough.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_subscript.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_superscript.png +0 -0
- data/app/assets/images/wymeditor/skins/refinery/text_underline.png +0 -0
- data/app/assets/images/wymeditor/skins/wymeditor_icon.png +0 -0
- data/app/assets/javascripts/refinery/boot_wym.js.erb +0 -285
- data/app/assets/javascripts/refinery/sortable_menu.js.coffee.erb +0 -20
- data/app/assets/javascripts/refinery/wymeditor.js +0 -37
- data/app/assets/javascripts/wymeditor/GPL-license.txt +0 -278
- data/app/assets/javascripts/wymeditor/MIT-license.txt +0 -20
- data/app/assets/javascripts/wymeditor/README +0 -35
- data/app/assets/javascripts/wymeditor/browsers/ie.js.erb +0 -224
- data/app/assets/javascripts/wymeditor/browsers/mozilla.js.erb +0 -292
- data/app/assets/javascripts/wymeditor/browsers/opera.js.erb +0 -123
- data/app/assets/javascripts/wymeditor/browsers/webkit.js.erb +0 -283
- data/app/assets/javascripts/wymeditor/classes.js.erb +0 -1575
- data/app/assets/javascripts/wymeditor/functions.js.erb +0 -222
- data/app/assets/javascripts/wymeditor/lang/bg.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/ca.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/cs.js +0 -58
- data/app/assets/javascripts/wymeditor/lang/da.js +0 -48
- data/app/assets/javascripts/wymeditor/lang/de.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/en.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/es.js +0 -58
- data/app/assets/javascripts/wymeditor/lang/fa.js +0 -46
- data/app/assets/javascripts/wymeditor/lang/fi.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/fr.js +0 -58
- data/app/assets/javascripts/wymeditor/lang/he.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/hu.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/it.js +0 -48
- data/app/assets/javascripts/wymeditor/lang/ja.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/lv.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/nb.js +0 -48
- data/app/assets/javascripts/wymeditor/lang/nl.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/nn.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/pl.js +0 -56
- data/app/assets/javascripts/wymeditor/lang/pt-BR.js +0 -58
- data/app/assets/javascripts/wymeditor/lang/pt.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/rs.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/ru.js +0 -57
- data/app/assets/javascripts/wymeditor/lang/sk.js +0 -56
- data/app/assets/javascripts/wymeditor/lang/sl.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/sv.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/tr.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/vi.js +0 -47
- data/app/assets/javascripts/wymeditor/lang/zh-CN.js +0 -47
- data/app/assets/javascripts/wymeditor/prototypes.js.erb +0 -1103
- data/app/assets/javascripts/wymeditor/setup.js.erb +0 -622
- data/app/assets/javascripts/wymeditor/skins/refinery/skin.js +0 -45
- data/app/assets/javascripts/wymeditor/validators.js.erb +0 -777
- data/app/assets/stylesheets/refinery/refinery.css +0 -15
- data/app/assets/stylesheets/refinery/site_bar.css.scss +0 -92
- data/app/assets/stylesheets/refinery/ui.css.scss +0 -103
- data/app/assets/stylesheets/wymeditor/skins/refinery/skin.css.scss +0 -530
- data/app/assets/stylesheets/wymeditor/skins/refinery/wymiframe.css.scss +0 -156
- data/app/helpers/refinery/admin/core_helper.rb +0 -6
- data/app/helpers/refinery/admin/dialogs_helper.rb +0 -6
- data/app/helpers/refinery/fast_helper.rb +0 -4
- data/app/helpers/refinery/sitemap_helper.rb +0 -4
- data/app/views/refinery/wymiframe.html.erb +0 -14
- data/lib/generators/refinery/form/USAGE +0 -20
- data/lib/generators/refinery/form/form_generator.rb +0 -25
- data/lib/generators/refinery/form/templates/.gitignore +0 -2
- data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb.erb +0 -54
- data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/admin/settings_controller.rb.erb +0 -45
- data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/plural_name_controller.rb.erb +0 -53
- data/lib/generators/refinery/form/templates/app/mailers/refinery/namespace/mailer.rb.erb +0 -22
- data/lib/generators/refinery/form/templates/app/models/refinery/namespace/setting.rb.erb +0 -34
- data/lib/generators/refinery/form/templates/app/models/refinery/namespace/singular_name.rb.erb +0 -49
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +0 -23
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_singular_name.html.erb +0 -25
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_submenu.html.erb +0 -29
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/index.html.erb +0 -4
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/show.html.erb +0 -52
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/spam.html.erb +0 -27
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/settings/_confirmation_email_form.html.erb +0 -51
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/settings/_notification_recipients_form.html.erb +0 -21
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/settings/edit.html.erb +0 -5
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/mailer/confirmation.html.erb +0 -1
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/mailer/notification.html.erb +0 -17
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/plural_name/new.html.erb +0 -43
- data/lib/generators/refinery/form/templates/app/views/refinery/namespace/plural_name/thank_you.html.erb +0 -1
- data/lib/generators/refinery/form/templates/config/locales/cs.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/da.yml +0 -66
- data/lib/generators/refinery/form/templates/config/locales/de.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/en.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/es.yml +0 -66
- data/lib/generators/refinery/form/templates/config/locales/fr.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/it.yml +0 -66
- data/lib/generators/refinery/form/templates/config/locales/lv.yml +0 -77
- data/lib/generators/refinery/form/templates/config/locales/nb.yml +0 -75
- data/lib/generators/refinery/form/templates/config/locales/nl.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/pt-BR.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/ru.yml +0 -77
- data/lib/generators/refinery/form/templates/config/locales/sk.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/sl.yml +0 -67
- data/lib/generators/refinery/form/templates/config/locales/tr.yml +0 -78
- data/lib/generators/refinery/form/templates/config/locales/zh-CN.yml +0 -78
- data/lib/generators/refinery/form/templates/config/routes.rb.erb +0 -26
- data/lib/generators/refinery/form/templates/db/migrate/1_create_plural_name.rb.erb +0 -39
- data/lib/generators/refinery/form/templates/db/seeds.rb.erb +0 -31
- data/lib/generators/refinery/form/templates/lib/generators/refinery/plural_name_generator.rb.erb +0 -20
- data/lib/generators/refinery/form/templates/lib/refinery/plural_name.rb.erb +0 -18
- data/lib/generators/refinery/form/templates/lib/refinery/plural_name/engine.rb.erb +0 -27
- data/lib/generators/refinery/form/templates/lib/refinerycms-plural_name.rb.erb +0 -1
- data/lib/generators/refinery/form/templates/refinerycms-plural_name.gemspec +0 -16
- data/lib/generators/refinery/form/templates/script/rails +0 -10
- data/lib/refinery/activity.rb +0 -113
- data/lib/refinery/ext/action_view/helpers/form_builder.rb +0 -9
- data/lib/refinery/ext/action_view/helpers/form_helper.rb +0 -20
- data/lib/refinery/ext/action_view/helpers/form_tag_helper.rb +0 -10
- data/spec/controllers/refinery/admin/refinery_core_controller_spec.rb +0 -19
- data/spec/controllers/refinery/fast_controller_spec.rb +0 -12
- data/spec/lib/generators/refinery/form/form_generator_spec.rb +0 -99
- data/spec/lib/refinery/activity_spec.rb +0 -46
- data/spec/support/background_selenium_firefox_driver.rb +0 -14
- data/vendor/assets/javascripts/jquery/jquery.jcarousel.js +0 -900
@@ -1,45 +0,0 @@
|
|
1
|
-
WYMeditor.SKINS['refinery'] = {
|
2
|
-
|
3
|
-
init: function(wym) {
|
4
|
-
//render following sections as buttons
|
5
|
-
$(wym._box).find(wym._options.toolsSelector)
|
6
|
-
.addClass('wym_buttons');
|
7
|
-
|
8
|
-
// auto add some margin to the main area sides if left area
|
9
|
-
// or right area are not empty (if they contain sections)
|
10
|
-
$(wym._box).find('div.wym_area_right ul')
|
11
|
-
.parents('div.wym_area_right').show()
|
12
|
-
.parents(wym._options.boxSelector)
|
13
|
-
.find('div.wym_area_main')
|
14
|
-
.css({'margin-right': '155px'});
|
15
|
-
|
16
|
-
$(wym._box).find('div.wym_area_left ul')
|
17
|
-
.parents('div.wym_area_left').show()
|
18
|
-
.parents(wym._options.boxSelector)
|
19
|
-
.find('div.wym_area_main')
|
20
|
-
.css({'margin-left': '155px'});
|
21
|
-
|
22
|
-
//make hover work under IE < 7
|
23
|
-
$(wym._box).find('.wym_section').hover(function(){
|
24
|
-
$(this).addClass('hover');
|
25
|
-
},function(){
|
26
|
-
$(this).removeClass('hover');
|
27
|
-
});
|
28
|
-
|
29
|
-
// show or hide CSS class options on hover
|
30
|
-
$(wym._box).find('.wym_tools_class')
|
31
|
-
.hover($.proxy(function(){
|
32
|
-
this.toggleClassSelector();
|
33
|
-
}, wym), $.proxy(function(){
|
34
|
-
this.toggleClassSelector();
|
35
|
-
}, wym));
|
36
|
-
|
37
|
-
// adjust sizing
|
38
|
-
$(wym._box).css('width', $(wym._element).width() - 2)
|
39
|
-
.find('.wym_iframe iframe').css('width', $(wym._box).width() - 2);
|
40
|
-
|
41
|
-
$(".wym_skin_refinery").animate({
|
42
|
-
opacity: 1
|
43
|
-
}, 800);
|
44
|
-
}
|
45
|
-
};
|
@@ -1,777 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* XhtmlValidator for validating tag attributes
|
3
|
-
*
|
4
|
-
* @author Bermi Ferrer - http://bermi.org
|
5
|
-
*/
|
6
|
-
WYMeditor.XhtmlValidator = {
|
7
|
-
"_attributes":
|
8
|
-
{
|
9
|
-
"core":
|
10
|
-
{
|
11
|
-
"except":<%= [
|
12
|
-
"base",
|
13
|
-
"head",
|
14
|
-
"html",
|
15
|
-
"meta",
|
16
|
-
"param",
|
17
|
-
"script",
|
18
|
-
"style",
|
19
|
-
"title"
|
20
|
-
].reject{|a| Refinery::Core.wymeditor_whitelist_tags.keys.map(&:to_s).include?(a)}.inspect %>,
|
21
|
-
"attributes":[
|
22
|
-
"class",
|
23
|
-
"id",
|
24
|
-
"style",
|
25
|
-
"title",
|
26
|
-
"accesskey",
|
27
|
-
"tabindex",
|
28
|
-
"data",
|
29
|
-
"^data-.*"
|
30
|
-
]
|
31
|
-
},
|
32
|
-
"language":
|
33
|
-
{
|
34
|
-
"except":<%= [
|
35
|
-
"base",
|
36
|
-
"br",
|
37
|
-
"hr",
|
38
|
-
"iframe",
|
39
|
-
"param",
|
40
|
-
"script"
|
41
|
-
].reject{|a| Refinery::Core.wymeditor_whitelist_tags.keys.map(&:to_s).include?(a)}.inspect %>,
|
42
|
-
"attributes":
|
43
|
-
{
|
44
|
-
"dir":[
|
45
|
-
"ltr",
|
46
|
-
"rtl"
|
47
|
-
],
|
48
|
-
"0":"lang",
|
49
|
-
"1":"xml:lang"
|
50
|
-
}
|
51
|
-
},
|
52
|
-
"keyboard":
|
53
|
-
{
|
54
|
-
"attributes":
|
55
|
-
{
|
56
|
-
"accesskey":/^(\w){1}$/,
|
57
|
-
"tabindex":/^(\d)+$/
|
58
|
-
}
|
59
|
-
}
|
60
|
-
},
|
61
|
-
"_events":
|
62
|
-
{
|
63
|
-
"window":
|
64
|
-
{
|
65
|
-
"only":[
|
66
|
-
"body"
|
67
|
-
],
|
68
|
-
"attributes":[
|
69
|
-
"onload",
|
70
|
-
"onunload"
|
71
|
-
]
|
72
|
-
},
|
73
|
-
"form":
|
74
|
-
{
|
75
|
-
"only":[
|
76
|
-
"form",
|
77
|
-
"input",
|
78
|
-
"textarea",
|
79
|
-
"select",
|
80
|
-
"a",
|
81
|
-
"label",
|
82
|
-
"button"
|
83
|
-
],
|
84
|
-
"attributes":[
|
85
|
-
"onchange",
|
86
|
-
"onsubmit",
|
87
|
-
"onreset",
|
88
|
-
"onselect",
|
89
|
-
"onblur",
|
90
|
-
"onfocus"
|
91
|
-
]
|
92
|
-
},
|
93
|
-
"keyboard":
|
94
|
-
{
|
95
|
-
"except":<%= [
|
96
|
-
"base",
|
97
|
-
"bdo",
|
98
|
-
"br",
|
99
|
-
"frame",
|
100
|
-
"frameset",
|
101
|
-
"head",
|
102
|
-
"html",
|
103
|
-
"iframe",
|
104
|
-
"meta",
|
105
|
-
"param",
|
106
|
-
"script",
|
107
|
-
"style",
|
108
|
-
"title"
|
109
|
-
].reject{|a| Refinery::Core.wymeditor_whitelist_tags.keys.map(&:to_s).include?(a)}.inspect %>,
|
110
|
-
"attributes":[
|
111
|
-
"onkeydown",
|
112
|
-
"onkeypress",
|
113
|
-
"onkeyup"
|
114
|
-
]
|
115
|
-
},
|
116
|
-
"mouse":
|
117
|
-
{
|
118
|
-
"except":<%= [
|
119
|
-
"base",
|
120
|
-
"bdo",
|
121
|
-
"br",
|
122
|
-
"head",
|
123
|
-
"html",
|
124
|
-
"meta",
|
125
|
-
"param",
|
126
|
-
"script",
|
127
|
-
"style",
|
128
|
-
"title"
|
129
|
-
].reject{|a| Refinery::Core.wymeditor_whitelist_tags.keys.map(&:to_s).include?(a)}.inspect %>,
|
130
|
-
"attributes":[
|
131
|
-
"onclick",
|
132
|
-
"ondblclick",
|
133
|
-
"onmousedown",
|
134
|
-
"onmousemove",
|
135
|
-
"onmouseover",
|
136
|
-
"onmouseout",
|
137
|
-
"onmouseup"
|
138
|
-
]
|
139
|
-
}
|
140
|
-
},
|
141
|
-
"_tags":
|
142
|
-
{
|
143
|
-
"a":
|
144
|
-
{
|
145
|
-
"attributes":
|
146
|
-
{
|
147
|
-
"0":"charset",
|
148
|
-
"1":"coords",
|
149
|
-
"2":"href",
|
150
|
-
"3":"hreflang",
|
151
|
-
"4":"name",
|
152
|
-
"rel":/^(alternate|designates|stylesheet|start|next|nofollow|prev|contents|index|glossary|copyright|chapter|section|subsection|appendix|help|bookmark| |shortcut|icon|moodalbox)+$/,
|
153
|
-
"rev":/^(alternate|designates|stylesheet|start|next|prev|contents|index|glossary|copyright|chapter|section|subsection|appendix|help|bookmark| |shortcut|icon|moodalbox)+$/,
|
154
|
-
"shape":/^(rect|rectangle|circ|circle|poly|polygon)$/,
|
155
|
-
"5":"type",
|
156
|
-
"target":/^(_blank)+$/
|
157
|
-
}
|
158
|
-
},
|
159
|
-
"0":"abbr",
|
160
|
-
"1":"acronym",
|
161
|
-
"2":"address",
|
162
|
-
"area":
|
163
|
-
{
|
164
|
-
"attributes":
|
165
|
-
{
|
166
|
-
"0":"alt",
|
167
|
-
"1":"coords",
|
168
|
-
"2":"href",
|
169
|
-
"nohref":/^(true|false)$/,
|
170
|
-
"shape":/^(rect|rectangle|circ|circle|poly|polygon)$/
|
171
|
-
},
|
172
|
-
"required":[
|
173
|
-
"alt"
|
174
|
-
]
|
175
|
-
},
|
176
|
-
"3":"b",
|
177
|
-
"base":
|
178
|
-
{
|
179
|
-
"attributes":[
|
180
|
-
"href"
|
181
|
-
],
|
182
|
-
"required":[
|
183
|
-
"href"
|
184
|
-
]
|
185
|
-
},
|
186
|
-
"bdo":
|
187
|
-
{
|
188
|
-
"attributes":
|
189
|
-
{
|
190
|
-
"dir":/^(ltr|rtl)$/
|
191
|
-
},
|
192
|
-
"required":[
|
193
|
-
"dir"
|
194
|
-
]
|
195
|
-
},
|
196
|
-
"4":"big",
|
197
|
-
"blockquote":
|
198
|
-
{
|
199
|
-
"attributes":[
|
200
|
-
"cite"
|
201
|
-
]
|
202
|
-
},
|
203
|
-
"5":"body",
|
204
|
-
"6":"br",
|
205
|
-
"button":
|
206
|
-
{
|
207
|
-
"attributes":
|
208
|
-
{
|
209
|
-
"disabled":/^(disabled)$/,
|
210
|
-
"type":/^(button|reset|submit)$/,
|
211
|
-
"0":"value"
|
212
|
-
},
|
213
|
-
"inside":"form"
|
214
|
-
},
|
215
|
-
"7":"caption",
|
216
|
-
"8":"cite",
|
217
|
-
"9":"code",
|
218
|
-
"col":
|
219
|
-
{
|
220
|
-
"attributes":
|
221
|
-
{
|
222
|
-
"align":/^(right|left|center|justify)$/,
|
223
|
-
"0":"char",
|
224
|
-
"1":"charoff",
|
225
|
-
"span":/^(\d)+$/,
|
226
|
-
"valign":/^(top|middle|bottom|baseline)$/,
|
227
|
-
"2":"width"
|
228
|
-
},
|
229
|
-
"inside":"colgroup"
|
230
|
-
},
|
231
|
-
"colgroup":
|
232
|
-
{
|
233
|
-
"attributes":
|
234
|
-
{
|
235
|
-
"align":/^(right|left|center|justify)$/,
|
236
|
-
"0":"char",
|
237
|
-
"1":"charoff",
|
238
|
-
"span":/^(\d)+$/,
|
239
|
-
"valign":/^(top|middle|bottom|baseline)$/,
|
240
|
-
"2":"width"
|
241
|
-
}
|
242
|
-
},
|
243
|
-
"10":"dd",
|
244
|
-
"del":
|
245
|
-
{
|
246
|
-
"attributes":
|
247
|
-
{
|
248
|
-
"0":"cite",
|
249
|
-
"datetime":/^([0-9]){8}/
|
250
|
-
}
|
251
|
-
},
|
252
|
-
"11":"div",
|
253
|
-
"12":"dfn",
|
254
|
-
"13":"dl",
|
255
|
-
"14":"dt",
|
256
|
-
"15":"em",
|
257
|
-
"fieldset":
|
258
|
-
{
|
259
|
-
"inside":"form"
|
260
|
-
},
|
261
|
-
"form":
|
262
|
-
{
|
263
|
-
"attributes":
|
264
|
-
{
|
265
|
-
"0":"action",
|
266
|
-
"1":"accept",
|
267
|
-
"2":"accept-charset",
|
268
|
-
"3":"enctype",
|
269
|
-
"method":/^(get|post)$/
|
270
|
-
},
|
271
|
-
"required":[
|
272
|
-
"action"
|
273
|
-
]
|
274
|
-
},
|
275
|
-
"head":
|
276
|
-
{
|
277
|
-
"attributes":[
|
278
|
-
"profile"
|
279
|
-
]
|
280
|
-
},
|
281
|
-
"16":"h1",
|
282
|
-
"17":"h2",
|
283
|
-
"18":"h3",
|
284
|
-
"19":"h4",
|
285
|
-
"20":"h5",
|
286
|
-
"21":"h6",
|
287
|
-
"22":"hr",
|
288
|
-
"html":
|
289
|
-
{
|
290
|
-
"attributes":[
|
291
|
-
"xmlns"
|
292
|
-
]
|
293
|
-
},
|
294
|
-
"23":"i",
|
295
|
-
"iframe":
|
296
|
-
{
|
297
|
-
"attributes":[
|
298
|
-
"src",
|
299
|
-
"width",
|
300
|
-
"height",
|
301
|
-
"frameborder",
|
302
|
-
"scrolling",
|
303
|
-
"marginheight",
|
304
|
-
"marginwidth"
|
305
|
-
],
|
306
|
-
"required":[
|
307
|
-
"src"
|
308
|
-
]
|
309
|
-
},
|
310
|
-
"img":
|
311
|
-
{
|
312
|
-
"attributes":{
|
313
|
-
"align":/^(right|left|center|justify)$/,
|
314
|
-
"0":"alt",
|
315
|
-
"1":"src",
|
316
|
-
"2":"height",
|
317
|
-
"3":"ismap",
|
318
|
-
"4":"longdesc",
|
319
|
-
"5":"usemap",
|
320
|
-
"6":"width",
|
321
|
-
"7":"rel"
|
322
|
-
},
|
323
|
-
"required":[
|
324
|
-
"alt",
|
325
|
-
"src"
|
326
|
-
]
|
327
|
-
},
|
328
|
-
"input":
|
329
|
-
{
|
330
|
-
"attributes":
|
331
|
-
{
|
332
|
-
"0":"accept",
|
333
|
-
"1":"alt",
|
334
|
-
"checked":/^(checked)$/,
|
335
|
-
"disabled":/^(disabled)$/,
|
336
|
-
"maxlength":/^(\d)+$/,
|
337
|
-
"2":"name",
|
338
|
-
"readonly":/^(readonly)$/,
|
339
|
-
"size":/^(\d)+$/,
|
340
|
-
"3":"src",
|
341
|
-
"type":/^(button|checkbox|file|hidden|image|password|radio|reset|submit|text|tel|search|url|email|datetime|date|month|week|time|datetime-local|number|range|color)$/,
|
342
|
-
"4":"value",
|
343
|
-
"5":"placeholder"
|
344
|
-
},
|
345
|
-
"inside":"form"
|
346
|
-
},
|
347
|
-
"ins":
|
348
|
-
{
|
349
|
-
"attributes":
|
350
|
-
{
|
351
|
-
"0":"cite",
|
352
|
-
"datetime":/^([0-9]){8}/
|
353
|
-
}
|
354
|
-
},
|
355
|
-
"24":"kbd",
|
356
|
-
"label":
|
357
|
-
{
|
358
|
-
"attributes":[
|
359
|
-
"for"
|
360
|
-
],
|
361
|
-
"inside":"form"
|
362
|
-
},
|
363
|
-
"25":"legend",
|
364
|
-
"26":"li",
|
365
|
-
"link":
|
366
|
-
{
|
367
|
-
"attributes":
|
368
|
-
{
|
369
|
-
"0":"charset",
|
370
|
-
"1":"href",
|
371
|
-
"2":"hreflang",
|
372
|
-
"media":/^(all|braille|print|projection|screen|speech|,|;| )+$/i,
|
373
|
-
//next comment line required by Opera!
|
374
|
-
/*"rel":/^(alternate|appendix|bookmark|chapter|contents|copyright|glossary|help|home|index|next|prev|section|start|stylesheet|subsection| |shortcut|icon)+$/i,*/
|
375
|
-
"rel":/^(alternate|appendix|bookmark|chapter|contents|copyright|glossary|help|home|index|next|nofollow|prev|section|start|stylesheet|subsection| |shortcut|icon)+$/i,
|
376
|
-
"rev":/^(alternate|appendix|bookmark|chapter|contents|copyright|glossary|help|home|index|next|prev|section|start|stylesheet|subsection| |shortcut|icon)+$/i,
|
377
|
-
"3":"type"
|
378
|
-
},
|
379
|
-
"inside":"head"
|
380
|
-
},
|
381
|
-
"map":
|
382
|
-
{
|
383
|
-
"attributes":[
|
384
|
-
"id",
|
385
|
-
"name"
|
386
|
-
],
|
387
|
-
"required":[
|
388
|
-
"id"
|
389
|
-
]
|
390
|
-
},
|
391
|
-
"meta":
|
392
|
-
{
|
393
|
-
"attributes":
|
394
|
-
{
|
395
|
-
"0":"content",
|
396
|
-
"http-equiv":/^(content\-type|expires|refresh|set\-cookie)$/i,
|
397
|
-
"1":"name",
|
398
|
-
"2":"scheme"
|
399
|
-
},
|
400
|
-
"required":[
|
401
|
-
"content"
|
402
|
-
]
|
403
|
-
},
|
404
|
-
"27":"noscript",
|
405
|
-
"28":"ol",
|
406
|
-
"optgroup":
|
407
|
-
{
|
408
|
-
"attributes":
|
409
|
-
{
|
410
|
-
"0":"label",
|
411
|
-
"disabled": /^(disabled)$/
|
412
|
-
},
|
413
|
-
"required":[
|
414
|
-
"label"
|
415
|
-
]
|
416
|
-
},
|
417
|
-
"option":
|
418
|
-
{
|
419
|
-
"attributes":
|
420
|
-
{
|
421
|
-
"0":"label",
|
422
|
-
"disabled":/^(disabled)$/,
|
423
|
-
"selected":/^(selected)$/,
|
424
|
-
"1":"value"
|
425
|
-
},
|
426
|
-
"inside":"select"
|
427
|
-
},
|
428
|
-
"29":"p",
|
429
|
-
"param":
|
430
|
-
{
|
431
|
-
"attributes":
|
432
|
-
[
|
433
|
-
"type",
|
434
|
-
"value",
|
435
|
-
"name"
|
436
|
-
],
|
437
|
-
"required":[
|
438
|
-
"name"
|
439
|
-
],
|
440
|
-
"inside":"object"
|
441
|
-
},
|
442
|
-
"embed":
|
443
|
-
{
|
444
|
-
"attributes":
|
445
|
-
[
|
446
|
-
"width",
|
447
|
-
"height",
|
448
|
-
"allowfullscreen",
|
449
|
-
"allowscriptaccess",
|
450
|
-
"wmode",
|
451
|
-
"type",
|
452
|
-
"src",
|
453
|
-
"flashvars"
|
454
|
-
],
|
455
|
-
"inside":"object"
|
456
|
-
},
|
457
|
-
"object":
|
458
|
-
{
|
459
|
-
"attributes":[
|
460
|
-
"archive",
|
461
|
-
"classid",
|
462
|
-
"codebase",
|
463
|
-
"codetype",
|
464
|
-
"data",
|
465
|
-
"declare",
|
466
|
-
"height",
|
467
|
-
"name",
|
468
|
-
"standby",
|
469
|
-
"type",
|
470
|
-
"usemap",
|
471
|
-
"width"
|
472
|
-
]
|
473
|
-
},
|
474
|
-
"30":"pre",
|
475
|
-
"q":
|
476
|
-
{
|
477
|
-
"attributes":[
|
478
|
-
"cite"
|
479
|
-
]
|
480
|
-
},
|
481
|
-
"31":"samp",
|
482
|
-
"script":
|
483
|
-
{
|
484
|
-
"attributes":
|
485
|
-
{
|
486
|
-
"type":/^(text\/ecmascript|text\/javascript|text\/jscript|text\/vbscript|text\/vbs|text\/xml)$/,
|
487
|
-
"0":"charset",
|
488
|
-
"defer":/^(defer)$/,
|
489
|
-
"1":"src"
|
490
|
-
},
|
491
|
-
"required":[
|
492
|
-
"type"
|
493
|
-
]
|
494
|
-
},
|
495
|
-
"select":
|
496
|
-
{
|
497
|
-
"attributes":
|
498
|
-
{
|
499
|
-
"disabled":/^(disabled)$/,
|
500
|
-
"multiple":/^(multiple)$/,
|
501
|
-
"0":"name",
|
502
|
-
"1":"size"
|
503
|
-
},
|
504
|
-
"inside":"form"
|
505
|
-
},
|
506
|
-
"32":"small",
|
507
|
-
"33":"span",
|
508
|
-
"34":"strong",
|
509
|
-
"style":
|
510
|
-
{
|
511
|
-
"attributes":
|
512
|
-
{
|
513
|
-
"0":"type",
|
514
|
-
"media":/^(screen|tty|tv|projection|handheld|print|braille|aural|all)$/
|
515
|
-
},
|
516
|
-
"required":[
|
517
|
-
"type"
|
518
|
-
]
|
519
|
-
},
|
520
|
-
"35":"sub",
|
521
|
-
"36":"sup",
|
522
|
-
"table":
|
523
|
-
{
|
524
|
-
"attributes":
|
525
|
-
{
|
526
|
-
"0":"border",
|
527
|
-
"1":"cellpadding",
|
528
|
-
"2":"cellspacing",
|
529
|
-
"frame":/^(void|above|below|hsides|lhs|rhs|vsides|box|border)$/,
|
530
|
-
"rules":/^(none|groups|rows|cols|all)$/,
|
531
|
-
"3":"summary",
|
532
|
-
"4":"width"
|
533
|
-
}
|
534
|
-
},
|
535
|
-
"tbody":
|
536
|
-
{
|
537
|
-
"attributes":
|
538
|
-
{
|
539
|
-
"align":/^(right|left|center|justify)$/,
|
540
|
-
"0":"char",
|
541
|
-
"1":"charoff",
|
542
|
-
"valign":/^(top|middle|bottom|baseline)$/
|
543
|
-
}
|
544
|
-
},
|
545
|
-
"td":
|
546
|
-
{
|
547
|
-
"attributes":
|
548
|
-
{
|
549
|
-
"0":"abbr",
|
550
|
-
"align":/^(left|right|center|justify|char)$/,
|
551
|
-
"1":"axis",
|
552
|
-
"2":"char",
|
553
|
-
"3":"charoff",
|
554
|
-
"colspan":/^(\d)+$/,
|
555
|
-
"4":"headers",
|
556
|
-
"rowspan":/^(\d)+$/,
|
557
|
-
"scope":/^(col|colgroup|row|rowgroup)$/,
|
558
|
-
"valign":/^(top|middle|bottom|baseline)$/
|
559
|
-
}
|
560
|
-
},
|
561
|
-
"textarea":
|
562
|
-
{
|
563
|
-
"attributes":[
|
564
|
-
"cols",
|
565
|
-
"rows",
|
566
|
-
"disabled",
|
567
|
-
"name",
|
568
|
-
"readonly"
|
569
|
-
],
|
570
|
-
"required":[
|
571
|
-
"cols",
|
572
|
-
"rows"
|
573
|
-
],
|
574
|
-
"inside":"form"
|
575
|
-
},
|
576
|
-
"tfoot":
|
577
|
-
{
|
578
|
-
"attributes":
|
579
|
-
{
|
580
|
-
"align":/^(right|left|center|justify)$/,
|
581
|
-
"0":"char",
|
582
|
-
"1":"charoff",
|
583
|
-
"valign":/^(top|middle|bottom)$/,
|
584
|
-
"2":"baseline"
|
585
|
-
}
|
586
|
-
},
|
587
|
-
"th":
|
588
|
-
{
|
589
|
-
"attributes":
|
590
|
-
{
|
591
|
-
"0":"abbr",
|
592
|
-
"align":/^(left|right|center|justify|char)$/,
|
593
|
-
"1":"axis",
|
594
|
-
"2":"char",
|
595
|
-
"3":"charoff",
|
596
|
-
"colspan":/^(\d)+$/,
|
597
|
-
"4":"headers",
|
598
|
-
"rowspan":/^(\d)+$/,
|
599
|
-
"scope":/^(col|colgroup|row|rowgroup)$/,
|
600
|
-
"valign":/^(top|middle|bottom|baseline)$/
|
601
|
-
}
|
602
|
-
},
|
603
|
-
"thead":
|
604
|
-
{
|
605
|
-
"attributes":
|
606
|
-
{
|
607
|
-
"align":/^(right|left|center|justify)$/,
|
608
|
-
"0":"char",
|
609
|
-
"1":"charoff",
|
610
|
-
"valign":/^(top|middle|bottom|baseline)$/
|
611
|
-
}
|
612
|
-
},
|
613
|
-
"37":"title",
|
614
|
-
"tr":
|
615
|
-
{
|
616
|
-
"attributes":
|
617
|
-
{
|
618
|
-
"align":/^(right|left|center|justify|char)$/,
|
619
|
-
"0":"char",
|
620
|
-
"1":"charoff",
|
621
|
-
"valign":/^(top|middle|bottom|baseline)$/
|
622
|
-
}
|
623
|
-
},
|
624
|
-
"38":"tt",
|
625
|
-
"39":"ul",
|
626
|
-
"40":"var",
|
627
|
-
"41":"section",
|
628
|
-
"42":"article",
|
629
|
-
"43":"aside",
|
630
|
-
"44":"details",
|
631
|
-
"45":"header",
|
632
|
-
"46":"footer",
|
633
|
-
"47":"nav",
|
634
|
-
"48":"dialog",
|
635
|
-
"49":"figure",
|
636
|
-
"50":"figcaption",
|
637
|
-
"51":"address",
|
638
|
-
"52":"hgroup",
|
639
|
-
"53":"mark",
|
640
|
-
"54":"time",
|
641
|
-
"55":"canvas",
|
642
|
-
"56":"audio",
|
643
|
-
"57":"video",
|
644
|
-
"58":"source",
|
645
|
-
"59":"output",
|
646
|
-
"60":"progress",
|
647
|
-
"61":"ruby",
|
648
|
-
"62":"rt",
|
649
|
-
"63":"rp",
|
650
|
-
"64":"summary",
|
651
|
-
"65":"command"<% Refinery::Core.wymeditor_whitelist_tags.each do |key, value| %>,
|
652
|
-
<%= key.inspect %>:<%= value.to_json %><% end %>
|
653
|
-
},
|
654
|
-
|
655
|
-
// Temporary skipped attributes
|
656
|
-
skipped_attributes : [],
|
657
|
-
skipped_attribute_values : [],
|
658
|
-
|
659
|
-
getValidTagAttributes: function(tag, attributes)
|
660
|
-
{
|
661
|
-
var valid_attributes = {};
|
662
|
-
var possible_attributes = this.getPossibleTagAttributes(tag);
|
663
|
-
var regexp_attributes = [];
|
664
|
-
$.each((possible_attributes || []), function(i, val) {
|
665
|
-
if (val.indexOf("*") > -1) {
|
666
|
-
regexp_attributes.push(new RegExp(val));
|
667
|
-
}
|
668
|
-
});
|
669
|
-
var h = WYMeditor.Helper;
|
670
|
-
for(var attribute in attributes) {
|
671
|
-
var value = attributes[attribute];
|
672
|
-
if(!h.contains(this.skipped_attributes, attribute) && !h.contains(this.skipped_attribute_values, value)){
|
673
|
-
if (typeof value != 'function') {
|
674
|
-
if (h.contains(possible_attributes, attribute)) {
|
675
|
-
if (this.doesAttributeNeedsValidation(tag, attribute)) {
|
676
|
-
if(this.validateAttribute(tag, attribute, value)){
|
677
|
-
valid_attributes[attribute] = value;
|
678
|
-
}
|
679
|
-
}else{
|
680
|
-
valid_attributes[attribute] = value;
|
681
|
-
}
|
682
|
-
}
|
683
|
-
else {
|
684
|
-
$.each(regexp_attributes, function(i, val) {
|
685
|
-
if (attribute.match(val)) {
|
686
|
-
valid_attributes[attribute] = value;
|
687
|
-
}
|
688
|
-
});
|
689
|
-
}
|
690
|
-
}
|
691
|
-
}
|
692
|
-
}
|
693
|
-
return valid_attributes;
|
694
|
-
},
|
695
|
-
getUniqueAttributesAndEventsForTag: function(tag)
|
696
|
-
{
|
697
|
-
var result = [];
|
698
|
-
|
699
|
-
if (this._tags[tag] && this._tags[tag]['attributes']) {
|
700
|
-
for (k in this._tags[tag]['attributes']) {
|
701
|
-
result.push(parseInt(k) == k ? this._tags[tag]['attributes'][k] : k);
|
702
|
-
}
|
703
|
-
}
|
704
|
-
return result;
|
705
|
-
},
|
706
|
-
getDefaultAttributesAndEventsForTags: function()
|
707
|
-
{
|
708
|
-
var result = [];
|
709
|
-
for (var key in this._events){
|
710
|
-
result.push(this._events[key]);
|
711
|
-
}
|
712
|
-
for (var key in this._attributes){
|
713
|
-
result.push(this._attributes[key]);
|
714
|
-
}
|
715
|
-
return result;
|
716
|
-
},
|
717
|
-
isValidTag: function(tag)
|
718
|
-
{
|
719
|
-
if(this._tags[tag]){
|
720
|
-
return true;
|
721
|
-
}
|
722
|
-
for(var key in this._tags){
|
723
|
-
if(this._tags[key] == tag){
|
724
|
-
return true;
|
725
|
-
}
|
726
|
-
}
|
727
|
-
return false;
|
728
|
-
},
|
729
|
-
getDefaultAttributesAndEventsForTag: function(tag)
|
730
|
-
{
|
731
|
-
var default_attributes = [];
|
732
|
-
if (this.isValidTag(tag)) {
|
733
|
-
var default_attributes_and_events = this.getDefaultAttributesAndEventsForTags();
|
734
|
-
|
735
|
-
for(var key in default_attributes_and_events) {
|
736
|
-
var defaults = default_attributes_and_events[key];
|
737
|
-
if(typeof defaults == 'object'){
|
738
|
-
var h = WYMeditor.Helper;
|
739
|
-
if ((defaults['except'] && h.contains(defaults['except'], tag)) || (defaults['only'] && !h.contains(defaults['only'], tag))) {
|
740
|
-
continue;
|
741
|
-
}
|
742
|
-
|
743
|
-
var tag_defaults = defaults['attributes'] ? defaults['attributes'] : defaults['events'];
|
744
|
-
for(var k in tag_defaults) {
|
745
|
-
default_attributes.push(typeof tag_defaults[k] != 'string' ? k : tag_defaults[k]);
|
746
|
-
}
|
747
|
-
}
|
748
|
-
}
|
749
|
-
}
|
750
|
-
return default_attributes;
|
751
|
-
},
|
752
|
-
doesAttributeNeedsValidation: function(tag, attribute)
|
753
|
-
{
|
754
|
-
return this._tags[tag] && ((this._tags[tag]['attributes'] && this._tags[tag]['attributes'][attribute]) || (this._tags[tag]['required'] &&
|
755
|
-
WYMeditor.Helper.contains(this._tags[tag]['required'], attribute)));
|
756
|
-
},
|
757
|
-
validateAttribute: function(tag, attribute, value)
|
758
|
-
{
|
759
|
-
if ( this._tags[tag] &&
|
760
|
-
(this._tags[tag]['attributes'] && this._tags[tag]['attributes'][attribute] && value.length > 0 && !value.match(this._tags[tag]['attributes'][attribute])) || // invalid format
|
761
|
-
(this._tags[tag] && this._tags[tag]['required'] && WYMeditor.Helper.contains(this._tags[tag]['required'], attribute) && value.length == 0) // required attribute
|
762
|
-
) {
|
763
|
-
return false;
|
764
|
-
}
|
765
|
-
return typeof this._tags[tag] != 'undefined';
|
766
|
-
},
|
767
|
-
getPossibleTagAttributes: function(tag)
|
768
|
-
{
|
769
|
-
if (!this._possible_tag_attributes) {
|
770
|
-
this._possible_tag_attributes = {};
|
771
|
-
}
|
772
|
-
if (!this._possible_tag_attributes[tag]) {
|
773
|
-
this._possible_tag_attributes[tag] = this.getUniqueAttributesAndEventsForTag(tag).concat(this.getDefaultAttributesAndEventsForTag(tag));
|
774
|
-
}
|
775
|
-
return this._possible_tag_attributes[tag];
|
776
|
-
}
|
777
|
-
};
|