soapbox 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +33 -0
- data/Gemfile.lock +142 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +75 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/app/controllers/admin/admin_controller.rb +111 -0
- data/app/controllers/admin/analytics_controller.rb +53 -0
- data/app/controllers/admin/attachments_controller.rb +28 -0
- data/app/controllers/admin/categories_controller.rb +2 -0
- data/app/controllers/admin/comments_controller.rb +2 -0
- data/app/controllers/admin/contents_controller.rb +2 -0
- data/app/controllers/admin/galleries_controller.rb +2 -0
- data/app/controllers/admin/gallery_images_controller.rb +29 -0
- data/app/controllers/admin/groups_controller.rb +10 -0
- data/app/controllers/admin/images_controller.rb +3 -0
- data/app/controllers/admin/menu_items_controller.rb +6 -0
- data/app/controllers/admin/menus_controller.rb +2 -0
- data/app/controllers/admin/pages_controller.rb +13 -0
- data/app/controllers/admin/plugins_controller.rb +2 -0
- data/app/controllers/admin/redirects_controller.rb +2 -0
- data/app/controllers/admin/settings_controller.rb +2 -0
- data/app/controllers/admin/users_controller.rb +2 -0
- data/app/controllers/admin/versions_controller.rb +6 -0
- data/app/controllers/application_controller.rb +38 -0
- data/app/controllers/attachments_controller.rb +2 -0
- data/app/controllers/categories_controller.rb +2 -0
- data/app/controllers/comments_controller.rb +2 -0
- data/app/controllers/groups_controller.rb +2 -0
- data/app/controllers/pages_controller.rb +18 -0
- data/app/controllers/plugins_controller.rb +2 -0
- data/app/controllers/redirects_controller.rb +5 -0
- data/app/controllers/settings_controller.rb +2 -0
- data/app/controllers/sitemap_controller.rb +7 -0
- data/app/helpers/content_helper.rb +17 -0
- data/app/helpers/layout_helper.rb +35 -0
- data/app/helpers/menu_helper.rb +26 -0
- data/app/helpers/page_helper.rb +21 -0
- data/app/helpers/plugin_helper.rb +21 -0
- data/app/helpers/soapbox_helper.rb +118 -0
- data/app/mailers/soapbox_mailer.rb +10 -0
- data/app/models/attachment.rb +16 -0
- data/app/models/content.rb +26 -0
- data/app/models/gallery.rb +9 -0
- data/app/models/gallery_image.rb +7 -0
- data/app/models/group.rb +27 -0
- data/app/models/member.rb +14 -0
- data/app/models/membership.rb +6 -0
- data/app/models/menu.rb +4 -0
- data/app/models/menu_item.rb +17 -0
- data/app/models/page.rb +41 -0
- data/app/models/permission.rb +12 -0
- data/app/models/plugin.rb +8 -0
- data/app/models/redirect.rb +3 -0
- data/app/models/setting.rb +16 -0
- data/app/models/user.rb +30 -0
- data/app/views/admin/analytics/index.html.erb +198 -0
- data/app/views/admin/attachments/_image.html.erb +15 -0
- data/app/views/admin/attachments/form.html.erb +26 -0
- data/app/views/admin/attachments/index.html.erb +16 -0
- data/app/views/admin/categories/form.html.erb +27 -0
- data/app/views/admin/categories/index.html.erb +1 -0
- data/app/views/admin/comments/form.html.erb +34 -0
- data/app/views/admin/comments/index.html.erb +1 -0
- data/app/views/admin/galleries/_image.html.erb +8 -0
- data/app/views/admin/galleries/_manager.html.erb +57 -0
- data/app/views/admin/galleries/form.html.erb +18 -0
- data/app/views/admin/galleries/index.html.erb +1 -0
- data/app/views/admin/groups/form.html.erb +81 -0
- data/app/views/admin/groups/index.html.erb +1 -0
- data/app/views/admin/menu_items/form.html.erb +28 -0
- data/app/views/admin/menus/_item.html.erb +5 -0
- data/app/views/admin/menus/form.html.erb +25 -0
- data/app/views/admin/menus/index.html.erb +82 -0
- data/app/views/admin/pages/form.html.erb +68 -0
- data/app/views/admin/pages/index.html.erb +1 -0
- data/app/views/admin/pages/link_list.html.erb +9 -0
- data/app/views/admin/plugins/form.html.erb +30 -0
- data/app/views/admin/plugins/index.html.erb +2 -0
- data/app/views/admin/redirects/form.html.erb +26 -0
- data/app/views/admin/redirects/index.html.erb +1 -0
- data/app/views/admin/settings/form.html.erb +27 -0
- data/app/views/admin/settings/index.html.erb +1 -0
- data/app/views/admin/shared/_form_buttons.html.erb +4 -0
- data/app/views/admin/shared/_form_errors.html.erb +10 -0
- data/app/views/admin/shared/_list.html.erb +68 -0
- data/app/views/admin/shared/_list_footer.html.erb +8 -0
- data/app/views/admin/shared/_list_toolbar.html.erb +22 -0
- data/app/views/admin/shared/_tag_manager.html.erb +20 -0
- data/app/views/admin/shared/order.html.erb +33 -0
- data/app/views/admin/shared/tree.html.erb +49 -0
- data/app/views/admin/shared/wysiwyg.html.erb +17 -0
- data/app/views/admin/users/form.html.erb +28 -0
- data/app/views/admin/users/index.html.erb +1 -0
- data/app/views/admin/versions/index.html.erb +38 -0
- data/app/views/devise/confirmations/new.html.erb +11 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.erb +15 -0
- data/app/views/devise/passwords/new.html.erb +11 -0
- data/app/views/devise/registrations/edit.html.erb +25 -0
- data/app/views/devise/registrations/new.html.erb +18 -0
- data/app/views/devise/sessions/new.html.erb +17 -0
- data/app/views/devise/shared/_links.erb +23 -0
- data/app/views/devise/unlocks/new.html.erb +12 -0
- data/app/views/galleries/_nivo_slider.html.erb +22 -0
- data/app/views/galleries/_pretty_photo.html.erb +19 -0
- data/app/views/groups/index.html.erb +7 -0
- data/app/views/groups/show.html.erb +16 -0
- data/app/views/layouts/_admin_toolbar.html.erb +29 -0
- data/app/views/layouts/_admin_top_nav.html.erb +19 -0
- data/app/views/layouts/_head.html.erb +31 -0
- data/app/views/layouts/admin.html.erb +11 -0
- data/app/views/layouts/admin_blank.html.erb +9 -0
- data/app/views/layouts/login.html.erb +22 -0
- data/app/views/pages/error_404.html.erb +2 -0
- data/app/views/pages/index.html.erb +7 -0
- data/app/views/pages/templates/default.html.erb +3 -0
- data/app/views/sitemap/sitemap.rxml +9 -0
- data/app/views/soapbox_mailer/email_form.html.erb +13 -0
- data/app/views/soapbox_mailer/email_form.text.erb +8 -0
- data/config/permissions.yml.template +35 -0
- data/config/routes.rb +62 -0
- data/install.rb +8 -0
- data/lib/generators/soapbox_migration/soapbox_migration_generator.rb +22 -0
- data/lib/generators/soapbox_migration/templates/migration.rb +259 -0
- data/lib/generators/soapbox_scaffold/soapbox_scaffold_generator.rb +69 -0
- data/lib/generators/soapbox_scaffold/templates/admin_controller.rb +2 -0
- data/lib/generators/soapbox_scaffold/templates/controller.rb +2 -0
- data/lib/generators/soapbox_scaffold/templates/migration.rb +20 -0
- data/lib/generators/soapbox_scaffold/templates/model.rb +3 -0
- data/lib/generators/soapbox_scaffold/templates/views/admin/form.html.erb +25 -0
- data/lib/generators/soapbox_scaffold/templates/views/admin/index.html.erb +1 -0
- data/lib/generators/soapbox_scaffold/templates/views/index.html.erb +7 -0
- data/lib/generators/soapbox_scaffold/templates/views/show.html.erb +17 -0
- data/lib/soapbox.rb +48 -0
- data/lib/soapbox/engine.rb +17 -0
- data/lib/soapbox/paperclip.rb +31 -0
- data/lib/soapbox/version.rb +4 -0
- data/lib/states.rb +52 -0
- data/public/404.html +26 -0
- data/public/422.html +26 -0
- data/public/500.html +26 -0
- data/public/favicon.ico +0 -0
- data/public/robots.txt +5 -0
- data/public/soapbox/images/alert-overlay.png +0 -0
- data/public/soapbox/images/prettyPhoto/dark_rounded/btnNext.png +0 -0
- data/public/soapbox/images/prettyPhoto/dark_rounded/btnPrevious.png +0 -0
- data/public/soapbox/images/prettyPhoto/dark_rounded/contentPattern.png +0 -0
- data/public/soapbox/images/prettyPhoto/dark_rounded/default_thumbnail.gif +0 -0
- data/public/soapbox/images/prettyPhoto/dark_rounded/loader.gif +0 -0
- data/public/soapbox/images/prettyPhoto/dark_rounded/sprite.png +0 -0
- data/public/soapbox/images/prettyPhoto/dark_square/btnNext.png +0 -0
- data/public/soapbox/images/prettyPhoto/dark_square/btnPrevious.png +0 -0
- data/public/soapbox/images/prettyPhoto/dark_square/contentPattern.png +0 -0
- data/public/soapbox/images/prettyPhoto/dark_square/default_thumbnail.gif +0 -0
- data/public/soapbox/images/prettyPhoto/dark_square/loader.gif +0 -0
- data/public/soapbox/images/prettyPhoto/dark_square/sprite.png +0 -0
- data/public/soapbox/images/prettyPhoto/default/default_thumb.png +0 -0
- data/public/soapbox/images/prettyPhoto/default/loader.gif +0 -0
- data/public/soapbox/images/prettyPhoto/default/sprite.png +0 -0
- data/public/soapbox/images/prettyPhoto/default/sprite_next.png +0 -0
- data/public/soapbox/images/prettyPhoto/default/sprite_prev.png +0 -0
- data/public/soapbox/images/prettyPhoto/default/sprite_x.png +0 -0
- data/public/soapbox/images/prettyPhoto/default/sprite_y.png +0 -0
- data/public/soapbox/images/prettyPhoto/facebook/btnNext.png +0 -0
- data/public/soapbox/images/prettyPhoto/facebook/btnPrevious.png +0 -0
- data/public/soapbox/images/prettyPhoto/facebook/contentPatternBottom.png +0 -0
- data/public/soapbox/images/prettyPhoto/facebook/contentPatternLeft.png +0 -0
- data/public/soapbox/images/prettyPhoto/facebook/contentPatternRight.png +0 -0
- data/public/soapbox/images/prettyPhoto/facebook/contentPatternTop.png +0 -0
- data/public/soapbox/images/prettyPhoto/facebook/default_thumbnail.gif +0 -0
- data/public/soapbox/images/prettyPhoto/facebook/loader.gif +0 -0
- data/public/soapbox/images/prettyPhoto/facebook/sprite.png +0 -0
- data/public/soapbox/images/prettyPhoto/light_rounded/btnNext.png +0 -0
- data/public/soapbox/images/prettyPhoto/light_rounded/btnPrevious.png +0 -0
- data/public/soapbox/images/prettyPhoto/light_rounded/default_thumbnail.gif +0 -0
- data/public/soapbox/images/prettyPhoto/light_rounded/loader.gif +0 -0
- data/public/soapbox/images/prettyPhoto/light_rounded/sprite.png +0 -0
- data/public/soapbox/images/prettyPhoto/light_square/btnNext.png +0 -0
- data/public/soapbox/images/prettyPhoto/light_square/btnPrevious.png +0 -0
- data/public/soapbox/images/prettyPhoto/light_square/default_thumbnail.gif +0 -0
- data/public/soapbox/images/prettyPhoto/light_square/loader.gif +0 -0
- data/public/soapbox/images/prettyPhoto/light_square/sprite.png +0 -0
- data/public/soapbox/javascripts/admin.js +119 -0
- data/public/soapbox/javascripts/blogger.js +52 -0
- data/public/soapbox/javascripts/jquery-1.4.2.min.js +154 -0
- data/public/soapbox/javascripts/jquery-1.6.2.min.js +18 -0
- data/public/soapbox/javascripts/jquery-ui-1.8rc3.custom.min.js +374 -0
- data/public/soapbox/javascripts/jquery.fileupload-ui.js +533 -0
- data/public/soapbox/javascripts/jquery.fileupload.js +975 -0
- data/public/soapbox/javascripts/jquery.flot.js +2599 -0
- data/public/soapbox/javascripts/jquery.formtastic.js +45 -0
- data/public/soapbox/javascripts/jquery.nivo.slider.pack.js +67 -0
- data/public/soapbox/javascripts/jquery.prettyPhoto.js +27 -0
- data/public/soapbox/javascripts/jquery.timepicker.js +304 -0
- data/public/soapbox/javascripts/jquery.tools.min.js +116 -0
- data/public/soapbox/javascripts/jquery.ui.nestedSortable.js +356 -0
- data/public/soapbox/javascripts/rails-1.6.js +331 -0
- data/public/soapbox/javascripts/rails.js +143 -0
- data/public/soapbox/javascripts/soapbox.js +27 -0
- data/public/soapbox/javascripts/tiny_mce/init.js +54 -0
- data/public/soapbox/javascripts/tiny_mce/jquery.tinymce.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/langs/en.js +169 -0
- data/public/soapbox/javascripts/tiny_mce/license.txt +504 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advhr/langs/en_dlg.js +5 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advhr/rule.htm +57 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advimage/image.htm +232 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advimage/js/image.js +443 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advimage/langs/en_dlg.js +43 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advlink/js/advlink.js +528 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advlink/langs/en_dlg.js +52 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advlink/link.htm +333 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/advlist/editor_plugin_src.js +154 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +117 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/autosave/editor_plugin_src.js +422 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/autosave/langs/en.js +4 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +127 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/emotions.htm +40 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/example/dialog.htm +22 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/example/img/example.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/example/js/dialog.js +19 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/example/langs/en.js +3 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/fullpage/css/fullpage.css +182 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +149 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/fullpage/fullpage.htm +571 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/fullpage/js/fullpage.js +471 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +148 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +635 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/layer/editor_plugin_src.js +212 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +136 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/css/content.css +6 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/css/media.css +16 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/editor_plugin_src.js +414 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/img/flash.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/img/flv_player.swf +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/img/quicktime.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/img/realmedia.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/img/shockwave.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/img/trans.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/img/windowsmedia.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/js/embed.js +73 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/js/media.js +630 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/langs/en_dlg.js +103 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/media/media.htm +817 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +90 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/pagebreak/css/content.css +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +77 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/pagebreak/img/pagebreak.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/pagebreak/img/trans.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/paste/editor_plugin_src.js +929 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/paste/pastetext.htm +27 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/paste/pasteword.htm +21 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/preview/example.html +28 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/preview/preview.html +17 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +57 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +130 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/searchreplace/searchreplace.htm +99 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +341 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/style/css/props.css +13 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/style/js/props.js +641 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/style/langs/en_dlg.js +63 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/style/props.htm +726 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +112 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/cell.htm +178 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/css/cell.css +17 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/css/row.css +25 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/css/table.css +13 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/editor_plugin_src.js +1118 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/js/cell.js +286 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/js/row.js +237 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/js/table.js +449 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/merge_cells.htm +32 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/row.htm +155 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/table/table.htm +187 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/template/blank.htm +12 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/template/css/template.css +23 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/template/js/template.js +106 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/template/template.htm +32 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +76 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +98 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +141 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +141 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +148 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/cite.htm +141 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/del.htm +161 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +144 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/ins.htm +161 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +126 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/js/del.js +63 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +231 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +62 -0
- data/public/soapbox/javascripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/about.htm +54 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/anchor.htm +26 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/charmap.htm +53 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/color_picker.htm +73 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/editor_template_src.js +1167 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/image.htm +80 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/js/about.js +72 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/js/anchor.js +37 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/js/charmap.js +335 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/js/color_picker.js +253 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/js/image.js +245 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/js/link.js +156 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/js/source_editor.js +62 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/langs/en.js +62 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/langs/en_dlg.js +51 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/link.htm +58 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/default/content.css +35 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/default/ui.css +213 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/o2k7/content.css +35 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +116 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +215 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/public/soapbox/javascripts/tiny_mce/themes/advanced/source_editor.htm +26 -0
- data/public/soapbox/javascripts/tiny_mce/themes/simple/editor_template.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/themes/simple/editor_template_src.js +85 -0
- data/public/soapbox/javascripts/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/simple/langs/en.js +11 -0
- data/public/soapbox/javascripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
- data/public/soapbox/javascripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
- data/public/soapbox/javascripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
- data/public/soapbox/javascripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/public/soapbox/javascripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
- data/public/soapbox/javascripts/tiny_mce/tiny_mce.js +1 -0
- data/public/soapbox/javascripts/tiny_mce/tiny_mce_popup.js +5 -0
- data/public/soapbox/javascripts/tiny_mce/tiny_mce_src.js +13134 -0
- data/public/soapbox/javascripts/tiny_mce/utils/editable_selects.js +70 -0
- data/public/soapbox/javascripts/tiny_mce/utils/form_utils.js +200 -0
- data/public/soapbox/javascripts/tiny_mce/utils/mctabs.js +77 -0
- data/public/soapbox/javascripts/tiny_mce/utils/validate.js +220 -0
- data/public/soapbox/stylesheets/admin.css +599 -0
- data/public/soapbox/stylesheets/admin_toolbar.css +24 -0
- data/public/soapbox/stylesheets/awesome_buttons.css +48 -0
- data/public/soapbox/stylesheets/base/images/ui-anim_basic_16x16.gif +0 -0
- data/public/soapbox/stylesheets/base/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-icons_222222_256x240.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-icons_454545_256x240.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-icons_888888_256x240.png +0 -0
- data/public/soapbox/stylesheets/base/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/soapbox/stylesheets/base/jquery.ui.accordion.css +10 -0
- data/public/soapbox/stylesheets/base/jquery.ui.all.css +2 -0
- data/public/soapbox/stylesheets/base/jquery.ui.autocomplete.css +35 -0
- data/public/soapbox/stylesheets/base/jquery.ui.base.css +10 -0
- data/public/soapbox/stylesheets/base/jquery.ui.button.css +35 -0
- data/public/soapbox/stylesheets/base/jquery.ui.core.css +37 -0
- data/public/soapbox/stylesheets/base/jquery.ui.datepicker.css +61 -0
- data/public/soapbox/stylesheets/base/jquery.ui.dialog.css +13 -0
- data/public/soapbox/stylesheets/base/jquery.ui.progressbar.css +4 -0
- data/public/soapbox/stylesheets/base/jquery.ui.resizable.css +13 -0
- data/public/soapbox/stylesheets/base/jquery.ui.slider.css +17 -0
- data/public/soapbox/stylesheets/base/jquery.ui.tabs.css +11 -0
- data/public/soapbox/stylesheets/base/jquery.ui.theme.css +247 -0
- data/public/soapbox/stylesheets/devise.css +0 -0
- data/public/soapbox/stylesheets/formtastic.css +131 -0
- data/public/soapbox/stylesheets/formtastic_changes.css +27 -0
- data/public/soapbox/stylesheets/jquery.fileupload-ui.css +151 -0
- data/public/soapbox/stylesheets/jquery.timepicker.css +104 -0
- data/public/soapbox/stylesheets/nivo-slider.css +89 -0
- data/public/soapbox/stylesheets/nivo-themes/default/arrows.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/default/bullets.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/default/default.css +74 -0
- data/public/soapbox/stylesheets/nivo-themes/default/loading.gif +0 -0
- data/public/soapbox/stylesheets/nivo-themes/orman/arrows.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/orman/bullets.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/orman/loading.gif +0 -0
- data/public/soapbox/stylesheets/nivo-themes/orman/orman.css +98 -0
- data/public/soapbox/stylesheets/nivo-themes/orman/readme.txt +1 -0
- data/public/soapbox/stylesheets/nivo-themes/orman/ribbon.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/orman/slider.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/pascal/bullets.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/pascal/controlnav.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/pascal/featured.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/pascal/loading.gif +0 -0
- data/public/soapbox/stylesheets/nivo-themes/pascal/pascal.css +102 -0
- data/public/soapbox/stylesheets/nivo-themes/pascal/readme.txt +1 -0
- data/public/soapbox/stylesheets/nivo-themes/pascal/ribbon.png +0 -0
- data/public/soapbox/stylesheets/nivo-themes/pascal/slider.png +0 -0
- data/public/soapbox/stylesheets/pbar-ani.gif +0 -0
- data/public/soapbox/stylesheets/prettyPhoto.css +1 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/public/soapbox/stylesheets/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/public/soapbox/stylesheets/smoothness/jquery-ui-1.8.4.custom.css +572 -0
- data/public/soapbox/stylesheets/standardize.css +127 -0
- data/soapbox.gemspec +617 -0
- data/test/helper.rb +18 -0
- data/test/test_soapbox.rb +7 -0
- metadata +872 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
/**
|
2
|
+
* ins.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
function init() {
|
12
|
+
SXE.initElementDialog('ins');
|
13
|
+
if (SXE.currentAction == "update") {
|
14
|
+
setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
|
15
|
+
setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
|
16
|
+
SXE.showRemoveButton();
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
function setElementAttribs(elm) {
|
21
|
+
setAllCommonAttribs(elm);
|
22
|
+
setAttrib(elm, 'datetime');
|
23
|
+
setAttrib(elm, 'cite');
|
24
|
+
}
|
25
|
+
|
26
|
+
function insertIns() {
|
27
|
+
var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS');
|
28
|
+
tinyMCEPopup.execCommand('mceBeginUndoLevel');
|
29
|
+
if (elm == null) {
|
30
|
+
var s = SXE.inst.selection.getContent();
|
31
|
+
if(s.length > 0) {
|
32
|
+
insertInlineElement('INS');
|
33
|
+
var elementArray = tinymce.grep(SXE.inst.dom.select('ins'), function(n) {return n.id == '#sxe_temp_ins#';});
|
34
|
+
for (var i=0; i<elementArray.length; i++) {
|
35
|
+
var elm = elementArray[i];
|
36
|
+
setElementAttribs(elm);
|
37
|
+
}
|
38
|
+
}
|
39
|
+
} else {
|
40
|
+
setElementAttribs(elm);
|
41
|
+
}
|
42
|
+
tinyMCEPopup.editor.nodeChanged();
|
43
|
+
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
44
|
+
tinyMCEPopup.close();
|
45
|
+
}
|
46
|
+
|
47
|
+
function removeIns() {
|
48
|
+
SXE.removeElement('ins');
|
49
|
+
tinyMCEPopup.close();
|
50
|
+
}
|
51
|
+
|
52
|
+
function insertInlineElement(en) {
|
53
|
+
var ed = tinyMCEPopup.editor, dom = ed.dom;
|
54
|
+
|
55
|
+
ed.getDoc().execCommand('FontName', false, 'mceinline');
|
56
|
+
tinymce.each(dom.select(tinymce.isWebKit ? 'span' : 'font'), function(n) {
|
57
|
+
if (n.style.fontFamily == 'mceinline' || n.face == 'mceinline')
|
58
|
+
dom.replace(dom.create(en), n, 1);
|
59
|
+
});
|
60
|
+
}
|
61
|
+
|
62
|
+
tinyMCEPopup.onInit.add(init);
|
@@ -0,0 +1,32 @@
|
|
1
|
+
tinyMCE.addI18n('en.xhtmlxtras_dlg',{
|
2
|
+
attribute_label_title:"Title",
|
3
|
+
attribute_label_id:"ID",
|
4
|
+
attribute_label_class:"Class",
|
5
|
+
attribute_label_style:"Style",
|
6
|
+
attribute_label_cite:"Cite",
|
7
|
+
attribute_label_datetime:"Date/Time",
|
8
|
+
attribute_label_langdir:"Text Direction",
|
9
|
+
attribute_option_ltr:"Left to right",
|
10
|
+
attribute_option_rtl:"Right to left",
|
11
|
+
attribute_label_langcode:"Language",
|
12
|
+
attribute_label_tabindex:"TabIndex",
|
13
|
+
attribute_label_accesskey:"AccessKey",
|
14
|
+
attribute_events_tab:"Events",
|
15
|
+
attribute_attrib_tab:"Attributes",
|
16
|
+
general_tab:"General",
|
17
|
+
attrib_tab:"Attributes",
|
18
|
+
events_tab:"Events",
|
19
|
+
fieldset_general_tab:"General Settings",
|
20
|
+
fieldset_attrib_tab:"Element Attributes",
|
21
|
+
fieldset_events_tab:"Element Events",
|
22
|
+
title_ins_element:"Insertion Element",
|
23
|
+
title_del_element:"Deletion Element",
|
24
|
+
title_acronym_element:"Acronym Element",
|
25
|
+
title_abbr_element:"Abbreviation Element",
|
26
|
+
title_cite_element:"Citation Element",
|
27
|
+
remove:"Remove",
|
28
|
+
insert_date:"Insert current date/time",
|
29
|
+
option_ltr:"Left to right",
|
30
|
+
option_rtl:"Right to left",
|
31
|
+
attribs_title:"Insert/Edit Attributes"
|
32
|
+
});
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title>{#advanced_dlg.about_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/about.js"></script>
|
8
|
+
</head>
|
9
|
+
<body id="about" style="display: none">
|
10
|
+
<div class="tabs">
|
11
|
+
<ul>
|
12
|
+
<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
|
13
|
+
<li id="help_tab" style="display:none"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
|
14
|
+
<li id="plugins_tab"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
|
15
|
+
</ul>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
<div class="panel_wrapper">
|
19
|
+
<div id="general_panel" class="panel current">
|
20
|
+
<h3>{#advanced_dlg.about_title}</h3>
|
21
|
+
<p>Version: <span id="version"></span> (<span id="date"></span>)</p>
|
22
|
+
<p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
|
23
|
+
by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
|
24
|
+
<p>Copyright © 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
|
25
|
+
<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
|
26
|
+
|
27
|
+
<div id="buttoncontainer">
|
28
|
+
<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
|
29
|
+
<a href="http://sourceforge.net/projects/tinymce/" target="_blank"><img src="http://sourceforge.net/sflogo.php?group_id=103281" alt="Hosted By Sourceforge" border="0" /></a>
|
30
|
+
<a href="http://www.freshmeat.net/projects/tinymce" target="_blank"><img src="http://tinymce.moxiecode.com/images/fm.gif" alt="Also on freshmeat" border="0" /></a>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div id="plugins_panel" class="panel">
|
35
|
+
<div id="pluginscontainer">
|
36
|
+
<h3>{#advanced_dlg.about_loaded}</h3>
|
37
|
+
|
38
|
+
<div id="plugintablecontainer">
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<p> </p>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<div id="help_panel" class="panel noscroll" style="overflow: visible;">
|
46
|
+
<div id="iframecontainer"></div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div class="mceActionPanel">
|
51
|
+
<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
|
52
|
+
</div>
|
53
|
+
</body>
|
54
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
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
|
+
</head>
|
8
|
+
<body style="display: none">
|
9
|
+
<form onsubmit="AnchorDialog.update();return false;" action="#">
|
10
|
+
<table border="0" cellpadding="4" cellspacing="0">
|
11
|
+
<tr>
|
12
|
+
<td colspan="2" class="title">{#advanced_dlg.anchor_title}</td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<td class="nowrap">{#advanced_dlg.anchor_name}:</td>
|
16
|
+
<td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" /></td>
|
17
|
+
</tr>
|
18
|
+
</table>
|
19
|
+
|
20
|
+
<div class="mceActionPanel">
|
21
|
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
22
|
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
23
|
+
</div>
|
24
|
+
</form>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
4
|
+
<title>{#advanced_dlg.charmap_title}</title>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
6
|
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
7
|
+
<script type="text/javascript" src="js/charmap.js"></script>
|
8
|
+
</head>
|
9
|
+
<body id="charmap" style="display:none">
|
10
|
+
<table align="center" border="0" cellspacing="0" cellpadding="2">
|
11
|
+
<tr>
|
12
|
+
<td colspan="2" class="title">{#advanced_dlg.charmap_title}</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">
|
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">
|
32
|
+
<tr>
|
33
|
+
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">HTML-Code</td>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center"> </td>
|
37
|
+
</tr>
|
38
|
+
<tr>
|
39
|
+
<td style="font-size: 1px;"> </td>
|
40
|
+
</tr>
|
41
|
+
<tr>
|
42
|
+
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">NUM-Code</td>
|
43
|
+
</tr>
|
44
|
+
<tr>
|
45
|
+
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center"> </td>
|
46
|
+
</tr>
|
47
|
+
</table>
|
48
|
+
</td>
|
49
|
+
</tr>
|
50
|
+
</table>
|
51
|
+
|
52
|
+
</body>
|
53
|
+
</html>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
+
<head>
|
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
|
+
</head>
|
9
|
+
<body id="colorpicker" style="display: none">
|
10
|
+
<form onsubmit="insertAction();return false" action="#">
|
11
|
+
<div class="tabs">
|
12
|
+
<ul>
|
13
|
+
<li id="picker_tab" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
|
14
|
+
<li id="rgb_tab"><span><a href="javascript:;" onclick="generateWebColors();mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
|
15
|
+
<li id="named_tab"><span><a href="javascript:;" onclick="generateNamedColors();javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
|
16
|
+
</ul>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="panel_wrapper">
|
20
|
+
<div id="picker_panel" class="panel current">
|
21
|
+
<fieldset>
|
22
|
+
<legend>{#advanced_dlg.colorpicker_picker_title}</legend>
|
23
|
+
<div id="picker">
|
24
|
+
<img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt="" />
|
25
|
+
|
26
|
+
<div id="light">
|
27
|
+
<!-- Will be filled with divs -->
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<br style="clear: both" />
|
31
|
+
</div>
|
32
|
+
</fieldset>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="rgb_panel" class="panel">
|
36
|
+
<fieldset>
|
37
|
+
<legend>{#advanced_dlg.colorpicker_palette_title}</legend>
|
38
|
+
<div id="webcolors">
|
39
|
+
<!-- Gets filled with web safe colors-->
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<br style="clear: both" />
|
43
|
+
</fieldset>
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="named_panel" class="panel">
|
47
|
+
<fieldset>
|
48
|
+
<legend>{#advanced_dlg.colorpicker_named_title}</legend>
|
49
|
+
<div id="namedcolors">
|
50
|
+
<!-- Gets filled with named colors-->
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<br style="clear: both" />
|
54
|
+
|
55
|
+
<div id="colornamecontainer">
|
56
|
+
{#advanced_dlg.colorpicker_name} <span id="colorname"></span>
|
57
|
+
</div>
|
58
|
+
</fieldset>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div class="mceActionPanel">
|
63
|
+
<input type="submit" id="insert" name="insert" value="{#apply}" />
|
64
|
+
|
65
|
+
<div id="preview"></div>
|
66
|
+
|
67
|
+
<div id="previewblock">
|
68
|
+
<label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" maxlength="8" class="text mceFocus" />
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
</form>
|
72
|
+
</body>
|
73
|
+
</html>
|
@@ -0,0 +1 @@
|
|
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);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",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}j.onInit.add(function(){if(!j.settings.readonly){j.onNodeChange.add(l._nodeChanged,l)}if(j.settings.content_css!==false){j.dom.loadCSS(j.baseURI.toAbsolute("themes/advanced/skins/"+j.settings.skin+"/content.css"))}});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")}},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",classes: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(n){i.execCommand("mceToggleFormat",false,n);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});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){i.execCommand("FontName",false,l);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){if(i.fontSize){k.execCommand("FontSize",false,i.fontSize)}else{f(m.settings.theme_advanced_font_sizes,function(p,o){if(p["class"]){j.push(p["class"])}});k.editorCommands._applyInlineStyle("span",{"class":i["class"]},{check_classes:j})}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",cmd:"FormatBlock"});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;m=j=d.create("span",{id:r.id+"_parent","class":"mceEditor "+r.settings.skin+"Skin"+(w.skin_variant?" "+r.settings.skin+"Skin"+v._ufirst(w.skin_variant):"")});if(!d.boxModel){m=d.add(m,"div",{"class":"mceOldBoxModel"})}m=u=d.add(m,"table",{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=d.stdMode?u.getElementsByTagName("tr"):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;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+"_tbl");this.resizeTo(k.clientWidth+i,k.clientHeight+j)},resizeTo:function(i,l){var j=this.editor,k=this.settings,m=d.get(j.id+"_tbl"),n=d.get(j.id+"_ifr");i=Math.max(k.theme_advanced_resizing_min_width||100,i);l=Math.max(k.theme_advanced_resizing_min_height||100,l);i=Math.min(k.theme_advanced_resizing_max_width||65535,i);l=Math.min(k.theme_advanced_resizing_max_height||65535,l);d.setStyle(m,"height","");d.setStyle(n,"height",l);if(k.theme_advanced_resize_horizontal){d.setStyle(m,"width","");d.setStyle(n,"width",i);if(i<m.clientWidth){d.setStyle(n,"width",m.clientWidth)}}},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(n.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(w,k){var z=this,p,m,r=z.editor,A=z.settings,y,j=r.controlManager,u,l,q=[],x;x=A.theme_advanced_toolbar_align.toLowerCase();x="mce"+z._ufirst(x);l=d.add(d.add(w,"tr"),"td",{"class":"mceToolbar "+x});if(!r.getParam("accessibility_focus")){q.push(d.createHTML("a",{href:"#",onfocus:"tinyMCE.get('"+r.id+"').focus();"},"<!-- IE -->"))}q.push(d.createHTML("a",{href:"#",accesskey:"q",title:r.getLang("advanced.toolbar_focus")},"<!-- IE -->"));for(p=1;(y=A["theme_advanced_buttons"+p]);p++){m=j.createToolbar("toolbar"+p,{"class":"mceToolbarRow"+p});if(A["theme_advanced_buttons"+p+"_add"]){y+=","+A["theme_advanced_buttons"+p+"_add"]}if(A["theme_advanced_buttons"+p+"_add_before"]){y=A["theme_advanced_buttons"+p+"_add_before"]+","+y}z._addControls(y,m);q.push(m.renderHTML());k.deltaHeight-=A.theme_advanced_row_height}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"},w.theme_advanced_path?p.translate("advanced.path")+": ":" ");d.add(k,"a",{href:"#",accesskey:"x"});if(w.theme_advanced_resizing){d.add(l,"a",{id:p.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize"});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","mousedown",function(D){var t,r,s,o,C,z,A,F,n,E,x;function y(G){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);if(w.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+p.id+"_size",{cw:n,ch:E})}}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},_nodeChanged:function(r,z,l,x,j){var C=this,i,y=0,B,u,D=C.settings,A,k,w,m,q;e.each(C.stateControls,function(n){z.setActive(n,r.queryCommandState(C.controls[n][1]))});function o(p){var s,n=j.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]}}}z.setActive("visualaid",r.hasVisual);z.setDisabled("undo",!r.undoManager.hasUndo()&&!r.typing);z.setDisabled("redo",!r.undoManager.hasRedo());z.setDisabled("outdent",!r.queryCommandState("Outdent"));i=o("A");if(u=z.get("link")){if(!i||!i.name){u.setDisabled(!i&&x);u.setActive(!!i)}}if(u=z.get("unlink")){u.setDisabled(!i&&x);u.setActive(!!i&&!i.name)}if(u=z.get("anchor")){u.setActive(!!i&&i.name)}i=o("IMG");if(u=z.get("image")){u.setActive(!!i&&l.className.indexOf("mceItem")==-1)}if(u=z.get("styleselect")){C._importClasses();m=[];f(u.items,function(n){m.push(n.value)});q=r.formatter.matchAll(m);u.select(q[0])}if(u=z.get("formatselect")){i=o(d.isBlock);if(i){u.select(i.nodeName.toLowerCase())}}o(function(p){if(p.nodeName==="SPAN"){if(!A&&p.className){A=p.className}if(!k&&p.style.fontSize){k=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}}return false});if(u=z.get("fontselect")){u.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(u=z.get("fontsizeselect")){if(D.theme_advanced_runtime_fontsize&&!k&&!A){k=r.dom.getStyle(l,"fontSize",true)}u.select(function(n){if(n.fontSize&&n.fontSize===k){return true}if(n["class"]&&n["class"]===A){return true}})}if(D.theme_advanced_path&&D.theme_advanced_statusbar_location){i=d.get(r.id+"_path")||d.add(r.id+"_path_row","span",{id:r.id+"_path"});d.setHTML(i,"");o(function(E){var p=E.nodeName.toLowerCase(),s,v,t="";if(E.nodeType!=1||E.nodeName==="BR"||(d.hasClass(E,"mceItemHidden")||d.hasClass(E,"mceItemRemoved"))){return}if(B=d.getAttrib(E,"mce_name")){p=B}if(e.isIE&&E.scopeName!=="HTML"){p=E.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(B=d.getAttrib(E,"src")){t+="src: "+B+" "}break;case"a":if(B=d.getAttrib(E,"name")){t+="name: "+B+" ";p+="#"+B}if(B=d.getAttrib(E,"href")){t+="href: "+B+" "}break;case"font":if(B=d.getAttrib(E,"face")){t+="font: "+B+" "}if(B=d.getAttrib(E,"size")){t+="size: "+B+" "}if(B=d.getAttrib(E,"color")){t+="color: "+B+" "}break;case"span":if(B=d.getAttrib(E,"style")){t+="style: "+B+" "}break}if(B=d.getAttrib(E,"id")){t+="id: "+B+" "}if(B=E.className){B=B.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(B){t+="class: "+B+" ";if(d.isBlock(E)||p=="img"||p=="span"){p+="."+B}}}p=p.replace(/(html:)/g,"");p={name:p,node:E,title:t};C.onResolveName.dispatch(C,p);t=p.title;p=p.name;v=d.create("a",{href:"javascript:;",onmousedown:"return false;",title:t,"class":"mcePath_"+(y++)},p);if(i.hasChildNodes()){i.insertBefore(d.doc.createTextNode(" \u00bb "),i.firstChild);i.insertBefore(v,i.firstChild)}else{i.appendChild(v)}},r.getBody())}},_sel:function(i){this.editor.execCommand("mceSelectNodeDepth",false,i)},_mceInsertAnchor:function(k,j){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/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:e.baseURL+"/themes/advanced/charmap.htm",width:550+parseInt(i.getLang("advanced.charmap_delta_width",0)),height:250+parseInt(i.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var i=this.editor;i.windowManager.open({url:e.baseURL+"/themes/advanced/about.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:e.baseURL+"/themes/advanced/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:e.baseURL+"/themes/advanced/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:e.baseURL+"/themes/advanced/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:e.baseURL+"/themes/advanced/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));
|
@@ -0,0 +1,1167 @@
|
|
1
|
+
/**
|
2
|
+
* editor_template_src.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function(tinymce) {
|
12
|
+
var DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
|
13
|
+
|
14
|
+
// Tell it to load theme specific language pack(s)
|
15
|
+
tinymce.ThemeManager.requireLangPack('advanced');
|
16
|
+
|
17
|
+
tinymce.create('tinymce.themes.AdvancedTheme', {
|
18
|
+
sizes : [8, 10, 12, 14, 18, 24, 36],
|
19
|
+
|
20
|
+
// Control name lookup, format: title, command
|
21
|
+
controls : {
|
22
|
+
bold : ['bold_desc', 'Bold'],
|
23
|
+
italic : ['italic_desc', 'Italic'],
|
24
|
+
underline : ['underline_desc', 'Underline'],
|
25
|
+
strikethrough : ['striketrough_desc', 'Strikethrough'],
|
26
|
+
justifyleft : ['justifyleft_desc', 'JustifyLeft'],
|
27
|
+
justifycenter : ['justifycenter_desc', 'JustifyCenter'],
|
28
|
+
justifyright : ['justifyright_desc', 'JustifyRight'],
|
29
|
+
justifyfull : ['justifyfull_desc', 'JustifyFull'],
|
30
|
+
bullist : ['bullist_desc', 'InsertUnorderedList'],
|
31
|
+
numlist : ['numlist_desc', 'InsertOrderedList'],
|
32
|
+
outdent : ['outdent_desc', 'Outdent'],
|
33
|
+
indent : ['indent_desc', 'Indent'],
|
34
|
+
cut : ['cut_desc', 'Cut'],
|
35
|
+
copy : ['copy_desc', 'Copy'],
|
36
|
+
paste : ['paste_desc', 'Paste'],
|
37
|
+
undo : ['undo_desc', 'Undo'],
|
38
|
+
redo : ['redo_desc', 'Redo'],
|
39
|
+
link : ['link_desc', 'mceLink'],
|
40
|
+
unlink : ['unlink_desc', 'unlink'],
|
41
|
+
image : ['image_desc', 'mceImage'],
|
42
|
+
cleanup : ['cleanup_desc', 'mceCleanup'],
|
43
|
+
help : ['help_desc', 'mceHelp'],
|
44
|
+
code : ['code_desc', 'mceCodeEditor'],
|
45
|
+
hr : ['hr_desc', 'InsertHorizontalRule'],
|
46
|
+
removeformat : ['removeformat_desc', 'RemoveFormat'],
|
47
|
+
sub : ['sub_desc', 'subscript'],
|
48
|
+
sup : ['sup_desc', 'superscript'],
|
49
|
+
forecolor : ['forecolor_desc', 'ForeColor'],
|
50
|
+
forecolorpicker : ['forecolor_desc', 'mceForeColor'],
|
51
|
+
backcolor : ['backcolor_desc', 'HiliteColor'],
|
52
|
+
backcolorpicker : ['backcolor_desc', 'mceBackColor'],
|
53
|
+
charmap : ['charmap_desc', 'mceCharMap'],
|
54
|
+
visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
|
55
|
+
anchor : ['anchor_desc', 'mceInsertAnchor'],
|
56
|
+
newdocument : ['newdocument_desc', 'mceNewDocument'],
|
57
|
+
blockquote : ['blockquote_desc', 'mceBlockQuote']
|
58
|
+
},
|
59
|
+
|
60
|
+
stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
|
61
|
+
|
62
|
+
init : function(ed, url) {
|
63
|
+
var t = this, s, v, o;
|
64
|
+
|
65
|
+
t.editor = ed;
|
66
|
+
t.url = url;
|
67
|
+
t.onResolveName = new tinymce.util.Dispatcher(this);
|
68
|
+
|
69
|
+
// Default settings
|
70
|
+
t.settings = s = extend({
|
71
|
+
theme_advanced_path : true,
|
72
|
+
theme_advanced_toolbar_location : 'bottom',
|
73
|
+
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
|
74
|
+
theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
|
75
|
+
theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap",
|
76
|
+
theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
|
77
|
+
theme_advanced_toolbar_align : "center",
|
78
|
+
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",
|
79
|
+
theme_advanced_more_colors : 1,
|
80
|
+
theme_advanced_row_height : 23,
|
81
|
+
theme_advanced_resize_horizontal : 1,
|
82
|
+
theme_advanced_resizing_use_cookie : 1,
|
83
|
+
theme_advanced_font_sizes : "1,2,3,4,5,6,7",
|
84
|
+
readonly : ed.settings.readonly
|
85
|
+
}, ed.settings);
|
86
|
+
|
87
|
+
// Setup default font_size_style_values
|
88
|
+
if (!s.font_size_style_values)
|
89
|
+
s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
|
90
|
+
|
91
|
+
if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
|
92
|
+
s.font_size_style_values = tinymce.explode(s.font_size_style_values);
|
93
|
+
s.font_size_classes = tinymce.explode(s.font_size_classes || '');
|
94
|
+
|
95
|
+
// Parse string value
|
96
|
+
o = {};
|
97
|
+
ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
|
98
|
+
each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
|
99
|
+
var cl;
|
100
|
+
|
101
|
+
if (k == v && v >= 1 && v <= 7) {
|
102
|
+
k = v + ' (' + t.sizes[v - 1] + 'pt)';
|
103
|
+
cl = s.font_size_classes[v - 1];
|
104
|
+
v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
|
105
|
+
}
|
106
|
+
|
107
|
+
if (/^\s*\./.test(v))
|
108
|
+
cl = v.replace(/\./g, '');
|
109
|
+
|
110
|
+
o[k] = cl ? {'class' : cl} : {fontSize : v};
|
111
|
+
});
|
112
|
+
|
113
|
+
s.theme_advanced_font_sizes = o;
|
114
|
+
}
|
115
|
+
|
116
|
+
if ((v = s.theme_advanced_path_location) && v != 'none')
|
117
|
+
s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
|
118
|
+
|
119
|
+
if (s.theme_advanced_statusbar_location == 'none')
|
120
|
+
s.theme_advanced_statusbar_location = 0;
|
121
|
+
|
122
|
+
// Init editor
|
123
|
+
ed.onInit.add(function() {
|
124
|
+
if (!ed.settings.readonly)
|
125
|
+
ed.onNodeChange.add(t._nodeChanged, t);
|
126
|
+
|
127
|
+
if (ed.settings.content_css !== false)
|
128
|
+
ed.dom.loadCSS(ed.baseURI.toAbsolute("themes/advanced/skins/" + ed.settings.skin + "/content.css"));
|
129
|
+
});
|
130
|
+
|
131
|
+
ed.onSetProgressState.add(function(ed, b, ti) {
|
132
|
+
var co, id = ed.id, tb;
|
133
|
+
|
134
|
+
if (b) {
|
135
|
+
t.progressTimer = setTimeout(function() {
|
136
|
+
co = ed.getContainer();
|
137
|
+
co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
|
138
|
+
tb = DOM.get(ed.id + '_tbl');
|
139
|
+
|
140
|
+
DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
|
141
|
+
DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
|
142
|
+
}, ti || 0);
|
143
|
+
} else {
|
144
|
+
DOM.remove(id + '_blocker');
|
145
|
+
DOM.remove(id + '_progress');
|
146
|
+
clearTimeout(t.progressTimer);
|
147
|
+
}
|
148
|
+
});
|
149
|
+
|
150
|
+
DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css");
|
151
|
+
|
152
|
+
if (s.skin_variant)
|
153
|
+
DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
|
154
|
+
},
|
155
|
+
|
156
|
+
createControl : function(n, cf) {
|
157
|
+
var cd, c;
|
158
|
+
|
159
|
+
if (c = cf.createControl(n))
|
160
|
+
return c;
|
161
|
+
|
162
|
+
switch (n) {
|
163
|
+
case "styleselect":
|
164
|
+
return this._createStyleSelect();
|
165
|
+
|
166
|
+
case "formatselect":
|
167
|
+
return this._createBlockFormats();
|
168
|
+
|
169
|
+
case "fontselect":
|
170
|
+
return this._createFontSelect();
|
171
|
+
|
172
|
+
case "fontsizeselect":
|
173
|
+
return this._createFontSizeSelect();
|
174
|
+
|
175
|
+
case "forecolor":
|
176
|
+
return this._createForeColorMenu();
|
177
|
+
|
178
|
+
case "backcolor":
|
179
|
+
return this._createBackColorMenu();
|
180
|
+
}
|
181
|
+
|
182
|
+
if ((cd = this.controls[n]))
|
183
|
+
return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
|
184
|
+
},
|
185
|
+
|
186
|
+
execCommand : function(cmd, ui, val) {
|
187
|
+
var f = this['_' + cmd];
|
188
|
+
|
189
|
+
if (f) {
|
190
|
+
f.call(this, ui, val);
|
191
|
+
return true;
|
192
|
+
}
|
193
|
+
|
194
|
+
return false;
|
195
|
+
},
|
196
|
+
|
197
|
+
_importClasses : function(e) {
|
198
|
+
var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
|
199
|
+
|
200
|
+
if (ctrl.getLength() == 0) {
|
201
|
+
each(ed.dom.getClasses(), function(o, idx) {
|
202
|
+
var name = 'style_' + idx;
|
203
|
+
|
204
|
+
ed.formatter.register(name, {
|
205
|
+
inline : 'span',
|
206
|
+
classes : o['class'],
|
207
|
+
selector : '*'
|
208
|
+
});
|
209
|
+
|
210
|
+
ctrl.add(o['class'], name);
|
211
|
+
});
|
212
|
+
}
|
213
|
+
},
|
214
|
+
|
215
|
+
_createStyleSelect : function(n) {
|
216
|
+
var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
|
217
|
+
|
218
|
+
// Setup style select box
|
219
|
+
ctrl = ctrlMan.createListBox('styleselect', {
|
220
|
+
title : 'advanced.style_select',
|
221
|
+
onselect : function(name) {
|
222
|
+
ed.execCommand('mceToggleFormat', false, name);
|
223
|
+
|
224
|
+
return false; // No auto select
|
225
|
+
}
|
226
|
+
});
|
227
|
+
|
228
|
+
// Handle specified format
|
229
|
+
ed.onInit.add(function() {
|
230
|
+
var counter = 0, formats = ed.getParam('style_formats');
|
231
|
+
|
232
|
+
if (formats) {
|
233
|
+
each(formats, function(fmt) {
|
234
|
+
var name, keys = 0;
|
235
|
+
|
236
|
+
each(fmt, function() {keys++;});
|
237
|
+
|
238
|
+
if (keys > 1) {
|
239
|
+
name = fmt.name = fmt.name || 'style_' + (counter++);
|
240
|
+
ed.formatter.register(name, fmt);
|
241
|
+
ctrl.add(fmt.title, name);
|
242
|
+
} else
|
243
|
+
ctrl.add(fmt.title);
|
244
|
+
});
|
245
|
+
} else {
|
246
|
+
each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
|
247
|
+
var name;
|
248
|
+
|
249
|
+
if (val) {
|
250
|
+
name = 'style_' + (counter++);
|
251
|
+
|
252
|
+
ed.formatter.register(name, {
|
253
|
+
inline : 'span',
|
254
|
+
classes : val
|
255
|
+
});
|
256
|
+
|
257
|
+
ctrl.add(t.editor.translate(key), name);
|
258
|
+
}
|
259
|
+
});
|
260
|
+
}
|
261
|
+
});
|
262
|
+
|
263
|
+
// Auto import classes if the ctrl box is empty
|
264
|
+
if (ctrl.getLength() == 0) {
|
265
|
+
ctrl.onPostRender.add(function(ed, n) {
|
266
|
+
if (!ctrl.NativeListBox) {
|
267
|
+
Event.add(n.id + '_text', 'focus', t._importClasses, t);
|
268
|
+
Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
|
269
|
+
Event.add(n.id + '_open', 'focus', t._importClasses, t);
|
270
|
+
Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
|
271
|
+
} else
|
272
|
+
Event.add(n.id, 'focus', t._importClasses, t);
|
273
|
+
});
|
274
|
+
}
|
275
|
+
|
276
|
+
return ctrl;
|
277
|
+
},
|
278
|
+
|
279
|
+
_createFontSelect : function() {
|
280
|
+
var c, t = this, ed = t.editor;
|
281
|
+
|
282
|
+
c = ed.controlManager.createListBox('fontselect', {
|
283
|
+
title : 'advanced.fontdefault',
|
284
|
+
onselect : function(v) {
|
285
|
+
ed.execCommand('FontName', false, v);
|
286
|
+
return false; // No auto select
|
287
|
+
}
|
288
|
+
});
|
289
|
+
|
290
|
+
if (c) {
|
291
|
+
each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
|
292
|
+
c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
|
293
|
+
});
|
294
|
+
}
|
295
|
+
|
296
|
+
return c;
|
297
|
+
},
|
298
|
+
|
299
|
+
_createFontSizeSelect : function() {
|
300
|
+
var t = this, ed = t.editor, c, i = 0, cl = [];
|
301
|
+
|
302
|
+
c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
|
303
|
+
if (v.fontSize)
|
304
|
+
ed.execCommand('FontSize', false, v.fontSize);
|
305
|
+
else {
|
306
|
+
each(t.settings.theme_advanced_font_sizes, function(v, k) {
|
307
|
+
if (v['class'])
|
308
|
+
cl.push(v['class']);
|
309
|
+
});
|
310
|
+
|
311
|
+
ed.editorCommands._applyInlineStyle('span', {'class' : v['class']}, {check_classes : cl});
|
312
|
+
}
|
313
|
+
|
314
|
+
return false; // No auto select
|
315
|
+
}});
|
316
|
+
|
317
|
+
if (c) {
|
318
|
+
each(t.settings.theme_advanced_font_sizes, function(v, k) {
|
319
|
+
var fz = v.fontSize;
|
320
|
+
|
321
|
+
if (fz >= 1 && fz <= 7)
|
322
|
+
fz = t.sizes[parseInt(fz) - 1] + 'pt';
|
323
|
+
|
324
|
+
c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
|
325
|
+
});
|
326
|
+
}
|
327
|
+
|
328
|
+
return c;
|
329
|
+
},
|
330
|
+
|
331
|
+
_createBlockFormats : function() {
|
332
|
+
var c, fmts = {
|
333
|
+
p : 'advanced.paragraph',
|
334
|
+
address : 'advanced.address',
|
335
|
+
pre : 'advanced.pre',
|
336
|
+
h1 : 'advanced.h1',
|
337
|
+
h2 : 'advanced.h2',
|
338
|
+
h3 : 'advanced.h3',
|
339
|
+
h4 : 'advanced.h4',
|
340
|
+
h5 : 'advanced.h5',
|
341
|
+
h6 : 'advanced.h6',
|
342
|
+
div : 'advanced.div',
|
343
|
+
blockquote : 'advanced.blockquote',
|
344
|
+
code : 'advanced.code',
|
345
|
+
dt : 'advanced.dt',
|
346
|
+
dd : 'advanced.dd',
|
347
|
+
samp : 'advanced.samp'
|
348
|
+
}, t = this;
|
349
|
+
|
350
|
+
c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', cmd : 'FormatBlock'});
|
351
|
+
if (c) {
|
352
|
+
each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
|
353
|
+
c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v});
|
354
|
+
});
|
355
|
+
}
|
356
|
+
|
357
|
+
return c;
|
358
|
+
},
|
359
|
+
|
360
|
+
_createForeColorMenu : function() {
|
361
|
+
var c, t = this, s = t.settings, o = {}, v;
|
362
|
+
|
363
|
+
if (s.theme_advanced_more_colors) {
|
364
|
+
o.more_colors_func = function() {
|
365
|
+
t._mceColorPicker(0, {
|
366
|
+
color : c.value,
|
367
|
+
func : function(co) {
|
368
|
+
c.setColor(co);
|
369
|
+
}
|
370
|
+
});
|
371
|
+
};
|
372
|
+
}
|
373
|
+
|
374
|
+
if (v = s.theme_advanced_text_colors)
|
375
|
+
o.colors = v;
|
376
|
+
|
377
|
+
if (s.theme_advanced_default_foreground_color)
|
378
|
+
o.default_color = s.theme_advanced_default_foreground_color;
|
379
|
+
|
380
|
+
o.title = 'advanced.forecolor_desc';
|
381
|
+
o.cmd = 'ForeColor';
|
382
|
+
o.scope = this;
|
383
|
+
|
384
|
+
c = t.editor.controlManager.createColorSplitButton('forecolor', o);
|
385
|
+
|
386
|
+
return c;
|
387
|
+
},
|
388
|
+
|
389
|
+
_createBackColorMenu : function() {
|
390
|
+
var c, t = this, s = t.settings, o = {}, v;
|
391
|
+
|
392
|
+
if (s.theme_advanced_more_colors) {
|
393
|
+
o.more_colors_func = function() {
|
394
|
+
t._mceColorPicker(0, {
|
395
|
+
color : c.value,
|
396
|
+
func : function(co) {
|
397
|
+
c.setColor(co);
|
398
|
+
}
|
399
|
+
});
|
400
|
+
};
|
401
|
+
}
|
402
|
+
|
403
|
+
if (v = s.theme_advanced_background_colors)
|
404
|
+
o.colors = v;
|
405
|
+
|
406
|
+
if (s.theme_advanced_default_background_color)
|
407
|
+
o.default_color = s.theme_advanced_default_background_color;
|
408
|
+
|
409
|
+
o.title = 'advanced.backcolor_desc';
|
410
|
+
o.cmd = 'HiliteColor';
|
411
|
+
o.scope = this;
|
412
|
+
|
413
|
+
c = t.editor.controlManager.createColorSplitButton('backcolor', o);
|
414
|
+
|
415
|
+
return c;
|
416
|
+
},
|
417
|
+
|
418
|
+
renderUI : function(o) {
|
419
|
+
var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
|
420
|
+
|
421
|
+
n = p = DOM.create('span', {id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '')});
|
422
|
+
|
423
|
+
if (!DOM.boxModel)
|
424
|
+
n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
|
425
|
+
|
426
|
+
n = sc = DOM.add(n, 'table', {id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
|
427
|
+
n = tb = DOM.add(n, 'tbody');
|
428
|
+
|
429
|
+
switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
|
430
|
+
case "rowlayout":
|
431
|
+
ic = t._rowLayout(s, tb, o);
|
432
|
+
break;
|
433
|
+
|
434
|
+
case "customlayout":
|
435
|
+
ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
|
436
|
+
break;
|
437
|
+
|
438
|
+
default:
|
439
|
+
ic = t._simpleLayout(s, tb, o, p);
|
440
|
+
}
|
441
|
+
|
442
|
+
n = o.targetNode;
|
443
|
+
|
444
|
+
// Add classes to first and last TRs
|
445
|
+
nl = DOM.stdMode ? sc.getElementsByTagName('tr') : sc.rows; // Quick fix for IE 8
|
446
|
+
DOM.addClass(nl[0], 'mceFirst');
|
447
|
+
DOM.addClass(nl[nl.length - 1], 'mceLast');
|
448
|
+
|
449
|
+
// Add classes to first and last TDs
|
450
|
+
each(DOM.select('tr', tb), function(n) {
|
451
|
+
DOM.addClass(n.firstChild, 'mceFirst');
|
452
|
+
DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
|
453
|
+
});
|
454
|
+
|
455
|
+
if (DOM.get(s.theme_advanced_toolbar_container))
|
456
|
+
DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
|
457
|
+
else
|
458
|
+
DOM.insertAfter(p, n);
|
459
|
+
|
460
|
+
Event.add(ed.id + '_path_row', 'click', function(e) {
|
461
|
+
e = e.target;
|
462
|
+
|
463
|
+
if (e.nodeName == 'A') {
|
464
|
+
t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
|
465
|
+
|
466
|
+
return Event.cancel(e);
|
467
|
+
}
|
468
|
+
});
|
469
|
+
/*
|
470
|
+
if (DOM.get(ed.id + '_path_row')) {
|
471
|
+
Event.add(ed.id + '_tbl', 'mouseover', function(e) {
|
472
|
+
var re;
|
473
|
+
|
474
|
+
e = e.target;
|
475
|
+
|
476
|
+
if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
|
477
|
+
re = DOM.get(ed.id + '_path_row');
|
478
|
+
t.lastPath = re.innerHTML;
|
479
|
+
DOM.setHTML(re, e.parentNode.title);
|
480
|
+
}
|
481
|
+
});
|
482
|
+
|
483
|
+
Event.add(ed.id + '_tbl', 'mouseout', function(e) {
|
484
|
+
if (t.lastPath) {
|
485
|
+
DOM.setHTML(ed.id + '_path_row', t.lastPath);
|
486
|
+
t.lastPath = 0;
|
487
|
+
}
|
488
|
+
});
|
489
|
+
}
|
490
|
+
*/
|
491
|
+
|
492
|
+
if (!ed.getParam('accessibility_focus'))
|
493
|
+
Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
|
494
|
+
|
495
|
+
if (s.theme_advanced_toolbar_location == 'external')
|
496
|
+
o.deltaHeight = 0;
|
497
|
+
|
498
|
+
t.deltaHeight = o.deltaHeight;
|
499
|
+
o.targetNode = null;
|
500
|
+
|
501
|
+
return {
|
502
|
+
iframeContainer : ic,
|
503
|
+
editorContainer : ed.id + '_parent',
|
504
|
+
sizeContainer : sc,
|
505
|
+
deltaHeight : o.deltaHeight
|
506
|
+
};
|
507
|
+
},
|
508
|
+
|
509
|
+
getInfo : function() {
|
510
|
+
return {
|
511
|
+
longname : 'Advanced theme',
|
512
|
+
author : 'Moxiecode Systems AB',
|
513
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
514
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
515
|
+
}
|
516
|
+
},
|
517
|
+
|
518
|
+
resizeBy : function(dw, dh) {
|
519
|
+
var e = DOM.get(this.editor.id + '_tbl');
|
520
|
+
|
521
|
+
this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
|
522
|
+
},
|
523
|
+
|
524
|
+
resizeTo : function(w, h) {
|
525
|
+
var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
|
526
|
+
|
527
|
+
// Boundery fix box
|
528
|
+
w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
|
529
|
+
h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
|
530
|
+
w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
|
531
|
+
h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
|
532
|
+
|
533
|
+
// Resize iframe and container
|
534
|
+
DOM.setStyle(e, 'height', '');
|
535
|
+
DOM.setStyle(ifr, 'height', h);
|
536
|
+
|
537
|
+
if (s.theme_advanced_resize_horizontal) {
|
538
|
+
DOM.setStyle(e, 'width', '');
|
539
|
+
DOM.setStyle(ifr, 'width', w);
|
540
|
+
|
541
|
+
// Make sure that the size is never smaller than the over all ui
|
542
|
+
if (w < e.clientWidth)
|
543
|
+
DOM.setStyle(ifr, 'width', e.clientWidth);
|
544
|
+
}
|
545
|
+
},
|
546
|
+
|
547
|
+
destroy : function() {
|
548
|
+
var id = this.editor.id;
|
549
|
+
|
550
|
+
Event.clear(id + '_resize');
|
551
|
+
Event.clear(id + '_path_row');
|
552
|
+
Event.clear(id + '_external_close');
|
553
|
+
},
|
554
|
+
|
555
|
+
// Internal functions
|
556
|
+
|
557
|
+
_simpleLayout : function(s, tb, o, p) {
|
558
|
+
var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
|
559
|
+
|
560
|
+
if (s.readonly) {
|
561
|
+
n = DOM.add(tb, 'tr');
|
562
|
+
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
563
|
+
return ic;
|
564
|
+
}
|
565
|
+
|
566
|
+
// Create toolbar container at top
|
567
|
+
if (lo == 'top')
|
568
|
+
t._addToolbars(tb, o);
|
569
|
+
|
570
|
+
// Create external toolbar
|
571
|
+
if (lo == 'external') {
|
572
|
+
n = c = DOM.create('div', {style : 'position:relative'});
|
573
|
+
n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
|
574
|
+
DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
|
575
|
+
n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
|
576
|
+
etb = DOM.add(n, 'tbody');
|
577
|
+
|
578
|
+
if (p.firstChild.className == 'mceOldBoxModel')
|
579
|
+
p.firstChild.appendChild(c);
|
580
|
+
else
|
581
|
+
p.insertBefore(c, p.firstChild);
|
582
|
+
|
583
|
+
t._addToolbars(etb, o);
|
584
|
+
|
585
|
+
ed.onMouseUp.add(function() {
|
586
|
+
var e = DOM.get(ed.id + '_external');
|
587
|
+
DOM.show(e);
|
588
|
+
|
589
|
+
DOM.hide(lastExtID);
|
590
|
+
|
591
|
+
var f = Event.add(ed.id + '_external_close', 'click', function() {
|
592
|
+
DOM.hide(ed.id + '_external');
|
593
|
+
Event.remove(ed.id + '_external_close', 'click', f);
|
594
|
+
});
|
595
|
+
|
596
|
+
DOM.show(e);
|
597
|
+
DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
|
598
|
+
|
599
|
+
// Fixes IE rendering bug
|
600
|
+
DOM.hide(e);
|
601
|
+
DOM.show(e);
|
602
|
+
e.style.filter = '';
|
603
|
+
|
604
|
+
lastExtID = ed.id + '_external';
|
605
|
+
|
606
|
+
e = null;
|
607
|
+
});
|
608
|
+
}
|
609
|
+
|
610
|
+
if (sl == 'top')
|
611
|
+
t._addStatusBar(tb, o);
|
612
|
+
|
613
|
+
// Create iframe container
|
614
|
+
if (!s.theme_advanced_toolbar_container) {
|
615
|
+
n = DOM.add(tb, 'tr');
|
616
|
+
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
617
|
+
}
|
618
|
+
|
619
|
+
// Create toolbar container at bottom
|
620
|
+
if (lo == 'bottom')
|
621
|
+
t._addToolbars(tb, o);
|
622
|
+
|
623
|
+
if (sl == 'bottom')
|
624
|
+
t._addStatusBar(tb, o);
|
625
|
+
|
626
|
+
return ic;
|
627
|
+
},
|
628
|
+
|
629
|
+
_rowLayout : function(s, tb, o) {
|
630
|
+
var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
|
631
|
+
|
632
|
+
dc = s.theme_advanced_containers_default_class || '';
|
633
|
+
da = s.theme_advanced_containers_default_align || 'center';
|
634
|
+
|
635
|
+
each(explode(s.theme_advanced_containers || ''), function(c, i) {
|
636
|
+
var v = s['theme_advanced_container_' + c] || '';
|
637
|
+
|
638
|
+
switch (v.toLowerCase()) {
|
639
|
+
case 'mceeditor':
|
640
|
+
n = DOM.add(tb, 'tr');
|
641
|
+
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
642
|
+
break;
|
643
|
+
|
644
|
+
case 'mceelementpath':
|
645
|
+
t._addStatusBar(tb, o);
|
646
|
+
break;
|
647
|
+
|
648
|
+
default:
|
649
|
+
a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
|
650
|
+
a = 'mce' + t._ufirst(a);
|
651
|
+
|
652
|
+
n = DOM.add(DOM.add(tb, 'tr'), 'td', {
|
653
|
+
'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
|
654
|
+
});
|
655
|
+
|
656
|
+
to = cf.createToolbar("toolbar" + i);
|
657
|
+
t._addControls(v, to);
|
658
|
+
DOM.setHTML(n, to.renderHTML());
|
659
|
+
o.deltaHeight -= s.theme_advanced_row_height;
|
660
|
+
}
|
661
|
+
});
|
662
|
+
|
663
|
+
return ic;
|
664
|
+
},
|
665
|
+
|
666
|
+
_addControls : function(v, tb) {
|
667
|
+
var t = this, s = t.settings, di, cf = t.editor.controlManager;
|
668
|
+
|
669
|
+
if (s.theme_advanced_disable && !t._disabled) {
|
670
|
+
di = {};
|
671
|
+
|
672
|
+
each(explode(s.theme_advanced_disable), function(v) {
|
673
|
+
di[v] = 1;
|
674
|
+
});
|
675
|
+
|
676
|
+
t._disabled = di;
|
677
|
+
} else
|
678
|
+
di = t._disabled;
|
679
|
+
|
680
|
+
each(explode(v), function(n) {
|
681
|
+
var c;
|
682
|
+
|
683
|
+
if (di && di[n])
|
684
|
+
return;
|
685
|
+
|
686
|
+
// Compatiblity with 2.x
|
687
|
+
if (n == 'tablecontrols') {
|
688
|
+
each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
|
689
|
+
n = t.createControl(n, cf);
|
690
|
+
|
691
|
+
if (n)
|
692
|
+
tb.add(n);
|
693
|
+
});
|
694
|
+
|
695
|
+
return;
|
696
|
+
}
|
697
|
+
|
698
|
+
c = t.createControl(n, cf);
|
699
|
+
|
700
|
+
if (c)
|
701
|
+
tb.add(c);
|
702
|
+
});
|
703
|
+
},
|
704
|
+
|
705
|
+
_addToolbars : function(c, o) {
|
706
|
+
var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a;
|
707
|
+
|
708
|
+
a = s.theme_advanced_toolbar_align.toLowerCase();
|
709
|
+
a = 'mce' + t._ufirst(a);
|
710
|
+
|
711
|
+
n = DOM.add(DOM.add(c, 'tr'), 'td', {'class' : 'mceToolbar ' + a});
|
712
|
+
|
713
|
+
if (!ed.getParam('accessibility_focus'))
|
714
|
+
h.push(DOM.createHTML('a', {href : '#', onfocus : 'tinyMCE.get(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
|
715
|
+
|
716
|
+
h.push(DOM.createHTML('a', {href : '#', accesskey : 'q', title : ed.getLang("advanced.toolbar_focus")}, '<!-- IE -->'));
|
717
|
+
|
718
|
+
// Create toolbar and add the controls
|
719
|
+
for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
|
720
|
+
tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i});
|
721
|
+
|
722
|
+
if (s['theme_advanced_buttons' + i + '_add'])
|
723
|
+
v += ',' + s['theme_advanced_buttons' + i + '_add'];
|
724
|
+
|
725
|
+
if (s['theme_advanced_buttons' + i + '_add_before'])
|
726
|
+
v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
|
727
|
+
|
728
|
+
t._addControls(v, tb);
|
729
|
+
|
730
|
+
//n.appendChild(n = tb.render());
|
731
|
+
h.push(tb.renderHTML());
|
732
|
+
|
733
|
+
o.deltaHeight -= s.theme_advanced_row_height;
|
734
|
+
}
|
735
|
+
|
736
|
+
h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
|
737
|
+
DOM.setHTML(n, h.join(''));
|
738
|
+
},
|
739
|
+
|
740
|
+
_addStatusBar : function(tb, o) {
|
741
|
+
var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
|
742
|
+
|
743
|
+
n = DOM.add(tb, 'tr');
|
744
|
+
n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
|
745
|
+
n = DOM.add(n, 'div', {id : ed.id + '_path_row'}, s.theme_advanced_path ? ed.translate('advanced.path') + ': ' : ' ');
|
746
|
+
DOM.add(n, 'a', {href : '#', accesskey : 'x'});
|
747
|
+
|
748
|
+
if (s.theme_advanced_resizing) {
|
749
|
+
DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize'});
|
750
|
+
|
751
|
+
if (s.theme_advanced_resizing_use_cookie) {
|
752
|
+
ed.onPostRender.add(function() {
|
753
|
+
var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
|
754
|
+
|
755
|
+
if (!o)
|
756
|
+
return;
|
757
|
+
|
758
|
+
t.resizeTo(o.cw, o.ch);
|
759
|
+
});
|
760
|
+
}
|
761
|
+
|
762
|
+
ed.onPostRender.add(function() {
|
763
|
+
Event.add(ed.id + '_resize', 'mousedown', function(e) {
|
764
|
+
var mouseMoveHandler1, mouseMoveHandler2,
|
765
|
+
mouseUpHandler1, mouseUpHandler2,
|
766
|
+
startX, startY, startWidth, startHeight, width, height, ifrElm;
|
767
|
+
|
768
|
+
function resizeOnMove(e) {
|
769
|
+
width = startWidth + (e.screenX - startX);
|
770
|
+
height = startHeight + (e.screenY - startY);
|
771
|
+
|
772
|
+
t.resizeTo(width, height);
|
773
|
+
};
|
774
|
+
|
775
|
+
function endResize(e) {
|
776
|
+
// Stop listening
|
777
|
+
Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
|
778
|
+
Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
|
779
|
+
Event.remove(DOM.doc, 'mouseup', mouseUpHandler1);
|
780
|
+
Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);
|
781
|
+
|
782
|
+
// Store away the size
|
783
|
+
if (s.theme_advanced_resizing_use_cookie) {
|
784
|
+
Cookie.setHash("TinyMCE_" + ed.id + "_size", {
|
785
|
+
cw : width,
|
786
|
+
ch : height
|
787
|
+
});
|
788
|
+
}
|
789
|
+
};
|
790
|
+
|
791
|
+
e.preventDefault();
|
792
|
+
|
793
|
+
// Get the current rect size
|
794
|
+
startX = e.screenX;
|
795
|
+
startY = e.screenY;
|
796
|
+
ifrElm = DOM.get(t.editor.id + '_ifr');
|
797
|
+
startWidth = width = ifrElm.clientWidth;
|
798
|
+
startHeight = height = ifrElm.clientHeight;
|
799
|
+
|
800
|
+
// Register envent handlers
|
801
|
+
mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
|
802
|
+
mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
|
803
|
+
mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);
|
804
|
+
mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);
|
805
|
+
});
|
806
|
+
});
|
807
|
+
}
|
808
|
+
|
809
|
+
o.deltaHeight -= 21;
|
810
|
+
n = tb = null;
|
811
|
+
},
|
812
|
+
|
813
|
+
_nodeChanged : function(ed, cm, n, co, ob) {
|
814
|
+
var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, formatNames, matches;
|
815
|
+
|
816
|
+
tinymce.each(t.stateControls, function(c) {
|
817
|
+
cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
|
818
|
+
});
|
819
|
+
|
820
|
+
function getParent(name) {
|
821
|
+
var i, parents = ob.parents, func = name;
|
822
|
+
|
823
|
+
if (typeof(name) == 'string') {
|
824
|
+
func = function(node) {
|
825
|
+
return node.nodeName == name;
|
826
|
+
};
|
827
|
+
}
|
828
|
+
|
829
|
+
for (i = 0; i < parents.length; i++) {
|
830
|
+
if (func(parents[i]))
|
831
|
+
return parents[i];
|
832
|
+
}
|
833
|
+
};
|
834
|
+
|
835
|
+
cm.setActive('visualaid', ed.hasVisual);
|
836
|
+
cm.setDisabled('undo', !ed.undoManager.hasUndo() && !ed.typing);
|
837
|
+
cm.setDisabled('redo', !ed.undoManager.hasRedo());
|
838
|
+
cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
|
839
|
+
|
840
|
+
p = getParent('A');
|
841
|
+
if (c = cm.get('link')) {
|
842
|
+
if (!p || !p.name) {
|
843
|
+
c.setDisabled(!p && co);
|
844
|
+
c.setActive(!!p);
|
845
|
+
}
|
846
|
+
}
|
847
|
+
|
848
|
+
if (c = cm.get('unlink')) {
|
849
|
+
c.setDisabled(!p && co);
|
850
|
+
c.setActive(!!p && !p.name);
|
851
|
+
}
|
852
|
+
|
853
|
+
if (c = cm.get('anchor')) {
|
854
|
+
c.setActive(!!p && p.name);
|
855
|
+
}
|
856
|
+
|
857
|
+
p = getParent('IMG');
|
858
|
+
if (c = cm.get('image'))
|
859
|
+
c.setActive(!!p && n.className.indexOf('mceItem') == -1);
|
860
|
+
|
861
|
+
if (c = cm.get('styleselect')) {
|
862
|
+
t._importClasses();
|
863
|
+
|
864
|
+
formatNames = [];
|
865
|
+
each(c.items, function(item) {
|
866
|
+
formatNames.push(item.value);
|
867
|
+
});
|
868
|
+
|
869
|
+
matches = ed.formatter.matchAll(formatNames);
|
870
|
+
c.select(matches[0]);
|
871
|
+
}
|
872
|
+
|
873
|
+
if (c = cm.get('formatselect')) {
|
874
|
+
p = getParent(DOM.isBlock);
|
875
|
+
|
876
|
+
if (p)
|
877
|
+
c.select(p.nodeName.toLowerCase());
|
878
|
+
}
|
879
|
+
|
880
|
+
// Find out current fontSize, fontFamily and fontClass
|
881
|
+
getParent(function(n) {
|
882
|
+
if (n.nodeName === 'SPAN') {
|
883
|
+
if (!cl && n.className)
|
884
|
+
cl = n.className;
|
885
|
+
|
886
|
+
if (!fz && n.style.fontSize)
|
887
|
+
fz = n.style.fontSize;
|
888
|
+
|
889
|
+
if (!fn && n.style.fontFamily)
|
890
|
+
fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
|
891
|
+
}
|
892
|
+
|
893
|
+
return false;
|
894
|
+
});
|
895
|
+
|
896
|
+
if (c = cm.get('fontselect')) {
|
897
|
+
c.select(function(v) {
|
898
|
+
return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
|
899
|
+
});
|
900
|
+
}
|
901
|
+
|
902
|
+
// Select font size
|
903
|
+
if (c = cm.get('fontsizeselect')) {
|
904
|
+
// Use computed style
|
905
|
+
if (s.theme_advanced_runtime_fontsize && !fz && !cl)
|
906
|
+
fz = ed.dom.getStyle(n, 'fontSize', true);
|
907
|
+
|
908
|
+
c.select(function(v) {
|
909
|
+
if (v.fontSize && v.fontSize === fz)
|
910
|
+
return true;
|
911
|
+
|
912
|
+
if (v['class'] && v['class'] === cl)
|
913
|
+
return true;
|
914
|
+
});
|
915
|
+
}
|
916
|
+
|
917
|
+
if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
|
918
|
+
p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
|
919
|
+
DOM.setHTML(p, '');
|
920
|
+
|
921
|
+
getParent(function(n) {
|
922
|
+
var na = n.nodeName.toLowerCase(), u, pi, ti = '';
|
923
|
+
|
924
|
+
/*if (n.getAttribute('_mce_bogus'))
|
925
|
+
return;
|
926
|
+
*/
|
927
|
+
// Ignore non element and hidden elements
|
928
|
+
if (n.nodeType != 1 || n.nodeName === 'BR' || (DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved')))
|
929
|
+
return;
|
930
|
+
|
931
|
+
// Fake name
|
932
|
+
if (v = DOM.getAttrib(n, 'mce_name'))
|
933
|
+
na = v;
|
934
|
+
|
935
|
+
// Handle prefix
|
936
|
+
if (tinymce.isIE && n.scopeName !== 'HTML')
|
937
|
+
na = n.scopeName + ':' + na;
|
938
|
+
|
939
|
+
// Remove internal prefix
|
940
|
+
na = na.replace(/mce\:/g, '');
|
941
|
+
|
942
|
+
// Handle node name
|
943
|
+
switch (na) {
|
944
|
+
case 'b':
|
945
|
+
na = 'strong';
|
946
|
+
break;
|
947
|
+
|
948
|
+
case 'i':
|
949
|
+
na = 'em';
|
950
|
+
break;
|
951
|
+
|
952
|
+
case 'img':
|
953
|
+
if (v = DOM.getAttrib(n, 'src'))
|
954
|
+
ti += 'src: ' + v + ' ';
|
955
|
+
|
956
|
+
break;
|
957
|
+
|
958
|
+
case 'a':
|
959
|
+
if (v = DOM.getAttrib(n, 'name')) {
|
960
|
+
ti += 'name: ' + v + ' ';
|
961
|
+
na += '#' + v;
|
962
|
+
}
|
963
|
+
|
964
|
+
if (v = DOM.getAttrib(n, 'href'))
|
965
|
+
ti += 'href: ' + v + ' ';
|
966
|
+
|
967
|
+
break;
|
968
|
+
|
969
|
+
case 'font':
|
970
|
+
if (v = DOM.getAttrib(n, 'face'))
|
971
|
+
ti += 'font: ' + v + ' ';
|
972
|
+
|
973
|
+
if (v = DOM.getAttrib(n, 'size'))
|
974
|
+
ti += 'size: ' + v + ' ';
|
975
|
+
|
976
|
+
if (v = DOM.getAttrib(n, 'color'))
|
977
|
+
ti += 'color: ' + v + ' ';
|
978
|
+
|
979
|
+
break;
|
980
|
+
|
981
|
+
case 'span':
|
982
|
+
if (v = DOM.getAttrib(n, 'style'))
|
983
|
+
ti += 'style: ' + v + ' ';
|
984
|
+
|
985
|
+
break;
|
986
|
+
}
|
987
|
+
|
988
|
+
if (v = DOM.getAttrib(n, 'id'))
|
989
|
+
ti += 'id: ' + v + ' ';
|
990
|
+
|
991
|
+
if (v = n.className) {
|
992
|
+
v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '')
|
993
|
+
|
994
|
+
if (v) {
|
995
|
+
ti += 'class: ' + v + ' ';
|
996
|
+
|
997
|
+
if (DOM.isBlock(n) || na == 'img' || na == 'span')
|
998
|
+
na += '.' + v;
|
999
|
+
}
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
na = na.replace(/(html:)/g, '');
|
1003
|
+
na = {name : na, node : n, title : ti};
|
1004
|
+
t.onResolveName.dispatch(t, na);
|
1005
|
+
ti = na.title;
|
1006
|
+
na = na.name;
|
1007
|
+
|
1008
|
+
//u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
|
1009
|
+
pi = DOM.create('a', {'href' : "javascript:;", onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na);
|
1010
|
+
|
1011
|
+
if (p.hasChildNodes()) {
|
1012
|
+
p.insertBefore(DOM.doc.createTextNode(' \u00bb '), p.firstChild);
|
1013
|
+
p.insertBefore(pi, p.firstChild);
|
1014
|
+
} else
|
1015
|
+
p.appendChild(pi);
|
1016
|
+
}, ed.getBody());
|
1017
|
+
}
|
1018
|
+
},
|
1019
|
+
|
1020
|
+
// Commands gets called by execCommand
|
1021
|
+
|
1022
|
+
_sel : function(v) {
|
1023
|
+
this.editor.execCommand('mceSelectNodeDepth', false, v);
|
1024
|
+
},
|
1025
|
+
|
1026
|
+
_mceInsertAnchor : function(ui, v) {
|
1027
|
+
var ed = this.editor;
|
1028
|
+
|
1029
|
+
ed.windowManager.open({
|
1030
|
+
url : tinymce.baseURL + '/themes/advanced/anchor.htm',
|
1031
|
+
width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
|
1032
|
+
height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
|
1033
|
+
inline : true
|
1034
|
+
}, {
|
1035
|
+
theme_url : this.url
|
1036
|
+
});
|
1037
|
+
},
|
1038
|
+
|
1039
|
+
_mceCharMap : function() {
|
1040
|
+
var ed = this.editor;
|
1041
|
+
|
1042
|
+
ed.windowManager.open({
|
1043
|
+
url : tinymce.baseURL + '/themes/advanced/charmap.htm',
|
1044
|
+
width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
|
1045
|
+
height : 250 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
|
1046
|
+
inline : true
|
1047
|
+
}, {
|
1048
|
+
theme_url : this.url
|
1049
|
+
});
|
1050
|
+
},
|
1051
|
+
|
1052
|
+
_mceHelp : function() {
|
1053
|
+
var ed = this.editor;
|
1054
|
+
|
1055
|
+
ed.windowManager.open({
|
1056
|
+
url : tinymce.baseURL + '/themes/advanced/about.htm',
|
1057
|
+
width : 480,
|
1058
|
+
height : 380,
|
1059
|
+
inline : true
|
1060
|
+
}, {
|
1061
|
+
theme_url : this.url
|
1062
|
+
});
|
1063
|
+
},
|
1064
|
+
|
1065
|
+
_mceColorPicker : function(u, v) {
|
1066
|
+
var ed = this.editor;
|
1067
|
+
|
1068
|
+
v = v || {};
|
1069
|
+
|
1070
|
+
ed.windowManager.open({
|
1071
|
+
url : tinymce.baseURL + '/themes/advanced/color_picker.htm',
|
1072
|
+
width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
|
1073
|
+
height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
|
1074
|
+
close_previous : false,
|
1075
|
+
inline : true
|
1076
|
+
}, {
|
1077
|
+
input_color : v.color,
|
1078
|
+
func : v.func,
|
1079
|
+
theme_url : this.url
|
1080
|
+
});
|
1081
|
+
},
|
1082
|
+
|
1083
|
+
_mceCodeEditor : function(ui, val) {
|
1084
|
+
var ed = this.editor;
|
1085
|
+
|
1086
|
+
ed.windowManager.open({
|
1087
|
+
url : tinymce.baseURL + '/themes/advanced/source_editor.htm',
|
1088
|
+
width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
|
1089
|
+
height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
|
1090
|
+
inline : true,
|
1091
|
+
resizable : true,
|
1092
|
+
maximizable : true
|
1093
|
+
}, {
|
1094
|
+
theme_url : this.url
|
1095
|
+
});
|
1096
|
+
},
|
1097
|
+
|
1098
|
+
_mceImage : function(ui, val) {
|
1099
|
+
var ed = this.editor;
|
1100
|
+
|
1101
|
+
// Internal image object like a flash placeholder
|
1102
|
+
if (ed.dom.getAttrib(ed.selection.getNode(), 'class').indexOf('mceItem') != -1)
|
1103
|
+
return;
|
1104
|
+
|
1105
|
+
ed.windowManager.open({
|
1106
|
+
url : tinymce.baseURL + '/themes/advanced/image.htm',
|
1107
|
+
width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
|
1108
|
+
height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
|
1109
|
+
inline : true
|
1110
|
+
}, {
|
1111
|
+
theme_url : this.url
|
1112
|
+
});
|
1113
|
+
},
|
1114
|
+
|
1115
|
+
_mceLink : function(ui, val) {
|
1116
|
+
var ed = this.editor;
|
1117
|
+
|
1118
|
+
ed.windowManager.open({
|
1119
|
+
url : tinymce.baseURL + '/themes/advanced/link.htm',
|
1120
|
+
width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
|
1121
|
+
height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
|
1122
|
+
inline : true
|
1123
|
+
}, {
|
1124
|
+
theme_url : this.url
|
1125
|
+
});
|
1126
|
+
},
|
1127
|
+
|
1128
|
+
_mceNewDocument : function() {
|
1129
|
+
var ed = this.editor;
|
1130
|
+
|
1131
|
+
ed.windowManager.confirm('advanced.newdocument', function(s) {
|
1132
|
+
if (s)
|
1133
|
+
ed.execCommand('mceSetContent', false, '');
|
1134
|
+
});
|
1135
|
+
},
|
1136
|
+
|
1137
|
+
_mceForeColor : function() {
|
1138
|
+
var t = this;
|
1139
|
+
|
1140
|
+
this._mceColorPicker(0, {
|
1141
|
+
color: t.fgColor,
|
1142
|
+
func : function(co) {
|
1143
|
+
t.fgColor = co;
|
1144
|
+
t.editor.execCommand('ForeColor', false, co);
|
1145
|
+
}
|
1146
|
+
});
|
1147
|
+
},
|
1148
|
+
|
1149
|
+
_mceBackColor : function() {
|
1150
|
+
var t = this;
|
1151
|
+
|
1152
|
+
this._mceColorPicker(0, {
|
1153
|
+
color: t.bgColor,
|
1154
|
+
func : function(co) {
|
1155
|
+
t.bgColor = co;
|
1156
|
+
t.editor.execCommand('HiliteColor', false, co);
|
1157
|
+
}
|
1158
|
+
});
|
1159
|
+
},
|
1160
|
+
|
1161
|
+
_ufirst : function(s) {
|
1162
|
+
return s.substring(0, 1).toUpperCase() + s.substring(1);
|
1163
|
+
}
|
1164
|
+
});
|
1165
|
+
|
1166
|
+
tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
|
1167
|
+
}(tinymce));
|