alchemy_cms 2.1.12 → 2.2.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -1
- data/Gemfile +20 -16
- data/README.md +11 -7
- data/alchemy_cms.gemspec +31 -29
- data/app/assets/javascripts/alchemy/alchemy.base.js +234 -233
- data/app/assets/javascripts/alchemy/alchemy.buttons.js +26 -26
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js +32 -32
- data/app/assets/javascripts/alchemy/alchemy.dirty.js +78 -78
- data/app/assets/javascripts/alchemy/alchemy.dragndrop.js +103 -103
- data/app/assets/javascripts/alchemy/alchemy.element_editor_selector.js +84 -84
- data/app/assets/javascripts/alchemy/alchemy.elements_window.js +88 -88
- data/app/assets/javascripts/alchemy/alchemy.file_progress.js +92 -0
- data/app/assets/javascripts/alchemy/alchemy.growler.js +23 -23
- data/app/assets/javascripts/alchemy/alchemy.html5.js +23 -0
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +53 -52
- data/app/assets/javascripts/alchemy/alchemy.jquery_loader.js +33 -30
- data/app/assets/javascripts/alchemy/alchemy.js +2 -0
- data/app/assets/javascripts/alchemy/alchemy.js_extensions.js +14 -14
- data/app/assets/javascripts/alchemy/alchemy.link_overlay.js.coffee +181 -0
- data/app/assets/javascripts/alchemy/alchemy.menubar.js +48 -48
- data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +39 -39
- data/app/assets/javascripts/alchemy/alchemy.preview.js +81 -83
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js +86 -86
- data/app/assets/javascripts/alchemy/alchemy.routes.js.erb +23 -23
- data/app/assets/javascripts/alchemy/alchemy.swf_upload.js +208 -353
- data/app/assets/javascripts/alchemy/alchemy.uploader.js +279 -0
- data/app/assets/javascripts/alchemy/alchemy.windows.js +268 -268
- data/app/assets/javascripts/tiny_mce/plugins/alchemy_link/editor_plugin.js +42 -42
- data/app/assets/stylesheets/alchemy/_defaults.scss +89 -89
- data/app/assets/stylesheets/alchemy/base.css.scss +790 -804
- data/app/assets/stylesheets/alchemy/buttons.css.scss +263 -264
- data/app/assets/stylesheets/alchemy/dashboard.css.scss +66 -66
- data/app/assets/stylesheets/alchemy/elements.css.scss +575 -564
- data/app/assets/stylesheets/alchemy/flash.css.scss +45 -45
- data/app/assets/stylesheets/alchemy/frame.css.scss +262 -262
- data/app/assets/stylesheets/alchemy/icons.css.scss +86 -86
- data/app/assets/stylesheets/alchemy/jquery-ui.alchemy.css.scss +706 -707
- data/app/assets/stylesheets/alchemy/jquery.Jcrop.css.scss +46 -27
- data/app/assets/stylesheets/alchemy/jquery.sb.css.scss +107 -107
- data/app/assets/stylesheets/alchemy/login.css.scss +40 -38
- data/app/assets/stylesheets/alchemy/menubar.css.scss +84 -82
- data/app/assets/stylesheets/alchemy/modules.css.scss +9 -9
- data/app/assets/stylesheets/alchemy/pagination.css.scss +49 -49
- data/app/assets/stylesheets/alchemy/print.css +7 -7
- data/app/assets/stylesheets/alchemy/sitemap.css.scss +185 -154
- data/app/assets/stylesheets/alchemy/standard_set.css +205 -206
- data/app/assets/stylesheets/alchemy/tables.css.scss +94 -60
- data/app/assets/stylesheets/alchemy/tinymce_content.css.scss +34 -34
- data/app/assets/stylesheets/alchemy/tinymce_dialog.css.scss +177 -177
- data/app/assets/stylesheets/alchemy/upload.css.scss +68 -45
- data/app/assets/stylesheets/tiny_mce/plugins/inlinepopups/skins/alchemy/window.css.scss +222 -221
- data/app/controllers/alchemy/admin/attachments_controller.rb +100 -100
- data/app/controllers/alchemy/admin/base_controller.rb +116 -116
- data/app/controllers/alchemy/admin/clipboard_controller.rb +44 -44
- data/app/controllers/alchemy/admin/contents_controller.rb +55 -55
- data/app/controllers/alchemy/admin/dashboard_controller.rb +12 -11
- data/app/controllers/alchemy/admin/elements_controller.rb +109 -109
- data/app/controllers/alchemy/admin/essence_audios_controller.rb +8 -8
- data/app/controllers/alchemy/admin/essence_files_controller.rb +20 -20
- data/app/controllers/alchemy/admin/essence_flashes_controller.rb +8 -8
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +81 -81
- data/app/controllers/alchemy/admin/essence_videos_controller.rb +8 -8
- data/app/controllers/alchemy/admin/languages_controller.rb +16 -4
- data/app/controllers/alchemy/admin/layoutpages_controller.rb +9 -9
- data/app/controllers/alchemy/admin/pages_controller.rb +249 -248
- data/app/controllers/alchemy/admin/pictures_controller.rb +105 -105
- data/app/controllers/alchemy/admin/resources_controller.rb +111 -166
- data/app/controllers/alchemy/admin/trash_controller.rb +18 -18
- data/app/controllers/alchemy/admin/users_controller.rb +69 -69
- data/app/controllers/alchemy/attachments_controller.rb +27 -27
- data/app/controllers/alchemy/base_controller.rb +159 -155
- data/app/controllers/alchemy/elements_controller.rb +16 -16
- data/app/controllers/alchemy/messages_controller.rb +59 -59
- data/app/controllers/alchemy/pages_controller.rb +194 -198
- data/app/controllers/alchemy/pictures_controller.rb +57 -57
- data/app/controllers/alchemy/user_sessions_controller.rb +70 -70
- data/app/helpers/alchemy/admin/attachments_helper.rb +7 -7
- data/app/helpers/alchemy/admin/base_helper.rb +425 -425
- data/app/helpers/alchemy/admin/contents_helper.rb +72 -72
- data/app/helpers/alchemy/admin/elements_helper.rb +108 -107
- data/app/helpers/alchemy/admin/essences_helper.rb +108 -108
- data/app/helpers/alchemy/admin/pages_helper.rb +42 -42
- data/app/helpers/alchemy/admin/pictures_helper.rb +26 -26
- data/app/helpers/alchemy/base_helper.rb +90 -90
- data/app/helpers/alchemy/elements_helper.rb +167 -168
- data/app/helpers/alchemy/essences_helper.rb +133 -133
- data/app/helpers/alchemy/pages_helper.rb +515 -526
- data/app/helpers/alchemy/pictures_helper.rb +19 -0
- data/app/mailers/alchemy/messages.rb +13 -13
- data/app/mailers/alchemy/notifications.rb +19 -19
- data/app/models/alchemy.rb +3 -3
- data/app/models/alchemy/attachment.rb +52 -78
- data/app/models/alchemy/cell.rb +48 -48
- data/app/models/alchemy/content.rb +196 -196
- data/app/models/alchemy/element.rb +500 -490
- data/app/models/alchemy/essence_audio.rb +7 -7
- data/app/models/alchemy/essence_date.rb +10 -10
- data/app/models/alchemy/essence_file.rb +7 -7
- data/app/models/alchemy/essence_flash.rb +6 -6
- data/app/models/alchemy/essence_html.rb +9 -9
- data/app/models/alchemy/essence_picture.rb +17 -17
- data/app/models/alchemy/essence_richtext.rb +53 -53
- data/app/models/alchemy/essence_text.rb +21 -21
- data/app/models/alchemy/essence_video.rb +7 -7
- data/app/models/alchemy/folded_page.rb +3 -3
- data/app/models/alchemy/language.rb +91 -91
- data/app/models/alchemy/language/code.rb +14 -14
- data/app/models/alchemy/message.rb +48 -45
- data/app/models/alchemy/page.rb +555 -558
- data/app/models/alchemy/picture.rb +100 -99
- data/app/models/alchemy/user.rb +76 -74
- data/app/models/alchemy/user_session.rb +8 -8
- data/app/sweepers/alchemy/content_sweeper.rb +15 -15
- data/app/sweepers/alchemy/pages_sweeper.rb +50 -50
- data/app/sweepers/alchemy/pictures_sweeper.rb +14 -14
- data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +23 -23
- data/app/views/alchemy/admin/attachments/_attachment.html.erb +56 -56
- data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +15 -15
- data/app/views/alchemy/admin/attachments/_files_list.html.erb +16 -16
- data/app/views/alchemy/admin/attachments/create.js.erb +2 -2
- data/app/views/alchemy/admin/attachments/destroy.js.erb +3 -3
- data/app/views/alchemy/admin/attachments/edit.html.erb +10 -10
- data/app/views/alchemy/admin/attachments/index.html.erb +14 -14
- data/app/views/alchemy/admin/attachments/new.html.erb +9 -9
- data/app/views/alchemy/admin/clipboard/index.html.erb +21 -21
- data/app/views/alchemy/admin/clipboard/insert.js.erb +5 -5
- data/app/views/alchemy/admin/contents/_missing.html.erb +1 -1
- data/app/views/alchemy/admin/contents/create.js.erb +33 -33
- data/app/views/alchemy/admin/contents/destroy.js.erb +5 -5
- data/app/views/alchemy/admin/contents/new.html.erb +13 -13
- data/app/views/alchemy/admin/contents/order.js.erb +2 -2
- data/app/views/alchemy/admin/dashboard/index.html.erb +96 -92
- data/app/views/alchemy/admin/elements/_add_content.html.erb +12 -12
- data/app/views/alchemy/admin/elements/_element.html.erb +3 -3
- data/app/views/alchemy/admin/elements/_new_element_form.html.erb +28 -28
- data/app/views/alchemy/admin/elements/_picture_editor.html.erb +21 -21
- data/app/views/alchemy/admin/elements/create.js.erb +32 -32
- data/app/views/alchemy/admin/elements/index.html.erb +2 -2
- data/app/views/alchemy/admin/elements/new.html.erb +31 -31
- data/app/views/alchemy/admin/elements/order.js.erb +3 -3
- data/app/views/alchemy/admin/elements/trash.js.erb +13 -13
- data/app/views/alchemy/admin/elements/update.js.erb +6 -6
- data/app/views/alchemy/admin/essence_files/assign.js.erb +6 -6
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +32 -32
- data/app/views/alchemy/admin/essence_pictures/destroy.js.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +11 -11
- data/app/views/alchemy/admin/languages/_form.html.erb +51 -45
- data/app/views/alchemy/admin/languages/_language.html.erb +45 -45
- data/app/views/alchemy/admin/languages/_table.html.erb +25 -25
- data/app/views/alchemy/admin/layoutpages/index.html.erb +35 -35
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +42 -42
- data/app/views/alchemy/admin/pages/_external_link.html.erb +1 -1
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +27 -27
- data/app/views/alchemy/admin/pages/_page.html.erb +112 -112
- data/app/views/alchemy/admin/pages/_sitemap.html.erb +1 -1
- data/app/views/alchemy/admin/pages/configure.html.erb +71 -69
- data/app/views/alchemy/admin/pages/configure_external.html.erb +38 -38
- data/app/views/alchemy/admin/pages/destroy.js.erb +10 -10
- data/app/views/alchemy/admin/pages/edit.html.erb +165 -165
- data/app/views/alchemy/admin/pages/fold.js.erb +2 -2
- data/app/views/alchemy/admin/pages/index.html.erb +66 -66
- data/app/views/alchemy/admin/pages/locked.html.erb +1 -1
- data/app/views/alchemy/admin/pages/new.html.erb +40 -40
- data/app/views/alchemy/admin/pages/sort.js.erb +4 -4
- data/app/views/alchemy/admin/pages/unlock.js.erb +6 -6
- data/app/views/alchemy/admin/pages/update.js.erb +19 -19
- data/app/views/alchemy/admin/partials/_flash.html.erb +2 -2
- data/app/views/alchemy/admin/partials/_flash_notices.html.erb +1 -1
- data/app/views/alchemy/admin/partials/_flash_upload.html.erb +38 -0
- data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +15 -15
- data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +8 -8
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +35 -35
- data/app/views/alchemy/admin/partials/_search_form.html.erb +14 -14
- data/app/views/alchemy/admin/partials/_sub_navigation_tab.html.erb +6 -6
- data/app/views/alchemy/admin/partials/_upload_form.html.erb +56 -118
- data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +11 -11
- data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +71 -71
- data/app/views/alchemy/admin/pictures/_picture.html.erb +32 -32
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +26 -26
- data/app/views/alchemy/admin/pictures/_pictures_list.html.erb +6 -6
- data/app/views/alchemy/admin/pictures/create.js.erb +7 -7
- data/app/views/alchemy/admin/pictures/index.html.erb +67 -67
- data/app/views/alchemy/admin/pictures/show_in_window.html.erb +5 -4
- data/app/views/alchemy/admin/resources/_form.html.erb +25 -19
- data/app/views/alchemy/admin/resources/_resource.html.erb +37 -36
- data/app/views/alchemy/admin/resources/_table.html.erb +17 -17
- data/app/views/alchemy/admin/resources/destroy.js.erb +1 -1
- data/app/views/alchemy/admin/resources/index.html.erb +14 -14
- data/app/views/alchemy/admin/trash/index.html.erb +20 -20
- data/app/views/alchemy/admin/users/_table.html.erb +52 -52
- data/app/views/alchemy/admin/users/_user.html.erb +35 -36
- data/app/views/alchemy/admin/users/index.html.erb +26 -27
- data/app/views/alchemy/base/error_notice.html.erb +2 -2
- data/app/views/alchemy/base/update.js.erb +1 -1
- data/app/views/alchemy/elements/_contactform_view.html.erb +76 -76
- data/app/views/alchemy/elements/_download_view.html.erb +1 -1
- data/app/views/alchemy/elements/_editor_not_found.html.erb +3 -3
- data/app/views/alchemy/elements/_searchresult_view.html.erb +2 -2
- data/app/views/alchemy/elements/_sitemap_editor.html.erb +1 -1
- data/app/views/alchemy/essences/_essence_audio_view.html.erb +13 -13
- data/app/views/alchemy/essences/_essence_date_editor.html.erb +10 -10
- data/app/views/alchemy/essences/_essence_file_editor.html.erb +62 -62
- data/app/views/alchemy/essences/_essence_file_view.html.erb +8 -8
- data/app/views/alchemy/essences/_essence_flash_view.html.erb +19 -19
- data/app/views/alchemy/essences/_essence_html_editor.html.erb +6 -6
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +73 -73
- data/app/views/alchemy/essences/_essence_picture_view.html.erb +34 -34
- data/app/views/alchemy/essences/_essence_richtext_editor.html.erb +7 -7
- data/app/views/alchemy/essences/_essence_text_editor.html.erb +8 -8
- data/app/views/alchemy/navigation/_image_link.html.erb +12 -12
- data/app/views/alchemy/navigation/_link.html.erb +13 -13
- data/app/views/alchemy/navigation/_renderer.html.erb +17 -17
- data/app/views/alchemy/page_layouts/_layout_footer.html.erb +1 -1
- data/app/views/alchemy/page_layouts/_layout_header.html.erb +1 -1
- data/app/views/alchemy/pages/show.rss.builder +14 -14
- data/app/views/alchemy/search/_result.html.erb +7 -7
- data/app/views/alchemy/user_sessions/leave.html.erb +9 -9
- data/app/views/alchemy/user_sessions/login.html.erb +39 -39
- data/app/views/alchemy/user_sessions/logout.html.erb +1 -1
- data/app/views/layouts/alchemy/admin.html.erb +81 -81
- data/app/views/layouts/alchemy/login.html.erb +36 -36
- data/app/views/layouts/alchemy/pages.html.erb +48 -27
- data/bin/alchemy +136 -134
- data/config/alchemy/config.yml +13 -9
- data/config/locales/alchemy.de.yml +24 -30
- data/config/locales/alchemy.en.yml +11 -28
- data/config/routes.rb +146 -146
- data/db/migrate/20100607193638_create_essence_pictures.rb +3 -3
- data/db/migrate/20101109150312_alter_pages_visible_column_default.rb +1 -1
- data/db/migrate/20101109151812_create_languages.rb +3 -3
- data/db/migrate/20110115123343_remove_css_class_default_from_essence_pictures.rb +3 -3
- data/db/migrate/20110224105120_change_pages_visible_default.rb +3 -3
- data/db/migrate/20110228182659_remove_default_page_layout_from_pages.rb +2 -2
- data/db/migrate/20110414163140_remove_display_name_from_elements.rb +3 -3
- data/db/migrate/20110511100516_rename_essence_texts_title_to_link_title.rb +2 -2
- data/db/migrate/20110529130500_add_cell_id_to_elements.rb +3 -3
- data/db/migrate/20110530102804_change_pages_page_layout_column.rb +3 -3
- data/db/migrate/20110711142057_change_open_link_in_new_window_to_link_target.rb +1 -1
- data/db/migrate/20111116125112_namespace_alchemy_models.rb +21 -21
- data/lib/alchemy/auth_engine.rb +5 -5
- data/lib/alchemy/capistrano.rb +64 -64
- data/lib/alchemy/config.rb +47 -44
- data/lib/alchemy/engine.rb +41 -41
- data/lib/alchemy/essence.rb +50 -51
- data/lib/alchemy/i18n.rb +48 -48
- data/lib/alchemy/modules.rb +30 -30
- data/lib/alchemy/mount_point.rb +6 -6
- data/lib/alchemy/page_layout.rb +94 -93
- data/lib/alchemy/resource.rb +82 -0
- data/lib/alchemy/resources_helper.rb +56 -0
- data/lib/alchemy/scoped_pagination_url_helper.rb +8 -8
- data/lib/alchemy/seeder.rb +88 -88
- data/lib/alchemy/tinymce.rb +49 -49
- data/lib/alchemy/upgrader.rb +103 -103
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +26 -27
- data/lib/extensions/action_view.rb +1 -1
- data/lib/extensions/array.rb +3 -3
- data/lib/extensions/hash.rb +3 -3
- data/lib/middleware/flash_session_cookie.rb +1 -1
- data/lib/rails/generators/alchemy/deploy_script/deploy_script_generator.rb +24 -24
- data/lib/rails/generators/alchemy/elements/elements_generator.rb +7 -7
- data/lib/rails/generators/alchemy/elements/templates/view.html.erb +17 -17
- data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +6 -6
- data/lib/rails/generators/alchemy/plugin/templates/authorization_rules.rb +8 -8
- data/lib/rails/generators/alchemy/scaffold/files/pages.html.erb +7 -7
- data/lib/rails/generators/alchemy/scaffold/scaffold_generator.rb +36 -36
- data/lib/rails/templates/alchemy.rb +1 -1
- data/lib/tasks/ferret.rake +2 -2
- data/lib/tasks/fleximage.rake +32 -32
- data/lib/tasks/install.rake +12 -12
- data/lib/tasks/upgrade.rake +4 -4
- data/spec/controllers/admin/clipboard_controller_spec.rb +43 -43
- data/spec/controllers/admin/contents_controller_spec.rb +22 -22
- data/spec/controllers/admin/elements_controller_spec.rb +13 -13
- data/spec/controllers/admin/languages_controller_spec.rb +31 -0
- data/spec/controllers/admin/pages_controller_spec.rb +10 -41
- data/spec/controllers/admin/resources_controller_spec.rb +19 -0
- data/spec/controllers/admin/trash_controller_spec.rb +11 -11
- data/spec/controllers/base_controller_spec.rb +46 -46
- data/spec/controllers/pages_controller_spec.rb +102 -92
- data/spec/dummy/app/controllers/admin/events_controller.rb +3 -0
- data/spec/dummy/app/controllers/errors_controller.rb +5 -0
- data/spec/dummy/app/models/event.rb +3 -0
- data/spec/dummy/config.ru +1 -1
- data/spec/dummy/config/application.rb +3 -0
- data/spec/dummy/config/authorization_rules.rb +7 -0
- data/spec/dummy/config/environments/development.rb +8 -1
- data/spec/dummy/config/environments/production.rb +1 -1
- data/spec/dummy/config/environments/test.rb +5 -2
- data/spec/dummy/config/routes.rb +9 -1
- data/spec/dummy/db/schema.rb +47 -35
- data/spec/dummy/public/404.html +19 -7
- data/spec/dummy/public/404.html.bak +26 -0
- data/spec/dummy/public/422.html +19 -7
- data/spec/dummy/public/500.html +19 -7
- data/spec/dummy/script/rails +2 -2
- data/spec/factories.rb +76 -76
- data/spec/helpers/admin/base_helper_spec.rb +21 -21
- data/spec/helpers/admin/contents_helper_spec.rb +14 -14
- data/spec/helpers/admin/elements_helper_spec.rb +40 -40
- data/spec/helpers/admin/essences_helper_spec.rb +7 -7
- data/spec/helpers/elements_helper_spec.rb +154 -154
- data/spec/helpers/essences_helper_spec.rb +10 -10
- data/spec/helpers/pages_helper_spec.rb +369 -372
- data/spec/helpers/pictures_helper_spec.rb +14 -0
- data/spec/helpers/url_helpers_spec.rb +29 -34
- data/spec/integration/admin/pages_controller_spec.rb +50 -50
- data/spec/integration/admin/resources_integration_spec.rb +100 -0
- data/spec/integration/navigation_spec.rb +1 -1
- data/spec/integration/pages_controller_spec.rb +205 -207
- data/spec/integration/security_spec.rb +47 -47
- data/spec/javascripts/alchemy/link_overlay_spec.js.coffee +42 -0
- data/spec/javascripts/alchemy_integration_spec.coffee +12 -0
- data/spec/javascripts/fixtures/select.html +3 -0
- data/spec/javascripts/helpers/.gitkeep +0 -0
- data/spec/javascripts/helpers/jasmine-jquery-1.3.1.js +289 -0
- data/spec/javascripts/helpers/mock-ajax.js +207 -0
- data/spec/javascripts/helpers/test_responses/test_responses.js +1 -0
- data/spec/javascripts/spec.css +3 -0
- data/spec/javascripts/spec.js +2 -0
- data/spec/libraries/resource_spec.rb +122 -0
- data/spec/libraries/resources_helper_spec.rb +105 -0
- data/spec/models/content_spec.rb +67 -67
- data/spec/models/element_spec.rb +133 -133
- data/spec/models/essence_picture_spec.rb +5 -5
- data/spec/models/essence_richtext_spec.rb +4 -4
- data/spec/models/language_spec.rb +89 -89
- data/spec/models/page_spec.rb +436 -506
- data/spec/models/picture_spec.rb +34 -34
- data/spec/models/user_spec.rb +2 -2
- data/spec/page_layout_spec.rb +24 -20
- data/spec/routing_spec.rb +253 -253
- data/spec/spec_helper.rb +51 -50
- data/spec/support/alchemy/controller_hacks.rb +25 -25
- data/spec/support/alchemy/specs_helpers.rb +25 -25
- data/spec/support/integration_spec_helper.rb +24 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.html5uploader.js +271 -0
- data/vendor/assets/javascripts/jquery_plugins/jquery.in-place-edit.js +86 -85
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.nestedSortable.js +380 -377
- data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +285 -279
- data/vendor/assets/javascripts/swfupload/SWFObject License.txt +3 -3
- data/vendor/assets/javascripts/swfupload/swfupload.cookies.js +47 -47
- data/vendor/assets/javascripts/swfupload/swfupload.js +612 -612
- data/vendor/assets/javascripts/swfupload/swfupload.queue.js +93 -93
- data/vendor/assets/javascripts/swfupload/swfupload.speed.js +337 -337
- data/vendor/assets/javascripts/swfupload/swfupload.swfobject.js +706 -102
- data/vendor/assets/javascripts/tiny_mce/license.txt +6 -6
- data/vendor/assets/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +97 -97
- data/vendor/assets/javascripts/tiny_mce/plugins/inlinepopups/template.htm +386 -376
- data/vendor/assets/javascripts/tiny_mce/plugins/paste/js/pastetext.js +30 -30
- data/vendor/assets/javascripts/tiny_mce/plugins/paste/js/pasteword.js +45 -45
- data/vendor/assets/javascripts/tiny_mce/plugins/paste/pastetext.htm +20 -17
- data/vendor/assets/javascripts/tiny_mce/plugins/paste/pasteword.htm +12 -12
- data/vendor/assets/javascripts/tiny_mce/plugins/table/cell.htm +183 -173
- data/vendor/assets/javascripts/tiny_mce/plugins/table/css/cell.css +4 -4
- data/vendor/assets/javascripts/tiny_mce/plugins/table/css/row.css +7 -7
- data/vendor/assets/javascripts/tiny_mce/plugins/table/css/table.css +3 -3
- data/vendor/assets/javascripts/tiny_mce/plugins/table/js/cell.js +282 -280
- data/vendor/assets/javascripts/tiny_mce/plugins/table/js/merge_cells.js +15 -15
- data/vendor/assets/javascripts/tiny_mce/plugins/table/js/row.js +204 -204
- data/vendor/assets/javascripts/tiny_mce/plugins/table/js/table.js +435 -435
- data/vendor/assets/javascripts/tiny_mce/plugins/table/merge_cells.htm +24 -22
- data/vendor/assets/javascripts/tiny_mce/plugins/table/row.htm +144 -136
- data/vendor/assets/javascripts/tiny_mce/plugins/table/table.htm +184 -168
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/about.htm +62 -46
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/anchor.htm +17 -16
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/charmap.htm +56 -47
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/color_picker.htm +67 -54
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/editor_template.js +852 -1
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/image.htm +79 -69
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/about.js +48 -48
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/anchor.js +28 -28
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/charmap.js +317 -317
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/color_picker.js +248 -246
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/image.js +246 -246
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/link.js +146 -146
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/js/source_editor.js +31 -31
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/langs/de.js +1 -1
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/langs/de_dlg.js +1 -1
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/langs/en.js +1 -1
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +1 -1
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/link.htm +53 -46
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/shortcuts.htm +57 -45
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/content.css +182 -47
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +399 -92
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +891 -187
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/content.css +102 -24
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +377 -78
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/highcontrast/ui.css +452 -77
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +167 -45
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +399 -92
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +890 -190
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +33 -7
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +15 -4
- data/vendor/assets/javascripts/tiny_mce/themes/advanced/source_editor.htm +18 -15
- data/vendor/assets/javascripts/tiny_mce/utils/editable_selects.js +46 -46
- data/vendor/assets/javascripts/tiny_mce/utils/form_utils.js +124 -124
- data/vendor/assets/javascripts/tiny_mce/utils/mctabs.js +112 -112
- data/vendor/assets/javascripts/tiny_mce/utils/validate.js +213 -213
- metadata +102 -115
- data/app/assets/javascripts/alchemy/alchemy.link_overlay.js +0 -216
- data/lib/tasks/routes.rake +0 -29
- data/spec/integration/admin/resources_spec.rb +0 -19
@@ -1,52 +1,68 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
3
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
4
|
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
<title>{#advanced_dlg.about_title}</title>
|
6
|
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
7
|
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
8
|
+
<script type="text/javascript" src="js/about.js"></script>
|
8
9
|
</head>
|
9
10
|
<body id="about" style="display: none">
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
11
|
+
<div class="tabs">
|
12
|
+
<ul>
|
13
|
+
<li id="general_tab" class="current" aria-controls="general_panel"><span><a
|
14
|
+
href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span>
|
15
|
+
</li>
|
16
|
+
<li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a
|
17
|
+
href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span>
|
18
|
+
</li>
|
19
|
+
<li id="plugins_tab" aria-controls="plugins_panel"><span><a
|
20
|
+
href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span>
|
21
|
+
</li>
|
22
|
+
</ul>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<div class="panel_wrapper">
|
26
|
+
<div id="general_panel" class="panel current">
|
27
|
+
<h3>{#advanced_dlg.about_title}</h3>
|
28
|
+
|
29
|
+
<p>Version: <span id="version"></span> (<span id="date"></span>)</p>
|
30
|
+
|
31
|
+
<p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under
|
32
|
+
<a href="../../license.txt" target="_blank">LGPL</a>
|
33
|
+
by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor
|
34
|
+
instances.</p>
|
35
|
+
|
36
|
+
<p>Copyright © 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All
|
37
|
+
rights reserved.</p>
|
38
|
+
|
39
|
+
<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE
|
40
|
+
website</a>.</p>
|
41
|
+
|
42
|
+
<div id="buttoncontainer">
|
43
|
+
<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png"
|
44
|
+
alt="Got Moxie?" border="0"/></a>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<div id="plugins_panel" class="panel">
|
49
|
+
<div id="pluginscontainer">
|
50
|
+
<h3>{#advanced_dlg.about_loaded}</h3>
|
51
|
+
|
52
|
+
<div id="plugintablecontainer">
|
53
|
+
</div>
|
54
|
+
|
55
|
+
<p> </p>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div id="help_panel" class="panel noscroll" style="overflow: visible;">
|
60
|
+
<div id="iframecontainer"></div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<div class="mceActionPanel">
|
65
|
+
<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();"/>
|
66
|
+
</div>
|
51
67
|
</body>
|
52
68
|
</html>
|
@@ -1,26 +1,27 @@
|
|
1
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
2
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
3
|
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
<title>{#advanced_dlg.anchor_title}</title>
|
5
|
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6
|
+
<script type="text/javascript" src="js/anchor.js"></script>
|
7
7
|
</head>
|
8
8
|
<body style="display: none" role="application" aria-labelledby="app_title">
|
9
9
|
<form onsubmit="AnchorDialog.update();return false;" action="#">
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
10
|
+
<table border="0" cellpadding="4" cellspacing="0" role="presentation">
|
11
|
+
<tr>
|
12
|
+
<td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
|
16
|
+
<td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px"
|
17
|
+
aria-required="true"/></td>
|
18
|
+
</tr>
|
19
|
+
</table>
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
<div class="mceActionPanel">
|
22
|
+
<input type="submit" id="insert" name="insert" value="{#update}"/>
|
23
|
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();"/>
|
24
|
+
</div>
|
24
25
|
</form>
|
25
26
|
</body>
|
26
27
|
</html>
|
@@ -1,55 +1,64 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
3
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
4
|
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
5
|
+
<title>{#advanced_dlg.charmap_title}</title>
|
6
|
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
7
|
+
<script type="text/javascript" src="js/charmap.js"></script>
|
7
8
|
</head>
|
8
9
|
<body id="charmap" style="display:none" role="application">
|
9
10
|
<table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
11
|
+
<tr>
|
12
|
+
<td colspan="2" class="title"><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<td id="charmapView" rowspan="2" align="left" valign="top">
|
16
|
+
<!-- Chars will be rendered here -->
|
17
|
+
</td>
|
18
|
+
<td width="100" align="center" valign="top">
|
19
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
|
20
|
+
<tr>
|
21
|
+
<td id="codeV"> </td>
|
22
|
+
</tr>
|
23
|
+
<tr>
|
24
|
+
<td id="codeN"> </td>
|
25
|
+
</tr>
|
26
|
+
</table>
|
27
|
+
</td>
|
28
|
+
</tr>
|
29
|
+
<tr>
|
30
|
+
<td valign="bottom" style="padding-bottom: 3px;">
|
31
|
+
<table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
|
32
|
+
<tr>
|
33
|
+
<td align="center"
|
34
|
+
style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">
|
35
|
+
<label for="codeA">HTML-Code</label></td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td
|
39
|
+
style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;"
|
40
|
+
id="codeA" align="center"> </td>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<td style="font-size: 1px;"> </td>
|
44
|
+
</tr>
|
45
|
+
<tr>
|
46
|
+
<td align="center"
|
47
|
+
style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">
|
48
|
+
<label for="codeB">NUM-Code</label></td>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<td
|
52
|
+
style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;"
|
53
|
+
id="codeB" align="center"> </td>
|
54
|
+
</tr>
|
55
|
+
</table>
|
56
|
+
</td>
|
57
|
+
</tr>
|
58
|
+
<tr>
|
59
|
+
<td colspan="2" id="charmap_usage">{#advanced_dlg.charmap_usage}</td>
|
60
|
+
</tr>
|
61
|
+
|
53
62
|
</table>
|
54
63
|
</body>
|
55
64
|
</html>
|
@@ -1,74 +1,87 @@
|
|
1
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
2
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
3
|
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
<title>{#advanced_dlg.colorpicker_title}</title>
|
5
|
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6
|
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7
|
+
<script type="text/javascript" src="js/color_picker.js"></script>
|
8
8
|
</head>
|
9
9
|
<body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
|
10
|
-
|
10
|
+
<span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
|
11
|
+
|
11
12
|
<form onsubmit="insertAction();return false" action="#">
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
13
|
+
<div class="tabs">
|
14
|
+
<ul>
|
15
|
+
<li id="picker_tab" aria-controls="picker_panel" class="current"><span><a
|
16
|
+
href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span>
|
17
|
+
</li>
|
18
|
+
<li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;"
|
19
|
+
onclick="mcTabs.displayTab('rgb_tab','rgb_panel');"
|
20
|
+
onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span>
|
21
|
+
</li>
|
22
|
+
<li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;"
|
23
|
+
onclick="javascript:mcTabs.displayTab('named_tab','named_panel');"
|
24
|
+
onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span>
|
25
|
+
</li>
|
26
|
+
</ul>
|
27
|
+
</div>
|
19
28
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
29
|
+
<div class="panel_wrapper">
|
30
|
+
<div id="picker_panel" class="panel current">
|
31
|
+
<fieldset>
|
32
|
+
<legend>{#advanced_dlg.colorpicker_picker_title}</legend>
|
33
|
+
<div id="picker">
|
34
|
+
<img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)"
|
35
|
+
onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;"
|
36
|
+
onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;"
|
37
|
+
onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt=""/>
|
26
38
|
|
27
|
-
|
28
|
-
|
29
|
-
|
39
|
+
<div id="light">
|
40
|
+
<!-- Will be filled with divs -->
|
41
|
+
</div>
|
30
42
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
43
|
+
<br style="clear: both"/>
|
44
|
+
</div>
|
45
|
+
</fieldset>
|
46
|
+
</div>
|
35
47
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
48
|
+
<div id="rgb_panel" class="panel">
|
49
|
+
<fieldset>
|
50
|
+
<legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
|
51
|
+
<div id="webcolors">
|
52
|
+
<!-- Gets filled with web safe colors-->
|
53
|
+
</div>
|
42
54
|
|
43
|
-
|
44
|
-
|
45
|
-
|
55
|
+
<br style="clear: both"/>
|
56
|
+
</fieldset>
|
57
|
+
</div>
|
46
58
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
59
|
+
<div id="named_panel" class="panel">
|
60
|
+
<fieldset id="named_picker_label">
|
61
|
+
<legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
|
62
|
+
<div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
|
63
|
+
<!-- Gets filled with named colors-->
|
64
|
+
</div>
|
53
65
|
|
54
|
-
|
66
|
+
<br style="clear: both"/>
|
55
67
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
68
|
+
<div id="colornamecontainer">
|
69
|
+
{#advanced_dlg.colorpicker_name} <span id="colorname"></span>
|
70
|
+
</div>
|
71
|
+
</fieldset>
|
72
|
+
</div>
|
73
|
+
</div>
|
62
74
|
|
63
|
-
|
64
|
-
|
75
|
+
<div class="mceActionPanel">
|
76
|
+
<input type="submit" id="insert" name="insert" value="{#apply}"/>
|
65
77
|
|
66
|
-
|
78
|
+
<div id="preview"></div>
|
67
79
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
80
|
+
<div id="previewblock">
|
81
|
+
<label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8"
|
82
|
+
class="text mceFocus" aria-required="true"/>
|
83
|
+
</div>
|
84
|
+
</div>
|
72
85
|
</form>
|
73
86
|
</body>
|
74
87
|
</html>
|
@@ -1 +1,852 @@
|
|
1
|
-
(function(e){var d=e.DOM,b=e.dom.Event,h=e.extend,f=e.each,a=e.util.Cookie,g,c=e.explode;e.ThemeManager.requireLangPack("advanced");e.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(j,k){var l=this,m,i,n;l.editor=j;l.url=k;l.onResolveName=new e.util.Dispatcher(this);j.forcedHighContrastMode=j.settings.detect_highcontrast&&l._isHighContrast();j.settings.skin=j.forcedHighContrastMode?"highcontrast":j.settings.skin;l.settings=m=h({theme_advanced_path:true,theme_advanced_toolbar_location:"bottom",theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"center",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:j.settings.readonly},j.settings);if(!m.font_size_style_values){m.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(e.is(m.theme_advanced_font_sizes,"string")){m.font_size_style_values=e.explode(m.font_size_style_values);m.font_size_classes=e.explode(m.font_size_classes||"");n={};j.settings.theme_advanced_font_sizes=m.theme_advanced_font_sizes;f(j.getParam("theme_advanced_font_sizes","","hash"),function(q,p){var o;if(p==q&&q>=1&&q<=7){p=q+" ("+l.sizes[q-1]+"pt)";o=m.font_size_classes[q-1];q=m.font_size_style_values[q-1]||(l.sizes[q-1]+"pt")}if(/^\s*\./.test(q)){o=q.replace(/\./g,"")}n[p]=o?{"class":o}:{fontSize:q}});m.theme_advanced_font_sizes=n}if((i=m.theme_advanced_path_location)&&i!="none"){m.theme_advanced_statusbar_location=m.theme_advanced_path_location}if(m.theme_advanced_statusbar_location=="none"){m.theme_advanced_statusbar_location=0}if(j.settings.content_css!==false){j.contentCSS.push(j.baseURI.toAbsolute(k+"/skins/"+j.settings.skin+"/content.css"))}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l);j.onKeyUp.add(l._updateUndoStatus,l);j.onMouseUp.add(l._updateUndoStatus,l);j.dom.bind(j.dom.getRoot(),"dragend",function(){l._updateUndoStatus(j)})}});j.onSetProgressState.add(function(q,o,r){var s,t=q.id,p;if(o){l.progressTimer=setTimeout(function(){s=q.getContainer();s=s.insertBefore(d.create("DIV",{style:"position:relative"}),s.firstChild);p=d.get(q.id+"_tbl");d.add(s,"div",{id:t+"_blocker","class":"mceBlocker",style:{width:p.clientWidth+2,height:p.clientHeight+2}});d.add(s,"div",{id:t+"_progress","class":"mceProgress",style:{left:p.clientWidth/2,top:p.clientHeight/2}})},r||0)}else{d.remove(t+"_blocker");d.remove(t+"_progress");clearTimeout(l.progressTimer)}});d.loadCSS(m.editor_css?j.documentBaseURI.toAbsolute(m.editor_css):k+"/skins/"+j.settings.skin+"/ui.css");if(m.skin_variant){d.loadCSS(k+"/skins/"+j.settings.skin+"/ui_"+m.skin_variant+".css")}},_isHighContrast:function(){var i,j=d.add(d.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});i=(d.getStyle(j,"background-color",true)+"").toLowerCase().replace(/ /g,"");d.remove(j);return i!="rgb(171,239,86)"&&i!="#abef56"},createControl:function(l,i){var j,k;if(k=i.createControl(l)){return k}switch(l){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((j=this.controls[l])){return i.createButton(l,{title:"advanced."+j[0],cmd:j[1],ui:j[2],value:j[3]})}},execCommand:function(k,j,l){var i=this["_"+k];if(i){i.call(this,j,l);return true}return false},_importClasses:function(k){var i=this.editor,j=i.controlManager.get("styleselect");if(j.getLength()==0){f(i.dom.getClasses(),function(n,l){var m="style_"+l;i.formatter.register(m,{inline:"span",attributes:{"class":n["class"]},selector:"*"});j.add(n["class"],m)})}},_createStyleSelect:function(m){var k=this,i=k.editor,j=i.controlManager,l;l=j.createListBox("styleselect",{title:"advanced.style_select",onselect:function(o){var p,n=[];f(l.items,function(q){n.push(q.value)});i.focus();i.undoManager.add();p=i.formatter.matchAll(n);if(!o||p[0]==o){if(p[0]){i.formatter.remove(p[0])}}else{i.formatter.apply(o)}i.undoManager.add();i.nodeChanged();return false}});i.onInit.add(function(){var o=0,n=i.getParam("style_formats");if(n){f(n,function(p){var q,r=0;f(p,function(){r++});if(r>1){q=p.name=p.name||"style_"+(o++);i.formatter.register(q,p);l.add(p.title,q)}else{l.add(p.title)}})}else{f(i.getParam("theme_advanced_styles","","hash"),function(r,q){var p;if(r){p="style_"+(o++);i.formatter.register(p,{inline:"span",classes:r,selector:"*"});l.add(k.editor.translate(q),p)}})}});if(l.getLength()==0){l.onPostRender.add(function(o,p){if(!l.NativeListBox){b.add(p.id+"_text","focus",k._importClasses,k);b.add(p.id+"_text","mousedown",k._importClasses,k);b.add(p.id+"_open","focus",k._importClasses,k);b.add(p.id+"_open","mousedown",k._importClasses,k)}else{b.add(p.id,"focus",k._importClasses,k)}})}return l},_createFontSelect:function(){var k,j=this,i=j.editor;k=i.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(l){var m=k.items[k.selectedIndex];if(!l&&m){i.execCommand("FontName",false,m.value);return}i.execCommand("FontName",false,l);k.select(function(n){return l==n});if(m&&m.value==l){k.select(null)}return false}});if(k){f(i.getParam("theme_advanced_fonts",j.settings.theme_advanced_fonts,"hash"),function(m,l){k.add(i.translate(l),m,{style:m.indexOf("dings")==-1?"font-family:"+m:""})})}return k},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(i){var o=n.items[n.selectedIndex];if(!i&&o){o=o.value;if(o["class"]){k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}return}if(i["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:i["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,i.fontSize)}n.select(function(p){return i==p});if(o&&(o.value.fontSize==i.fontSize||o.value["class"]&&o.value["class"]==i["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(o,i){var p=o.fontSize;if(p>=1&&p<=7){p=m.sizes[parseInt(p)-1]+"pt"}n.add(i,o,{style:"font-size:"+p,"class":"mceFontSize"+(l++)+(" "+(o["class"]||""))})})}return n},_createBlockFormats:function(){var k,i={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},j=this;k=j.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(l){j.editor.execCommand("FormatBlock",false,l);return false}});if(k){f(j.editor.getParam("theme_advanced_blockformats",j.settings.theme_advanced_blockformats,"hash"),function(m,l){k.add(j.editor.translate(l!=m?l:i[m]),m,{"class":"mce_formatPreview mce_"+m})})}return k},_createForeColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_text_colors){l.colors=i}if(k.theme_advanced_default_foreground_color){l.default_color=k.theme_advanced_default_foreground_color}l.title="advanced.forecolor_desc";l.cmd="ForeColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("forecolor",l);return m},_createBackColorMenu:function(){var m,j=this,k=j.settings,l={},i;if(k.theme_advanced_more_colors){l.more_colors_func=function(){j._mceColorPicker(0,{color:m.value,func:function(n){m.setColor(n)}})}}if(i=k.theme_advanced_background_colors){l.colors=i}if(k.theme_advanced_default_background_color){l.default_color=k.theme_advanced_default_background_color}l.title="advanced.backcolor_desc";l.cmd="HiliteColor";l.scope=this;m=j.editor.controlManager.createColorSplitButton("backcolor",l);return m},renderUI:function(k){var m,l,q,v=this,r=v.editor,w=v.settings,u,j,i;if(r.settings){r.settings.aria_label=w.aria_label+r.getLang("advanced.help_shortcut")}m=j=d.create("span",{role:"application","aria-labelledby":r.id+"_voice",id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});d.add(m,"span",{"class":"mceVoiceLabel",style:"display:none;",id:r.id+"_voice"},w.aria_label);if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{role:"presentation",id:r.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});m=q=d.add(m,"tbody");switch((w.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":l=v._rowLayout(w,q,k);break;case"customlayout":l=r.execCallback("theme_advanced_custom_layout",w,q,k,j);break;default:l=v._simpleLayout(w,q,k,j)}m=k.targetNode;i=u.rows;d.addClass(i[0],"mceFirst");d.addClass(i[i.length-1],"mceLast");f(d.select("tr",q),function(o){d.addClass(o.firstChild,"mceFirst");d.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(d.get(w.theme_advanced_toolbar_container)){d.get(w.theme_advanced_toolbar_container).appendChild(j)}else{d.insertAfter(j,m)}b.add(r.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return b.cancel(n)}});if(!r.getParam("accessibility_focus")){b.add(d.add(j,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(r.id).focus()})}if(w.theme_advanced_toolbar_location=="external"){k.deltaHeight=0}v.deltaHeight=k.deltaHeight;k.targetNode=null;r.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(e.isWebKit){window.focus()}v.toolbarGroup.focus();return b.cancel(n)}else{if(n.keyCode===o){d.get(p.id+"_path_row").focus();return b.cancel(n)}}}});r.addShortcut("alt+0","","mceShortcuts",v);return{iframeContainer:l,editorContainer:r.id+"_parent",sizeContainer:u,deltaHeight:k.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:e.majorVersion+"."+e.minorVersion}},resizeBy:function(i,j){var k=d.get(this.editor.id+"_ifr");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,m,k){var j=this.editor,l=this.settings,n=d.get(j.id+"_tbl"),o=d.get(j.id+"_ifr");i=Math.max(l.theme_advanced_resizing_min_width||100,i);m=Math.max(l.theme_advanced_resizing_min_height||100,m);i=Math.min(l.theme_advanced_resizing_max_width||65535,i);m=Math.min(l.theme_advanced_resizing_max_height||65535,m);d.setStyle(n,"height","");d.setStyle(o,"height",m);if(l.theme_advanced_resize_horizontal){d.setStyle(n,"width","");d.setStyle(o,"width",i);if(i<n.clientWidth){i=n.clientWidth;d.setStyle(o,"width",n.clientWidth)}}if(k&&l.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+j.id+"_size",{cw:i,ch:m})}},destroy:function(){var i=this.editor.id;b.clear(i+"_resize");b.clear(i+"_path_row");b.clear(i+"_external_close")},_simpleLayout:function(y,r,k,i){var x=this,u=x.editor,v=y.theme_advanced_toolbar_location,m=y.theme_advanced_statusbar_location,l,j,q,w;if(y.readonly){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});return j}if(v=="top"){x._addToolbars(r,k)}if(v=="external"){l=w=d.create("div",{style:"position:relative"});l=d.add(l,"div",{id:u.id+"_external","class":"mceExternalToolbar"});d.add(l,"a",{id:u.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});l=d.add(l,"table",{id:u.id+"_tblext",cellSpacing:0,cellPadding:0});q=d.add(l,"tbody");if(i.firstChild.className=="mceOldBoxModel"){i.firstChild.appendChild(w)}else{i.insertBefore(w,i.firstChild)}x._addToolbars(q,k);u.onMouseUp.add(function(){var o=d.get(u.id+"_external");d.show(o);d.hide(g);var n=b.add(u.id+"_external_close","click",function(){d.hide(u.id+"_external");b.remove(u.id+"_external_close","click",n)});d.show(o);d.setStyle(o,"top",0-d.getRect(u.id+"_tblext").h-1);d.hide(o);d.show(o);o.style.filter="";g=u.id+"_external";o=null})}if(m=="top"){x._addStatusBar(r,k)}if(!y.theme_advanced_toolbar_container){l=d.add(r,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"})}if(v=="bottom"){x._addToolbars(r,k)}if(m=="bottom"){x._addStatusBar(r,k)}return j},_rowLayout:function(w,m,k){var v=this,p=v.editor,u,x,i=p.controlManager,l,j,r,q;u=w.theme_advanced_containers_default_class||"";x=w.theme_advanced_containers_default_align||"center";f(c(w.theme_advanced_containers||""),function(s,o){var n=w["theme_advanced_container_"+s]||"";switch(s.toLowerCase()){case"mceeditor":l=d.add(m,"tr");l=j=d.add(l,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":v._addStatusBar(m,k);break;default:q=(w["theme_advanced_container_"+s+"_align"]||x).toLowerCase();q="mce"+v._ufirst(q);l=d.add(d.add(m,"tr"),"td",{"class":"mceToolbar "+(w["theme_advanced_container_"+s+"_class"]||u)+" "+q||x});r=i.createToolbar("toolbar"+o);v._addControls(n,r);d.setHTML(l,r.renderHTML());k.deltaHeight-=w.theme_advanced_row_height}});return j},_addControls:function(j,i){var k=this,l=k.settings,m,n=k.editor.controlManager;if(l.theme_advanced_disable&&!k._disabled){m={};f(c(l.theme_advanced_disable),function(o){m[o]=1});k._disabled=m}else{m=k._disabled}f(c(j),function(p){var o;if(m&&m[p]){return}if(p=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(q){q=k.createControl(q,n);if(q){i.add(q)}});return}o=k.createControl(p,n);if(o){i.add(o)}})},_addToolbars:function(x,k){var A=this,p,m,r=A.editor,B=A.settings,z,j=r.controlManager,u,l,q=[],y,w;w=j.createToolbarGroup("toolbargroup",{name:r.getLang("advanced.toolbar"),tab_focus_toolbar:r.getParam("theme_advanced_tab_focus_toolbar")});A.toolbarGroup=w;y=B.theme_advanced_toolbar_align.toLowerCase();y="mce"+A._ufirst(y);l=d.add(d.add(x,"tr",{role:"presentation"}),"td",{"class":"mceToolbar "+y,role:"presentation"});for(p=1;(z=B["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(B["theme_advanced_buttons"+p+"_add"]){z+=","+B["theme_advanced_buttons"+p+"_add"]}if(B["theme_advanced_buttons"+p+"_add_before"]){z=B["theme_advanced_buttons"+p+"_add_before"]+","+z}A._addControls(z,m);w.add(m);k.deltaHeight-=B.theme_advanced_row_height}q.push(w.renderHTML());q.push(d.createHTML("a",{href:"#",accesskey:"z",title:r.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+r.id+"').focus();"},"<!-- IE -->"));d.setHTML(l,q.join(""))},_addStatusBar:function(m,j){var k,v=this,p=v.editor,w=v.settings,i,q,u,l;k=d.add(m,"tr");k=l=d.add(k,"td",{"class":"mceStatusbar"});k=d.add(k,"div",{id:p.id+"_path_row",role:"group","aria-labelledby":p.id+"_path_voice"});if(w.theme_advanced_path){d.add(k,"span",{id:p.id+"_path_voice"},p.translate("advanced.path"));d.add(k,"span",{},": ")}else{d.add(k,"span",{}," ")}if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(w.theme_advanced_resizing_use_cookie){p.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+p.id+"_size"),r=d.get(p.id+"_tbl");if(!n){return}v.resizeTo(n.cw,n.ch)})}p.onPostRender.add(function(){b.add(p.id+"_resize","click",function(n){n.preventDefault()});b.add(p.id+"_resize","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){G.preventDefault();n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E)}function B(G){b.remove(d.doc,"mousemove",t);b.remove(p.getDoc(),"mousemove",r);b.remove(d.doc,"mouseup",s);b.remove(p.getDoc(),"mouseup",o);n=A+(G.screenX-C);E=F+(G.screenY-z);v.resizeTo(n,E,true)}D.preventDefault();C=D.screenX;z=D.screenY;x=d.get(v.editor.id+"_ifr");A=n=x.clientWidth;F=E=x.clientHeight;t=b.add(d.doc,"mousemove",y);r=b.add(p.getDoc(),"mousemove",y);s=b.add(d.doc,"mouseup",B);o=b.add(p.getDoc(),"mouseup",B)})})}j.deltaHeight-=21;k=m=null},_updateUndoStatus:function(j){var i=j.controlManager,k=j.undoManager;i.setDisabled("undo",!k.hasUndo()&&!k.typing);i.setDisabled("redo",!k.hasRedo())},_nodeChanged:function(m,r,D,q,E){var y=this,C,F=0,x,G,z=y.settings,w,k,u,B,l,j,i;e.each(y.stateControls,function(n){r.setActive(n,m.queryCommandState(y.controls[n][1]))});function o(p){var s,n=E.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}r.setActive("visualaid",m.hasVisual);y._updateUndoStatus(m);r.setDisabled("outdent",!m.queryCommandState("Outdent"));C=o("A");if(G=r.get("link")){if(!C||!C.name){G.setDisabled(!C&&q);G.setActive(!!C)}}if(G=r.get("unlink")){G.setDisabled(!C&&q);G.setActive(!!C&&!C.name)}if(G=r.get("anchor")){G.setActive(!q&&!!C&&C.name)}C=o("IMG");if(G=r.get("image")){G.setActive(!q&&!!C&&D.className.indexOf("mceItem")==-1)}if(G=r.get("styleselect")){y._importClasses();j=[];f(G.items,function(n){j.push(n.value)});i=m.formatter.matchAll(j);G.select(i[0])}if(G=r.get("formatselect")){C=o(d.isBlock);if(C){G.select(C.nodeName.toLowerCase())}}o(function(p){if(p.nodeName==="SPAN"){if(!w&&p.className){w=p.className}}if(m.dom.is(p,z.theme_advanced_font_selector)){if(!k&&p.style.fontSize){k=p.style.fontSize}if(!u&&p.style.fontFamily){u=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!B&&p.style.color){B=p.style.color}if(!l&&p.style.backgroundColor){l=p.style.backgroundColor}}return false});if(G=r.get("fontselect")){G.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==u})}if(G=r.get("fontsizeselect")){if(z.theme_advanced_runtime_fontsize&&!k&&!w){k=m.dom.getStyle(D,"fontSize",true)}G.select(function(n){if(n.fontSize&&n.fontSize===k){return true}if(n["class"]&&n["class"]===w){return true}})}if(z.theme_advanced_show_current_color){function A(p,n){if(G=r.get(p)){if(!n){n=G.settings.default_color}if(n!==G.value){G.displayColor(n)}}}A("forecolor",B);A("backcolor",l)}if(z.theme_advanced_show_current_color){function A(p,n){if(G=r.get(p)){if(!n){n=G.settings.default_color}if(n!==G.value){G.displayColor(n)}}}A("forecolor",B);A("backcolor",l)}if(z.theme_advanced_path&&z.theme_advanced_statusbar_location){C=d.get(m.id+"_path")||d.add(m.id+"_path_row","span",{id:m.id+"_path"});if(y.statusKeyboardNavigation){y.statusKeyboardNavigation.destroy();y.statusKeyboardNavigation=null}d.setHTML(C,"");o(function(H){var p=H.nodeName.toLowerCase(),s,v,t="";if(H.nodeType!=1||p==="br"||H.getAttribute("data-mce-bogus")||d.hasClass(H,"mceItemHidden")||d.hasClass(H,"mceItemRemoved")){return}if(e.isIE&&H.scopeName!=="HTML"){p=H.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(x=d.getAttrib(H,"src")){t+="src: "+x+" "}break;case"a":if(x=d.getAttrib(H,"name")){t+="name: "+x+" ";p+="#"+x}if(x=d.getAttrib(H,"href")){t+="href: "+x+" "}break;case"font":if(x=d.getAttrib(H,"face")){t+="font: "+x+" "}if(x=d.getAttrib(H,"size")){t+="size: "+x+" "}if(x=d.getAttrib(H,"color")){t+="color: "+x+" "}break;case"span":if(x=d.getAttrib(H,"style")){t+="style: "+x+" "}break}if(x=d.getAttrib(H,"id")){t+="id: "+x+" "}if(x=H.className){x=x.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(x){t+="class: "+x+" ";if(d.isBlock(H)||p=="img"||p=="span"){p+="."+x}}}p=p.replace(/(html:)/g,"");p={name:p,node:H,title:t};y.onResolveName.dispatch(y,p);t=p.title;p=p.name;v=d.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(F++)},p);if(C.hasChildNodes()){C.insertBefore(d.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),C.firstChild);C.insertBefore(v,C.firstChild)}else{C.appendChild(v)}},m.getBody());if(d.select("a",C).length>0){y.statusKeyboardNavigation=new e.ui.KeyboardNavigation({root:m.id+"_path_row",items:d.select("a",C),excludeFromTabOrder:true,onCancel:function(){m.focus()}},d)}}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(i.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(i.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var i=this.editor;i.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var i=this.editor;i.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(k,j){var i=this.editor;j=j||{};i.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(i.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(i.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:j.color,func:j.func,theme_url:this.url})},_mceCodeEditor:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(i.getParam("theme_advanced_source_editor_width",720)),height:parseInt(i.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(j,k){var i=this.editor;if(i.dom.getAttrib(i.selection.getNode(),"class").indexOf("mceItem")!=-1){return}i.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(i.getLang("advanced.image_delta_width",0)),height:275+parseInt(i.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(j,k){var i=this.editor;i.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(i.getLang("advanced.link_delta_width",0)),height:200+parseInt(i.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var i=this.editor;i.windowManager.confirm("advanced.newdocument",function(j){if(j){i.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var i=this;this._mceColorPicker(0,{color:i.fgColor,func:function(j){i.fgColor=j;i.editor.execCommand("ForeColor",false,j)}})},_mceBackColor:function(){var i=this;this._mceColorPicker(0,{color:i.bgColor,func:function(j){i.bgColor=j;i.editor.execCommand("HiliteColor",false,j)}})},_ufirst:function(i){return i.substring(0,1).toUpperCase()+i.substring(1)}});e.ThemeManager.add("advanced",e.themes.AdvancedTheme)}(tinymce));
|
1
|
+
(function (e) {
|
2
|
+
var d = e.DOM, b = e.dom.Event, h = e.extend, f = e.each, a = e.util.Cookie, g, c = e.explode;
|
3
|
+
e.ThemeManager.requireLangPack("advanced");
|
4
|
+
e.create("tinymce.themes.AdvancedTheme", {sizes:[8, 10, 12, 14, 18, 24, 36], controls:{bold:["bold_desc", "Bold"], italic:["italic_desc", "Italic"], underline:["underline_desc", "Underline"], strikethrough:["striketrough_desc", "Strikethrough"], justifyleft:["justifyleft_desc", "JustifyLeft"], justifycenter:["justifycenter_desc", "JustifyCenter"], justifyright:["justifyright_desc", "JustifyRight"], justifyfull:["justifyfull_desc", "JustifyFull"], bullist:["bullist_desc", "InsertUnorderedList"], numlist:["numlist_desc", "InsertOrderedList"], outdent:["outdent_desc", "Outdent"], indent:["indent_desc", "Indent"], cut:["cut_desc", "Cut"], copy:["copy_desc", "Copy"], paste:["paste_desc", "Paste"], undo:["undo_desc", "Undo"], redo:["redo_desc", "Redo"], link:["link_desc", "mceLink"], unlink:["unlink_desc", "unlink"], image:["image_desc", "mceImage"], cleanup:["cleanup_desc", "mceCleanup"], help:["help_desc", "mceHelp"], code:["code_desc", "mceCodeEditor"], hr:["hr_desc", "InsertHorizontalRule"], removeformat:["removeformat_desc", "RemoveFormat"], sub:["sub_desc", "subscript"], sup:["sup_desc", "superscript"], forecolor:["forecolor_desc", "ForeColor"], forecolorpicker:["forecolor_desc", "mceForeColor"], backcolor:["backcolor_desc", "HiliteColor"], backcolorpicker:["backcolor_desc", "mceBackColor"], charmap:["charmap_desc", "mceCharMap"], visualaid:["visualaid_desc", "mceToggleVisualAid"], anchor:["anchor_desc", "mceInsertAnchor"], newdocument:["newdocument_desc", "mceNewDocument"], blockquote:["blockquote_desc", "mceBlockQuote"]}, stateControls:["bold", "italic", "underline", "strikethrough", "bullist", "numlist", "justifyleft", "justifycenter", "justifyright", "justifyfull", "sub", "sup", "blockquote"], init:function (j, k) {
|
5
|
+
var l = this, m, i, n;
|
6
|
+
l.editor = j;
|
7
|
+
l.url = k;
|
8
|
+
l.onResolveName = new e.util.Dispatcher(this);
|
9
|
+
j.forcedHighContrastMode = j.settings.detect_highcontrast && l._isHighContrast();
|
10
|
+
j.settings.skin = j.forcedHighContrastMode ? "highcontrast" : j.settings.skin;
|
11
|
+
l.settings = m = h({theme_advanced_path:true, theme_advanced_toolbar_location:"bottom", theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect", theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code", theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap", theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6", theme_advanced_toolbar_align:"center", theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats", theme_advanced_more_colors:1, theme_advanced_row_height:23, theme_advanced_resize_horizontal:1, theme_advanced_resizing_use_cookie:1, theme_advanced_font_sizes:"1,2,3,4,5,6,7", theme_advanced_font_selector:"span", theme_advanced_show_current_color:0, readonly:j.settings.readonly}, j.settings);
|
12
|
+
if (!m.font_size_style_values) {
|
13
|
+
m.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt"
|
14
|
+
}
|
15
|
+
if (e.is(m.theme_advanced_font_sizes, "string")) {
|
16
|
+
m.font_size_style_values = e.explode(m.font_size_style_values);
|
17
|
+
m.font_size_classes = e.explode(m.font_size_classes || "");
|
18
|
+
n = {};
|
19
|
+
j.settings.theme_advanced_font_sizes = m.theme_advanced_font_sizes;
|
20
|
+
f(j.getParam("theme_advanced_font_sizes", "", "hash"), function (q, p) {
|
21
|
+
var o;
|
22
|
+
if (p == q && q >= 1 && q <= 7) {
|
23
|
+
p = q + " (" + l.sizes[q - 1] + "pt)";
|
24
|
+
o = m.font_size_classes[q - 1];
|
25
|
+
q = m.font_size_style_values[q - 1] || (l.sizes[q - 1] + "pt")
|
26
|
+
}
|
27
|
+
if (/^\s*\./.test(q)) {
|
28
|
+
o = q.replace(/\./g, "")
|
29
|
+
}
|
30
|
+
n[p] = o ? {"class":o} : {fontSize:q}
|
31
|
+
});
|
32
|
+
m.theme_advanced_font_sizes = n
|
33
|
+
}
|
34
|
+
if ((i = m.theme_advanced_path_location) && i != "none") {
|
35
|
+
m.theme_advanced_statusbar_location = m.theme_advanced_path_location
|
36
|
+
}
|
37
|
+
if (m.theme_advanced_statusbar_location == "none") {
|
38
|
+
m.theme_advanced_statusbar_location = 0
|
39
|
+
}
|
40
|
+
if (j.settings.content_css !== false) {
|
41
|
+
j.contentCSS.push(j.baseURI.toAbsolute(k + "/skins/" + j.settings.skin + "/content.css"))
|
42
|
+
}
|
43
|
+
j.onInit.add(function () {
|
44
|
+
if (!j.settings.readonly) {
|
45
|
+
j.onNodeChange.add(l._nodeChanged, l);
|
46
|
+
j.onKeyUp.add(l._updateUndoStatus, l);
|
47
|
+
j.onMouseUp.add(l._updateUndoStatus, l);
|
48
|
+
j.dom.bind(j.dom.getRoot(), "dragend", function () {
|
49
|
+
l._updateUndoStatus(j)
|
50
|
+
})
|
51
|
+
}
|
52
|
+
});
|
53
|
+
j.onSetProgressState.add(function (q, o, r) {
|
54
|
+
var s, t = q.id, p;
|
55
|
+
if (o) {
|
56
|
+
l.progressTimer = setTimeout(function () {
|
57
|
+
s = q.getContainer();
|
58
|
+
s = s.insertBefore(d.create("DIV", {style:"position:relative"}), s.firstChild);
|
59
|
+
p = d.get(q.id + "_tbl");
|
60
|
+
d.add(s, "div", {id:t + "_blocker", "class":"mceBlocker", style:{width:p.clientWidth + 2, height:p.clientHeight + 2}});
|
61
|
+
d.add(s, "div", {id:t + "_progress", "class":"mceProgress", style:{left:p.clientWidth / 2, top:p.clientHeight / 2}})
|
62
|
+
}, r || 0)
|
63
|
+
} else {
|
64
|
+
d.remove(t + "_blocker");
|
65
|
+
d.remove(t + "_progress");
|
66
|
+
clearTimeout(l.progressTimer)
|
67
|
+
}
|
68
|
+
});
|
69
|
+
d.loadCSS(m.editor_css ? j.documentBaseURI.toAbsolute(m.editor_css) : k + "/skins/" + j.settings.skin + "/ui.css");
|
70
|
+
if (m.skin_variant) {
|
71
|
+
d.loadCSS(k + "/skins/" + j.settings.skin + "/ui_" + m.skin_variant + ".css")
|
72
|
+
}
|
73
|
+
}, _isHighContrast:function () {
|
74
|
+
var i, j = d.add(d.getRoot(), "div", {style:"background-color: rgb(171,239,86);"});
|
75
|
+
i = (d.getStyle(j, "background-color", true) + "").toLowerCase().replace(/ /g, "");
|
76
|
+
d.remove(j);
|
77
|
+
return i != "rgb(171,239,86)" && i != "#abef56"
|
78
|
+
}, createControl:function (l, i) {
|
79
|
+
var j, k;
|
80
|
+
if (k = i.createControl(l)) {
|
81
|
+
return k
|
82
|
+
}
|
83
|
+
switch (l) {
|
84
|
+
case"styleselect":
|
85
|
+
return this._createStyleSelect();
|
86
|
+
case"formatselect":
|
87
|
+
return this._createBlockFormats();
|
88
|
+
case"fontselect":
|
89
|
+
return this._createFontSelect();
|
90
|
+
case"fontsizeselect":
|
91
|
+
return this._createFontSizeSelect();
|
92
|
+
case"forecolor":
|
93
|
+
return this._createForeColorMenu();
|
94
|
+
case"backcolor":
|
95
|
+
return this._createBackColorMenu()
|
96
|
+
}
|
97
|
+
if ((j = this.controls[l])) {
|
98
|
+
return i.createButton(l, {title:"advanced." + j[0], cmd:j[1], ui:j[2], value:j[3]})
|
99
|
+
}
|
100
|
+
}, execCommand:function (k, j, l) {
|
101
|
+
var i = this["_" + k];
|
102
|
+
if (i) {
|
103
|
+
i.call(this, j, l);
|
104
|
+
return true
|
105
|
+
}
|
106
|
+
return false
|
107
|
+
}, _importClasses:function (k) {
|
108
|
+
var i = this.editor, j = i.controlManager.get("styleselect");
|
109
|
+
if (j.getLength() == 0) {
|
110
|
+
f(i.dom.getClasses(), function (n, l) {
|
111
|
+
var m = "style_" + l;
|
112
|
+
i.formatter.register(m, {inline:"span", attributes:{"class":n["class"]}, selector:"*"});
|
113
|
+
j.add(n["class"], m)
|
114
|
+
})
|
115
|
+
}
|
116
|
+
}, _createStyleSelect:function (m) {
|
117
|
+
var k = this, i = k.editor, j = i.controlManager, l;
|
118
|
+
l = j.createListBox("styleselect", {title:"advanced.style_select", onselect:function (o) {
|
119
|
+
var p, n = [];
|
120
|
+
f(l.items, function (q) {
|
121
|
+
n.push(q.value)
|
122
|
+
});
|
123
|
+
i.focus();
|
124
|
+
i.undoManager.add();
|
125
|
+
p = i.formatter.matchAll(n);
|
126
|
+
if (!o || p[0] == o) {
|
127
|
+
if (p[0]) {
|
128
|
+
i.formatter.remove(p[0])
|
129
|
+
}
|
130
|
+
} else {
|
131
|
+
i.formatter.apply(o)
|
132
|
+
}
|
133
|
+
i.undoManager.add();
|
134
|
+
i.nodeChanged();
|
135
|
+
return false
|
136
|
+
}});
|
137
|
+
i.onInit.add(function () {
|
138
|
+
var o = 0, n = i.getParam("style_formats");
|
139
|
+
if (n) {
|
140
|
+
f(n, function (p) {
|
141
|
+
var q, r = 0;
|
142
|
+
f(p, function () {
|
143
|
+
r++
|
144
|
+
});
|
145
|
+
if (r > 1) {
|
146
|
+
q = p.name = p.name || "style_" + (o++);
|
147
|
+
i.formatter.register(q, p);
|
148
|
+
l.add(p.title, q)
|
149
|
+
} else {
|
150
|
+
l.add(p.title)
|
151
|
+
}
|
152
|
+
})
|
153
|
+
} else {
|
154
|
+
f(i.getParam("theme_advanced_styles", "", "hash"), function (r, q) {
|
155
|
+
var p;
|
156
|
+
if (r) {
|
157
|
+
p = "style_" + (o++);
|
158
|
+
i.formatter.register(p, {inline:"span", classes:r, selector:"*"});
|
159
|
+
l.add(k.editor.translate(q), p)
|
160
|
+
}
|
161
|
+
})
|
162
|
+
}
|
163
|
+
});
|
164
|
+
if (l.getLength() == 0) {
|
165
|
+
l.onPostRender.add(function (o, p) {
|
166
|
+
if (!l.NativeListBox) {
|
167
|
+
b.add(p.id + "_text", "focus", k._importClasses, k);
|
168
|
+
b.add(p.id + "_text", "mousedown", k._importClasses, k);
|
169
|
+
b.add(p.id + "_open", "focus", k._importClasses, k);
|
170
|
+
b.add(p.id + "_open", "mousedown", k._importClasses, k)
|
171
|
+
} else {
|
172
|
+
b.add(p.id, "focus", k._importClasses, k)
|
173
|
+
}
|
174
|
+
})
|
175
|
+
}
|
176
|
+
return l
|
177
|
+
}, _createFontSelect:function () {
|
178
|
+
var k, j = this, i = j.editor;
|
179
|
+
k = i.controlManager.createListBox("fontselect", {title:"advanced.fontdefault", onselect:function (l) {
|
180
|
+
var m = k.items[k.selectedIndex];
|
181
|
+
if (!l && m) {
|
182
|
+
i.execCommand("FontName", false, m.value);
|
183
|
+
return
|
184
|
+
}
|
185
|
+
i.execCommand("FontName", false, l);
|
186
|
+
k.select(function (n) {
|
187
|
+
return l == n
|
188
|
+
});
|
189
|
+
if (m && m.value == l) {
|
190
|
+
k.select(null)
|
191
|
+
}
|
192
|
+
return false
|
193
|
+
}});
|
194
|
+
if (k) {
|
195
|
+
f(i.getParam("theme_advanced_fonts", j.settings.theme_advanced_fonts, "hash"), function (m, l) {
|
196
|
+
k.add(i.translate(l), m, {style:m.indexOf("dings") == -1 ? "font-family:" + m : ""})
|
197
|
+
})
|
198
|
+
}
|
199
|
+
return k
|
200
|
+
}, _createFontSizeSelect:function () {
|
201
|
+
var m = this, k = m.editor, n, l = 0, j = [];
|
202
|
+
n = k.controlManager.createListBox("fontsizeselect", {title:"advanced.font_size", onselect:function (i) {
|
203
|
+
var o = n.items[n.selectedIndex];
|
204
|
+
if (!i && o) {
|
205
|
+
o = o.value;
|
206
|
+
if (o["class"]) {
|
207
|
+
k.formatter.toggle("fontsize_class", {value:o["class"]});
|
208
|
+
k.undoManager.add();
|
209
|
+
k.nodeChanged()
|
210
|
+
} else {
|
211
|
+
k.execCommand("FontSize", false, o.fontSize)
|
212
|
+
}
|
213
|
+
return
|
214
|
+
}
|
215
|
+
if (i["class"]) {
|
216
|
+
k.focus();
|
217
|
+
k.undoManager.add();
|
218
|
+
k.formatter.toggle("fontsize_class", {value:i["class"]});
|
219
|
+
k.undoManager.add();
|
220
|
+
k.nodeChanged()
|
221
|
+
} else {
|
222
|
+
k.execCommand("FontSize", false, i.fontSize)
|
223
|
+
}
|
224
|
+
n.select(function (p) {
|
225
|
+
return i == p
|
226
|
+
});
|
227
|
+
if (o && (o.value.fontSize == i.fontSize || o.value["class"] && o.value["class"] == i["class"])) {
|
228
|
+
n.select(null)
|
229
|
+
}
|
230
|
+
return false
|
231
|
+
}});
|
232
|
+
if (n) {
|
233
|
+
f(m.settings.theme_advanced_font_sizes, function (o, i) {
|
234
|
+
var p = o.fontSize;
|
235
|
+
if (p >= 1 && p <= 7) {
|
236
|
+
p = m.sizes[parseInt(p) - 1] + "pt"
|
237
|
+
}
|
238
|
+
n.add(i, o, {style:"font-size:" + p, "class":"mceFontSize" + (l++) + (" " + (o["class"] || ""))})
|
239
|
+
})
|
240
|
+
}
|
241
|
+
return n
|
242
|
+
}, _createBlockFormats:function () {
|
243
|
+
var k, i = {p:"advanced.paragraph", address:"advanced.address", pre:"advanced.pre", h1:"advanced.h1", h2:"advanced.h2", h3:"advanced.h3", h4:"advanced.h4", h5:"advanced.h5", h6:"advanced.h6", div:"advanced.div", blockquote:"advanced.blockquote", code:"advanced.code", dt:"advanced.dt", dd:"advanced.dd", samp:"advanced.samp"}, j = this;
|
244
|
+
k = j.editor.controlManager.createListBox("formatselect", {title:"advanced.block", onselect:function (l) {
|
245
|
+
j.editor.execCommand("FormatBlock", false, l);
|
246
|
+
return false
|
247
|
+
}});
|
248
|
+
if (k) {
|
249
|
+
f(j.editor.getParam("theme_advanced_blockformats", j.settings.theme_advanced_blockformats, "hash"), function (m, l) {
|
250
|
+
k.add(j.editor.translate(l != m ? l : i[m]), m, {"class":"mce_formatPreview mce_" + m})
|
251
|
+
})
|
252
|
+
}
|
253
|
+
return k
|
254
|
+
}, _createForeColorMenu:function () {
|
255
|
+
var m, j = this, k = j.settings, l = {}, i;
|
256
|
+
if (k.theme_advanced_more_colors) {
|
257
|
+
l.more_colors_func = function () {
|
258
|
+
j._mceColorPicker(0, {color:m.value, func:function (n) {
|
259
|
+
m.setColor(n)
|
260
|
+
}})
|
261
|
+
}
|
262
|
+
}
|
263
|
+
if (i = k.theme_advanced_text_colors) {
|
264
|
+
l.colors = i
|
265
|
+
}
|
266
|
+
if (k.theme_advanced_default_foreground_color) {
|
267
|
+
l.default_color = k.theme_advanced_default_foreground_color
|
268
|
+
}
|
269
|
+
l.title = "advanced.forecolor_desc";
|
270
|
+
l.cmd = "ForeColor";
|
271
|
+
l.scope = this;
|
272
|
+
m = j.editor.controlManager.createColorSplitButton("forecolor", l);
|
273
|
+
return m
|
274
|
+
}, _createBackColorMenu:function () {
|
275
|
+
var m, j = this, k = j.settings, l = {}, i;
|
276
|
+
if (k.theme_advanced_more_colors) {
|
277
|
+
l.more_colors_func = function () {
|
278
|
+
j._mceColorPicker(0, {color:m.value, func:function (n) {
|
279
|
+
m.setColor(n)
|
280
|
+
}})
|
281
|
+
}
|
282
|
+
}
|
283
|
+
if (i = k.theme_advanced_background_colors) {
|
284
|
+
l.colors = i
|
285
|
+
}
|
286
|
+
if (k.theme_advanced_default_background_color) {
|
287
|
+
l.default_color = k.theme_advanced_default_background_color
|
288
|
+
}
|
289
|
+
l.title = "advanced.backcolor_desc";
|
290
|
+
l.cmd = "HiliteColor";
|
291
|
+
l.scope = this;
|
292
|
+
m = j.editor.controlManager.createColorSplitButton("backcolor", l);
|
293
|
+
return m
|
294
|
+
}, renderUI:function (k) {
|
295
|
+
var m, l, q, v = this, r = v.editor, w = v.settings, u, j, i;
|
296
|
+
if (r.settings) {
|
297
|
+
r.settings.aria_label = w.aria_label + r.getLang("advanced.help_shortcut")
|
298
|
+
}
|
299
|
+
m = j = d.create("span", {role:"application", "aria-labelledby":r.id + "_voice", id:r.id + "_parent", "class":"mceEditor " + r.settings.skin + "Skin" + (w.skin_variant ? " " + r.settings.skin + "Skin" + v._ufirst(w.skin_variant) : "")});
|
300
|
+
d.add(m, "span", {"class":"mceVoiceLabel", style:"display:none;", id:r.id + "_voice"}, w.aria_label);
|
301
|
+
if (!d.boxModel) {
|
302
|
+
m = d.add(m, "div", {"class":"mceOldBoxModel"})
|
303
|
+
}
|
304
|
+
m = u = d.add(m, "table", {role:"presentation", id:r.id + "_tbl", "class":"mceLayout", cellSpacing:0, cellPadding:0});
|
305
|
+
m = q = d.add(m, "tbody");
|
306
|
+
switch ((w.theme_advanced_layout_manager || "").toLowerCase()) {
|
307
|
+
case"rowlayout":
|
308
|
+
l = v._rowLayout(w, q, k);
|
309
|
+
break;
|
310
|
+
case"customlayout":
|
311
|
+
l = r.execCallback("theme_advanced_custom_layout", w, q, k, j);
|
312
|
+
break;
|
313
|
+
default:
|
314
|
+
l = v._simpleLayout(w, q, k, j)
|
315
|
+
}
|
316
|
+
m = k.targetNode;
|
317
|
+
i = u.rows;
|
318
|
+
d.addClass(i[0], "mceFirst");
|
319
|
+
d.addClass(i[i.length - 1], "mceLast");
|
320
|
+
f(d.select("tr", q), function (o) {
|
321
|
+
d.addClass(o.firstChild, "mceFirst");
|
322
|
+
d.addClass(o.childNodes[o.childNodes.length - 1], "mceLast")
|
323
|
+
});
|
324
|
+
if (d.get(w.theme_advanced_toolbar_container)) {
|
325
|
+
d.get(w.theme_advanced_toolbar_container).appendChild(j)
|
326
|
+
} else {
|
327
|
+
d.insertAfter(j, m)
|
328
|
+
}
|
329
|
+
b.add(r.id + "_path_row", "click", function (n) {
|
330
|
+
n = n.target;
|
331
|
+
if (n.nodeName == "A") {
|
332
|
+
v._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/, "$1"));
|
333
|
+
return b.cancel(n)
|
334
|
+
}
|
335
|
+
});
|
336
|
+
if (!r.getParam("accessibility_focus")) {
|
337
|
+
b.add(d.add(j, "a", {href:"#"}, "<!-- IE -->"), "focus", function () {
|
338
|
+
tinyMCE.get(r.id).focus()
|
339
|
+
})
|
340
|
+
}
|
341
|
+
if (w.theme_advanced_toolbar_location == "external") {
|
342
|
+
k.deltaHeight = 0
|
343
|
+
}
|
344
|
+
v.deltaHeight = k.deltaHeight;
|
345
|
+
k.targetNode = null;
|
346
|
+
r.onKeyDown.add(function (p, n) {
|
347
|
+
var s = 121, o = 122;
|
348
|
+
if (n.altKey) {
|
349
|
+
if (n.keyCode === s) {
|
350
|
+
if (e.isWebKit) {
|
351
|
+
window.focus()
|
352
|
+
}
|
353
|
+
v.toolbarGroup.focus();
|
354
|
+
return b.cancel(n)
|
355
|
+
} else {
|
356
|
+
if (n.keyCode === o) {
|
357
|
+
d.get(p.id + "_path_row").focus();
|
358
|
+
return b.cancel(n)
|
359
|
+
}
|
360
|
+
}
|
361
|
+
}
|
362
|
+
});
|
363
|
+
r.addShortcut("alt+0", "", "mceShortcuts", v);
|
364
|
+
return{iframeContainer:l, editorContainer:r.id + "_parent", sizeContainer:u, deltaHeight:k.deltaHeight}
|
365
|
+
}, getInfo:function () {
|
366
|
+
return{longname:"Advanced theme", author:"Moxiecode Systems AB", authorurl:"http://tinymce.moxiecode.com", version:e.majorVersion + "." + e.minorVersion}
|
367
|
+
}, resizeBy:function (i, j) {
|
368
|
+
var k = d.get(this.editor.id + "_ifr");
|
369
|
+
this.resizeTo(k.clientWidth + i, k.clientHeight + j)
|
370
|
+
}, resizeTo:function (i, m, k) {
|
371
|
+
var j = this.editor, l = this.settings, n = d.get(j.id + "_tbl"), o = d.get(j.id + "_ifr");
|
372
|
+
i = Math.max(l.theme_advanced_resizing_min_width || 100, i);
|
373
|
+
m = Math.max(l.theme_advanced_resizing_min_height || 100, m);
|
374
|
+
i = Math.min(l.theme_advanced_resizing_max_width || 65535, i);
|
375
|
+
m = Math.min(l.theme_advanced_resizing_max_height || 65535, m);
|
376
|
+
d.setStyle(n, "height", "");
|
377
|
+
d.setStyle(o, "height", m);
|
378
|
+
if (l.theme_advanced_resize_horizontal) {
|
379
|
+
d.setStyle(n, "width", "");
|
380
|
+
d.setStyle(o, "width", i);
|
381
|
+
if (i < n.clientWidth) {
|
382
|
+
i = n.clientWidth;
|
383
|
+
d.setStyle(o, "width", n.clientWidth)
|
384
|
+
}
|
385
|
+
}
|
386
|
+
if (k && l.theme_advanced_resizing_use_cookie) {
|
387
|
+
a.setHash("TinyMCE_" + j.id + "_size", {cw:i, ch:m})
|
388
|
+
}
|
389
|
+
}, destroy:function () {
|
390
|
+
var i = this.editor.id;
|
391
|
+
b.clear(i + "_resize");
|
392
|
+
b.clear(i + "_path_row");
|
393
|
+
b.clear(i + "_external_close")
|
394
|
+
}, _simpleLayout:function (y, r, k, i) {
|
395
|
+
var x = this, u = x.editor, v = y.theme_advanced_toolbar_location, m = y.theme_advanced_statusbar_location, l, j, q, w;
|
396
|
+
if (y.readonly) {
|
397
|
+
l = d.add(r, "tr");
|
398
|
+
l = j = d.add(l, "td", {"class":"mceIframeContainer"});
|
399
|
+
return j
|
400
|
+
}
|
401
|
+
if (v == "top") {
|
402
|
+
x._addToolbars(r, k)
|
403
|
+
}
|
404
|
+
if (v == "external") {
|
405
|
+
l = w = d.create("div", {style:"position:relative"});
|
406
|
+
l = d.add(l, "div", {id:u.id + "_external", "class":"mceExternalToolbar"});
|
407
|
+
d.add(l, "a", {id:u.id + "_external_close", href:"javascript:;", "class":"mceExternalClose"});
|
408
|
+
l = d.add(l, "table", {id:u.id + "_tblext", cellSpacing:0, cellPadding:0});
|
409
|
+
q = d.add(l, "tbody");
|
410
|
+
if (i.firstChild.className == "mceOldBoxModel") {
|
411
|
+
i.firstChild.appendChild(w)
|
412
|
+
} else {
|
413
|
+
i.insertBefore(w, i.firstChild)
|
414
|
+
}
|
415
|
+
x._addToolbars(q, k);
|
416
|
+
u.onMouseUp.add(function () {
|
417
|
+
var o = d.get(u.id + "_external");
|
418
|
+
d.show(o);
|
419
|
+
d.hide(g);
|
420
|
+
var n = b.add(u.id + "_external_close", "click", function () {
|
421
|
+
d.hide(u.id + "_external");
|
422
|
+
b.remove(u.id + "_external_close", "click", n)
|
423
|
+
});
|
424
|
+
d.show(o);
|
425
|
+
d.setStyle(o, "top", 0 - d.getRect(u.id + "_tblext").h - 1);
|
426
|
+
d.hide(o);
|
427
|
+
d.show(o);
|
428
|
+
o.style.filter = "";
|
429
|
+
g = u.id + "_external";
|
430
|
+
o = null
|
431
|
+
})
|
432
|
+
}
|
433
|
+
if (m == "top") {
|
434
|
+
x._addStatusBar(r, k)
|
435
|
+
}
|
436
|
+
if (!y.theme_advanced_toolbar_container) {
|
437
|
+
l = d.add(r, "tr");
|
438
|
+
l = j = d.add(l, "td", {"class":"mceIframeContainer"})
|
439
|
+
}
|
440
|
+
if (v == "bottom") {
|
441
|
+
x._addToolbars(r, k)
|
442
|
+
}
|
443
|
+
if (m == "bottom") {
|
444
|
+
x._addStatusBar(r, k)
|
445
|
+
}
|
446
|
+
return j
|
447
|
+
}, _rowLayout:function (w, m, k) {
|
448
|
+
var v = this, p = v.editor, u, x, i = p.controlManager, l, j, r, q;
|
449
|
+
u = w.theme_advanced_containers_default_class || "";
|
450
|
+
x = w.theme_advanced_containers_default_align || "center";
|
451
|
+
f(c(w.theme_advanced_containers || ""), function (s, o) {
|
452
|
+
var n = w["theme_advanced_container_" + s] || "";
|
453
|
+
switch (s.toLowerCase()) {
|
454
|
+
case"mceeditor":
|
455
|
+
l = d.add(m, "tr");
|
456
|
+
l = j = d.add(l, "td", {"class":"mceIframeContainer"});
|
457
|
+
break;
|
458
|
+
case"mceelementpath":
|
459
|
+
v._addStatusBar(m, k);
|
460
|
+
break;
|
461
|
+
default:
|
462
|
+
q = (w["theme_advanced_container_" + s + "_align"] || x).toLowerCase();
|
463
|
+
q = "mce" + v._ufirst(q);
|
464
|
+
l = d.add(d.add(m, "tr"), "td", {"class":"mceToolbar " + (w["theme_advanced_container_" + s + "_class"] || u) + " " + q || x});
|
465
|
+
r = i.createToolbar("toolbar" + o);
|
466
|
+
v._addControls(n, r);
|
467
|
+
d.setHTML(l, r.renderHTML());
|
468
|
+
k.deltaHeight -= w.theme_advanced_row_height
|
469
|
+
}
|
470
|
+
});
|
471
|
+
return j
|
472
|
+
}, _addControls:function (j, i) {
|
473
|
+
var k = this, l = k.settings, m, n = k.editor.controlManager;
|
474
|
+
if (l.theme_advanced_disable && !k._disabled) {
|
475
|
+
m = {};
|
476
|
+
f(c(l.theme_advanced_disable), function (o) {
|
477
|
+
m[o] = 1
|
478
|
+
});
|
479
|
+
k._disabled = m
|
480
|
+
} else {
|
481
|
+
m = k._disabled
|
482
|
+
}
|
483
|
+
f(c(j), function (p) {
|
484
|
+
var o;
|
485
|
+
if (m && m[p]) {
|
486
|
+
return
|
487
|
+
}
|
488
|
+
if (p == "tablecontrols") {
|
489
|
+
f(["table", "|", "row_props", "cell_props", "|", "row_before", "row_after", "delete_row", "|", "col_before", "col_after", "delete_col", "|", "split_cells", "merge_cells"], function (q) {
|
490
|
+
q = k.createControl(q, n);
|
491
|
+
if (q) {
|
492
|
+
i.add(q)
|
493
|
+
}
|
494
|
+
});
|
495
|
+
return
|
496
|
+
}
|
497
|
+
o = k.createControl(p, n);
|
498
|
+
if (o) {
|
499
|
+
i.add(o)
|
500
|
+
}
|
501
|
+
})
|
502
|
+
}, _addToolbars:function (x, k) {
|
503
|
+
var A = this, p, m, r = A.editor, B = A.settings, z, j = r.controlManager, u, l, q = [], y, w;
|
504
|
+
w = j.createToolbarGroup("toolbargroup", {name:r.getLang("advanced.toolbar"), tab_focus_toolbar:r.getParam("theme_advanced_tab_focus_toolbar")});
|
505
|
+
A.toolbarGroup = w;
|
506
|
+
y = B.theme_advanced_toolbar_align.toLowerCase();
|
507
|
+
y = "mce" + A._ufirst(y);
|
508
|
+
l = d.add(d.add(x, "tr", {role:"presentation"}), "td", {"class":"mceToolbar " + y, role:"presentation"});
|
509
|
+
for (p = 1; (z = B["theme_advanced_buttons" + p]); p++) {
|
510
|
+
m = j.createToolbar("toolbar" + p, {"class":"mceToolbarRow" + p});
|
511
|
+
if (B["theme_advanced_buttons" + p + "_add"]) {
|
512
|
+
z += "," + B["theme_advanced_buttons" + p + "_add"]
|
513
|
+
}
|
514
|
+
if (B["theme_advanced_buttons" + p + "_add_before"]) {
|
515
|
+
z = B["theme_advanced_buttons" + p + "_add_before"] + "," + z
|
516
|
+
}
|
517
|
+
A._addControls(z, m);
|
518
|
+
w.add(m);
|
519
|
+
k.deltaHeight -= B.theme_advanced_row_height
|
520
|
+
}
|
521
|
+
q.push(w.renderHTML());
|
522
|
+
q.push(d.createHTML("a", {href:"#", accesskey:"z", title:r.getLang("advanced.toolbar_focus"), onfocus:"tinyMCE.getInstanceById('" + r.id + "').focus();"}, "<!-- IE -->"));
|
523
|
+
d.setHTML(l, q.join(""))
|
524
|
+
}, _addStatusBar:function (m, j) {
|
525
|
+
var k, v = this, p = v.editor, w = v.settings, i, q, u, l;
|
526
|
+
k = d.add(m, "tr");
|
527
|
+
k = l = d.add(k, "td", {"class":"mceStatusbar"});
|
528
|
+
k = d.add(k, "div", {id:p.id + "_path_row", role:"group", "aria-labelledby":p.id + "_path_voice"});
|
529
|
+
if (w.theme_advanced_path) {
|
530
|
+
d.add(k, "span", {id:p.id + "_path_voice"}, p.translate("advanced.path"));
|
531
|
+
d.add(k, "span", {}, ": ")
|
532
|
+
} else {
|
533
|
+
d.add(k, "span", {}, " ")
|
534
|
+
}
|
535
|
+
if (w.theme_advanced_resizing) {
|
536
|
+
d.add(l, "a", {id:p.id + "_resize", href:"javascript:;", onclick:"return false;", "class":"mceResize", tabIndex:"-1"});
|
537
|
+
if (w.theme_advanced_resizing_use_cookie) {
|
538
|
+
p.onPostRender.add(function () {
|
539
|
+
var n = a.getHash("TinyMCE_" + p.id + "_size"), r = d.get(p.id + "_tbl");
|
540
|
+
if (!n) {
|
541
|
+
return
|
542
|
+
}
|
543
|
+
v.resizeTo(n.cw, n.ch)
|
544
|
+
})
|
545
|
+
}
|
546
|
+
p.onPostRender.add(function () {
|
547
|
+
b.add(p.id + "_resize", "click", function (n) {
|
548
|
+
n.preventDefault()
|
549
|
+
});
|
550
|
+
b.add(p.id + "_resize", "mousedown", function (D) {
|
551
|
+
var t, r, s, o, C, z, A, F, n, E, x;
|
552
|
+
|
553
|
+
function y(G) {
|
554
|
+
G.preventDefault();
|
555
|
+
n = A + (G.screenX - C);
|
556
|
+
E = F + (G.screenY - z);
|
557
|
+
v.resizeTo(n, E)
|
558
|
+
}
|
559
|
+
|
560
|
+
function B(G) {
|
561
|
+
b.remove(d.doc, "mousemove", t);
|
562
|
+
b.remove(p.getDoc(), "mousemove", r);
|
563
|
+
b.remove(d.doc, "mouseup", s);
|
564
|
+
b.remove(p.getDoc(), "mouseup", o);
|
565
|
+
n = A + (G.screenX - C);
|
566
|
+
E = F + (G.screenY - z);
|
567
|
+
v.resizeTo(n, E, true)
|
568
|
+
}
|
569
|
+
|
570
|
+
D.preventDefault();
|
571
|
+
C = D.screenX;
|
572
|
+
z = D.screenY;
|
573
|
+
x = d.get(v.editor.id + "_ifr");
|
574
|
+
A = n = x.clientWidth;
|
575
|
+
F = E = x.clientHeight;
|
576
|
+
t = b.add(d.doc, "mousemove", y);
|
577
|
+
r = b.add(p.getDoc(), "mousemove", y);
|
578
|
+
s = b.add(d.doc, "mouseup", B);
|
579
|
+
o = b.add(p.getDoc(), "mouseup", B)
|
580
|
+
})
|
581
|
+
})
|
582
|
+
}
|
583
|
+
j.deltaHeight -= 21;
|
584
|
+
k = m = null
|
585
|
+
}, _updateUndoStatus:function (j) {
|
586
|
+
var i = j.controlManager, k = j.undoManager;
|
587
|
+
i.setDisabled("undo", !k.hasUndo() && !k.typing);
|
588
|
+
i.setDisabled("redo", !k.hasRedo())
|
589
|
+
}, _nodeChanged:function (m, r, D, q, E) {
|
590
|
+
var y = this, C, F = 0, x, G, z = y.settings, w, k, u, B, l, j, i;
|
591
|
+
e.each(y.stateControls, function (n) {
|
592
|
+
r.setActive(n, m.queryCommandState(y.controls[n][1]))
|
593
|
+
});
|
594
|
+
function o(p) {
|
595
|
+
var s, n = E.parents, t = p;
|
596
|
+
if (typeof(p) == "string") {
|
597
|
+
t = function (v) {
|
598
|
+
return v.nodeName == p
|
599
|
+
}
|
600
|
+
}
|
601
|
+
for (s = 0; s < n.length; s++) {
|
602
|
+
if (t(n[s])) {
|
603
|
+
return n[s]
|
604
|
+
}
|
605
|
+
}
|
606
|
+
}
|
607
|
+
|
608
|
+
r.setActive("visualaid", m.hasVisual);
|
609
|
+
y._updateUndoStatus(m);
|
610
|
+
r.setDisabled("outdent", !m.queryCommandState("Outdent"));
|
611
|
+
C = o("A");
|
612
|
+
if (G = r.get("link")) {
|
613
|
+
if (!C || !C.name) {
|
614
|
+
G.setDisabled(!C && q);
|
615
|
+
G.setActive(!!C)
|
616
|
+
}
|
617
|
+
}
|
618
|
+
if (G = r.get("unlink")) {
|
619
|
+
G.setDisabled(!C && q);
|
620
|
+
G.setActive(!!C && !C.name)
|
621
|
+
}
|
622
|
+
if (G = r.get("anchor")) {
|
623
|
+
G.setActive(!q && !!C && C.name)
|
624
|
+
}
|
625
|
+
C = o("IMG");
|
626
|
+
if (G = r.get("image")) {
|
627
|
+
G.setActive(!q && !!C && D.className.indexOf("mceItem") == -1)
|
628
|
+
}
|
629
|
+
if (G = r.get("styleselect")) {
|
630
|
+
y._importClasses();
|
631
|
+
j = [];
|
632
|
+
f(G.items, function (n) {
|
633
|
+
j.push(n.value)
|
634
|
+
});
|
635
|
+
i = m.formatter.matchAll(j);
|
636
|
+
G.select(i[0])
|
637
|
+
}
|
638
|
+
if (G = r.get("formatselect")) {
|
639
|
+
C = o(d.isBlock);
|
640
|
+
if (C) {
|
641
|
+
G.select(C.nodeName.toLowerCase())
|
642
|
+
}
|
643
|
+
}
|
644
|
+
o(function (p) {
|
645
|
+
if (p.nodeName === "SPAN") {
|
646
|
+
if (!w && p.className) {
|
647
|
+
w = p.className
|
648
|
+
}
|
649
|
+
}
|
650
|
+
if (m.dom.is(p, z.theme_advanced_font_selector)) {
|
651
|
+
if (!k && p.style.fontSize) {
|
652
|
+
k = p.style.fontSize
|
653
|
+
}
|
654
|
+
if (!u && p.style.fontFamily) {
|
655
|
+
u = p.style.fontFamily.replace(/[\"\']+/g, "").replace(/^([^,]+).*/, "$1").toLowerCase()
|
656
|
+
}
|
657
|
+
if (!B && p.style.color) {
|
658
|
+
B = p.style.color
|
659
|
+
}
|
660
|
+
if (!l && p.style.backgroundColor) {
|
661
|
+
l = p.style.backgroundColor
|
662
|
+
}
|
663
|
+
}
|
664
|
+
return false
|
665
|
+
});
|
666
|
+
if (G = r.get("fontselect")) {
|
667
|
+
G.select(function (n) {
|
668
|
+
return n.replace(/^([^,]+).*/, "$1").toLowerCase() == u
|
669
|
+
})
|
670
|
+
}
|
671
|
+
if (G = r.get("fontsizeselect")) {
|
672
|
+
if (z.theme_advanced_runtime_fontsize && !k && !w) {
|
673
|
+
k = m.dom.getStyle(D, "fontSize", true)
|
674
|
+
}
|
675
|
+
G.select(function (n) {
|
676
|
+
if (n.fontSize && n.fontSize === k) {
|
677
|
+
return true
|
678
|
+
}
|
679
|
+
if (n["class"] && n["class"] === w) {
|
680
|
+
return true
|
681
|
+
}
|
682
|
+
})
|
683
|
+
}
|
684
|
+
if (z.theme_advanced_show_current_color) {
|
685
|
+
function A(p, n) {
|
686
|
+
if (G = r.get(p)) {
|
687
|
+
if (!n) {
|
688
|
+
n = G.settings.default_color
|
689
|
+
}
|
690
|
+
if (n !== G.value) {
|
691
|
+
G.displayColor(n)
|
692
|
+
}
|
693
|
+
}
|
694
|
+
}
|
695
|
+
|
696
|
+
A("forecolor", B);
|
697
|
+
A("backcolor", l)
|
698
|
+
}
|
699
|
+
if (z.theme_advanced_show_current_color) {
|
700
|
+
function A(p, n) {
|
701
|
+
if (G = r.get(p)) {
|
702
|
+
if (!n) {
|
703
|
+
n = G.settings.default_color
|
704
|
+
}
|
705
|
+
if (n !== G.value) {
|
706
|
+
G.displayColor(n)
|
707
|
+
}
|
708
|
+
}
|
709
|
+
}
|
710
|
+
|
711
|
+
A("forecolor", B);
|
712
|
+
A("backcolor", l)
|
713
|
+
}
|
714
|
+
if (z.theme_advanced_path && z.theme_advanced_statusbar_location) {
|
715
|
+
C = d.get(m.id + "_path") || d.add(m.id + "_path_row", "span", {id:m.id + "_path"});
|
716
|
+
if (y.statusKeyboardNavigation) {
|
717
|
+
y.statusKeyboardNavigation.destroy();
|
718
|
+
y.statusKeyboardNavigation = null
|
719
|
+
}
|
720
|
+
d.setHTML(C, "");
|
721
|
+
o(function (H) {
|
722
|
+
var p = H.nodeName.toLowerCase(), s, v, t = "";
|
723
|
+
if (H.nodeType != 1 || p === "br" || H.getAttribute("data-mce-bogus") || d.hasClass(H, "mceItemHidden") || d.hasClass(H, "mceItemRemoved")) {
|
724
|
+
return
|
725
|
+
}
|
726
|
+
if (e.isIE && H.scopeName !== "HTML") {
|
727
|
+
p = H.scopeName + ":" + p
|
728
|
+
}
|
729
|
+
p = p.replace(/mce\:/g, "");
|
730
|
+
switch (p) {
|
731
|
+
case"b":
|
732
|
+
p = "strong";
|
733
|
+
break;
|
734
|
+
case"i":
|
735
|
+
p = "em";
|
736
|
+
break;
|
737
|
+
case"img":
|
738
|
+
if (x = d.getAttrib(H, "src")) {
|
739
|
+
t += "src: " + x + " "
|
740
|
+
}
|
741
|
+
break;
|
742
|
+
case"a":
|
743
|
+
if (x = d.getAttrib(H, "name")) {
|
744
|
+
t += "name: " + x + " ";
|
745
|
+
p += "#" + x
|
746
|
+
}
|
747
|
+
if (x = d.getAttrib(H, "href")) {
|
748
|
+
t += "href: " + x + " "
|
749
|
+
}
|
750
|
+
break;
|
751
|
+
case"font":
|
752
|
+
if (x = d.getAttrib(H, "face")) {
|
753
|
+
t += "font: " + x + " "
|
754
|
+
}
|
755
|
+
if (x = d.getAttrib(H, "size")) {
|
756
|
+
t += "size: " + x + " "
|
757
|
+
}
|
758
|
+
if (x = d.getAttrib(H, "color")) {
|
759
|
+
t += "color: " + x + " "
|
760
|
+
}
|
761
|
+
break;
|
762
|
+
case"span":
|
763
|
+
if (x = d.getAttrib(H, "style")) {
|
764
|
+
t += "style: " + x + " "
|
765
|
+
}
|
766
|
+
break
|
767
|
+
}
|
768
|
+
if (x = d.getAttrib(H, "id")) {
|
769
|
+
t += "id: " + x + " "
|
770
|
+
}
|
771
|
+
if (x = H.className) {
|
772
|
+
x = x.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, "");
|
773
|
+
if (x) {
|
774
|
+
t += "class: " + x + " ";
|
775
|
+
if (d.isBlock(H) || p == "img" || p == "span") {
|
776
|
+
p += "." + x
|
777
|
+
}
|
778
|
+
}
|
779
|
+
}
|
780
|
+
p = p.replace(/(html:)/g, "");
|
781
|
+
p = {name:p, node:H, title:t};
|
782
|
+
y.onResolveName.dispatch(y, p);
|
783
|
+
t = p.title;
|
784
|
+
p = p.name;
|
785
|
+
v = d.create("a", {href:"javascript:;", role:"button", onmousedown:"return false;", title:t, "class":"mcePath_" + (F++)}, p);
|
786
|
+
if (C.hasChildNodes()) {
|
787
|
+
C.insertBefore(d.create("span", {"aria-hidden":"true"}, "\u00a0\u00bb "), C.firstChild);
|
788
|
+
C.insertBefore(v, C.firstChild)
|
789
|
+
} else {
|
790
|
+
C.appendChild(v)
|
791
|
+
}
|
792
|
+
}, m.getBody());
|
793
|
+
if (d.select("a", C).length > 0) {
|
794
|
+
y.statusKeyboardNavigation = new e.ui.KeyboardNavigation({root:m.id + "_path_row", items:d.select("a", C), excludeFromTabOrder:true, onCancel:function () {
|
795
|
+
m.focus()
|
796
|
+
}}, d)
|
797
|
+
}
|
798
|
+
}
|
799
|
+
}, _sel:function (i) {
|
800
|
+
this.editor.execCommand("mceSelectNodeDepth", false, i)
|
801
|
+
}, _mceInsertAnchor:function (k, j) {
|
802
|
+
var i = this.editor;
|
803
|
+
i.windowManager.open({url:this.url + "/anchor.htm", width:320 + parseInt(i.getLang("advanced.anchor_delta_width", 0)), height:90 + parseInt(i.getLang("advanced.anchor_delta_height", 0)), inline:true}, {theme_url:this.url})
|
804
|
+
}, _mceCharMap:function () {
|
805
|
+
var i = this.editor;
|
806
|
+
i.windowManager.open({url:this.url + "/charmap.htm", width:550 + parseInt(i.getLang("advanced.charmap_delta_width", 0)), height:265 + parseInt(i.getLang("advanced.charmap_delta_height", 0)), inline:true}, {theme_url:this.url})
|
807
|
+
}, _mceHelp:function () {
|
808
|
+
var i = this.editor;
|
809
|
+
i.windowManager.open({url:this.url + "/about.htm", width:480, height:380, inline:true}, {theme_url:this.url})
|
810
|
+
}, _mceShortcuts:function () {
|
811
|
+
var i = this.editor;
|
812
|
+
i.windowManager.open({url:this.url + "/shortcuts.htm", width:480, height:380, inline:true}, {theme_url:this.url})
|
813
|
+
}, _mceColorPicker:function (k, j) {
|
814
|
+
var i = this.editor;
|
815
|
+
j = j || {};
|
816
|
+
i.windowManager.open({url:this.url + "/color_picker.htm", width:375 + parseInt(i.getLang("advanced.colorpicker_delta_width", 0)), height:250 + parseInt(i.getLang("advanced.colorpicker_delta_height", 0)), close_previous:false, inline:true}, {input_color:j.color, func:j.func, theme_url:this.url})
|
817
|
+
}, _mceCodeEditor:function (j, k) {
|
818
|
+
var i = this.editor;
|
819
|
+
i.windowManager.open({url:this.url + "/source_editor.htm", width:parseInt(i.getParam("theme_advanced_source_editor_width", 720)), height:parseInt(i.getParam("theme_advanced_source_editor_height", 580)), inline:true, resizable:true, maximizable:true}, {theme_url:this.url})
|
820
|
+
}, _mceImage:function (j, k) {
|
821
|
+
var i = this.editor;
|
822
|
+
if (i.dom.getAttrib(i.selection.getNode(), "class").indexOf("mceItem") != -1) {
|
823
|
+
return
|
824
|
+
}
|
825
|
+
i.windowManager.open({url:this.url + "/image.htm", width:355 + parseInt(i.getLang("advanced.image_delta_width", 0)), height:275 + parseInt(i.getLang("advanced.image_delta_height", 0)), inline:true}, {theme_url:this.url})
|
826
|
+
}, _mceLink:function (j, k) {
|
827
|
+
var i = this.editor;
|
828
|
+
i.windowManager.open({url:this.url + "/link.htm", width:310 + parseInt(i.getLang("advanced.link_delta_width", 0)), height:200 + parseInt(i.getLang("advanced.link_delta_height", 0)), inline:true}, {theme_url:this.url})
|
829
|
+
}, _mceNewDocument:function () {
|
830
|
+
var i = this.editor;
|
831
|
+
i.windowManager.confirm("advanced.newdocument", function (j) {
|
832
|
+
if (j) {
|
833
|
+
i.execCommand("mceSetContent", false, "")
|
834
|
+
}
|
835
|
+
})
|
836
|
+
}, _mceForeColor:function () {
|
837
|
+
var i = this;
|
838
|
+
this._mceColorPicker(0, {color:i.fgColor, func:function (j) {
|
839
|
+
i.fgColor = j;
|
840
|
+
i.editor.execCommand("ForeColor", false, j)
|
841
|
+
}})
|
842
|
+
}, _mceBackColor:function () {
|
843
|
+
var i = this;
|
844
|
+
this._mceColorPicker(0, {color:i.bgColor, func:function (j) {
|
845
|
+
i.bgColor = j;
|
846
|
+
i.editor.execCommand("HiliteColor", false, j)
|
847
|
+
}})
|
848
|
+
}, _ufirst:function (i) {
|
849
|
+
return i.substring(0, 1).toUpperCase() + i.substring(1)
|
850
|
+
}});
|
851
|
+
e.ThemeManager.add("advanced", e.themes.AdvancedTheme)
|
852
|
+
}(tinymce));
|