locomotive-tinymce-rails 3.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +18 -0
- data/README.md +67 -0
- data/Rakefile +65 -0
- data/app/assets/javascripts/tinymce/preinit.js.erb +5 -0
- data/app/assets/javascripts/tinymce-jquery.js +3 -0
- data/app/assets/javascripts/tinymce.js +2 -0
- data/lib/tinymce/rails/engine.rb +9 -0
- data/lib/tinymce/rails/sprockets_monkeypatch.rb +13 -0
- data/lib/tinymce/rails/version.rb +7 -0
- data/lib/tinymce/rails.rb +3 -0
- data/lib/tinymce-rails.rb +1 -0
- data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -0
- data/vendor/assets/javascripts/tinymce/langs/en.js +1 -0
- data/vendor/assets/javascripts/tinymce/license.txt +504 -0
- data/vendor/assets/javascripts/tinymce/plugins/advhr/css/advhr.css +5 -0
- data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin_src.js +57 -0
- data/vendor/assets/javascripts/tinymce/plugins/advhr/js/rule.js +43 -0
- data/vendor/assets/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/advhr/rule.htm +58 -0
- data/vendor/assets/javascripts/tinymce/plugins/advimage/css/advimage.css +13 -0
- data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin_src.js +50 -0
- data/vendor/assets/javascripts/tinymce/plugins/advimage/image.htm +235 -0
- data/vendor/assets/javascripts/tinymce/plugins/advimage/img/sample.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/advimage/js/image.js +462 -0
- data/vendor/assets/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/advlink/css/advlink.css +8 -0
- data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin_src.js +61 -0
- data/vendor/assets/javascripts/tinymce/plugins/advlink/js/advlink.js +532 -0
- data/vendor/assets/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/advlink/link.htm +338 -0
- data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +176 -0
- data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +172 -0
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +137 -0
- data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +431 -0
- data/vendor/assets/javascripts/tinymce/plugins/autosave/langs/en.js +4 -0
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +120 -0
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +160 -0
- data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin_src.js +82 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin_src.js +43 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/emotions.htm +42 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/js/emotions.js +43 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/dialog.htm +22 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin_src.js +84 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/img/example.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/js/dialog.js +19 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/langs/en.js +3 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/langs/en_dlg.js +3 -0
- data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin_src.js +50 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/css/fullpage.css +143 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +405 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/fullpage.htm +259 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/js/fullpage.js +232 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +159 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/fullscreen.htm +110 -0
- data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin_src.js +54 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +699 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/template.htm +387 -0
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin_src.js +262 -0
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +139 -0
- data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin_src.js +925 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/css/media.css +17 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin_src.js +890 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/js/embed.js +73 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/js/media.js +464 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/media.htm +922 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +54 -0
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +95 -0
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +74 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin_src.js +871 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/js/pastetext.js +36 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/js/pasteword.js +51 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/pastetext.htm +27 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/pasteword.htm +21 -0
- data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin_src.js +53 -0
- data/vendor/assets/javascripts/tinymce/plugins/preview/example.html +28 -0
- data/vendor/assets/javascripts/tinymce/plugins/preview/jscripts/embed.js +73 -0
- data/vendor/assets/javascripts/tinymce/plugins/preview/preview.html +17 -0
- data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin_src.js +34 -0
- data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin_src.js +101 -0
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +61 -0
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +142 -0
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +100 -0
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/css/content.css +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +436 -0
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/img/wline.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/style/css/props.css +13 -0
- data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin_src.js +55 -0
- data/vendor/assets/javascripts/tinymce/plugins/style/js/props.js +635 -0
- data/vendor/assets/javascripts/tinymce/plugins/style/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/style/props.htm +840 -0
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +122 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/cell.htm +180 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/css/cell.css +17 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/css/row.css +25 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/css/table.css +13 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin_src.js +1408 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/js/cell.js +319 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/js/merge_cells.js +27 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/js/row.js +237 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/js/table.js +484 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/merge_cells.htm +32 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/row.htm +158 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/table.htm +188 -0
- data/vendor/assets/javascripts/tinymce/plugins/template/blank.htm +12 -0
- data/vendor/assets/javascripts/tinymce/plugins/template/css/template.css +23 -0
- data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin_src.js +159 -0
- data/vendor/assets/javascripts/tinymce/plugins/template/js/template.js +106 -0
- data/vendor/assets/javascripts/tinymce/plugins/template/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/template/template.htm +31 -0
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +83 -0
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +114 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +142 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +142 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +149 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +142 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/del.htm +162 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +132 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +162 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/abbr.js +28 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/acronym.js +28 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +111 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/cite.js +28 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +53 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +229 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +53 -0
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/about.htm +52 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/anchor.htm +26 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/charmap.htm +55 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/color_picker.htm +74 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template.js +1 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template_src.js +1362 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/image.htm +80 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/flash.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/icons.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/pagebreak.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/quicktime.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/realmedia.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/shockwave.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/trans.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/about.js +73 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/anchor.js +43 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/charmap.js +363 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/color_picker.js +329 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/image.js +251 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/link.js +153 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/source_editor.js +56 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en.js +1 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en_dlg.js +1 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/link.htm +57 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/shortcuts.htm +47 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/content.css +50 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/dialog.css +117 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/ui.css +214 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +24 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +105 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +102 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +48 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +117 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +217 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/source_editor.htm +25 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/editor_template.js +1 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/editor_template_src.js +84 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/img/icons.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/langs/en.js +1 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/content.css +25 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/ui.css +32 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/content.css +17 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/ui.css +35 -0
- data/vendor/assets/javascripts/tinymce/tiny_mce.js +1 -0
- data/vendor/assets/javascripts/tinymce/tiny_mce_jquery.js +1 -0
- data/vendor/assets/javascripts/tinymce/tiny_mce_jquery_src.js +15905 -0
- data/vendor/assets/javascripts/tinymce/tiny_mce_popup.js +5 -0
- data/vendor/assets/javascripts/tinymce/tiny_mce_src.js +16728 -0
- data/vendor/assets/javascripts/tinymce/utils/editable_selects.js +70 -0
- data/vendor/assets/javascripts/tinymce/utils/form_utils.js +210 -0
- data/vendor/assets/javascripts/tinymce/utils/mctabs.js +162 -0
- data/vendor/assets/javascripts/tinymce/utils/validate.js +252 -0
- metadata +334 -0
@@ -0,0 +1,319 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
var ed;
|
4
|
+
|
5
|
+
function init() {
|
6
|
+
ed = tinyMCEPopup.editor;
|
7
|
+
tinyMCEPopup.resizeToInnerSize();
|
8
|
+
|
9
|
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
10
|
+
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
11
|
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
|
12
|
+
|
13
|
+
var inst = ed;
|
14
|
+
var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
|
15
|
+
var formObj = document.forms[0];
|
16
|
+
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
|
17
|
+
|
18
|
+
// Get table cell data
|
19
|
+
var celltype = tdElm.nodeName.toLowerCase();
|
20
|
+
var align = ed.dom.getAttrib(tdElm, 'align');
|
21
|
+
var valign = ed.dom.getAttrib(tdElm, 'valign');
|
22
|
+
var width = trimSize(getStyle(tdElm, 'width', 'width'));
|
23
|
+
var height = trimSize(getStyle(tdElm, 'height', 'height'));
|
24
|
+
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
|
25
|
+
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
|
26
|
+
var className = ed.dom.getAttrib(tdElm, 'class');
|
27
|
+
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
28
|
+
var id = ed.dom.getAttrib(tdElm, 'id');
|
29
|
+
var lang = ed.dom.getAttrib(tdElm, 'lang');
|
30
|
+
var dir = ed.dom.getAttrib(tdElm, 'dir');
|
31
|
+
var scope = ed.dom.getAttrib(tdElm, 'scope');
|
32
|
+
|
33
|
+
// Setup form
|
34
|
+
addClassesToList('class', 'table_cell_styles');
|
35
|
+
TinyMCE_EditableSelects.init();
|
36
|
+
|
37
|
+
if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
|
38
|
+
formObj.bordercolor.value = bordercolor;
|
39
|
+
formObj.bgcolor.value = bgcolor;
|
40
|
+
formObj.backgroundimage.value = backgroundimage;
|
41
|
+
formObj.width.value = width;
|
42
|
+
formObj.height.value = height;
|
43
|
+
formObj.id.value = id;
|
44
|
+
formObj.lang.value = lang;
|
45
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
46
|
+
selectByValue(formObj, 'align', align);
|
47
|
+
selectByValue(formObj, 'valign', valign);
|
48
|
+
selectByValue(formObj, 'class', className, true, true);
|
49
|
+
selectByValue(formObj, 'celltype', celltype);
|
50
|
+
selectByValue(formObj, 'dir', dir);
|
51
|
+
selectByValue(formObj, 'scope', scope);
|
52
|
+
|
53
|
+
// Resize some elements
|
54
|
+
if (isVisible('backgroundimagebrowser'))
|
55
|
+
document.getElementById('backgroundimage').style.width = '180px';
|
56
|
+
|
57
|
+
updateColor('bordercolor_pick', 'bordercolor');
|
58
|
+
updateColor('bgcolor_pick', 'bgcolor');
|
59
|
+
} else
|
60
|
+
tinyMCEPopup.dom.hide('action');
|
61
|
+
}
|
62
|
+
|
63
|
+
function updateAction() {
|
64
|
+
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
|
65
|
+
|
66
|
+
if (!AutoValidator.validate(formObj)) {
|
67
|
+
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
68
|
+
return false;
|
69
|
+
}
|
70
|
+
|
71
|
+
tinyMCEPopup.restoreSelection();
|
72
|
+
el = ed.selection.getStart();
|
73
|
+
tdElm = ed.dom.getParent(el, "td,th");
|
74
|
+
trElm = ed.dom.getParent(el, "tr");
|
75
|
+
tableElm = ed.dom.getParent(el, "table");
|
76
|
+
|
77
|
+
// Cell is selected
|
78
|
+
if (ed.dom.hasClass(tdElm, 'mceSelected')) {
|
79
|
+
// Update all selected sells
|
80
|
+
tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
|
81
|
+
updateCell(td);
|
82
|
+
});
|
83
|
+
|
84
|
+
ed.addVisual();
|
85
|
+
ed.nodeChanged();
|
86
|
+
inst.execCommand('mceEndUndoLevel');
|
87
|
+
tinyMCEPopup.close();
|
88
|
+
return;
|
89
|
+
}
|
90
|
+
|
91
|
+
switch (getSelectValue(formObj, 'action')) {
|
92
|
+
case "cell":
|
93
|
+
var celltype = getSelectValue(formObj, 'celltype');
|
94
|
+
var scope = getSelectValue(formObj, 'scope');
|
95
|
+
|
96
|
+
function doUpdate(s) {
|
97
|
+
if (s) {
|
98
|
+
updateCell(tdElm);
|
99
|
+
|
100
|
+
ed.addVisual();
|
101
|
+
ed.nodeChanged();
|
102
|
+
inst.execCommand('mceEndUndoLevel');
|
103
|
+
tinyMCEPopup.close();
|
104
|
+
}
|
105
|
+
};
|
106
|
+
|
107
|
+
if (ed.getParam("accessibility_warnings", 1)) {
|
108
|
+
if (celltype == "th" && scope == "")
|
109
|
+
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
|
110
|
+
else
|
111
|
+
doUpdate(1);
|
112
|
+
|
113
|
+
return;
|
114
|
+
}
|
115
|
+
|
116
|
+
updateCell(tdElm);
|
117
|
+
break;
|
118
|
+
|
119
|
+
case "row":
|
120
|
+
var cell = trElm.firstChild;
|
121
|
+
|
122
|
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
123
|
+
cell = nextCell(cell);
|
124
|
+
|
125
|
+
do {
|
126
|
+
cell = updateCell(cell, true);
|
127
|
+
} while ((cell = nextCell(cell)) != null);
|
128
|
+
|
129
|
+
break;
|
130
|
+
|
131
|
+
case "col":
|
132
|
+
var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr");
|
133
|
+
|
134
|
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
135
|
+
cell = nextCell(cell);
|
136
|
+
|
137
|
+
do {
|
138
|
+
if (cell == tdElm)
|
139
|
+
break;
|
140
|
+
col += cell.getAttribute("colspan");
|
141
|
+
} while ((cell = nextCell(cell)) != null);
|
142
|
+
|
143
|
+
for (var i=0; i<rows.length; i++) {
|
144
|
+
cell = rows[i].firstChild;
|
145
|
+
|
146
|
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
147
|
+
cell = nextCell(cell);
|
148
|
+
|
149
|
+
curr = 0;
|
150
|
+
do {
|
151
|
+
if (curr == col) {
|
152
|
+
cell = updateCell(cell, true);
|
153
|
+
break;
|
154
|
+
}
|
155
|
+
curr += cell.getAttribute("colspan");
|
156
|
+
} while ((cell = nextCell(cell)) != null);
|
157
|
+
}
|
158
|
+
|
159
|
+
break;
|
160
|
+
|
161
|
+
case "all":
|
162
|
+
var rows = tableElm.getElementsByTagName("tr");
|
163
|
+
|
164
|
+
for (var i=0; i<rows.length; i++) {
|
165
|
+
var cell = rows[i].firstChild;
|
166
|
+
|
167
|
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
168
|
+
cell = nextCell(cell);
|
169
|
+
|
170
|
+
do {
|
171
|
+
cell = updateCell(cell, true);
|
172
|
+
} while ((cell = nextCell(cell)) != null);
|
173
|
+
}
|
174
|
+
|
175
|
+
break;
|
176
|
+
}
|
177
|
+
|
178
|
+
ed.addVisual();
|
179
|
+
ed.nodeChanged();
|
180
|
+
inst.execCommand('mceEndUndoLevel');
|
181
|
+
tinyMCEPopup.close();
|
182
|
+
}
|
183
|
+
|
184
|
+
function nextCell(elm) {
|
185
|
+
while ((elm = elm.nextSibling) != null) {
|
186
|
+
if (elm.nodeName == "TD" || elm.nodeName == "TH")
|
187
|
+
return elm;
|
188
|
+
}
|
189
|
+
|
190
|
+
return null;
|
191
|
+
}
|
192
|
+
|
193
|
+
function updateCell(td, skip_id) {
|
194
|
+
var inst = ed;
|
195
|
+
var formObj = document.forms[0];
|
196
|
+
var curCellType = td.nodeName.toLowerCase();
|
197
|
+
var celltype = getSelectValue(formObj, 'celltype');
|
198
|
+
var doc = inst.getDoc();
|
199
|
+
var dom = ed.dom;
|
200
|
+
|
201
|
+
if (!skip_id)
|
202
|
+
dom.setAttrib(td, 'id', formObj.id.value);
|
203
|
+
|
204
|
+
dom.setAttrib(td, 'align', formObj.align.value);
|
205
|
+
dom.setAttrib(td, 'vAlign', formObj.valign.value);
|
206
|
+
dom.setAttrib(td, 'lang', formObj.lang.value);
|
207
|
+
dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
|
208
|
+
dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
|
209
|
+
dom.setAttrib(td, 'scope', formObj.scope.value);
|
210
|
+
dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
|
211
|
+
|
212
|
+
// Clear deprecated attributes
|
213
|
+
ed.dom.setAttrib(td, 'width', '');
|
214
|
+
ed.dom.setAttrib(td, 'height', '');
|
215
|
+
ed.dom.setAttrib(td, 'bgColor', '');
|
216
|
+
ed.dom.setAttrib(td, 'borderColor', '');
|
217
|
+
ed.dom.setAttrib(td, 'background', '');
|
218
|
+
|
219
|
+
// Set styles
|
220
|
+
td.style.width = getCSSSize(formObj.width.value);
|
221
|
+
td.style.height = getCSSSize(formObj.height.value);
|
222
|
+
if (formObj.bordercolor.value != "") {
|
223
|
+
td.style.borderColor = formObj.bordercolor.value;
|
224
|
+
td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
|
225
|
+
td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
|
226
|
+
} else
|
227
|
+
td.style.borderColor = '';
|
228
|
+
|
229
|
+
td.style.backgroundColor = formObj.bgcolor.value;
|
230
|
+
|
231
|
+
if (formObj.backgroundimage.value != "")
|
232
|
+
td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
233
|
+
else
|
234
|
+
td.style.backgroundImage = '';
|
235
|
+
|
236
|
+
if (curCellType != celltype) {
|
237
|
+
// changing to a different node type
|
238
|
+
var newCell = doc.createElement(celltype);
|
239
|
+
|
240
|
+
for (var c=0; c<td.childNodes.length; c++)
|
241
|
+
newCell.appendChild(td.childNodes[c].cloneNode(1));
|
242
|
+
|
243
|
+
for (var a=0; a<td.attributes.length; a++)
|
244
|
+
ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
|
245
|
+
|
246
|
+
td.parentNode.replaceChild(newCell, td);
|
247
|
+
td = newCell;
|
248
|
+
}
|
249
|
+
|
250
|
+
dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
|
251
|
+
|
252
|
+
return td;
|
253
|
+
}
|
254
|
+
|
255
|
+
function changedBackgroundImage() {
|
256
|
+
var formObj = document.forms[0];
|
257
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
258
|
+
|
259
|
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
260
|
+
|
261
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
262
|
+
}
|
263
|
+
|
264
|
+
function changedSize() {
|
265
|
+
var formObj = document.forms[0];
|
266
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
267
|
+
|
268
|
+
var width = formObj.width.value;
|
269
|
+
if (width != "")
|
270
|
+
st['width'] = getCSSSize(width);
|
271
|
+
else
|
272
|
+
st['width'] = "";
|
273
|
+
|
274
|
+
var height = formObj.height.value;
|
275
|
+
if (height != "")
|
276
|
+
st['height'] = getCSSSize(height);
|
277
|
+
else
|
278
|
+
st['height'] = "";
|
279
|
+
|
280
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
281
|
+
}
|
282
|
+
|
283
|
+
function changedColor() {
|
284
|
+
var formObj = document.forms[0];
|
285
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
286
|
+
|
287
|
+
st['background-color'] = formObj.bgcolor.value;
|
288
|
+
st['border-color'] = formObj.bordercolor.value;
|
289
|
+
|
290
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
291
|
+
}
|
292
|
+
|
293
|
+
function changedStyle() {
|
294
|
+
var formObj = document.forms[0];
|
295
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
296
|
+
|
297
|
+
if (st['background-image'])
|
298
|
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
299
|
+
else
|
300
|
+
formObj.backgroundimage.value = '';
|
301
|
+
|
302
|
+
if (st['width'])
|
303
|
+
formObj.width.value = trimSize(st['width']);
|
304
|
+
|
305
|
+
if (st['height'])
|
306
|
+
formObj.height.value = trimSize(st['height']);
|
307
|
+
|
308
|
+
if (st['background-color']) {
|
309
|
+
formObj.bgcolor.value = st['background-color'];
|
310
|
+
updateColor('bgcolor_pick','bgcolor');
|
311
|
+
}
|
312
|
+
|
313
|
+
if (st['border-color']) {
|
314
|
+
formObj.bordercolor.value = st['border-color'];
|
315
|
+
updateColor('bordercolor_pick','bordercolor');
|
316
|
+
}
|
317
|
+
}
|
318
|
+
|
319
|
+
tinyMCEPopup.onInit.add(init);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
var MergeCellsDialog = {
|
4
|
+
init : function() {
|
5
|
+
var f = document.forms[0];
|
6
|
+
|
7
|
+
f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
|
8
|
+
f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
|
9
|
+
},
|
10
|
+
|
11
|
+
merge : function() {
|
12
|
+
var func, f = document.forms[0];
|
13
|
+
|
14
|
+
tinyMCEPopup.restoreSelection();
|
15
|
+
|
16
|
+
func = tinyMCEPopup.getWindowArg('onaction');
|
17
|
+
|
18
|
+
func({
|
19
|
+
cols : f.numcols.value,
|
20
|
+
rows : f.numrows.value
|
21
|
+
});
|
22
|
+
|
23
|
+
tinyMCEPopup.close();
|
24
|
+
}
|
25
|
+
};
|
26
|
+
|
27
|
+
tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);
|
@@ -0,0 +1,237 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
function init() {
|
4
|
+
tinyMCEPopup.resizeToInnerSize();
|
5
|
+
|
6
|
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
7
|
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
8
|
+
|
9
|
+
var inst = tinyMCEPopup.editor;
|
10
|
+
var dom = inst.dom;
|
11
|
+
var trElm = dom.getParent(inst.selection.getStart(), "tr");
|
12
|
+
var formObj = document.forms[0];
|
13
|
+
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
14
|
+
|
15
|
+
// Get table row data
|
16
|
+
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
17
|
+
var align = dom.getAttrib(trElm, 'align');
|
18
|
+
var valign = dom.getAttrib(trElm, 'valign');
|
19
|
+
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
20
|
+
var className = dom.getAttrib(trElm, 'class');
|
21
|
+
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
22
|
+
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
23
|
+
var id = dom.getAttrib(trElm, 'id');
|
24
|
+
var lang = dom.getAttrib(trElm, 'lang');
|
25
|
+
var dir = dom.getAttrib(trElm, 'dir');
|
26
|
+
|
27
|
+
selectByValue(formObj, 'rowtype', rowtype);
|
28
|
+
|
29
|
+
// Any cells selected
|
30
|
+
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
|
31
|
+
// Setup form
|
32
|
+
addClassesToList('class', 'table_row_styles');
|
33
|
+
TinyMCE_EditableSelects.init();
|
34
|
+
|
35
|
+
formObj.bgcolor.value = bgcolor;
|
36
|
+
formObj.backgroundimage.value = backgroundimage;
|
37
|
+
formObj.height.value = height;
|
38
|
+
formObj.id.value = id;
|
39
|
+
formObj.lang.value = lang;
|
40
|
+
formObj.style.value = dom.serializeStyle(st);
|
41
|
+
selectByValue(formObj, 'align', align);
|
42
|
+
selectByValue(formObj, 'valign', valign);
|
43
|
+
selectByValue(formObj, 'class', className, true, true);
|
44
|
+
selectByValue(formObj, 'dir', dir);
|
45
|
+
|
46
|
+
// Resize some elements
|
47
|
+
if (isVisible('backgroundimagebrowser'))
|
48
|
+
document.getElementById('backgroundimage').style.width = '180px';
|
49
|
+
|
50
|
+
updateColor('bgcolor_pick', 'bgcolor');
|
51
|
+
} else
|
52
|
+
tinyMCEPopup.dom.hide('action');
|
53
|
+
}
|
54
|
+
|
55
|
+
function updateAction() {
|
56
|
+
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
57
|
+
var action = getSelectValue(formObj, 'action');
|
58
|
+
|
59
|
+
if (!AutoValidator.validate(formObj)) {
|
60
|
+
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
61
|
+
return false;
|
62
|
+
}
|
63
|
+
|
64
|
+
tinyMCEPopup.restoreSelection();
|
65
|
+
trElm = dom.getParent(inst.selection.getStart(), "tr");
|
66
|
+
tableElm = dom.getParent(inst.selection.getStart(), "table");
|
67
|
+
|
68
|
+
// Update all selected rows
|
69
|
+
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
|
70
|
+
tinymce.each(tableElm.rows, function(tr) {
|
71
|
+
var i;
|
72
|
+
|
73
|
+
for (i = 0; i < tr.cells.length; i++) {
|
74
|
+
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
|
75
|
+
updateRow(tr, true);
|
76
|
+
return;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
});
|
80
|
+
|
81
|
+
inst.addVisual();
|
82
|
+
inst.nodeChanged();
|
83
|
+
inst.execCommand('mceEndUndoLevel');
|
84
|
+
tinyMCEPopup.close();
|
85
|
+
return;
|
86
|
+
}
|
87
|
+
|
88
|
+
switch (action) {
|
89
|
+
case "row":
|
90
|
+
updateRow(trElm);
|
91
|
+
break;
|
92
|
+
|
93
|
+
case "all":
|
94
|
+
var rows = tableElm.getElementsByTagName("tr");
|
95
|
+
|
96
|
+
for (var i=0; i<rows.length; i++)
|
97
|
+
updateRow(rows[i], true);
|
98
|
+
|
99
|
+
break;
|
100
|
+
|
101
|
+
case "odd":
|
102
|
+
case "even":
|
103
|
+
var rows = tableElm.getElementsByTagName("tr");
|
104
|
+
|
105
|
+
for (var i=0; i<rows.length; i++) {
|
106
|
+
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
107
|
+
updateRow(rows[i], true, true);
|
108
|
+
}
|
109
|
+
|
110
|
+
break;
|
111
|
+
}
|
112
|
+
|
113
|
+
inst.addVisual();
|
114
|
+
inst.nodeChanged();
|
115
|
+
inst.execCommand('mceEndUndoLevel');
|
116
|
+
tinyMCEPopup.close();
|
117
|
+
}
|
118
|
+
|
119
|
+
function updateRow(tr_elm, skip_id, skip_parent) {
|
120
|
+
var inst = tinyMCEPopup.editor;
|
121
|
+
var formObj = document.forms[0];
|
122
|
+
var dom = inst.dom;
|
123
|
+
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
124
|
+
var rowtype = getSelectValue(formObj, 'rowtype');
|
125
|
+
var doc = inst.getDoc();
|
126
|
+
|
127
|
+
// Update row element
|
128
|
+
if (!skip_id)
|
129
|
+
dom.setAttrib(tr_elm, 'id', formObj.id.value);
|
130
|
+
|
131
|
+
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
|
132
|
+
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
|
133
|
+
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
|
134
|
+
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
|
135
|
+
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
136
|
+
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
137
|
+
|
138
|
+
// Clear deprecated attributes
|
139
|
+
dom.setAttrib(tr_elm, 'background', '');
|
140
|
+
dom.setAttrib(tr_elm, 'bgColor', '');
|
141
|
+
dom.setAttrib(tr_elm, 'height', '');
|
142
|
+
|
143
|
+
// Set styles
|
144
|
+
tr_elm.style.height = getCSSSize(formObj.height.value);
|
145
|
+
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
146
|
+
|
147
|
+
if (formObj.backgroundimage.value != "")
|
148
|
+
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
149
|
+
else
|
150
|
+
tr_elm.style.backgroundImage = '';
|
151
|
+
|
152
|
+
// Setup new rowtype
|
153
|
+
if (curRowType != rowtype && !skip_parent) {
|
154
|
+
// first, clone the node we are working on
|
155
|
+
var newRow = tr_elm.cloneNode(1);
|
156
|
+
|
157
|
+
// next, find the parent of its new destination (creating it if necessary)
|
158
|
+
var theTable = dom.getParent(tr_elm, "table");
|
159
|
+
var dest = rowtype;
|
160
|
+
var newParent = null;
|
161
|
+
for (var i = 0; i < theTable.childNodes.length; i++) {
|
162
|
+
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
163
|
+
newParent = theTable.childNodes[i];
|
164
|
+
}
|
165
|
+
|
166
|
+
if (newParent == null) {
|
167
|
+
newParent = doc.createElement(dest);
|
168
|
+
|
169
|
+
if (theTable.firstChild.nodeName == 'CAPTION')
|
170
|
+
inst.dom.insertAfter(newParent, theTable.firstChild);
|
171
|
+
else
|
172
|
+
theTable.insertBefore(newParent, theTable.firstChild);
|
173
|
+
}
|
174
|
+
|
175
|
+
// append the row to the new parent
|
176
|
+
newParent.appendChild(newRow);
|
177
|
+
|
178
|
+
// remove the original
|
179
|
+
tr_elm.parentNode.removeChild(tr_elm);
|
180
|
+
|
181
|
+
// set tr_elm to the new node
|
182
|
+
tr_elm = newRow;
|
183
|
+
}
|
184
|
+
|
185
|
+
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
186
|
+
}
|
187
|
+
|
188
|
+
function changedBackgroundImage() {
|
189
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
190
|
+
var st = dom.parseStyle(formObj.style.value);
|
191
|
+
|
192
|
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
193
|
+
|
194
|
+
formObj.style.value = dom.serializeStyle(st);
|
195
|
+
}
|
196
|
+
|
197
|
+
function changedStyle() {
|
198
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
199
|
+
var st = dom.parseStyle(formObj.style.value);
|
200
|
+
|
201
|
+
if (st['background-image'])
|
202
|
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
203
|
+
else
|
204
|
+
formObj.backgroundimage.value = '';
|
205
|
+
|
206
|
+
if (st['height'])
|
207
|
+
formObj.height.value = trimSize(st['height']);
|
208
|
+
|
209
|
+
if (st['background-color']) {
|
210
|
+
formObj.bgcolor.value = st['background-color'];
|
211
|
+
updateColor('bgcolor_pick','bgcolor');
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
function changedSize() {
|
216
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
217
|
+
var st = dom.parseStyle(formObj.style.value);
|
218
|
+
|
219
|
+
var height = formObj.height.value;
|
220
|
+
if (height != "")
|
221
|
+
st['height'] = getCSSSize(height);
|
222
|
+
else
|
223
|
+
st['height'] = "";
|
224
|
+
|
225
|
+
formObj.style.value = dom.serializeStyle(st);
|
226
|
+
}
|
227
|
+
|
228
|
+
function changedColor() {
|
229
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
230
|
+
var st = dom.parseStyle(formObj.style.value);
|
231
|
+
|
232
|
+
st['background-color'] = formObj.bgcolor.value;
|
233
|
+
|
234
|
+
formObj.style.value = dom.serializeStyle(st);
|
235
|
+
}
|
236
|
+
|
237
|
+
tinyMCEPopup.onInit.add(init);
|