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,622 +0,0 @@
|
|
1
|
-
if(!WYMeditor) { var WYMeditor = {}; }
|
2
|
-
|
3
|
-
//Wrap the Firebug console in WYMeditor.console
|
4
|
-
(function() {
|
5
|
-
if ( !window.console || !console.firebug ) {
|
6
|
-
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
7
|
-
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
8
|
-
|
9
|
-
WYMeditor.console = {};
|
10
|
-
for (var i = 0; i < names.length; ++i)
|
11
|
-
WYMeditor.console[names[i]] = function() {};
|
12
|
-
|
13
|
-
} else { WYMeditor.console = window.console; }
|
14
|
-
})();
|
15
|
-
$.extend(WYMeditor, {
|
16
|
-
|
17
|
-
/*
|
18
|
-
Constants: Global WYMeditor constants.
|
19
|
-
|
20
|
-
VERSION - Defines WYMeditor version.
|
21
|
-
INSTANCES - An array of loaded WYMeditor.editor instances.
|
22
|
-
STRINGS - An array of loaded WYMeditor language pairs/values.
|
23
|
-
SKINS - An array of loaded WYMeditor skins.
|
24
|
-
NAME - The "name" attribute.
|
25
|
-
INDEX - A string replaced by the instance index.
|
26
|
-
WYM_INDEX - A string used to get/set the instance index.
|
27
|
-
BASE_PATH - A string replaced by WYMeditor's base path.
|
28
|
-
SKIN_PATH - A string replaced by WYMeditor's skin path.
|
29
|
-
WYM_PATH - A string replaced by WYMeditor's main JS file path.
|
30
|
-
SKINS_DEFAULT_PATH - The skins default base path.
|
31
|
-
SKINS_DEFAULT_CSS - The skins default CSS file.
|
32
|
-
LANG_DEFAULT_PATH - The language files default path.
|
33
|
-
IFRAME_BASE_PATH - A string replaced by the designmode iframe's base path.
|
34
|
-
IFRAME_DEFAULT - The iframe's default base path.
|
35
|
-
JQUERY_PATH - A string replaced by the computed jQuery path.
|
36
|
-
DIRECTION - A string replaced by the text direction (rtl or ltr).
|
37
|
-
LOGO - A string replaced by WYMeditor logo.
|
38
|
-
TOOLS - A string replaced by the toolbar's HTML.
|
39
|
-
TOOLS_ITEMS - A string replaced by the toolbar items.
|
40
|
-
TOOL_NAME - A string replaced by a toolbar item's name.
|
41
|
-
TOOL_TITLE - A string replaced by a toolbar item's title.
|
42
|
-
TOOL_CLASS - A string replaced by a toolbar item's class.
|
43
|
-
CLASSES - A string replaced by the classes panel's HTML.
|
44
|
-
CLASSES_ITEMS - A string replaced by the classes items.
|
45
|
-
CLASS_NAME - A string replaced by a class item's name.
|
46
|
-
CLASS_TITLE - A string replaced by a class item's title.
|
47
|
-
CONTAINERS - A string replaced by the containers panel's HTML.
|
48
|
-
CONTAINERS_ITEMS - A string replaced by the containers items.
|
49
|
-
CONTAINER_NAME - A string replaced by a container item's name.
|
50
|
-
CONTAINER_TITLE - A string replaced by a container item's title.
|
51
|
-
CONTAINER_CLASS - A string replaced by a container item's class.
|
52
|
-
HTML - A string replaced by the HTML view panel's HTML.
|
53
|
-
IFRAME - A string replaced by the designmode iframe.
|
54
|
-
STATUS - A string replaced by the status panel's HTML.
|
55
|
-
DIALOG_TITLE - A string replaced by a dialog's title.
|
56
|
-
DIALOG_BODY - A string replaced by a dialog's HTML body.
|
57
|
-
BODY - The BODY element.
|
58
|
-
STRING - The "string" type.
|
59
|
-
BODY,DIV,P,
|
60
|
-
H1,H2,H3,H4,H5,H6,
|
61
|
-
PRE,BLOCKQUOTE,
|
62
|
-
A,BR,IMG,
|
63
|
-
TABLE,TD,TH,
|
64
|
-
UL,OL,LI - HTML elements string representation.
|
65
|
-
CLASS,HREF,SRC,
|
66
|
-
TITLE,ALT - HTML attributes string representation.
|
67
|
-
DIALOG_LINK - A link dialog type.
|
68
|
-
DIALOG_IMAGE - An image dialog type.
|
69
|
-
DIALOG_TABLE - A table dialog type.
|
70
|
-
DIALOG_PASTE - A 'Paste' dialog type.
|
71
|
-
BOLD - Command: (un)set selection to <strong>.
|
72
|
-
ITALIC - Command: (un)set selection to <em>.
|
73
|
-
CREATE_LINK - Command: open the link dialog or (un)set link.
|
74
|
-
INSERT_IMAGE - Command: open the image dialog or insert an image.
|
75
|
-
INSERT_TABLE - Command: open the table dialog.
|
76
|
-
PASTE - Command: open the paste dialog.
|
77
|
-
INDENT - Command: nest a list item.
|
78
|
-
OUTDENT - Command: unnest a list item.
|
79
|
-
TOGGLE_HTML - Command: display/hide the HTML view.
|
80
|
-
FORMAT_BLOCK - Command: set a block element to another type.
|
81
|
-
PREVIEW - Command: open the preview dialog.
|
82
|
-
UNLINK - Command: unset a link.
|
83
|
-
INSERT_UNORDEREDLIST- Command: insert an unordered list.
|
84
|
-
INSERT_ORDEREDLIST - Command: insert an ordered list.
|
85
|
-
MAIN_CONTAINERS - An array of the main HTML containers used in WYMeditor.
|
86
|
-
BLOCKS - An array of the HTML block elements.
|
87
|
-
KEY - Standard key codes.
|
88
|
-
NODE - Node types.
|
89
|
-
|
90
|
-
*/
|
91
|
-
|
92
|
-
VERSION : "0.5-rc1-refinery",
|
93
|
-
INSTANCES : [],
|
94
|
-
STRINGS : [],
|
95
|
-
SKINS : [],
|
96
|
-
NAME : "name",
|
97
|
-
INDEX : "{Wym_Index}",
|
98
|
-
WYM_INDEX : "wym_index",
|
99
|
-
BASE_PATH : "{Wym_Base_Path}",
|
100
|
-
CSS_PATH : "{Wym_Css_Path}",
|
101
|
-
WYM_PATH : "{Wym_Wym_Path}",
|
102
|
-
SKINS_DEFAULT_PATH : "<%= asset_path 'wymeditor/skins/' %>",
|
103
|
-
SKINS_DEFAULT_CSS : "skin.css",
|
104
|
-
SKINS_DEFAULT_JS : "skin.js",
|
105
|
-
LANG_DEFAULT_PATH : "<%= asset_path 'wymeditor/lang/' %>",
|
106
|
-
IFRAME_BASE_PATH : "{Wym_Iframe_Base_Path}",
|
107
|
-
IFRAME_DEFAULT : "iframe/default/",
|
108
|
-
JQUERY_PATH : "{Wym_Jquery_Path}",
|
109
|
-
DIRECTION : "{Wym_Direction}",
|
110
|
-
LOGO : "{Wym_Logo}",
|
111
|
-
TOOLS : "{Wym_Tools}",
|
112
|
-
TOOLS_ITEMS : "{Wym_Tools_Items}",
|
113
|
-
TOOL_NAME : "{Wym_Tool_Name}",
|
114
|
-
TOOL_TITLE : "{Wym_Tool_Title}",
|
115
|
-
TOOL_CLASS : "{Wym_Tool_Class}",
|
116
|
-
CLASSES : "{Wym_Classes}",
|
117
|
-
CLASSES_ITEMS : "{Wym_Classes_Items}",
|
118
|
-
CLASS_NAME : "{Wym_Class_Name}",
|
119
|
-
CLASS_TITLE : "{Wym_Class_Title}",
|
120
|
-
CONTAINERS : "{Wym_Containers}",
|
121
|
-
CONTAINERS_ITEMS : "{Wym_Containers_Items}",
|
122
|
-
CONTAINER_NAME : "{Wym_Container_Name}",
|
123
|
-
CONTAINER_TITLE : "{Wym_Containers_Title}",
|
124
|
-
CONTAINER_CLASS : "{Wym_Container_Class}",
|
125
|
-
HTML : "{Wym_Html}",
|
126
|
-
IFRAME : "{Wym_Iframe}",
|
127
|
-
STATUS : "{Wym_Status}",
|
128
|
-
DIALOG_TITLE : "{Wym_Dialog_Title}",
|
129
|
-
DIALOG_BODY : "{Wym_Dialog_Body}",
|
130
|
-
STRING : "string",
|
131
|
-
BODY : "body",
|
132
|
-
DIV : "div",
|
133
|
-
P : "p",
|
134
|
-
H1 : "h1",
|
135
|
-
H2 : "h2",
|
136
|
-
H3 : "h3",
|
137
|
-
H4 : "h4",
|
138
|
-
H5 : "h5",
|
139
|
-
H6 : "h6",
|
140
|
-
PRE : "pre",
|
141
|
-
BLOCKQUOTE : "blockquote",
|
142
|
-
A : "a",
|
143
|
-
BR : "br",
|
144
|
-
IMG : "img",
|
145
|
-
TABLE : "table",
|
146
|
-
TD : "td",
|
147
|
-
TH : "th",
|
148
|
-
UL : "ul",
|
149
|
-
OL : "ol",
|
150
|
-
LI : "li",
|
151
|
-
CLASS : "class",
|
152
|
-
HREF : "href",
|
153
|
-
SRC : "src",
|
154
|
-
TITLE : "title",
|
155
|
-
TARGET : "target",
|
156
|
-
ALT : "alt",
|
157
|
-
REL : 'data-rel',
|
158
|
-
DIALOG_LINK : "Link",
|
159
|
-
DIALOG_IMAGE : "Image",
|
160
|
-
DIALOG_TABLE : "Table",
|
161
|
-
DIALOG_PASTE : "Paste_From_Word",
|
162
|
-
DIALOG_CLASS : "Css_Class",
|
163
|
-
BOLD : "Bold",
|
164
|
-
ITALIC : "Italic",
|
165
|
-
CREATE_LINK : "CreateLink",
|
166
|
-
INSERT_IMAGE : "InsertImage",
|
167
|
-
INSERT_TABLE : "InsertTable",
|
168
|
-
INSERT_HTML : "InsertHTML",
|
169
|
-
APPLY_CLASS : "Apply_Style",
|
170
|
-
PASTE : "Paste",
|
171
|
-
INDENT : "Indent",
|
172
|
-
OUTDENT : "Outdent",
|
173
|
-
TOGGLE_HTML : "ToggleHtml",
|
174
|
-
FORMAT_BLOCK : "FormatBlock",
|
175
|
-
PREVIEW : "Preview",
|
176
|
-
|
177
|
-
UNLINK : "Unlink",
|
178
|
-
INSERT_UNORDEREDLIST : "InsertUnorderedList",
|
179
|
-
INSERT_ORDEREDLIST : "InsertOrderedList",
|
180
|
-
|
181
|
-
MAIN_CONTAINERS : new Array("p","h1","h2","h3","h4","h5","h6","pre","blockquote"),
|
182
|
-
|
183
|
-
BLOCKS : new Array("address", "blockquote", "div", "dl",
|
184
|
-
"fieldset", "form", "h1", "h2", "h3", "h4", "h5", "h6", "hr",
|
185
|
-
"noscript", "ol", "p", "pre", "table", "ul", "dd", "dt",
|
186
|
-
"li", "tbody", "td", "tfoot", "th", "thead", "tr", "meter",
|
187
|
-
"section", "article", "aside", "details", "header", "footer",
|
188
|
-
"nav", "dialog", "figure", "figcaption", "address", "hgroup",
|
189
|
-
"mark", "time", "canvas", "audio", "video", "output",
|
190
|
-
"progress", "ruby", "rt", "rp", "summary", "command"),
|
191
|
-
|
192
|
-
KEY : {
|
193
|
-
BACKSPACE: 8,
|
194
|
-
ENTER: 13,
|
195
|
-
END: 35,
|
196
|
-
HOME: 36,
|
197
|
-
LEFT: 37,
|
198
|
-
UP: 38,
|
199
|
-
RIGHT: 39,
|
200
|
-
DOWN: 40,
|
201
|
-
CURSOR: new Array(37, 38, 39, 40),
|
202
|
-
DELETE: 46
|
203
|
-
},
|
204
|
-
|
205
|
-
NODE : {
|
206
|
-
ELEMENT: 1,
|
207
|
-
ATTRIBUTE: 2,
|
208
|
-
TEXT: 3
|
209
|
-
},
|
210
|
-
|
211
|
-
/*
|
212
|
-
Class: WYMeditor.editor
|
213
|
-
WYMeditor editor main class, instanciated for each editor occurrence.
|
214
|
-
*/
|
215
|
-
|
216
|
-
editor : function(elem, options) {
|
217
|
-
/*
|
218
|
-
Constructor: WYMeditor.editor
|
219
|
-
|
220
|
-
Initializes main values (index, elements, paths, ...)
|
221
|
-
and call WYMeditor.editor.init which initializes the editor.
|
222
|
-
|
223
|
-
Parameters:
|
224
|
-
|
225
|
-
elem - The HTML element to be replaced by the editor.
|
226
|
-
options - The hash of options.
|
227
|
-
|
228
|
-
Returns:
|
229
|
-
|
230
|
-
Nothing.
|
231
|
-
|
232
|
-
See Also:
|
233
|
-
|
234
|
-
<WYMeditor.editor.init>
|
235
|
-
*/
|
236
|
-
|
237
|
-
//store the instance in the INSTANCES array and store the index
|
238
|
-
this._index = WYMeditor.INSTANCES.push(this) - 1;
|
239
|
-
//store the element replaced by the editor
|
240
|
-
this._element = elem;
|
241
|
-
//store the options
|
242
|
-
this._options = options;
|
243
|
-
//store the element's inner value
|
244
|
-
this._html = $(elem).val();
|
245
|
-
|
246
|
-
//store the HTML option, if any
|
247
|
-
if(this._options.html) { this._html = this._options.html; }
|
248
|
-
|
249
|
-
//get or compute the base path (where the main JS file is located)
|
250
|
-
this._options.basePath = this._options.basePath || this.computeBasePath();
|
251
|
-
|
252
|
-
//get or set the skin path (where the skin files are located)
|
253
|
-
this._options.skinPath = this._options.skinPath || (this._options.basePath + WYMeditor.SKINS_DEFAULT_PATH) + this._options.skin + '/';
|
254
|
-
|
255
|
-
// set css and js skin paths
|
256
|
-
this._options.cssCompiledSkinPath = this._options.cssCompiledSkinPath || ((this._options.cssSkinPath || this._options.skinPath) + this._options.skin + "/");
|
257
|
-
this._options.jsCompiledSkinPath = this._options.jsCompiledSkinPath || ((this._options.jsSkinPath || this._options.skinPath) + this._options.skin + "/");
|
258
|
-
|
259
|
-
//get or compute the main JS file location
|
260
|
-
this._options.wymPath = this._options.wymPath || this.computeWymPath();
|
261
|
-
|
262
|
-
//get or set the language files path
|
263
|
-
this._options.langPath = this._options.langPath || this._options.basePath + WYMeditor.LANG_DEFAULT_PATH;
|
264
|
-
|
265
|
-
//get or set the designmode iframe's base path
|
266
|
-
this._options.iframeBasePath = this._options.iframeBasePath || this._options.basePath + WYMeditor.IFRAME_DEFAULT;
|
267
|
-
|
268
|
-
//get or compute the jQuery JS file location
|
269
|
-
this._options.jQueryPath = this._options.jQueryPath || this.computeJqueryPath();
|
270
|
-
|
271
|
-
//initialize the editor instance
|
272
|
-
this.init();
|
273
|
-
}
|
274
|
-
|
275
|
-
});
|
276
|
-
|
277
|
-
|
278
|
-
/********** JQUERY **********/
|
279
|
-
|
280
|
-
/**
|
281
|
-
* Replace an HTML element by WYMeditor
|
282
|
-
*
|
283
|
-
* @example $(".wymeditor").wymeditor(
|
284
|
-
* {
|
285
|
-
*
|
286
|
-
* }
|
287
|
-
* );
|
288
|
-
* @desc Example description here
|
289
|
-
*
|
290
|
-
* @name WYMeditor
|
291
|
-
* @description WYMeditor is a web-based WYSIWYM XHTML editor
|
292
|
-
* @param Hash hash A hash of parameters
|
293
|
-
* @option Integer iExample Description here
|
294
|
-
* @option String sExample Description here
|
295
|
-
*
|
296
|
-
* @type jQuery
|
297
|
-
* @cat Plugins/WYMeditor
|
298
|
-
* @author Jean-Francois Hovinne
|
299
|
-
*/
|
300
|
-
$.fn.wymeditor = function(options) {
|
301
|
-
|
302
|
-
options = $.extend({
|
303
|
-
|
304
|
-
html: "",
|
305
|
-
|
306
|
-
basePath: false,
|
307
|
-
|
308
|
-
skinPath: false,
|
309
|
-
jsSkinPath: false,
|
310
|
-
cssSkinPath: false,
|
311
|
-
|
312
|
-
wymPath: false,
|
313
|
-
|
314
|
-
iframeBasePath: false,
|
315
|
-
|
316
|
-
jQueryPath: false,
|
317
|
-
|
318
|
-
styles: false,
|
319
|
-
|
320
|
-
stylesheet: false,
|
321
|
-
|
322
|
-
skin: "default",
|
323
|
-
initSkin: true,
|
324
|
-
loadSkin: true,
|
325
|
-
|
326
|
-
lang: refinery.current_admin_locale,
|
327
|
-
|
328
|
-
direction: "ltr",
|
329
|
-
|
330
|
-
boxHtml: "<div class='wym_box'>"
|
331
|
-
+ "<div class='wym_area_top'>" + WYMeditor.TOOLS + "</div>"
|
332
|
-
+ "<div class='wym_area_left'></div>"
|
333
|
-
+ "<div class='wym_area_right'>" + WYMeditor.CONTAINERS + WYMeditor.CLASSES + "</div>"
|
334
|
-
+ "<div class='wym_area_main'>" + WYMeditor.HTML + WYMeditor.IFRAME + WYMeditor.STATUS + "</div>"
|
335
|
-
+ "<div class='wym_area_bottom'>" + WYMeditor.LOGO + "</div>"
|
336
|
-
+ "</div>",
|
337
|
-
|
338
|
-
logoHtml: "<a class='wym_wymeditor_link' href='http://www.wymeditor.org/'>WYMeditor</a>",
|
339
|
-
|
340
|
-
iframeHtml:"<div class='wym_iframe wym_section'>"
|
341
|
-
+ "<iframe src='" + WYMeditor.IFRAME_BASE_PATH + "wymiframe.html' onload='"
|
342
|
-
+ "this.contentWindow.parent.WYMeditor.INSTANCES[" + WYMeditor.INDEX + "].initIframe(this)'>"
|
343
|
-
+ "</iframe>"
|
344
|
-
+ "</div>",
|
345
|
-
|
346
|
-
editorStyles: [],
|
347
|
-
|
348
|
-
toolsHtml: "<div class='wym_tools wym_section'>"
|
349
|
-
+ "<h2>{Tools}</h2>"
|
350
|
-
+ "<ul>" + WYMeditor.TOOLS_ITEMS + "</ul>"
|
351
|
-
+ "</div>",
|
352
|
-
|
353
|
-
toolsItemHtml:"<li class='" + WYMeditor.TOOL_CLASS + "'>"
|
354
|
-
+ "<a href='#' name='" + WYMeditor.TOOL_NAME + "' title='" + WYMeditor.TOOL_TITLE + "'>"
|
355
|
-
+ WYMeditor.TOOL_TITLE
|
356
|
-
+ "</a>"
|
357
|
-
+ "</li>",
|
358
|
-
|
359
|
-
toolsItems: [
|
360
|
-
{'name': 'Bold', 'title': 'Strong', 'css': 'wym_tools_strong'},
|
361
|
-
{'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'},
|
362
|
-
{'name': 'Superscript', 'title': 'Superscript', 'css': 'wym_tools_superscript'},
|
363
|
-
{'name': 'Subscript', 'title': 'Subscript', 'css': 'wym_tools_subscript'},
|
364
|
-
{'name': 'InsertOrderedList', 'title': 'Ordered_List', 'css': 'wym_tools_ordered_list'},
|
365
|
-
{'name': 'InsertUnorderedList', 'title': 'Unordered_List', 'css': 'wym_tools_unordered_list'},
|
366
|
-
{'name': 'Indent', 'title': 'Indent', 'css': 'wym_tools_indent'},
|
367
|
-
{'name': 'Outdent', 'title': 'Outdent', 'css': 'wym_tools_outdent'},
|
368
|
-
{'name': 'Undo', 'title': 'Undo', 'css': 'wym_tools_undo'},
|
369
|
-
{'name': 'Redo', 'title': 'Redo', 'css': 'wym_tools_redo'},
|
370
|
-
{'name': 'CreateLink', 'title': 'Link', 'css': 'wym_tools_link'},
|
371
|
-
{'name': 'Unlink', 'title': 'Unlink', 'css': 'wym_tools_unlink'},
|
372
|
-
{'name': 'InsertImage', 'title': 'Image', 'css': 'wym_tools_image'},
|
373
|
-
{'name': 'InsertTable', 'title': 'Table', 'css': 'wym_tools_table'},
|
374
|
-
{'name': 'Paste', 'title': 'Paste_From_Word', 'css': 'wym_tools_paste'},
|
375
|
-
{'name': 'ToggleHtml', 'title': 'HTML', 'css': 'wym_tools_html'},
|
376
|
-
{'name': 'Preview', 'title': 'Preview', 'css': 'wym_tools_preview'}
|
377
|
-
],
|
378
|
-
|
379
|
-
containersHtml: "<div class='wym_containers wym_section'>"
|
380
|
-
+ "<h2>{Containers}</h2>"
|
381
|
-
+ "<ul>"
|
382
|
-
+ WYMeditor.CONTAINERS_ITEMS
|
383
|
-
+ "</ul>"
|
384
|
-
+ "</div>",
|
385
|
-
|
386
|
-
containersItemHtml:"<li class='" + WYMeditor.CONTAINER_CLASS + "'>"
|
387
|
-
+ "<a href='#' name='" + WYMeditor.CONTAINER_NAME + "'>"
|
388
|
-
+ WYMeditor.CONTAINER_TITLE
|
389
|
-
+ "</a>"
|
390
|
-
+"</li>",
|
391
|
-
|
392
|
-
containersItems: [
|
393
|
-
{'name': 'P', 'title': 'Paragraph', 'css': 'wym_containers_p'},
|
394
|
-
{'name': 'H1', 'title': 'Heading_1', 'css': 'wym_containers_h1'},
|
395
|
-
{'name': 'H2', 'title': 'Heading_2', 'css': 'wym_containers_h2'},
|
396
|
-
{'name': 'H3', 'title': 'Heading_3', 'css': 'wym_containers_h3'},
|
397
|
-
{'name': 'H4', 'title': 'Heading_4', 'css': 'wym_containers_h4'},
|
398
|
-
{'name': 'H5', 'title': 'Heading_5', 'css': 'wym_containers_h5'},
|
399
|
-
{'name': 'H6', 'title': 'Heading_6', 'css': 'wym_containers_h6'},
|
400
|
-
{'name': 'PRE', 'title': 'Preformatted', 'css': 'wym_containers_pre'},
|
401
|
-
{'name': 'BLOCKQUOTE', 'title': 'Blockquote', 'css': 'wym_containers_blockquote'},
|
402
|
-
{'name': 'TH', 'title': 'Table_Header', 'css': 'wym_containers_th'}
|
403
|
-
],
|
404
|
-
|
405
|
-
classesHtml: "<div class='wym_classes wym_section'>"
|
406
|
-
+ "<h2>{Classes}</h2><ul>"
|
407
|
-
+ WYMeditor.CLASSES_ITEMS
|
408
|
-
+ "</ul></div>",
|
409
|
-
|
410
|
-
classesItemHtml: "<li class='wym_classes_" + WYMeditor.CLASS_NAME + "'>"
|
411
|
-
+ "<a href='#' name='" + WYMeditor.CLASS_NAME + "'>"
|
412
|
-
+ WYMeditor.CLASS_TITLE
|
413
|
-
+ "</a>"
|
414
|
-
+"</li>",
|
415
|
-
|
416
|
-
classesItems: [],
|
417
|
-
|
418
|
-
statusHtml: "<div class='wym_status wym_section'>"
|
419
|
-
+ "<h2>{Status}</h2>"
|
420
|
-
+"</div>",
|
421
|
-
|
422
|
-
htmlHtml: "<div class='wym_html wym_section'>"
|
423
|
-
+ "<h2>{Source_Code}</h2>"
|
424
|
-
+ "<textarea class='wym_html_val'></textarea>"
|
425
|
-
+"</div>",
|
426
|
-
|
427
|
-
boxSelector: ".wym_box",
|
428
|
-
toolsSelector: ".wym_tools",
|
429
|
-
toolsListSelector: " ul",
|
430
|
-
containersSelector:".wym_containers",
|
431
|
-
classesSelector: ".wym_classes",
|
432
|
-
htmlSelector: ".wym_html",
|
433
|
-
iframeSelector: ".wym_iframe iframe",
|
434
|
-
iframeBodySelector:".wym_iframe",
|
435
|
-
statusSelector: ".wym_status",
|
436
|
-
toolSelector: ".wym_tools a",
|
437
|
-
containerSelector: ".wym_containers a",
|
438
|
-
classSelector: ".wym_classes a",
|
439
|
-
classUnhiddenSelector: ".wym_classes",
|
440
|
-
classHiddenSelector: ".wym_classes_hidden",
|
441
|
-
htmlValSelector: ".wym_html_val",
|
442
|
-
|
443
|
-
hrefSelector: ".wym_href",
|
444
|
-
srcSelector: ".wym_src",
|
445
|
-
titleSelector: ".wym_title",
|
446
|
-
targetSelector: ".wym_target",
|
447
|
-
altSelector: ".wym_alt",
|
448
|
-
textSelector: ".wym_text",
|
449
|
-
sizeSelector: ".wym_size",
|
450
|
-
|
451
|
-
rowsSelector: ".wym_rows",
|
452
|
-
colsSelector: ".wym_cols",
|
453
|
-
captionSelector: ".wym_caption",
|
454
|
-
summarySelector: ".wym_summary",
|
455
|
-
|
456
|
-
submitSelector: ".wym_submit",
|
457
|
-
cancelSelector: ".wym_cancel",
|
458
|
-
previewSelector: "",
|
459
|
-
|
460
|
-
dialogTypeSelector: ".wym_dialog_type",
|
461
|
-
dialogLinkSelector: ".wym_dialog_link",
|
462
|
-
dialogImageSelector: ".wym_dialog_image",
|
463
|
-
dialogTableSelector: ".wym_dialog_table",
|
464
|
-
dialogPasteSelector: ".wym_dialog_paste",
|
465
|
-
dialogPreviewSelector: ".wym_dialog_preview",
|
466
|
-
|
467
|
-
updateSelector: ".wymupdate",
|
468
|
-
updateEvent: "click",
|
469
|
-
|
470
|
-
dialogFeatures: {
|
471
|
-
width: 560
|
472
|
-
, height: 300
|
473
|
-
}
|
474
|
-
|
475
|
-
, dialogFeaturesPreview: "menubar=no,titlebar=no,toolbar=no,resizable=no,scrollbars=yes,width=560,height=300,top=0,left=0"
|
476
|
-
|
477
|
-
, dialogHtml:"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'"
|
478
|
-
+ " 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>"
|
479
|
-
+ "<html dir='" + WYMeditor.DIRECTION + "'>"
|
480
|
-
+ "<head>"
|
481
|
-
+ "<link rel='stylesheet' type='text/css' media='screen'" + " href='" + WYMeditor.CSS_PATH + "' />"
|
482
|
-
+ "<title>" + WYMeditor.DIALOG_TITLE + "</title>"
|
483
|
-
+ "<script type='text/javascript' src='" + WYMeditor.JQUERY_PATH + "'></script>"
|
484
|
-
+ "<script type='text/javascript' src='" + WYMeditor.WYM_PATH + "'></script>"
|
485
|
-
+ "</head>"
|
486
|
-
+ WYMeditor.DIALOG_BODY
|
487
|
-
+ "</html>",
|
488
|
-
|
489
|
-
dialogLinkHtml: "<div class='wym_dialog wym_dialog_link'>"
|
490
|
-
+ "<form>"
|
491
|
-
+ "<fieldset>"
|
492
|
-
+ "<input type='hidden' id='wym_dialog_type' class='wym_dialog_type' value='"
|
493
|
-
+ WYMeditor.DIALOG_LINK
|
494
|
-
+ "' />"
|
495
|
-
+ "<legend>{Link}</legend>"
|
496
|
-
+ "<div class='row'>"
|
497
|
-
+ "<label>{URL}</label>"
|
498
|
-
+ "<input type='text' class='wym_href' value='' size='40' />"
|
499
|
-
+ "</div>"
|
500
|
-
+ "<div class='row'>"
|
501
|
-
+ "<label>{Title}</label>"
|
502
|
-
+ "<input type='text' class='wym_title' value='' size='40' />"
|
503
|
-
+ "</div>"
|
504
|
-
+ "<div class='row row-indent'>"
|
505
|
-
+ "<input class='wym_submit button' type='button'"
|
506
|
-
+ " value='{Submit}' />"
|
507
|
-
+ "<input class='wym_cancel' type='button'"
|
508
|
-
+ "value='{Cancel}' />"
|
509
|
-
+ "</div>"
|
510
|
-
+ "</fieldset>"
|
511
|
-
+ "</form>"
|
512
|
-
+ "</div>",
|
513
|
-
|
514
|
-
dialogImageHtml: "<div class='wym_dialog wym_dialog_image'>"
|
515
|
-
+ "<form>"
|
516
|
-
+ "<fieldset>"
|
517
|
-
+ "<input type='hidden' id='wym_dialog_type' class='wym_dialog_type' value='"
|
518
|
-
+ WYMeditor.DIALOG_IMAGE
|
519
|
-
+ "' />"
|
520
|
-
+ "<legend>{Image}</legend>"
|
521
|
-
+ "<div class='row'>"
|
522
|
-
+ "<label>{URL}</label>"
|
523
|
-
+ "<input type='text' class='wym_src' value='' size='40' />"
|
524
|
-
+ "</div>"
|
525
|
-
+ "<div class='row'>"
|
526
|
-
+ "<label>{Alternative_Text}</label>"
|
527
|
-
+ "<input type='text' class='wym_alt' value='' size='40' />"
|
528
|
-
+ "</div>"
|
529
|
-
+ "<div class='row'>"
|
530
|
-
+ "<label>{Title}</label>"
|
531
|
-
+ "<input type='text' class='wym_title' value='' size='40' />"
|
532
|
-
+ "</div>"
|
533
|
-
+ "<div class='row row-indent'>"
|
534
|
-
+ "<input class='wym_submit button' type='button'"
|
535
|
-
+ " value='{Submit}' />"
|
536
|
-
+ "<input class='wym_cancel' type='button'"
|
537
|
-
+ "value='{Cancel}' />"
|
538
|
-
+ "</div>"
|
539
|
-
+ "</fieldset>"
|
540
|
-
+ "</form>"
|
541
|
-
+ "</div>",
|
542
|
-
|
543
|
-
dialogTableHtml: "<div class='wym_dialog wym_dialog_table'>"
|
544
|
-
+ "<form>"
|
545
|
-
+ "<input type='hidden' id='wym_dialog_type' class='wym_dialog_type' value='"
|
546
|
-
+ WYMeditor.DIALOG_TABLE
|
547
|
-
+ "' />"
|
548
|
-
+ "<div class='row'>"
|
549
|
-
+ "<label>{Caption}</label>"
|
550
|
-
+ "<input type='text' class='wym_caption' value='' size='40' />"
|
551
|
-
+ "</div>"
|
552
|
-
+ "<div class='row'>"
|
553
|
-
+ "<label>{Summary}</label>"
|
554
|
-
+ "<input type='text' class='wym_summary' value='' size='40' />"
|
555
|
-
+ "</div>"
|
556
|
-
+ "<div class='row'>"
|
557
|
-
+ "<label>{Number_Of_Rows}</label>"
|
558
|
-
+ "<input type='text' class='wym_rows' value='3' size='3' />"
|
559
|
-
+ "</div>"
|
560
|
-
+ "<div class='row'>"
|
561
|
-
+ "<label>{Number_Of_Cols}</label>"
|
562
|
-
+ "<input type='text' class='wym_cols' value='2' size='3' />"
|
563
|
-
+ "</div>"
|
564
|
-
+ "<div class='row row-indent'>"
|
565
|
-
+ "<input class='wym_submit button' type='button'"
|
566
|
-
+ " value='{Submit}' />"
|
567
|
-
+ "<input class='wym_cancel' type='button'"
|
568
|
-
+ "value='{Cancel}' />"
|
569
|
-
+ "</div>"
|
570
|
-
+ "</form>"
|
571
|
-
+ "</div>",
|
572
|
-
|
573
|
-
dialogPasteHtml: "<div class='wym_dialog wym_dialog_paste'>"
|
574
|
-
+ "<form>"
|
575
|
-
+ "<input type='hidden' id='wym_dialog_type' class='wym_dialog_type' value='"
|
576
|
-
+ WYMeditor.DIALOG_PASTE
|
577
|
-
+ "' />"
|
578
|
-
+ "<fieldset>"
|
579
|
-
+ "<legend>{Paste_From_Word}</legend>"
|
580
|
-
+ "<div class='row'>"
|
581
|
-
+ "<textarea class='wym_text' rows='10' cols='50'></textarea>"
|
582
|
-
+ "</div>"
|
583
|
-
+ "<div class='row'>"
|
584
|
-
+ "<input class='wym_submit button' type='button'"
|
585
|
-
+ " value='{Submit}' />"
|
586
|
-
+ "<input class='wym_cancel' type='button'"
|
587
|
-
+ "value='{Cancel}' />"
|
588
|
-
+ "</div>"
|
589
|
-
+ "</fieldset>"
|
590
|
-
+ "</form>"
|
591
|
-
+ "</div>",
|
592
|
-
|
593
|
-
dialogPreviewHtml: "<div class='wym_dialog wym_dialog_preview'></div>",
|
594
|
-
|
595
|
-
dialogStyles: [],
|
596
|
-
|
597
|
-
stringDelimiterLeft: "{",
|
598
|
-
stringDelimiterRight:"}",
|
599
|
-
|
600
|
-
preInit: null,
|
601
|
-
preBind: null,
|
602
|
-
postInit: null,
|
603
|
-
|
604
|
-
preInitDialog: null,
|
605
|
-
postInitDialog: null
|
606
|
-
|
607
|
-
}, options);
|
608
|
-
|
609
|
-
return this.each(function() {
|
610
|
-
|
611
|
-
new WYMeditor.editor($(this),options);
|
612
|
-
});
|
613
|
-
};
|
614
|
-
|
615
|
-
/* @name extend
|
616
|
-
* @description Returns the WYMeditor instance based on its index
|
617
|
-
*/
|
618
|
-
$.extend({
|
619
|
-
wymeditors: function(i) {
|
620
|
-
return (WYMeditor.INSTANCES[i]);
|
621
|
-
}
|
622
|
-
});
|