tinymce-rails 3.5.11.1 → 4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.md +40 -103
- data/Rakefile +10 -15
- data/app/assets/javascripts/tinymce-jquery.js +1 -1
- data/app/assets/javascripts/tinymce.js +1 -1
- data/app/assets/javascripts/tinymce/preinit.js.erb +1 -2
- data/lib/tasks/tinymce-assets.rake +3 -6
- data/lib/tinymce/rails.rb +1 -1
- data/lib/tinymce/rails/asset_installer.rb +36 -34
- data/lib/tinymce/rails/asset_manifest.rb +89 -108
- data/lib/tinymce/rails/configuration.rb +36 -29
- data/lib/tinymce/rails/engine.rb +1 -40
- data/lib/tinymce/rails/helper.rb +5 -9
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -1
- data/vendor/assets/javascripts/tinymce/langs/readme.md +3 -0
- data/vendor/assets/javascripts/tinymce/license.txt +504 -504
- data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/editable_selects.js +70 -70
- data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/form_utils.js +210 -210
- data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/mctabs.js +161 -161
- data/vendor/assets/javascripts/tinymce/plugins/compat3x/tiny_mce_popup.js +435 -0
- data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/validate.js +252 -252
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-cool.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-cry.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-embarassed.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-foot-in-mouth.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-frown.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-innocent.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-kiss.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-laughing.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-money-mouth.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-sealed.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-smile.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-surprised.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-tongue-out.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-undecided.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-wink.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-yell.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/example_dependency/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/layer/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/css/visualblocks.css +114 -21
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/content.inline.min.css +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/content.min.css +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.eot +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.svg +166 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.ttf +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.woff +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.eot +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.svg +150 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.ttf +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.woff +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/readme.md +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/object.gif +0 -0
- data/vendor/assets/javascripts/tinymce/{themes/advanced → skins/lightgray}/img/trans.gif +0 -0
- data/vendor/assets/javascripts/tinymce/{plugins/spellchecker → skins/lightgray}/img/wline.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +1 -0
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -0
- data/vendor/assets/javascripts/tinymce/tinymce.js +10 -0
- data/vendor/assets/javascripts/tinymce/tinymce_jquery.js +9 -0
- metadata +100 -272
- checksums.yaml +0 -7
- data/lib/tinymce/rails/asset_installer/compile.rb +0 -44
- data/lib/tinymce/rails/asset_installer/copy.rb +0 -52
- data/vendor/assets/javascripts/tinymce/langs/en.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advhr/css/advhr.css +0 -5
- data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin_src.js +0 -57
- data/vendor/assets/javascripts/tinymce/plugins/advhr/js/rule.js +0 -43
- data/vendor/assets/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advhr/rule.htm +0 -58
- data/vendor/assets/javascripts/tinymce/plugins/advimage/css/advimage.css +0 -13
- data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin_src.js +0 -50
- data/vendor/assets/javascripts/tinymce/plugins/advimage/image.htm +0 -235
- data/vendor/assets/javascripts/tinymce/plugins/advimage/img/sample.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/advimage/js/image.js +0 -464
- data/vendor/assets/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlink/css/advlink.css +0 -8
- data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin_src.js +0 -61
- data/vendor/assets/javascripts/tinymce/plugins/advlink/js/advlink.js +0 -543
- data/vendor/assets/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlink/link.htm +0 -338
- data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +0 -176
- data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +0 -184
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +0 -119
- data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +0 -433
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +0 -120
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +0 -163
- data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin_src.js +0 -85
- data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin_src.js +0 -43
- data/vendor/assets/javascripts/tinymce/plugins/emotions/emotions.htm +0 -42
- data/vendor/assets/javascripts/tinymce/plugins/emotions/js/emotions.js +0 -43
- data/vendor/assets/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/example/dialog.htm +0 -22
- data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin_src.js +0 -84
- data/vendor/assets/javascripts/tinymce/plugins/example/img/example.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/js/dialog.js +0 -19
- data/vendor/assets/javascripts/tinymce/plugins/example/langs/en.js +0 -3
- data/vendor/assets/javascripts/tinymce/plugins/example/langs/en_dlg.js +0 -3
- data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin_src.js +0 -50
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/css/fullpage.css +0 -143
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +0 -405
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/fullpage.htm +0 -259
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/js/fullpage.js +0 -232
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -234
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/fullscreen.htm +0 -117
- data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin_src.js +0 -54
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -699
- 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 +0 -90
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/template.htm +0 -387
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -83
- data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin_src.js +0 -262
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -139
- data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin_src.js +0 -955
- data/vendor/assets/javascripts/tinymce/plugins/media/css/media.css +0 -17
- data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin_src.js +0 -898
- data/vendor/assets/javascripts/tinymce/plugins/media/js/embed.js +0 -73
- data/vendor/assets/javascripts/tinymce/plugins/media/js/media.js +0 -513
- data/vendor/assets/javascripts/tinymce/plugins/media/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/media/media.htm +0 -922
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -54
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +0 -537
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -74
- data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin_src.js +0 -887
- data/vendor/assets/javascripts/tinymce/plugins/paste/js/pastetext.js +0 -36
- data/vendor/assets/javascripts/tinymce/plugins/paste/js/pasteword.js +0 -51
- data/vendor/assets/javascripts/tinymce/plugins/paste/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/pastetext.htm +0 -27
- data/vendor/assets/javascripts/tinymce/plugins/paste/pasteword.htm +0 -21
- data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin_src.js +0 -53
- data/vendor/assets/javascripts/tinymce/plugins/preview/example.html +0 -28
- data/vendor/assets/javascripts/tinymce/plugins/preview/jscripts/embed.js +0 -73
- data/vendor/assets/javascripts/tinymce/plugins/preview/preview.html +0 -17
- data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin_src.js +0 -34
- data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin_src.js +0 -101
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/css/searchreplace.css +0 -6
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -61
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +0 -152
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +0 -100
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/css/content.css +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -471
- data/vendor/assets/javascripts/tinymce/plugins/style/css/props.css +0 -14
- data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin_src.js +0 -71
- data/vendor/assets/javascripts/tinymce/plugins/style/js/props.js +0 -709
- data/vendor/assets/javascripts/tinymce/plugins/style/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/style/props.htm +0 -845
- data/vendor/assets/javascripts/tinymce/plugins/style/readme.txt +0 -19
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -122
- data/vendor/assets/javascripts/tinymce/plugins/table/cell.htm +0 -180
- data/vendor/assets/javascripts/tinymce/plugins/table/css/cell.css +0 -17
- data/vendor/assets/javascripts/tinymce/plugins/table/css/row.css +0 -25
- data/vendor/assets/javascripts/tinymce/plugins/table/css/table.css +0 -13
- data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin_src.js +0 -1456
- data/vendor/assets/javascripts/tinymce/plugins/table/js/cell.js +0 -319
- data/vendor/assets/javascripts/tinymce/plugins/table/js/merge_cells.js +0 -27
- data/vendor/assets/javascripts/tinymce/plugins/table/js/row.js +0 -254
- data/vendor/assets/javascripts/tinymce/plugins/table/js/table.js +0 -501
- data/vendor/assets/javascripts/tinymce/plugins/table/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/merge_cells.htm +0 -32
- data/vendor/assets/javascripts/tinymce/plugins/table/row.htm +0 -158
- data/vendor/assets/javascripts/tinymce/plugins/table/table.htm +0 -188
- data/vendor/assets/javascripts/tinymce/plugins/template/blank.htm +0 -12
- data/vendor/assets/javascripts/tinymce/plugins/template/css/template.css +0 -23
- data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin_src.js +0 -159
- data/vendor/assets/javascripts/tinymce/plugins/template/js/template.js +0 -106
- data/vendor/assets/javascripts/tinymce/plugins/template/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/template/template.htm +0 -31
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin_src.js +0 -63
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +0 -83
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +0 -122
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +0 -142
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +0 -142
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +0 -149
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +0 -142
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -11
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/popup.css +0 -9
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/del.htm +0 -162
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +0 -162
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -28
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -28
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -111
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/cite.js +0 -28
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +0 -53
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -229
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +0 -53
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/advanced/about.htm +0 -52
- data/vendor/assets/javascripts/tinymce/themes/advanced/anchor.htm +0 -26
- data/vendor/assets/javascripts/tinymce/themes/advanced/charmap.htm +0 -55
- data/vendor/assets/javascripts/tinymce/themes/advanced/color_picker.htm +0 -70
- data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template_src.js +0 -1490
- data/vendor/assets/javascripts/tinymce/themes/advanced/image.htm +0 -80
- 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/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 +0 -73
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/anchor.js +0 -56
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/charmap.js +0 -363
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/color_picker.js +0 -345
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/image.js +0 -253
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/link.js +0 -159
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/source_editor.js +0 -78
- data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/advanced/link.htm +0 -57
- data/vendor/assets/javascripts/tinymce/themes/advanced/shortcuts.htm +0 -47
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/content.css +0 -50
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/dialog.css +0 -118
- 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 +0 -219
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +0 -24
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -106
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -106
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +0 -48
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -118
- 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 +0 -222
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -8
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
- data/vendor/assets/javascripts/tinymce/themes/advanced/source_editor.htm +0 -25
- data/vendor/assets/javascripts/tinymce/themes/simple/editor_template.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/simple/editor_template_src.js +0 -84
- data/vendor/assets/javascripts/tinymce/themes/simple/img/icons.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/langs/en.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/content.css +0 -25
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/ui.css +0 -32
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/content.css +0 -17
- 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 +0 -35
- data/vendor/assets/javascripts/tinymce/tiny_mce.js +0 -1
- data/vendor/assets/javascripts/tinymce/tiny_mce_jquery.js +0 -1
- data/vendor/assets/javascripts/tinymce/tiny_mce_jquery_src.js +0 -17942
- data/vendor/assets/javascripts/tinymce/tiny_mce_popup.js +0 -5
- data/vendor/assets/javascripts/tinymce/tiny_mce_src.js +0 -19156
@@ -1 +0,0 @@
|
|
1
|
-
tinyMCE.addI18n('en.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"});
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){var b=tinymce.DOM;var a=function(d,f,e){var c=function(g){var i=d.controlManager.get(g);var h=f.controlManager.get(g);if(i&&h){h.displayColor(i.value)}};c("forecolor");c("backcolor");f.setContent(d.getContent({format:"raw"}),{format:"raw"});f.selection.moveToBookmark(e);if(d.plugins.spellchecker&&f.plugins.spellchecker){f.plugins.spellchecker.setLanguage(d.plugins.spellchecker.selectedLang)}};tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(i,c){var l=this,m={},k=b.doc.documentElement,d,o,h,g,f,e,j;i.addCommand("mceFullScreen",function(){var q,r;if(i.getParam("fullscreen_is_enabled")){if(i.getParam("fullscreen_new_window")){closeFullscreen()}else{b.win.setTimeout(function(){var t=i;var s=tinyMCE.get(t.getParam("fullscreen_editor_id"));s.plugins.fullscreen.saveState(t);tinyMCE.remove(t)},10)}return}if(i.getParam("fullscreen_new_window")){l.fullscreenSettings={bookmark:i.selection.getBookmark()};q=b.win.open(c+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{q.resizeTo(screen.availWidth,screen.availHeight)}catch(p){}}else{o=b.getStyle(b.doc.body,"overflow",1)||"auto";h=b.getStyle(k,"overflow",1);d=b.getViewPort();g=d.x;f=d.y;if(tinymce.isOpera&&o=="visible"){o="auto"}if(tinymce.isIE&&o=="scroll"){o="auto"}if(tinymce.isIE&&(h=="visible"||h=="scroll")){h="auto"}if(o=="0px"){o=""}b.setStyle(b.doc.body,"overflow","hidden");k.style.overflow="hidden";d=b.getViewPort();b.win.scrollTo(0,0);if(tinymce.isIE){d.h-=1}if(tinymce.isIE6||document.compatMode=="BackCompat"){e="absolute;top:"+d.y}else{e="fixed;top:0"}n=b.add(b.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+e+";left:0;width:"+d.w+"px;height:"+d.h+"px;z-index:200000;"});b.add(n,"div",{id:"mce_fullscreen"});tinymce.each(i.settings,function(s,t){m[t]=s});m.id="mce_fullscreen";m.width=n.clientWidth;m.height=n.clientHeight-15;m.fullscreen_is_enabled=true;m.fullscreen_editor_id=i.id;m.theme_advanced_resizing=false;m.save_onsavecallback=function(){i.setContent(tinyMCE.get(m.id).getContent());i.execCommand("mceSave")};tinymce.each(i.getParam("fullscreen_settings"),function(t,s){m[s]=t});l.fullscreenSettings={bookmark:i.selection.getBookmark(),fullscreen_overflow:o,fullscreen_html_overflow:h,fullscreen_scrollx:g,fullscreen_scrolly:f};if(m.theme_advanced_toolbar_location==="external"){m.theme_advanced_toolbar_location="top"}tinyMCE.oldSettings=tinyMCE.settings;l.fullscreenEditor=new tinymce.Editor("mce_fullscreen",m);l.fullscreenEditor.onInit.add(function(){l.loadState(l.fullscreenEditor)});l.fullscreenEditor.render();l.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");l.fullscreenElement.update();l.resizeFunc=tinymce.dom.Event.add(b.win,"resize",function(){var v=tinymce.DOM.getViewPort(),t=l.fullscreenEditor,s,u;s=t.dom.getSize(t.getContainer().getElementsByTagName("table")[0]);u=t.dom.getSize(t.getContainer().getElementsByTagName("iframe")[0]);t.theme.resizeTo(v.w-s.w+u.w,v.h-s.h+u.h)})}});i.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});i.onNodeChange.add(function(q,p){p.setActive("fullscreen",q.getParam("fullscreen_is_enabled"))});l.loadState=function(p){if(!(p&&l.fullscreenSettings)){throw"No fullscreen editor to load to"}a(i,p,l.fullscreenSettings.bookmark);p.focus()};l.saveState=function(q){if(!(q&&l.fullscreenSettings)){throw"No fullscreen editor to restore from"}var p=l.fullscreenSettings;a(q,i,q.selection.getBookmark());if(!i.getParam("fullscreen_new_window")){tinymce.dom.Event.remove(b.win,"resize",l.resizeFunc);delete l.resizeFunc;b.remove("mce_fullscreen_container");b.doc.documentElement.style.overflow=p.fullscreen_html_overflow;b.setStyle(b.doc.body,"overflow",p.fullscreen_overflow);b.win.scrollTo(p.fullscreen_scrollx,p.fullscreen_scrolly)}tinyMCE.settings=tinyMCE.oldSettings;delete tinyMCE.oldSettings;delete l.fullscreenEditor;delete l.fullscreenElement;delete l.fullscreenSettings;b.win.setTimeout(function(){i.selection.moveToBookmark(j);i.focus()},10)}},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
|
@@ -1,234 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_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() {
|
12
|
-
var DOM = tinymce.DOM;
|
13
|
-
|
14
|
-
// State Transfer function
|
15
|
-
var transferState = function(oldEditor, newEditor, bookmark) {
|
16
|
-
var transferColorButtonState = function(swapme) {
|
17
|
-
var c = oldEditor.controlManager.get(swapme);
|
18
|
-
var newC = newEditor.controlManager.get(swapme);
|
19
|
-
|
20
|
-
if (c && newC) {
|
21
|
-
newC.displayColor(c.value);
|
22
|
-
}
|
23
|
-
|
24
|
-
};
|
25
|
-
|
26
|
-
transferColorButtonState('forecolor');
|
27
|
-
transferColorButtonState('backcolor');
|
28
|
-
newEditor.setContent(oldEditor.getContent({format : 'raw'}), {format : 'raw'});
|
29
|
-
newEditor.selection.moveToBookmark(bookmark);
|
30
|
-
|
31
|
-
if (oldEditor.plugins.spellchecker && newEditor.plugins.spellchecker) {
|
32
|
-
newEditor.plugins.spellchecker.setLanguage(oldEditor.plugins.spellchecker.selectedLang);
|
33
|
-
}
|
34
|
-
};
|
35
|
-
|
36
|
-
tinymce.create('tinymce.plugins.FullScreenPlugin', {
|
37
|
-
init : function(ed, url) {
|
38
|
-
var t = this, s = {}, de = DOM.doc.documentElement, vp, fullscreen_overflow, fullscreen_html_overflow, fullscreen_scrollx, fullscreen_scrolly, posCss, bookmark;
|
39
|
-
|
40
|
-
// Register commands
|
41
|
-
ed.addCommand('mceFullScreen', function() {
|
42
|
-
var win, oed;
|
43
|
-
|
44
|
-
if (ed.getParam('fullscreen_is_enabled')) {
|
45
|
-
if (ed.getParam('fullscreen_new_window'))
|
46
|
-
closeFullscreen(); // Call to close in fullscreen.htm
|
47
|
-
else {
|
48
|
-
DOM.win.setTimeout(function() {
|
49
|
-
var fullscreenEditor = ed;
|
50
|
-
|
51
|
-
// find the editor that opened this one, execute restore function there
|
52
|
-
var originalEditor = tinyMCE.get(fullscreenEditor.getParam('fullscreen_editor_id'));
|
53
|
-
originalEditor.plugins.fullscreen.saveState(fullscreenEditor);
|
54
|
-
|
55
|
-
tinyMCE.remove(fullscreenEditor);
|
56
|
-
}, 10);
|
57
|
-
}
|
58
|
-
|
59
|
-
return;
|
60
|
-
}
|
61
|
-
|
62
|
-
if (ed.getParam('fullscreen_new_window')) {
|
63
|
-
t.fullscreenSettings = {
|
64
|
-
bookmark: ed.selection.getBookmark()
|
65
|
-
};
|
66
|
-
win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
|
67
|
-
try {
|
68
|
-
win.resizeTo(screen.availWidth, screen.availHeight);
|
69
|
-
} catch (e) {
|
70
|
-
// Ignore
|
71
|
-
}
|
72
|
-
} else {
|
73
|
-
fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
|
74
|
-
fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
|
75
|
-
vp = DOM.getViewPort();
|
76
|
-
fullscreen_scrollx = vp.x;
|
77
|
-
fullscreen_scrolly = vp.y;
|
78
|
-
|
79
|
-
// Fixes an Opera bug where the scrollbars doesn't reappear
|
80
|
-
if (tinymce.isOpera && fullscreen_overflow == 'visible')
|
81
|
-
fullscreen_overflow = 'auto';
|
82
|
-
|
83
|
-
// Fixes an IE bug where horizontal scrollbars would appear
|
84
|
-
if (tinymce.isIE && fullscreen_overflow == 'scroll')
|
85
|
-
fullscreen_overflow = 'auto';
|
86
|
-
|
87
|
-
// Fixes an IE bug where the scrollbars doesn't reappear
|
88
|
-
if (tinymce.isIE && (fullscreen_html_overflow == 'visible' || fullscreen_html_overflow == 'scroll'))
|
89
|
-
fullscreen_html_overflow = 'auto';
|
90
|
-
|
91
|
-
if (fullscreen_overflow == '0px')
|
92
|
-
fullscreen_overflow = '';
|
93
|
-
|
94
|
-
DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
|
95
|
-
de.style.overflow = 'hidden'; //Fix for IE6/7
|
96
|
-
vp = DOM.getViewPort();
|
97
|
-
DOM.win.scrollTo(0, 0);
|
98
|
-
|
99
|
-
if (tinymce.isIE)
|
100
|
-
vp.h -= 1;
|
101
|
-
|
102
|
-
// Use fixed position if it exists
|
103
|
-
if (tinymce.isIE6 || document.compatMode == 'BackCompat')
|
104
|
-
posCss = 'absolute;top:' + vp.y;
|
105
|
-
else
|
106
|
-
posCss = 'fixed;top:0';
|
107
|
-
|
108
|
-
n = DOM.add(DOM.doc.body, 'div', {
|
109
|
-
id : 'mce_fullscreen_container',
|
110
|
-
style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
|
111
|
-
DOM.add(n, 'div', {id : 'mce_fullscreen'});
|
112
|
-
|
113
|
-
tinymce.each(ed.settings, function(v, n) {
|
114
|
-
s[n] = v;
|
115
|
-
});
|
116
|
-
|
117
|
-
s.id = 'mce_fullscreen';
|
118
|
-
s.width = n.clientWidth;
|
119
|
-
s.height = n.clientHeight - 15;
|
120
|
-
s.fullscreen_is_enabled = true;
|
121
|
-
s.fullscreen_editor_id = ed.id;
|
122
|
-
s.theme_advanced_resizing = false;
|
123
|
-
s.save_onsavecallback = function() {
|
124
|
-
ed.setContent(tinyMCE.get(s.id).getContent());
|
125
|
-
ed.execCommand('mceSave');
|
126
|
-
};
|
127
|
-
|
128
|
-
tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
|
129
|
-
s[k] = v;
|
130
|
-
});
|
131
|
-
|
132
|
-
t.fullscreenSettings = {
|
133
|
-
bookmark: ed.selection.getBookmark(),
|
134
|
-
fullscreen_overflow: fullscreen_overflow,
|
135
|
-
fullscreen_html_overflow: fullscreen_html_overflow,
|
136
|
-
fullscreen_scrollx: fullscreen_scrollx,
|
137
|
-
fullscreen_scrolly: fullscreen_scrolly
|
138
|
-
};
|
139
|
-
|
140
|
-
if (s.theme_advanced_toolbar_location === 'external')
|
141
|
-
s.theme_advanced_toolbar_location = 'top';
|
142
|
-
|
143
|
-
tinyMCE.oldSettings = tinyMCE.settings; // Store old settings, the Editor constructor overwrites them
|
144
|
-
t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
|
145
|
-
t.fullscreenEditor.onInit.add(function() {
|
146
|
-
t.loadState(t.fullscreenEditor);
|
147
|
-
});
|
148
|
-
|
149
|
-
t.fullscreenEditor.render();
|
150
|
-
|
151
|
-
t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
|
152
|
-
t.fullscreenElement.update();
|
153
|
-
//document.body.overflow = 'hidden';
|
154
|
-
|
155
|
-
t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
|
156
|
-
var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
|
157
|
-
|
158
|
-
// Get outer/inner size to get a delta size that can be used to calc the new iframe size
|
159
|
-
outerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('table')[0]);
|
160
|
-
innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
|
161
|
-
|
162
|
-
fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
|
163
|
-
});
|
164
|
-
}
|
165
|
-
});
|
166
|
-
|
167
|
-
// Register buttons
|
168
|
-
ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
|
169
|
-
|
170
|
-
ed.onNodeChange.add(function(ed, cm) {
|
171
|
-
cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
|
172
|
-
});
|
173
|
-
|
174
|
-
// fullscreenEditor is a param here because in window mode we don't create it
|
175
|
-
t.loadState = function(fullscreenEditor) {
|
176
|
-
if (!(fullscreenEditor && t.fullscreenSettings)) {
|
177
|
-
throw "No fullscreen editor to load to";
|
178
|
-
}
|
179
|
-
|
180
|
-
transferState(ed, fullscreenEditor, t.fullscreenSettings.bookmark);
|
181
|
-
fullscreenEditor.focus();
|
182
|
-
|
183
|
-
};
|
184
|
-
|
185
|
-
// fullscreenEditor is a param here because in window mode we don't create it
|
186
|
-
t.saveState = function(fullscreenEditor) {
|
187
|
-
if (!(fullscreenEditor && t.fullscreenSettings)) {
|
188
|
-
throw "No fullscreen editor to restore from";
|
189
|
-
}
|
190
|
-
var settings = t.fullscreenSettings;
|
191
|
-
|
192
|
-
transferState(fullscreenEditor, ed, fullscreenEditor.selection.getBookmark());
|
193
|
-
|
194
|
-
// cleanup only required if window mode isn't used
|
195
|
-
if (!ed.getParam('fullscreen_new_window')) {
|
196
|
-
tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
|
197
|
-
delete t.resizeFunc;
|
198
|
-
|
199
|
-
DOM.remove('mce_fullscreen_container');
|
200
|
-
|
201
|
-
DOM.doc.documentElement.style.overflow = settings.fullscreen_html_overflow;
|
202
|
-
DOM.setStyle(DOM.doc.body, 'overflow', settings.fullscreen_overflow);
|
203
|
-
DOM.win.scrollTo(settings.fullscreen_scrollx, settings.fullscreen_scrolly);
|
204
|
-
}
|
205
|
-
tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
|
206
|
-
|
207
|
-
// clear variables
|
208
|
-
delete tinyMCE.oldSettings;
|
209
|
-
delete t.fullscreenEditor;
|
210
|
-
delete t.fullscreenElement;
|
211
|
-
delete t.fullscreenSettings;
|
212
|
-
|
213
|
-
// allow the fullscreen editor to be removed before restoring focus and selection
|
214
|
-
DOM.win.setTimeout(function() {
|
215
|
-
ed.selection.moveToBookmark(bookmark);
|
216
|
-
ed.focus();
|
217
|
-
}, 10);
|
218
|
-
};
|
219
|
-
},
|
220
|
-
|
221
|
-
getInfo : function() {
|
222
|
-
return {
|
223
|
-
longname : 'Fullscreen',
|
224
|
-
author : 'Moxiecode Systems AB',
|
225
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
226
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
|
227
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
228
|
-
};
|
229
|
-
}
|
230
|
-
});
|
231
|
-
|
232
|
-
// Register plugin
|
233
|
-
tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
|
234
|
-
})();
|
@@ -1,117 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
3
|
-
<head>
|
4
|
-
<title></title>
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6
|
-
<script type="text/javascript" src="../../tiny_mce.js"></script>
|
7
|
-
<script type="text/javascript">
|
8
|
-
function patchCallback(settings, key) {
|
9
|
-
if (settings[key])
|
10
|
-
settings[key] = "window.opener." + settings[key];
|
11
|
-
}
|
12
|
-
|
13
|
-
var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
|
14
|
-
|
15
|
-
// Clone array
|
16
|
-
for (var n in paSe)
|
17
|
-
settings[n] = paSe[n];
|
18
|
-
|
19
|
-
// Override options for fullscreen
|
20
|
-
for (var n in paSe.fullscreen_settings)
|
21
|
-
settings[n] = paSe.fullscreen_settings[n];
|
22
|
-
|
23
|
-
// Patch callbacks, make them point to window.opener
|
24
|
-
patchCallback(settings, 'urlconverter_callback');
|
25
|
-
patchCallback(settings, 'insertlink_callback');
|
26
|
-
patchCallback(settings, 'insertimage_callback');
|
27
|
-
patchCallback(settings, 'setupcontent_callback');
|
28
|
-
patchCallback(settings, 'save_callback');
|
29
|
-
patchCallback(settings, 'onchange_callback');
|
30
|
-
patchCallback(settings, 'init_instance_callback');
|
31
|
-
patchCallback(settings, 'file_browser_callback');
|
32
|
-
patchCallback(settings, 'cleanup_callback');
|
33
|
-
patchCallback(settings, 'execcommand_callback');
|
34
|
-
patchCallback(settings, 'oninit');
|
35
|
-
|
36
|
-
// Set options
|
37
|
-
delete settings.id;
|
38
|
-
settings['mode'] = 'exact';
|
39
|
-
settings['elements'] = 'fullscreenarea';
|
40
|
-
settings['add_unload_trigger'] = false;
|
41
|
-
settings['ask'] = false;
|
42
|
-
settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
|
43
|
-
settings['fullscreen_is_enabled'] = true;
|
44
|
-
settings['fullscreen_editor_id'] = oeID;
|
45
|
-
settings['theme_advanced_resizing'] = false;
|
46
|
-
settings['strict_loading_mode'] = true;
|
47
|
-
|
48
|
-
settings.save_onsavecallback = function() {
|
49
|
-
moveContent();
|
50
|
-
window.opener.tinyMCE.get(oeID).execCommand('mceSave');
|
51
|
-
window.close();
|
52
|
-
};
|
53
|
-
|
54
|
-
function unloadHandler(e) {
|
55
|
-
moveContent();
|
56
|
-
}
|
57
|
-
|
58
|
-
function moveContent() {
|
59
|
-
// find the original editor, execute restore state in it's plugin instance
|
60
|
-
window.opener.tinyMCE.get(oeID).plugins.fullscreen.saveState(tinyMCE.activeEditor);
|
61
|
-
|
62
|
-
// prevent moveContent from being called twice - e.g. if the unloadHandler runs after moveContent()
|
63
|
-
tinymce.dom.Event.remove(window, "beforeunload", unloadHandler);
|
64
|
-
}
|
65
|
-
|
66
|
-
function closeFullscreen() {
|
67
|
-
// moveContent() will be called by the unload handler
|
68
|
-
window.close();
|
69
|
-
}
|
70
|
-
|
71
|
-
function doParentSubmit() {
|
72
|
-
moveContent();
|
73
|
-
|
74
|
-
if (window.opener.tinyMCE.selectedInstance.formElement.form)
|
75
|
-
window.opener.tinyMCE.selectedInstance.formElement.form.submit();
|
76
|
-
|
77
|
-
window.close();
|
78
|
-
|
79
|
-
return false;
|
80
|
-
}
|
81
|
-
|
82
|
-
function render() {
|
83
|
-
var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
|
84
|
-
|
85
|
-
vp = dom.getViewPort();
|
86
|
-
settings.width = vp.w;
|
87
|
-
settings.height = vp.h - 15;
|
88
|
-
|
89
|
-
settings.oninit = function() {
|
90
|
-
var ed = tinyMCE.activeEditor;
|
91
|
-
window.opener.tinyMCE.get(oeID).plugins.fullscreen.loadState(ed);
|
92
|
-
|
93
|
-
tinymce.dom.Event.add(window, 'resize', function() {
|
94
|
-
var vp = dom.getViewPort();
|
95
|
-
|
96
|
-
tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
|
97
|
-
});
|
98
|
-
}
|
99
|
-
|
100
|
-
tinyMCE.init(settings);
|
101
|
-
}
|
102
|
-
|
103
|
-
// Add onunload
|
104
|
-
tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
|
105
|
-
</script>
|
106
|
-
</head>
|
107
|
-
<body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
|
108
|
-
<form onsubmit="doParentSubmit();">
|
109
|
-
<textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
|
110
|
-
</form>
|
111
|
-
|
112
|
-
<script type="text/javascript">
|
113
|
-
render();
|
114
|
-
</script>
|
115
|
-
|
116
|
-
</body>
|
117
|
-
</html>
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})();
|
@@ -1,54 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_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() {
|
12
|
-
tinymce.create('tinymce.plugins.IESpell', {
|
13
|
-
init : function(ed, url) {
|
14
|
-
var t = this, sp;
|
15
|
-
|
16
|
-
if (!tinymce.isIE)
|
17
|
-
return;
|
18
|
-
|
19
|
-
t.editor = ed;
|
20
|
-
|
21
|
-
// Register commands
|
22
|
-
ed.addCommand('mceIESpell', function() {
|
23
|
-
try {
|
24
|
-
sp = new ActiveXObject("ieSpell.ieSpellExtension");
|
25
|
-
sp.CheckDocumentNode(ed.getDoc().documentElement);
|
26
|
-
} catch (e) {
|
27
|
-
if (e.number == -2146827859) {
|
28
|
-
ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
|
29
|
-
if (s)
|
30
|
-
window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
|
31
|
-
});
|
32
|
-
} else
|
33
|
-
ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
|
34
|
-
}
|
35
|
-
});
|
36
|
-
|
37
|
-
// Register buttons
|
38
|
-
ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
|
39
|
-
},
|
40
|
-
|
41
|
-
getInfo : function() {
|
42
|
-
return {
|
43
|
-
longname : 'IESpell (IE Only)',
|
44
|
-
author : 'Moxiecode Systems AB',
|
45
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
46
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
|
47
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
48
|
-
};
|
49
|
-
}
|
50
|
-
});
|
51
|
-
|
52
|
-
// Register plugin
|
53
|
-
tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
|
54
|
-
})();
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId("mce_inlinepopups_");h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
|
@@ -1,699 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_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() {
|
12
|
-
var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
|
13
|
-
|
14
|
-
tinymce.create('tinymce.plugins.InlinePopups', {
|
15
|
-
init : function(ed, url) {
|
16
|
-
// Replace window manager
|
17
|
-
ed.onBeforeRenderUI.add(function() {
|
18
|
-
ed.windowManager = new tinymce.InlineWindowManager(ed);
|
19
|
-
DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
|
20
|
-
});
|
21
|
-
},
|
22
|
-
|
23
|
-
getInfo : function() {
|
24
|
-
return {
|
25
|
-
longname : 'InlinePopups',
|
26
|
-
author : 'Moxiecode Systems AB',
|
27
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
28
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
|
29
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
30
|
-
};
|
31
|
-
}
|
32
|
-
});
|
33
|
-
|
34
|
-
tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
|
35
|
-
InlineWindowManager : function(ed) {
|
36
|
-
var t = this;
|
37
|
-
|
38
|
-
t.parent(ed);
|
39
|
-
t.zIndex = 300000;
|
40
|
-
t.count = 0;
|
41
|
-
t.windows = {};
|
42
|
-
},
|
43
|
-
|
44
|
-
open : function(f, p) {
|
45
|
-
var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
|
46
|
-
|
47
|
-
f = f || {};
|
48
|
-
p = p || {};
|
49
|
-
|
50
|
-
// Run native windows
|
51
|
-
if (!f.inline)
|
52
|
-
return t.parent(f, p);
|
53
|
-
|
54
|
-
parentWindow = t._frontWindow();
|
55
|
-
if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
|
56
|
-
parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
|
57
|
-
}
|
58
|
-
|
59
|
-
// Only store selection if the type is a normal window
|
60
|
-
if (!f.type)
|
61
|
-
t.bookmark = ed.selection.getBookmark(1);
|
62
|
-
|
63
|
-
id = DOM.uniqueId("mce_inlinepopups_"); // Use a prefix so this can't conflict with other ids
|
64
|
-
vp = DOM.getViewPort();
|
65
|
-
f.width = parseInt(f.width || 320);
|
66
|
-
f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
|
67
|
-
f.min_width = parseInt(f.min_width || 150);
|
68
|
-
f.min_height = parseInt(f.min_height || 100);
|
69
|
-
f.max_width = parseInt(f.max_width || 2000);
|
70
|
-
f.max_height = parseInt(f.max_height || 2000);
|
71
|
-
f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
|
72
|
-
f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
|
73
|
-
f.movable = f.resizable = true;
|
74
|
-
p.mce_width = f.width;
|
75
|
-
p.mce_height = f.height;
|
76
|
-
p.mce_inline = true;
|
77
|
-
p.mce_window_id = id;
|
78
|
-
p.mce_auto_focus = f.auto_focus;
|
79
|
-
|
80
|
-
// Transpose
|
81
|
-
// po = DOM.getPos(ed.getContainer());
|
82
|
-
// f.left -= po.x;
|
83
|
-
// f.top -= po.y;
|
84
|
-
|
85
|
-
t.features = f;
|
86
|
-
t.params = p;
|
87
|
-
t.onOpen.dispatch(t, f, p);
|
88
|
-
|
89
|
-
if (f.type) {
|
90
|
-
opt += ' mceModal';
|
91
|
-
|
92
|
-
if (f.type)
|
93
|
-
opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
|
94
|
-
|
95
|
-
f.resizable = false;
|
96
|
-
}
|
97
|
-
|
98
|
-
if (f.statusbar)
|
99
|
-
opt += ' mceStatusbar';
|
100
|
-
|
101
|
-
if (f.resizable)
|
102
|
-
opt += ' mceResizable';
|
103
|
-
|
104
|
-
if (f.minimizable)
|
105
|
-
opt += ' mceMinimizable';
|
106
|
-
|
107
|
-
if (f.maximizable)
|
108
|
-
opt += ' mceMaximizable';
|
109
|
-
|
110
|
-
if (f.movable)
|
111
|
-
opt += ' mceMovable';
|
112
|
-
|
113
|
-
// Create DOM objects
|
114
|
-
t._addAll(DOM.doc.body,
|
115
|
-
['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
|
116
|
-
['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
|
117
|
-
['div', {id : id + '_top', 'class' : 'mceTop'},
|
118
|
-
['div', {'class' : 'mceLeft'}],
|
119
|
-
['div', {'class' : 'mceCenter'}],
|
120
|
-
['div', {'class' : 'mceRight'}],
|
121
|
-
['span', {id : id + '_title'}, f.title || '']
|
122
|
-
],
|
123
|
-
|
124
|
-
['div', {id : id + '_middle', 'class' : 'mceMiddle'},
|
125
|
-
['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
|
126
|
-
['span', {id : id + '_content'}],
|
127
|
-
['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
|
128
|
-
],
|
129
|
-
|
130
|
-
['div', {id : id + '_bottom', 'class' : 'mceBottom'},
|
131
|
-
['div', {'class' : 'mceLeft'}],
|
132
|
-
['div', {'class' : 'mceCenter'}],
|
133
|
-
['div', {'class' : 'mceRight'}],
|
134
|
-
['span', {id : id + '_status'}, 'Content']
|
135
|
-
],
|
136
|
-
|
137
|
-
['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
|
138
|
-
['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
139
|
-
['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
140
|
-
['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
141
|
-
['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
142
|
-
['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
|
143
|
-
['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
|
144
|
-
['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
|
145
|
-
['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
|
146
|
-
['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
|
147
|
-
['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
|
148
|
-
['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
|
149
|
-
['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
|
150
|
-
]
|
151
|
-
]
|
152
|
-
);
|
153
|
-
|
154
|
-
DOM.setStyles(id, {top : -10000, left : -10000});
|
155
|
-
|
156
|
-
// Fix gecko rendering bug, where the editors iframe messed with window contents
|
157
|
-
if (tinymce.isGecko)
|
158
|
-
DOM.setStyle(id, 'overflow', 'auto');
|
159
|
-
|
160
|
-
// Measure borders
|
161
|
-
if (!f.type) {
|
162
|
-
dw += DOM.get(id + '_left').clientWidth;
|
163
|
-
dw += DOM.get(id + '_right').clientWidth;
|
164
|
-
dh += DOM.get(id + '_top').clientHeight;
|
165
|
-
dh += DOM.get(id + '_bottom').clientHeight;
|
166
|
-
}
|
167
|
-
|
168
|
-
// Resize window
|
169
|
-
DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
|
170
|
-
|
171
|
-
u = f.url || f.file;
|
172
|
-
if (u) {
|
173
|
-
if (tinymce.relaxedDomain)
|
174
|
-
u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
|
175
|
-
|
176
|
-
u = tinymce._addVer(u);
|
177
|
-
}
|
178
|
-
|
179
|
-
if (!f.type) {
|
180
|
-
DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
|
181
|
-
DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
|
182
|
-
DOM.setAttrib(id + '_ifr', 'src', u);
|
183
|
-
} else {
|
184
|
-
DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
|
185
|
-
|
186
|
-
if (f.type == 'confirm')
|
187
|
-
DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
|
188
|
-
|
189
|
-
DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
|
190
|
-
DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
|
191
|
-
|
192
|
-
Event.add(id, 'keyup', function(evt) {
|
193
|
-
var VK_ESCAPE = 27;
|
194
|
-
if (evt.keyCode === VK_ESCAPE) {
|
195
|
-
f.button_func(false);
|
196
|
-
return Event.cancel(evt);
|
197
|
-
}
|
198
|
-
});
|
199
|
-
|
200
|
-
Event.add(id, 'keydown', function(evt) {
|
201
|
-
var cancelButton, VK_TAB = 9;
|
202
|
-
if (evt.keyCode === VK_TAB) {
|
203
|
-
cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
|
204
|
-
if (cancelButton && cancelButton !== evt.target) {
|
205
|
-
cancelButton.focus();
|
206
|
-
} else {
|
207
|
-
DOM.get(id + '_ok').focus();
|
208
|
-
}
|
209
|
-
return Event.cancel(evt);
|
210
|
-
}
|
211
|
-
});
|
212
|
-
}
|
213
|
-
|
214
|
-
// Register events
|
215
|
-
mdf = Event.add(id, 'mousedown', function(e) {
|
216
|
-
var n = e.target, w, vp;
|
217
|
-
|
218
|
-
w = t.windows[id];
|
219
|
-
t.focus(id);
|
220
|
-
|
221
|
-
if (n.nodeName == 'A' || n.nodeName == 'a') {
|
222
|
-
if (n.className == 'mceClose') {
|
223
|
-
t.close(null, id);
|
224
|
-
return Event.cancel(e);
|
225
|
-
} else if (n.className == 'mceMax') {
|
226
|
-
w.oldPos = w.element.getXY();
|
227
|
-
w.oldSize = w.element.getSize();
|
228
|
-
|
229
|
-
vp = DOM.getViewPort();
|
230
|
-
|
231
|
-
// Reduce viewport size to avoid scrollbars
|
232
|
-
vp.w -= 2;
|
233
|
-
vp.h -= 2;
|
234
|
-
|
235
|
-
w.element.moveTo(vp.x, vp.y);
|
236
|
-
w.element.resizeTo(vp.w, vp.h);
|
237
|
-
DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
|
238
|
-
DOM.addClass(id + '_wrapper', 'mceMaximized');
|
239
|
-
} else if (n.className == 'mceMed') {
|
240
|
-
// Reset to old size
|
241
|
-
w.element.moveTo(w.oldPos.x, w.oldPos.y);
|
242
|
-
w.element.resizeTo(w.oldSize.w, w.oldSize.h);
|
243
|
-
w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
|
244
|
-
|
245
|
-
DOM.removeClass(id + '_wrapper', 'mceMaximized');
|
246
|
-
} else if (n.className == 'mceMove')
|
247
|
-
return t._startDrag(id, e, n.className);
|
248
|
-
else if (DOM.hasClass(n, 'mceResize'))
|
249
|
-
return t._startDrag(id, e, n.className.substring(13));
|
250
|
-
}
|
251
|
-
});
|
252
|
-
|
253
|
-
clf = Event.add(id, 'click', function(e) {
|
254
|
-
var n = e.target;
|
255
|
-
|
256
|
-
t.focus(id);
|
257
|
-
|
258
|
-
if (n.nodeName == 'A' || n.nodeName == 'a') {
|
259
|
-
switch (n.className) {
|
260
|
-
case 'mceClose':
|
261
|
-
t.close(null, id);
|
262
|
-
return Event.cancel(e);
|
263
|
-
|
264
|
-
case 'mceButton mceOk':
|
265
|
-
case 'mceButton mceCancel':
|
266
|
-
f.button_func(n.className == 'mceButton mceOk');
|
267
|
-
return Event.cancel(e);
|
268
|
-
}
|
269
|
-
}
|
270
|
-
});
|
271
|
-
|
272
|
-
// Make sure the tab order loops within the dialog.
|
273
|
-
Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
|
274
|
-
var iframe = DOM.get(id + '_ifr');
|
275
|
-
if (iframe) {
|
276
|
-
var body = iframe.contentWindow.document.body;
|
277
|
-
var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
|
278
|
-
if (evt.target.id === (id + '_left')) {
|
279
|
-
focusable[focusable.length - 1].focus();
|
280
|
-
} else {
|
281
|
-
focusable[0].focus();
|
282
|
-
}
|
283
|
-
} else {
|
284
|
-
DOM.get(id + '_ok').focus();
|
285
|
-
}
|
286
|
-
});
|
287
|
-
|
288
|
-
// Add window
|
289
|
-
w = t.windows[id] = {
|
290
|
-
id : id,
|
291
|
-
mousedown_func : mdf,
|
292
|
-
click_func : clf,
|
293
|
-
element : new Element(id, {blocker : 1, container : ed.getContainer()}),
|
294
|
-
iframeElement : new Element(id + '_ifr'),
|
295
|
-
features : f,
|
296
|
-
deltaWidth : dw,
|
297
|
-
deltaHeight : dh
|
298
|
-
};
|
299
|
-
|
300
|
-
w.iframeElement.on('focus', function() {
|
301
|
-
t.focus(id);
|
302
|
-
});
|
303
|
-
|
304
|
-
// Setup blocker
|
305
|
-
if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
|
306
|
-
DOM.add(DOM.doc.body, 'div', {
|
307
|
-
id : 'mceModalBlocker',
|
308
|
-
'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
|
309
|
-
style : {zIndex : t.zIndex - 1}
|
310
|
-
});
|
311
|
-
|
312
|
-
DOM.show('mceModalBlocker'); // Reduces flicker in IE
|
313
|
-
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
|
314
|
-
} else
|
315
|
-
DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
|
316
|
-
|
317
|
-
if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
|
318
|
-
DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
319
|
-
|
320
|
-
DOM.setAttrib(id, 'aria-hidden', 'false');
|
321
|
-
t.focus(id);
|
322
|
-
t._fixIELayout(id, 1);
|
323
|
-
|
324
|
-
// Focus ok button
|
325
|
-
if (DOM.get(id + '_ok'))
|
326
|
-
DOM.get(id + '_ok').focus();
|
327
|
-
t.count++;
|
328
|
-
|
329
|
-
return w;
|
330
|
-
},
|
331
|
-
|
332
|
-
focus : function(id) {
|
333
|
-
var t = this, w;
|
334
|
-
|
335
|
-
if (w = t.windows[id]) {
|
336
|
-
w.zIndex = this.zIndex++;
|
337
|
-
w.element.setStyle('zIndex', w.zIndex);
|
338
|
-
w.element.update();
|
339
|
-
|
340
|
-
id = id + '_wrapper';
|
341
|
-
DOM.removeClass(t.lastId, 'mceFocus');
|
342
|
-
DOM.addClass(id, 'mceFocus');
|
343
|
-
t.lastId = id;
|
344
|
-
|
345
|
-
if (w.focussedElement) {
|
346
|
-
w.focussedElement.focus();
|
347
|
-
} else if (DOM.get(id + '_ok')) {
|
348
|
-
DOM.get(w.id + '_ok').focus();
|
349
|
-
} else if (DOM.get(w.id + '_ifr')) {
|
350
|
-
DOM.get(w.id + '_ifr').focus();
|
351
|
-
}
|
352
|
-
}
|
353
|
-
},
|
354
|
-
|
355
|
-
_addAll : function(te, ne) {
|
356
|
-
var i, n, t = this, dom = tinymce.DOM;
|
357
|
-
|
358
|
-
if (is(ne, 'string'))
|
359
|
-
te.appendChild(dom.doc.createTextNode(ne));
|
360
|
-
else if (ne.length) {
|
361
|
-
te = te.appendChild(dom.create(ne[0], ne[1]));
|
362
|
-
|
363
|
-
for (i=2; i<ne.length; i++)
|
364
|
-
t._addAll(te, ne[i]);
|
365
|
-
}
|
366
|
-
},
|
367
|
-
|
368
|
-
_startDrag : function(id, se, ac) {
|
369
|
-
var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
|
370
|
-
|
371
|
-
// Get positons and sizes
|
372
|
-
// cp = DOM.getPos(t.editor.getContainer());
|
373
|
-
cp = {x : 0, y : 0};
|
374
|
-
vp = DOM.getViewPort();
|
375
|
-
|
376
|
-
// Reduce viewport size to avoid scrollbars while dragging
|
377
|
-
vp.w -= 2;
|
378
|
-
vp.h -= 2;
|
379
|
-
|
380
|
-
sex = se.screenX;
|
381
|
-
sey = se.screenY;
|
382
|
-
dx = dy = dw = dh = 0;
|
383
|
-
|
384
|
-
// Handle mouse up
|
385
|
-
mu = Event.add(d, 'mouseup', function(e) {
|
386
|
-
Event.remove(d, 'mouseup', mu);
|
387
|
-
Event.remove(d, 'mousemove', mm);
|
388
|
-
|
389
|
-
if (eb)
|
390
|
-
eb.remove();
|
391
|
-
|
392
|
-
we.moveBy(dx, dy);
|
393
|
-
we.resizeBy(dw, dh);
|
394
|
-
sz = we.getSize();
|
395
|
-
DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
|
396
|
-
t._fixIELayout(id, 1);
|
397
|
-
|
398
|
-
return Event.cancel(e);
|
399
|
-
});
|
400
|
-
|
401
|
-
if (ac != 'Move')
|
402
|
-
startMove();
|
403
|
-
|
404
|
-
function startMove() {
|
405
|
-
if (eb)
|
406
|
-
return;
|
407
|
-
|
408
|
-
t._fixIELayout(id, 0);
|
409
|
-
|
410
|
-
// Setup event blocker
|
411
|
-
DOM.add(d.body, 'div', {
|
412
|
-
id : 'mceEventBlocker',
|
413
|
-
'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
|
414
|
-
style : {zIndex : t.zIndex + 1}
|
415
|
-
});
|
416
|
-
|
417
|
-
if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
|
418
|
-
DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
419
|
-
|
420
|
-
eb = new Element('mceEventBlocker');
|
421
|
-
eb.update();
|
422
|
-
|
423
|
-
// Setup placeholder
|
424
|
-
p = we.getXY();
|
425
|
-
sz = we.getSize();
|
426
|
-
sx = cp.x + p.x - vp.x;
|
427
|
-
sy = cp.y + p.y - vp.y;
|
428
|
-
DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
|
429
|
-
ph = new Element('mcePlaceHolder');
|
430
|
-
};
|
431
|
-
|
432
|
-
// Handle mouse move/drag
|
433
|
-
mm = Event.add(d, 'mousemove', function(e) {
|
434
|
-
var x, y, v;
|
435
|
-
|
436
|
-
startMove();
|
437
|
-
|
438
|
-
x = e.screenX - sex;
|
439
|
-
y = e.screenY - sey;
|
440
|
-
|
441
|
-
switch (ac) {
|
442
|
-
case 'ResizeW':
|
443
|
-
dx = x;
|
444
|
-
dw = 0 - x;
|
445
|
-
break;
|
446
|
-
|
447
|
-
case 'ResizeE':
|
448
|
-
dw = x;
|
449
|
-
break;
|
450
|
-
|
451
|
-
case 'ResizeN':
|
452
|
-
case 'ResizeNW':
|
453
|
-
case 'ResizeNE':
|
454
|
-
if (ac == "ResizeNW") {
|
455
|
-
dx = x;
|
456
|
-
dw = 0 - x;
|
457
|
-
} else if (ac == "ResizeNE")
|
458
|
-
dw = x;
|
459
|
-
|
460
|
-
dy = y;
|
461
|
-
dh = 0 - y;
|
462
|
-
break;
|
463
|
-
|
464
|
-
case 'ResizeS':
|
465
|
-
case 'ResizeSW':
|
466
|
-
case 'ResizeSE':
|
467
|
-
if (ac == "ResizeSW") {
|
468
|
-
dx = x;
|
469
|
-
dw = 0 - x;
|
470
|
-
} else if (ac == "ResizeSE")
|
471
|
-
dw = x;
|
472
|
-
|
473
|
-
dh = y;
|
474
|
-
break;
|
475
|
-
|
476
|
-
case 'mceMove':
|
477
|
-
dx = x;
|
478
|
-
dy = y;
|
479
|
-
break;
|
480
|
-
}
|
481
|
-
|
482
|
-
// Boundary check
|
483
|
-
if (dw < (v = w.features.min_width - sz.w)) {
|
484
|
-
if (dx !== 0)
|
485
|
-
dx += dw - v;
|
486
|
-
|
487
|
-
dw = v;
|
488
|
-
}
|
489
|
-
|
490
|
-
if (dh < (v = w.features.min_height - sz.h)) {
|
491
|
-
if (dy !== 0)
|
492
|
-
dy += dh - v;
|
493
|
-
|
494
|
-
dh = v;
|
495
|
-
}
|
496
|
-
|
497
|
-
dw = Math.min(dw, w.features.max_width - sz.w);
|
498
|
-
dh = Math.min(dh, w.features.max_height - sz.h);
|
499
|
-
dx = Math.max(dx, vp.x - (sx + vp.x));
|
500
|
-
dy = Math.max(dy, vp.y - (sy + vp.y));
|
501
|
-
dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
|
502
|
-
dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
|
503
|
-
|
504
|
-
// Move if needed
|
505
|
-
if (dx + dy !== 0) {
|
506
|
-
if (sx + dx < 0)
|
507
|
-
dx = 0;
|
508
|
-
|
509
|
-
if (sy + dy < 0)
|
510
|
-
dy = 0;
|
511
|
-
|
512
|
-
ph.moveTo(sx + dx, sy + dy);
|
513
|
-
}
|
514
|
-
|
515
|
-
// Resize if needed
|
516
|
-
if (dw + dh !== 0)
|
517
|
-
ph.resizeTo(sz.w + dw, sz.h + dh);
|
518
|
-
|
519
|
-
return Event.cancel(e);
|
520
|
-
});
|
521
|
-
|
522
|
-
return Event.cancel(se);
|
523
|
-
},
|
524
|
-
|
525
|
-
resizeBy : function(dw, dh, id) {
|
526
|
-
var w = this.windows[id];
|
527
|
-
|
528
|
-
if (w) {
|
529
|
-
w.element.resizeBy(dw, dh);
|
530
|
-
w.iframeElement.resizeBy(dw, dh);
|
531
|
-
}
|
532
|
-
},
|
533
|
-
|
534
|
-
close : function(win, id) {
|
535
|
-
var t = this, w, d = DOM.doc, fw, id;
|
536
|
-
|
537
|
-
id = t._findId(id || win);
|
538
|
-
|
539
|
-
// Probably not inline
|
540
|
-
if (!t.windows[id]) {
|
541
|
-
t.parent(win);
|
542
|
-
return;
|
543
|
-
}
|
544
|
-
|
545
|
-
t.count--;
|
546
|
-
|
547
|
-
if (t.count == 0) {
|
548
|
-
DOM.remove('mceModalBlocker');
|
549
|
-
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
|
550
|
-
t.editor.focus();
|
551
|
-
}
|
552
|
-
|
553
|
-
if (w = t.windows[id]) {
|
554
|
-
t.onClose.dispatch(t);
|
555
|
-
Event.remove(d, 'mousedown', w.mousedownFunc);
|
556
|
-
Event.remove(d, 'click', w.clickFunc);
|
557
|
-
Event.clear(id);
|
558
|
-
Event.clear(id + '_ifr');
|
559
|
-
|
560
|
-
DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
|
561
|
-
w.element.remove();
|
562
|
-
delete t.windows[id];
|
563
|
-
|
564
|
-
fw = t._frontWindow();
|
565
|
-
|
566
|
-
if (fw)
|
567
|
-
t.focus(fw.id);
|
568
|
-
}
|
569
|
-
},
|
570
|
-
|
571
|
-
// Find front most window
|
572
|
-
_frontWindow : function() {
|
573
|
-
var fw, ix = 0;
|
574
|
-
// Find front most window and focus that
|
575
|
-
each (this.windows, function(w) {
|
576
|
-
if (w.zIndex > ix) {
|
577
|
-
fw = w;
|
578
|
-
ix = w.zIndex;
|
579
|
-
}
|
580
|
-
});
|
581
|
-
return fw;
|
582
|
-
},
|
583
|
-
|
584
|
-
setTitle : function(w, ti) {
|
585
|
-
var e;
|
586
|
-
|
587
|
-
w = this._findId(w);
|
588
|
-
|
589
|
-
if (e = DOM.get(w + '_title'))
|
590
|
-
e.innerHTML = DOM.encode(ti);
|
591
|
-
},
|
592
|
-
|
593
|
-
alert : function(txt, cb, s) {
|
594
|
-
var t = this, w;
|
595
|
-
|
596
|
-
w = t.open({
|
597
|
-
title : t,
|
598
|
-
type : 'alert',
|
599
|
-
button_func : function(s) {
|
600
|
-
if (cb)
|
601
|
-
cb.call(s || t, s);
|
602
|
-
|
603
|
-
t.close(null, w.id);
|
604
|
-
},
|
605
|
-
content : DOM.encode(t.editor.getLang(txt, txt)),
|
606
|
-
inline : 1,
|
607
|
-
width : 400,
|
608
|
-
height : 130
|
609
|
-
});
|
610
|
-
},
|
611
|
-
|
612
|
-
confirm : function(txt, cb, s) {
|
613
|
-
var t = this, w;
|
614
|
-
|
615
|
-
w = t.open({
|
616
|
-
title : t,
|
617
|
-
type : 'confirm',
|
618
|
-
button_func : function(s) {
|
619
|
-
if (cb)
|
620
|
-
cb.call(s || t, s);
|
621
|
-
|
622
|
-
t.close(null, w.id);
|
623
|
-
},
|
624
|
-
content : DOM.encode(t.editor.getLang(txt, txt)),
|
625
|
-
inline : 1,
|
626
|
-
width : 400,
|
627
|
-
height : 130
|
628
|
-
});
|
629
|
-
},
|
630
|
-
|
631
|
-
// Internal functions
|
632
|
-
|
633
|
-
_findId : function(w) {
|
634
|
-
var t = this;
|
635
|
-
|
636
|
-
if (typeof(w) == 'string')
|
637
|
-
return w;
|
638
|
-
|
639
|
-
each(t.windows, function(wo) {
|
640
|
-
var ifr = DOM.get(wo.id + '_ifr');
|
641
|
-
|
642
|
-
if (ifr && w == ifr.contentWindow) {
|
643
|
-
w = wo.id;
|
644
|
-
return false;
|
645
|
-
}
|
646
|
-
});
|
647
|
-
|
648
|
-
return w;
|
649
|
-
},
|
650
|
-
|
651
|
-
_fixIELayout : function(id, s) {
|
652
|
-
var w, img;
|
653
|
-
|
654
|
-
if (!tinymce.isIE6)
|
655
|
-
return;
|
656
|
-
|
657
|
-
// Fixes the bug where hover flickers and does odd things in IE6
|
658
|
-
each(['n','s','w','e','nw','ne','sw','se'], function(v) {
|
659
|
-
var e = DOM.get(id + '_resize_' + v);
|
660
|
-
|
661
|
-
DOM.setStyles(e, {
|
662
|
-
width : s ? e.clientWidth : '',
|
663
|
-
height : s ? e.clientHeight : '',
|
664
|
-
cursor : DOM.getStyle(e, 'cursor', 1)
|
665
|
-
});
|
666
|
-
|
667
|
-
DOM.setStyle(id + "_bottom", 'bottom', '-1px');
|
668
|
-
|
669
|
-
e = 0;
|
670
|
-
});
|
671
|
-
|
672
|
-
// Fixes graphics glitch
|
673
|
-
if (w = this.windows[id]) {
|
674
|
-
// Fixes rendering bug after resize
|
675
|
-
w.element.hide();
|
676
|
-
w.element.show();
|
677
|
-
|
678
|
-
// Forced a repaint of the window
|
679
|
-
//DOM.get(id).style.filter = '';
|
680
|
-
|
681
|
-
// IE has a bug where images used in CSS won't get loaded
|
682
|
-
// sometimes when the cache in the browser is disabled
|
683
|
-
// This fix tries to solve it by loading the images using the image object
|
684
|
-
each(DOM.select('div,a', id), function(e, i) {
|
685
|
-
if (e.currentStyle.backgroundImage != 'none') {
|
686
|
-
img = new Image();
|
687
|
-
img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
|
688
|
-
}
|
689
|
-
});
|
690
|
-
|
691
|
-
DOM.get(id).style.filter = '';
|
692
|
-
}
|
693
|
-
}
|
694
|
-
});
|
695
|
-
|
696
|
-
// Register plugin
|
697
|
-
tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
|
698
|
-
})();
|
699
|
-
|