Changeset 6632
- Timestamp:
- 01/17/08 15:44:05 (8 months ago)
- Files:
-
- trunk/wp-includes/formatting.php (modified) (1 diff)
- trunk/wp-includes/general-template.php (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/langs/en.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css (modified) (1 prop)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2 (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css (added)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/template.htm (added)
- trunk/wp-includes/js/tinymce/plugins/media (added)
- trunk/wp-includes/js/tinymce/plugins/media/css (added)
- trunk/wp-includes/js/tinymce/plugins/media/css/content.css (added)
- trunk/wp-includes/js/tinymce/plugins/media/css/media.css (added)
- trunk/wp-includes/js/tinymce/plugins/media/editor_plugin.js (added)
- trunk/wp-includes/js/tinymce/plugins/media/img (added)
- trunk/wp-includes/js/tinymce/plugins/media/img/flash.gif (added)
- trunk/wp-includes/js/tinymce/plugins/media/img/flv_player.swf (added)
- trunk/wp-includes/js/tinymce/plugins/media/img/quicktime.gif (added)
- trunk/wp-includes/js/tinymce/plugins/media/img/realmedia.gif (added)
- trunk/wp-includes/js/tinymce/plugins/media/img/shockwave.gif (added)
- trunk/wp-includes/js/tinymce/plugins/media/img/trans.gif (added)
- trunk/wp-includes/js/tinymce/plugins/media/img/windowsmedia.gif (added)
- trunk/wp-includes/js/tinymce/plugins/media/js (added)
- trunk/wp-includes/js/tinymce/plugins/media/js/embed.js (added)
- trunk/wp-includes/js/tinymce/plugins/media/js/media.js (added)
- trunk/wp-includes/js/tinymce/plugins/media/langs (added)
- trunk/wp-includes/js/tinymce/plugins/media/langs/en_dlg.js (added)
- trunk/wp-includes/js/tinymce/plugins/media/media.htm (added)
- trunk/wp-includes/js/tinymce/plugins/paste/blank.htm (modified) (1 diff, 1 prop)
- trunk/wp-includes/js/tinymce/plugins/paste/css/blank.css (modified) (1 diff, 1 prop)
- trunk/wp-includes/js/tinymce/plugins/paste/css/pasteword.css (modified) (1 prop)
- trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/js (added)
- trunk/wp-includes/js/tinymce/plugins/paste/js/pastetext.js (added)
- trunk/wp-includes/js/tinymce/plugins/paste/js/pasteword.js (added)
- trunk/wp-includes/js/tinymce/plugins/paste/langs/en_dlg.js (added)
- trunk/wp-includes/js/tinymce/plugins/paste/pastetext.htm (modified) (2 diffs, 1 prop)
- trunk/wp-includes/js/tinymce/plugins/paste/pasteword.htm (modified) (2 diffs, 1 prop)
- trunk/wp-includes/js/tinymce/plugins/safari (added)
- trunk/wp-includes/js/tinymce/plugins/safari/blank.htm (added)
- trunk/wp-includes/js/tinymce/plugins/safari/editor_plugin.js (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/GoogleSpell.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpell.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/PSpellShell.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/SpellChecker.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/utils (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/JSON.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/utils/Logger.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/config.php (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/css/content.css (modified) (1 diff, 1 prop)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css (modified) (1 prop)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/img (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/img/wline.gif (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/includes (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/includes/general.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/rpc.php (added)
- trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js (modified) (8 diffs)
- trunk/wp-includes/js/tinymce/plugins/wordpress/popups.css (modified) (1 prop)
- trunk/wp-includes/js/tinymce/plugins/wordpress/wordpress.css (modified) (1 prop)
- trunk/wp-includes/js/tinymce/themes/advanced/about.htm (modified) (4 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/anchor.htm (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/charmap.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/color_picker.htm (modified) (7 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/css/colorpicker.css (modified) (1 prop)
- trunk/wp-includes/js/tinymce/themes/advanced/css/editor_content.css (modified) (1 prop)
- trunk/wp-includes/js/tinymce/themes/advanced/css/editor_popup.css (modified) (1 prop)
- trunk/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css (modified) (1 prop)
- trunk/wp-includes/js/tinymce/themes/advanced/editor_template.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/image.htm (modified) (4 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/img (added)
- trunk/wp-includes/js/tinymce/themes/advanced/img/colorpicker.jpg (added)
- trunk/wp-includes/js/tinymce/themes/advanced/img/icons.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/js (added)
- trunk/wp-includes/js/tinymce/themes/advanced/js/about.js (added)
- trunk/wp-includes/js/tinymce/themes/advanced/js/anchor.js (added)
- trunk/wp-includes/js/tinymce/themes/advanced/js/charmap.js (added)
- trunk/wp-includes/js/tinymce/themes/advanced/js/color_picker.js (added)
- trunk/wp-includes/js/tinymce/themes/advanced/js/image.js (added)
- trunk/wp-includes/js/tinymce/themes/advanced/js/link.js (added)
- trunk/wp-includes/js/tinymce/themes/advanced/js/source_editor.js (added)
- trunk/wp-includes/js/tinymce/themes/advanced/langs/en.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/langs/en_dlg.js (added)
- trunk/wp-includes/js/tinymce/themes/advanced/link.htm (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/skins (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/content.css (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/dialog.css (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/img (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/img/buttons.png (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/img/items.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_arrow.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/img/menu_check.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/img/progress.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/img/tabs.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/default/ui.css (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/o2k7 (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/o2k7/content.css (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/o2k7/dialog.css (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/o2k7/img/button_bg.png (added)
- trunk/wp-includes/js/tinymce/themes/advanced/skins/o2k7/ui.css (added)
- trunk/wp-includes/js/tinymce/themes/advanced/source_editor.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce.js (modified) (5 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce_config.php (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce_gzip.php (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce_popup.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/utils/editable_selects.js (modified) (3 diffs, 1 prop)
- trunk/wp-includes/js/tinymce/utils/form_utils.js (modified) (7 diffs)
- trunk/wp-includes/js/tinymce/utils/mclayer.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/utils/mctabs.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/utils/validate.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/formatting.php
r6613 r6632 68 68 $pee = preg_replace('!(</' . $allblocks . '>)!', "$1\n\n", $pee); 69 69 $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines 70 if ( strpos($pee, '<object') !== false ) { 71 $pee = preg_replace('|\s*<param([^>]*)>\s*|', "<param$1>", $pee); // no pee inside object/embed 72 $pee = preg_replace('|\s*</embed>\s*|', '</embed>', $pee); 73 } 70 74 $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates 71 75 $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end trunk/wp-includes/general-template.php
r6609 r6632 953 953 <script type="text/javascript"> 954 954 // <![CDATA[ 955 if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0)955 if ( typeof tinyMCE != "undefined" ) 956 956 document.getElementById('editor-toolbar').style.display = 'block'; 957 957 // ]]> … … 968 968 <script type="text/javascript"> 969 969 // <![CDATA[ 970 if ( typeof tinyMCE != "undefined" && tinyMCE.configs.length > 0)970 if ( typeof tinyMCE != "undefined" ) 971 971 document.getElementById("quicktags").style.display="none"; 972 972 // ]]> trunk/wp-includes/js/tinymce/langs/en.js
r4747 r6632 1 // UK lang variables 2 3 tinyMCE.addToLang('',{ 4 bold_desc : 'Bold (Ctrl+B)', 5 italic_desc : 'Italic (Ctrl+I)', 6 underline_desc : 'Underline (Ctrl+U)', 7 striketrough_desc : 'Strikethrough', 8 justifyleft_desc : 'Align left', 9 justifycenter_desc : 'Align center', 10 justifyright_desc : 'Align right', 11 justifyfull_desc : 'Align full', 12 bullist_desc : 'Unordered list', 13 numlist_desc : 'Ordered list', 14 outdent_desc : 'Outdent', 15 indent_desc : 'Indent', 16 undo_desc : 'Undo (Ctrl+Z)', 17 redo_desc : 'Redo (Ctrl+Y)', 18 link_desc : 'Insert/edit link', 19 unlink_desc : 'Unlink', 20 image_desc : 'Insert/edit image', 21 cleanup_desc : 'Cleanup messy code', 22 focus_alert : 'A editor instance must be focused before using this command.', 23 edit_confirm : 'Do you want to use the WYSIWYG mode for this textarea?', 24 insert_link_title : 'Insert/edit link', 25 insert : 'Insert', 26 update : 'Update', 27 cancel : 'Cancel', 28 insert_link_url : 'Link URL', 29 insert_link_target : 'Target', 30 insert_link_target_same : 'Open link in the same window', 31 insert_link_target_blank : 'Open link in a new window', 32 insert_image_title : 'Insert/edit image', 33 insert_image_src : 'Image URL', 34 insert_image_alt : 'Image description', 35 help_desc : 'Help', 36 bold_img : "bold.gif", 37 italic_img : "italic.gif", 38 underline_img : "underline.gif", 39 clipboard_msg : 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?', 40 popup_blocked : 'Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.' 41 }); 1 tinyMCE.addI18n({en:{ 2 common:{ 3 edit_confirm:"Do you want to use the WYSIWYG mode for this textarea?", 4 apply:"Apply", 5 insert:"Insert", 6 update:"Update", 7 cancel:"Cancel", 8 close:"Close", 9 browse:"Browse", 10 class_name:"Class", 11 not_set:"-- Not set --", 12 clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?", 13 clipboard_no_support:"Currently not supported by your browser, use keyboard shortcuts instead.", 14 popup_blocked:"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.", 15 invalid_data:"Error: Invalid values entered, these are marked in red.", 16 more_colors:"More colors" 17 }, 18 contextmenu:{ 19 align:"Alignment", 20 left:"Left", 21 center:"Center", 22 right:"Right", 23 full:"Full" 24 }, 25 insertdatetime:{ 26 date_fmt:"%Y-%m-%d", 27 time_fmt:"%H:%M:%S", 28 insertdate_desc:"Insert date", 29 inserttime_desc:"Insert time", 30 months_long:"January,February,March,April,May,June,July,August,September,October,November,December", 31 months_short:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", 32 day_long:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday", 33 day_short:"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun" 34 }, 35 print:{ 36 print_desc:"Print" 37 }, 38 preview:{ 39 preview_desc:"Preview" 40 }, 41 directionality:{ 42 ltr_desc:"Direction left to right", 43 rtl_desc:"Direction right to left" 44 }, 45 layer:{ 46 insertlayer_desc:"Insert new layer", 47 forward_desc:"Move forward", 48 backward_desc:"Move backward", 49 absolute_desc:"Toggle absolute positioning", 50 content:"New layer..." 51 }, 52 save:{ 53 save_desc:"Save", 54 cancel_desc:"Cancel all changes" 55 }, 56 nonbreaking:{ 57 nonbreaking_desc:"Insert non-breaking space character" 58 }, 59 iespell:{ 60 iespell_desc:"Run spell checking", 61 download:"ieSpell not detected. Do you want to install it now?" 62 }, 63 advhr:{ 64 advhr_desc:"Horizontale rule" 65 }, 66 emotions:{ 67 emotions_desc:"Emotions" 68 }, 69 searchreplace:{ 70 search_desc:"Find", 71 replace_desc:"Find/Replace" 72 }, 73 advimage:{ 74 image_desc:"Insert/edit image" 75 }, 76 advlink:{ 77 link_desc:"Insert/edit link" 78 }, 79 xhtmlxtras:{ 80 cite_desc:"Citation", 81 abbr_desc:"Abbreviation", 82 acronym_desc:"Acronym", 83 del_desc:"Deletion", 84 ins_desc:"Insertion", 85 attribs_desc:"Insert/Edit Attributes" 86 }, 87 style:{ 88 desc:"Edit CSS Style" 89 }, 90 paste:{ 91 paste_text_desc:"Paste as Plain Text", 92 paste_word_desc:"Paste from Word", 93 selectall_desc:"Select All" 94 }, 95 paste_dlg:{ 96 text_title:"Use CTRL+V on your keyboard to paste the text into the window.", 97 text_linebreaks:"Keep linebreaks", 98 word_title:"Use CTRL+V on your keyboard to paste the text into the window." 99 }, 100 table:{ 101 desc:"Inserts a new table", 102 row_before_desc:"Insert row before", 103 row_after_desc:"Insert row after", 104 delete_row_desc:"Delete row", 105 col_before_desc:"Insert column before", 106 col_after_desc:"Insert column after", 107 delete_col_desc:"Remove column", 108 split_cells_desc:"Split merged table cells", 109 merge_cells_desc:"Merge table cells", 110 row_desc:"Table row properties", 111 cell_desc:"Table cell properties", 112 props_desc:"Table properties", 113 paste_row_before_desc:"Paste table row before", 114 paste_row_after_desc:"Paste table row after", 115 cut_row_desc:"Cut table row", 116 copy_row_desc:"Copy table row", 117 del:"Delete table", 118 row:"Row", 119 col:"Column", 120 cell:"Cell" 121 }, 122 autosave:{ 123 unload_msg:"The changes you made will be lost if you navigate away from this page." 124 }, 125 fullscreen:{ 126 desc:"Toggle fullscreen mode" 127 }, 128 media:{ 129 desc:"Insert / edit embedded media", 130 edit:"Edit embedded media" 131 }, 132 fullpage:{ 133 desc:"Document properties" 134 }, 135 template:{ 136 desc:"Insert predefined template content" 137 }, 138 visualchars:{ 139 desc:"Visual control characters on/off." 140 }, 141 spellchecker:{ 142 desc:"Toggle spellchecker", 143 menu:"Spellchecker settings", 144 ignore_word:"Ignore word", 145 ignore_words:"Ignore all", 146 langs:"Languages", 147 wait:"Please wait...", 148 sug:"Suggestions", 149 no_sug:"No suggestions", 150 no_mpell:"No misspellings found." 151 }, 152 pagebreak:{ 153 desc:"Insert page break." 154 }}}); trunk/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js
r5256 r6632 1 1 /** 2 * $Id : editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke$2 * $Id$ 3 3 * 4 4 * @author Moxiecode 5 * @copyright Copyright � 2004-200 7, Moxiecode Systems AB, All rights reserved.5 * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved. 6 6 */ 7 7 8 /* Import plugin specific language pack */ 9 tinyMCE.importPluginLanguagePack('autosave'); 8 (function() { 9 tinymce.create('tinymce.plugins.AutoSavePlugin', { 10 init : function(ed, url) { 11 var t = this; 10 12 11 var TinyMCE_AutoSavePlugin = { 12 getInfo : function() { 13 return { 14 longname : 'Auto save', 15 author : 'Moxiecode Systems AB', 16 authorurl : 'http://tinymce.moxiecode.com', 17 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave', 18 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion 19 }; 20 }, 13 t.editor = ed; 21 14 22 // Private plugin internal methods 15 window.onbeforeunload = tinymce.plugins.AutoSavePlugin._beforeUnloadHandler; 16 }, 23 17 24 _beforeUnloadHandler : function() { 25 var n, inst, anyDirty = false, msg = tinyMCE.getLang("lang_autosave_unload_msg"); 18 getInfo : function() { 19 return { 20 longname : 'Auto save', 21 author : 'Moxiecode Systems AB', 22 authorurl : 'http://tinymce.moxiecode.com', 23 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave', 24 version : tinymce.majorVersion + "." + tinymce.minorVersion 25 }; 26 }, 26 27 27 if (tinyMCE.getParam("fullscreen_is_enabled")) 28 return; 28 // Private plugin internal methods 29 29 30 for (n in tinyMCE.instances) { 31 inst = tinyMCE.instances[n]; 30 'static' : { 31 _beforeUnloadHandler : function() { 32 var msg; 32 33 33 if (!tinyMCE.isInstance(inst)) 34 continue; 34 tinymce.each(tinyMCE.editors, function(ed) { 35 if (ed.getParam("fullscreen_is_enabled")) 36 return; 35 37 36 if (inst.isDirty()) 38 if (ed.isDirty()) { 39 msg = ed.getLang("autosave.unload_msg"); 40 return false; 41 } 42 }); 43 37 44 return msg; 45 } 38 46 } 47 }); 39 48 40 return; 41 } 42 }; 43 44 window.onbeforeunload = TinyMCE_AutoSavePlugin._beforeUnloadHandler; 45 46 tinyMCE.addPlugin("autosave", TinyMCE_AutoSavePlugin); 49 // Register plugin 50 tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSavePlugin); 51 })(); trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js
r5256 r6632 1 1 /** 2 * $Id: editor_plugin_src.js 201 2007-02-12 15:56:56Z spocke $2 * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ 3 3 * 4 4 * @author Moxiecode 5 * @copyright Copyright � 2004-200 7, Moxiecode Systems AB, All rights reserved.5 * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved. 6 6 */ 7 7 8 /* Import plugin specific language pack */ 9 tinyMCE.importPluginLanguagePack('directionality'); 8 (function() { 9 tinymce.create('tinymce.plugins.Directionality', { 10 init : function(ed, url) { 11 var t = this; 10 12 11 var TinyMCE_DirectionalityPlugin = { 12 getInfo : function() { 13 return { 14 longname : 'Directionality', 15 author : 'Moxiecode Systems AB', 16 authorurl : 'http://tinymce.moxiecode.com', 17 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality', 18 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion 19 }; 20 }, 13 t.editor = ed; 21 14 22 getControlHTML : function(cn) { 23 switch (cn) { 24 case "ltr": 25 return tinyMCE.getButtonHTML(cn, 'lang_directionality_ltr_desc', '{$pluginurl}/images/ltr.gif', 'mceDirectionLTR'); 15 ed.addCommand('mceDirectionLTR', function() { 16 var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); 26 17 27 case "rtl": 28 return tinyMCE.getButtonHTML(cn, 'lang_directionality_rtl_desc', '{$pluginurl}/images/rtl.gif', 'mceDirectionRTL'); 18 if (e) { 19 if (ed.dom.getAttrib(e, "dir") != "ltr") 20 ed.dom.setAttrib(e, "dir", "ltr"); 21 else 22 ed.dom.setAttrib(e, "dir", ""); 23 } 24 25 ed.nodeChanged(); 26 }); 27 28 ed.addCommand('mceDirectionRTL', function() { 29 var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock); 30 31 if (e) { 32 if (ed.dom.getAttrib(e, "dir") != "rtl") 33 ed.dom.setAttrib(e, "dir", "rtl"); 34 else 35 ed.dom.setAttrib(e, "dir", ""); 36 } 37 38 ed.nodeChanged(); 39 }); 40 41 ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'}); 42 ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'}); 43 44 ed.onNodeChange.add(t._nodeChange, t); 45 }, 46 47 getInfo : function() { 48 return { 49 longname : 'Directionality', 50 author : 'Moxiecode Systems AB', 51 authorurl : 'http://tinymce.moxiecode.com', 52 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality', 53 version : tinymce.majorVersion + "." + tinymce.minorVersion 54 }; 55 }, 56 57 // Private methods 58 59 _nodeChange : function(ed, cm, n) { 60 var dom = ed.dom, dir; 61 62 n = dom.getParent(n, dom.isBlock); 63 if (!n) { 64 cm.setDisabled('ltr', 1); 65 cm.setDisabled('rtl', 1); 66 return; 67 } 68 69 dir = dom.getAttrib(n, 'dir'); 70 cm.setActive('ltr', dir == "ltr"); 71 cm.setDisabled('ltr', 0); 72 cm.setActive('rtl', dir == "rtl"); 73 cm.setDisabled('rtl', 0); 29 74 } 75 }); 30 76 31 return ""; 32 }, 33 34 execCommand : function(editor_id, element, command, user_interface, value) { 35 // Handle commands 36 switch (command) { 37 case "mceDirectionLTR": 38 var inst = tinyMCE.getInstanceById(editor_id); 39 var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address"); 40 41 if (elm) 42 elm.setAttribute("dir", "ltr"); 43 44 tinyMCE.triggerNodeChange(false); 45 return true; 46 47 case "mceDirectionRTL": 48 var inst = tinyMCE.getInstanceById(editor_id); 49 var elm = tinyMCE.getParentElement(inst.getFocusElement(), "p,div,td,h1,h2,h3,h4,h5,h6,pre,address"); 50 51 if (elm) 52 elm.setAttribute("dir", "rtl"); 53 54 tinyMCE.triggerNodeChange(false); 55 return true; 56 } 57 58 // Pass to next handler in chain 59 return false; 60 }, 61 62 handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) { 63 function getAttrib(elm, name) { 64 return elm.getAttribute(name) ? elm.getAttribute(name) : ""; 65 } 66 67 if (node == null) 68 return; 69 70 var elm = tinyMCE.getParentElement(node, "p,div,td,h1,h2,h3,h4,h5,h6,pre,address"); 71 if (!elm) { 72 tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonDisabled'); 73 tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonDisabled'); 74 return true; 75 } 76 77 tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonNormal'); 78 tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonNormal'); 79 80 var dir = getAttrib(elm, "dir"); 81 if (dir == "ltr" || dir == "") 82 tinyMCE.switchClass(editor_id + '_ltr', 'mceButtonSelected'); 83 else 84 tinyMCE.switchClass(editor_id + '_rtl', 'mceButtonSelected'); 85 86 return true; 87 } 88 }; 89 90 tinyMCE.addPlugin("directionality", TinyMCE_DirectionalityPlugin); 77 // Register plugin 78 tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality); 79 })(); trunk/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css
- Property svn:eol-style set to native
trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js
r6568 r6632 1 1 /** 2 * $Id: editor_plugin_src.js 268 2007-04-28 15:52:59Z spocke $ 3 * 4 * Moxiecode DHTML Windows script. 2 * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $ 5 3 * 6 4 * @author Moxiecode 7 * @copyright Copyright � 2004-200 7, Moxiecode Systems AB, All rights reserved.5 * @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved. 8 6 */ 9 7 10 // Patch openWindow, closeWindow TinyMCE functions 11 12 var TinyMCE_InlinePopupsPlugin = { 13 getInfo : function() { 14 return { 15 longname : 'Inline Popups', 16 author : 'Moxiecode Systems AB', 17 authorurl : 'http://tinymce.moxiecode.com', 18 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups', 19 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion 20 }; 21 } 22 }; 23 24 tinyMCE.addPlugin("inlinepopups", TinyMCE_InlinePopupsPlugin); 25 26 // Patch openWindow, closeWindow TinyMCE functions 27 28 TinyMCE_Engine.prototype.orgOpenWindow = TinyMCE_Engine.prototype.openWindow; 29 TinyMCE_Engine.prototype.orgCloseWindow = TinyMCE_Engine.prototype.closeWindow; 30 31 TinyMCE_Engine.prototype.openWindow = function(template, args) { 32 // Does the caller support inline 33 if (args['inline'] != "yes" || tinyMCE.isOpera || tinyMCE.getParam("plugins").indexOf('inlinepopups') == -1) { 34 mcWindows.selectedWindow = null; 35 args['mce_inside_iframe'] = false; 36 this.orgOpenWindow(template, args); 37 return; 38 } 39 40 var url, resizable, scrollbars; 41 42 args['mce_inside_iframe'] = true; 43 tinyMCE.windowArgs = args; 44 45 if (template['file'].charAt(0) != '/' && template['file'].indexOf('://') == -1) 46 url = tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file']; 47 else 48 url = template['file']; 49 50 if (!(width = parseInt(template['width']))) 51 width = 320; 52 53 if (!(height = parseInt(template['height']))) 54 height = 200; 55 56 if (!(minWidth = parseInt(template['minWidth']))) 57 minWidth = 100; 58 59 if (!(minHeight = parseInt(template['minHeight']))) 60 minHeight = 100; 61 62 resizable = (args && args['resizable']) ? args['resizable'] : "no"; 63 scrollbars = (args && args['scrollbars']) ? args['scrollbars'] : "no"; 64 65 height += 18; 66 67 // Replace all args as variables in URL 68 for (var name in args) { 69 if (typeof(args[name]) == 'function') 70 continue; 71 72 url = tinyMCE.replaceVar(url, name, escape(args[name])); 73 } 74 75 var elm = document.getElementById(this.selectedInstance.editorId + '_parent'); 76 77 if (tinyMCE.hasPlugin('fullscreen') && this.selectedInstance.getData('fullscreen').enabled) 78 pos = { absLeft: 0, absTop: 0 }; 79 else 80 pos = tinyMCE.getAbsPosition(elm); 81 82 // Center div in editor area 83 pos.absLeft += Math.round((elm.firstChild.clientWidth / 2) - (width / 2)); 84 pos.absTop += Math.round((elm.firstChild.clientHeight / 2) - (height / 2)); 8 (function() { 9 var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is; 10 11 tinymce.create('tinymce.plugins.InlinePopups', { 12 init : function(ed, url) { 13 // Replace window manager 14 ed.onBeforeRenderUI.add(function() { 15 ed.windowManager = new tinymce.InlineWindowManager(ed); 16 DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css"); 17 }); 18 }, 19 20 getInfo : function() { 21 return { 22 longname : 'InlinePopups', 23 author : 'Moxiecode Systems AB', 24 authorurl : 'http://tinymce.moxiecode.com', 25 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups', 26 version : tinymce.majorVersion + "." + tinymce.minorVersion 27 }; 28 } 29 }); 30 31 tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', { 32 InlineWindowManager : function(ed) { 33 var t = this; 34 35 t.parent(ed); 36 t.zIndex = 1000; 37 }, 38 39 open : function(f, p) { 40 var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w; 41 42 f = f || {}; 43 p = p || {}; 44 45 // Run native windows 46 if (!f.inline) 47 return t.parent(f, p); 48 49 t.bookmark = ed.selection.getBookmark('simple'); 50 id = DOM.uniqueId(); 51 vp = DOM.getViewPort(); 52 f.width = parseInt(f.width || 320); 53 f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0); 54 f.min_width = parseInt(f.min_width || 150); 55 f.min_height = parseInt(f.min_height || 100); 56 f.max_width = parseInt(f.max_width || 2000); 57 f.max_height = parseInt(f.max_height || 2000); 58 f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0))); 59 f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0))); 60 f.movable = f.resizable = true; 61 p.mce_width = f.width; 62 p.mce_height = f.height; 63 p.mce_inline = true; 64 p.mce_window_id = id; 65 66 // Transpose 67 // po = DOM.getPos(ed.getContainer()); 68 // f.left -= po.x; 69 // f.top -= po.y; 70 71 t.features = f; 72 t.params = p; 73 t.onOpen.dispatch(t, f, p); 74 75 if (f.type) { 76 opt += ' modal ' + f.type; 77 f.resizable = false; 78 } 79 80 if (f.statusbar) 81 opt += ' statusbar'; 82 83 if (f.resizable) 84 opt += ' resizable'; 85 86 if (f.minimizable) 87 opt += ' minimizable'; 88 89 if (f.maximizable) 90 opt += ' maximizable'; 91 92 if (f.movable) 93 opt += ' movable'; 94 95 // Create DOM objects 96 t._addAll(document.body, 97 ['div', {id : id, 'class' : ed.settings.inlinepopups_skin || 'clearlooks2', style : 'width:100px;height:100px'}, 98 ['div', {id : id + '_wrapper', 'class' : 'wrapper' + opt}, 99 ['div', {id : id + '_top', 'class' : 'top'}, 100 ['div', {'class' : 'left'}], 101 ['div', {'class' : 'center'}], 102 ['div', {'class' : 'right'}], 103 ['span', {id : id + '_title'}, f.title || ''] 104 ], 105 106 ['div', {id : id + '_middle', 'class' : 'middle'}, 107 ['div', {id : id + '_left', 'class' : 'left'}], 108 ['span', {id : id + '_content'}], 109 ['div', {id : id + '_right', 'class' : 'right'}] 110 ], 111 112 ['div', {id : id + '_bottom', 'class' : 'bottom'}, 113 ['div', {'class' : 'left'}], 114 ['div', {'class' : 'center'}], 115 ['div', {'class' : 'right'}], 116 ['span', {id : id + '_status'}, 'Content'] 117 ], 118 119 ['a', {'class' : 'move', href : 'javascript:;'}], 120 ['a', {'class' : 'min', href : 'javascript:;', onmousedown : 'return false;'}], 121 ['a', {'class' : 'max', href : 'javascript:;', onmousedown : 'return false;'}], 122 ['a', {'class' : 'med', href : 'javascript:;', onmousedown : 'return false;'}], 123 ['a', {'class' : 'close', href : 'javascript:;', onmousedown : 'return false;'}], 124 ['a', {id : id + '_resize_n', 'class' : 'resize resize-n', href : 'javascript:;'}], 125 ['a', {id : id + '_resize_s', 'class' : 'resize resize-s', href : 'javascript:;'}], 126 ['a', {id : id + '_resize_w', 'class' : 'resize resize-w', href : 'javascript:;'}], 127 ['a', {id : id + '_resize_e', 'class' : 'resize resize-e', href : 'javascript:;'}], 128 ['a', {id : id + '_resize_nw', 'class' : 'resize resize-nw', href : 'javascript:;'}], 129 ['a', {id : id + '_resize_ne', 'class' : 'resize resize-ne', href : 'javascript:;'}], 130 ['a', {id : id + '_resize_sw', 'class' : 'resize resize-sw', href : 'javascript:;'}], 131 ['a', {id : id + '_resize_se', 'class' : 'resize resize-se', href : 'javascript:;'}] 132 ] 133 ] 134 ); 135 136 DOM.setStyles(id, {top : -10000, left : -10000}); 137 138 // Fix gecko rendering bug, where the editors iframe messed with window contents 139 if (tinymce.isGecko) 140 DOM.setStyle(id, 'overflow', 'auto'); 141 142 // Measure borders 143 if (!f.type) { 144 dw += DOM.get(id + '_left').clientWidth; 145 dw += DOM.get(id + '_right').clientWidth; 146 dh += DOM.get(id + '_top').clientHeight; 147 dh += DOM.get(id + '_bottom').clientHeight; 148 } 149 150 // Resize window 151 DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh}); 152 153 if (!f.type) { 154 DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'}); 155 DOM.setStyles(id + '_ifr', {width : f.width, height : f.height}); 156 DOM.setAttrib(id + '_ifr', 'src', f.url || f.file); 157 } else { 158 DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'button ok', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok'); 159 160 if (f.type == 'confirm') 161 DOM.add(id + '_wrapper', 'a', {'class' : 'button cancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel'); 162 163 DOM.add(id + '_middle', 'div', {'class' : 'icon'}); 164 DOM.setHTML(id + '_content', f.content.replace('\n', '<br />')); 165 } 166 167 // Register events 168 mdf = Event.add(id, 'mousedown', function(e) { 169 var n = e.target, w, vp; 170 171 w = t.windows[id]; 172 t.focus(id); 173 174 if (n.nodeName == 'A' || n.nodeName == 'a') { 175 if (n.className == 'max') { 176 w.oldPos = w.element.getXY(); 177 w.oldSize = w.element.getSize(); 178 179 vp = DOM.getViewPort(); 180 181 // Reduce viewport size to avoid scrollbars 182 vp.w -= 2; 183
