Changeset 3664
- Timestamp:
- 03/30/06 07:50:33 (3 years ago)
- Files:
-
- trunk/wp-admin/admin-header.php (modified) (1 diff)
- trunk/wp-admin/edit-form-advanced.php (modified) (1 diff)
- trunk/wp-admin/edit-form-comment.php (modified) (1 diff)
- trunk/wp-admin/edit-page-form.php (modified) (1 diff)
- trunk/wp-includes/functions-post.php (modified) (1 diff)
- 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/inlinepopups/css/inlinepopup.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/jscripts/mcwindows.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste (added)
- trunk/wp-includes/js/tinymce/plugins/paste/blank.htm (added)
- trunk/wp-includes/js/tinymce/plugins/paste/css (added)
- trunk/wp-includes/js/tinymce/plugins/paste/css/blank.css (added)
- trunk/wp-includes/js/tinymce/plugins/paste/css/pasteword.css (added)
- trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin.js (added)
- trunk/wp-includes/js/tinymce/plugins/paste/images (added)
- trunk/wp-includes/js/tinymce/plugins/paste/images/pastetext.gif (added)
- trunk/wp-includes/js/tinymce/plugins/paste/images/pasteword.gif (added)
- trunk/wp-includes/js/tinymce/plugins/paste/images/selectall.gif (added)
- trunk/wp-includes/js/tinymce/plugins/paste/jscripts (added)
- trunk/wp-includes/js/tinymce/plugins/paste/jscripts/pastetext.js (added)
- trunk/wp-includes/js/tinymce/plugins/paste/jscripts/pasteword.js (added)
- trunk/wp-includes/js/tinymce/plugins/paste/langs (added)
- trunk/wp-includes/js/tinymce/plugins/paste/langs/en.js (added)
- trunk/wp-includes/js/tinymce/plugins/paste/pastetext.htm (added)
- trunk/wp-includes/js/tinymce/plugins/paste/pasteword.htm (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/HttpClient.class.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspell.class.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/config.php (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/css (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/css/content.css (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/css/spellchecker.css (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/editor_plugin.js (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/images (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/images/spellchecker.gif (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/images/wline.gif (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/langs (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/langs/en.js (added)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php (added)
- trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/plugins/wordpress/images/help.gif (modified) (previous)
- trunk/wp-includes/js/tinymce/plugins/wordpress/images/toolbars.gif (added)
- trunk/wp-includes/js/tinymce/plugins/wordpress/langs/en.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/wordpress/popups.css (added)
- trunk/wp-includes/js/tinymce/plugins/wordpress/wordpress.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/about.htm (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/anchor.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/charmap.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/color_picker.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/css/editor_content.css (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/css/editor_popup.css (modified) (12 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css (modified) (5 diffs)
- 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/images/bold_es.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/bold_tw.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/button_menu.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/buttons.gif (modified) (previous)
- trunk/wp-includes/js/tinymce/themes/advanced/images/help.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/italic_es.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/italic_tw.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/justifycenter.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/justifyfull.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/justifyleft.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/justifyright.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/menu_check.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/opacity.png (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/separator.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/underline_es.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/images/underline_tw.gif (added)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/about.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/anchor.js (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/charmap.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/color_picker.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/image.js (modified) (4 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/link.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/source_editor.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/langs/en.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/link.htm (modified) (4 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/source_editor.htm (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce.js (modified) (19 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce_config.php (added)
- trunk/wp-includes/js/tinymce/tiny_mce_gzip.php (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce_popup.js (modified) (14 diffs)
- trunk/wp-includes/js/tinymce/utils/form_utils.js (modified) (6 diffs)
- trunk/wp-includes/js/tinymce/utils/mclayer.js (added)
- trunk/wp-includes/js/tinymce/utils/mctabs.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/utils/validate.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/wp-mce-help.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-header.php
r3660 r3664 58 58 <script type="text/javascript" src="../wp-includes/js/dbx-key.js"></script> 59 59 <?php } ?> 60 <?php if ( $editing && user_can_richedit() ) { ?> 61 <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20051211"></script> 62 <?php } ?> 60 <?php if ( $editing && user_can_richedit() ) { tinymce_include(); } ?> 63 61 <?php if ( $cat_js ) { ?> 64 62 <script type="text/javascript" src="cat-js.php"></script> trunk/wp-admin/edit-form-advanced.php
r3660 r3664 144 144 <legend><?php _e('Post') ?></legend> 145 145 146 <?php 147 $rows = get_settings('default_post_edit_rows'); 148 if (($rows < 3) || ($rows > 100)) { 149 $rows = 12; 150 } 151 ?> 152 <?php the_quicktags(); ?> 153 154 <div><textarea <?php if ( user_can_richedit() ) echo 'title="true" '; ?>rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="2" id="content"><?php echo user_can_richedit() ? wp_richedit_pre($post->post_content) : $post->post_content; ?></textarea></div> 155 </fieldset> 156 157 <script type="text/javascript"> 158 <!-- 159 edCanvas = document.getElementById('content'); 160 <?php if ( user_can_richedit() ) : ?> 161 // This code is meant to allow tabbing from Title to Post (TinyMCE). 162 if ( tinyMCE.isMSIE ) 163 document.getElementById('title').onkeydown = function (e) 164 { 165 e = e ? e : window.event; 166 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 167 var i = tinyMCE.selectedInstance; 168 if(typeof i == 'undefined') 169 return true; 170 tinyMCE.execCommand("mceStartTyping"); 171 this.blur(); 172 i.contentWindow.focus(); 173 e.returnValue = false; 174 return false; 175 } 176 } 177 else 178 document.getElementById('title').onkeypress = function (e) 179 { 180 e = e ? e : window.event; 181 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 182 var i = tinyMCE.selectedInstance; 183 if(typeof i == 'undefined') 184 return true; 185 tinyMCE.execCommand("mceStartTyping"); 186 this.blur(); 187 i.contentWindow.focus(); 188 e.returnValue = false; 189 return false; 190 } 191 } 192 <?php endif; ?> 193 //--> 194 </script> 146 <?php the_editor($post->post_content); ?> 195 147 196 148 <?php echo $form_pingback ?> trunk/wp-admin/edit-form-comment.php
r3563 r3664 38 38 <fieldset style="clear: both;"> 39 39 <legend><?php _e('Comment') ?></legend> 40 <?php the_quicktags(); ?> 41 42 <?php 43 $rows = get_settings('default_post_edit_rows'); 44 if (($rows < 3) || ($rows > 100)) { 45 $rows = 10; 46 } 47 ?> 48 <div><textarea title="true" rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content" style="width: 99%"><?php echo user_can_richedit() ? wp_richedit_pre($comment->comment_content) : $comment->comment_content; ?></textarea></div> 40 <?php the_editor($comment->comment_content, 'content', 'newcomment_author_url'); ?> 49 41 </fieldset> 50 51 <script type="text/javascript">52 <!--53 edCanvas = document.getElementById('content');54 <?php if ( user_can_richedit() ) : ?>55 // This code is meant to allow tabbing from Author URL to Post (TinyMCE).56 if ( tinyMCE.isMSIE )57 document.getElementById('newcomment_author_url').onkeydown = function (e)58 {59 e = e ? e : window.event;60 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {61 var i = tinyMCE.selectedInstance;62 if(typeof i == 'undefined')63 return true;64 tinyMCE.execCommand("mceStartTyping");65 this.blur();66 i.contentWindow.focus();67 e.returnValue = false;68 return false;69 }70 }71 else72 document.getElementById('newcomment_author_url').onkeypress = function (e)73 {74 e = e ? e : window.event;75 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {76 var i = tinyMCE.selectedInstance;77 if(typeof i == 'undefined')78 return true;79 tinyMCE.execCommand("mceStartTyping");80 this.blur();81 i.contentWindow.focus();82 e.returnValue = false;83 return false;84 }85 }86 <?php endif; ?>87 //-->88 </script>89 42 90 43 <p class="submit"><input type="submit" name="editcomment" id="editcomment" value="<?php echo $submitbutton_text ?>" style="font-weight: bold;" tabindex="6" /> trunk/wp-admin/edit-page-form.php
r3660 r3664 131 131 <fieldset id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>"> 132 132 <legend><?php _e('Page Content') ?></legend> 133 <?php 134 $rows = get_settings('default_post_edit_rows'); 135 if (($rows < 3) || ($rows > 100)) { 136 $rows = 10; 137 } 138 ?> 139 <?php the_quicktags(); ?> 140 141 <div><textarea title="true" rows="<?php echo $rows; ?>" cols="40" name="content" tabindex="4" id="content"><?php echo user_can_richedit() ? wp_richedit_pre($post->post_content) : $post->post_content; ?></textarea></div> 133 <?php the_editor($post->post_content); ?> 142 134 </fieldset> 143 144 <script type="text/javascript">145 <!--146 edCanvas = document.getElementById('content');147 <?php if ( user_can_richedit() ) : ?>148 // This code is meant to allow tabbing from Title to Post (TinyMCE).149 if ( tinyMCE.isMSIE )150 document.getElementById('title').onkeydown = function (e)151 {152 e = e ? e : window.event;153 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {154 var i = tinyMCE.selectedInstance;155 if(typeof i == 'undefined')156 return true;157 tinyMCE.execCommand("mceStartTyping");158 this.blur();159 i.contentWindow.focus();160 e.returnValue = false;161 return false;162 }163 }164 else165 document.getElementById('title').onkeypress = function (e)166 {167 e = e ? e : window.event;168 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {169 var i = tinyMCE.selectedInstance;170 if(typeof i == 'undefined')171 return true;172 tinyMCE.execCommand("mceStartTyping");173 this.blur();174 i.contentWindow.focus();175 e.returnValue = false;176 return false;177 }178 }179 <?php endif; ?>180 //-->181 </script>182 135 183 136 <p class="submit"> trunk/wp-includes/functions-post.php
r3663 r3664 1029 1029 generic_ping(); 1030 1030 } 1031 1032 /** 1033 * Places two script links in <head>: one to get tinyMCE (big), one to configure and start it (small) 1034 */ 1035 function tinymce_include() { 1036 $src1 = get_settings('siteurl') . '/wp-includes/js/tinymce/tiny_mce_gzip.php'; 1037 $src2 = get_settings('siteurl') . '/wp-includes/js/tinymce/tiny_mce_config.php'; 1038 1039 echo "<script type='text/javascript' src='$src1'></script>\n"; 1040 echo "<script type='text/javascript' src='$src2'></script>\n"; 1041 } 1042 1043 /** 1044 * Places a textarea according to the current user's preferences, filled with $content. 1045 * Also places a script block that enables tabbing between Title and Content. 1046 * 1047 * @param string Editor contents 1048 * @param string (optional) Previous form field's ID (for tabbing support) 1049 */ 1050 function the_editor($content, $id = 'content', $prev_id = 'title') { 1051 $rows = get_settings('default_post_edit_rows'); 1052 if (($rows < 3) || ($rows > 100)) 1053 $rows = 12; 1054 1055 $rows = "rows='$rows'"; 1056 1057 the_quicktags(); 1058 1059 if ( user_can_richedit() ) 1060 add_filter('the_editor_content', 'wp_richedit_pre'); 1061 1062 $the_editor = apply_filters('the_editor', "<div><textarea class='mceEditor' $rows cols='40' name='$id' tabindex='2' id='$id'>%s</textarea></div>\n"); 1063 $the_editor_content = apply_filters('the_editor_content', $content); 1064 1065 printf($the_editor, $the_editor_content); 1066 1067 ?> 1068 <script type="text/javascript"> 1069 //<!-- 1070 edCanvas = document.getElementById('<?php echo $id; ?>'); 1071 <?php if ( user_can_richedit() ) : ?> 1072 // This code is meant to allow tabbing from Title to Post (TinyMCE). 1073 if ( tinyMCE.isMSIE ) 1074 document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) 1075 { 1076 e = e ? e : window.event; 1077 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 1078 var i = tinyMCE.selectedInstance; 1079 if(typeof i == 'undefined') 1080 return true; 1081 tinyMCE.execCommand("mceStartTyping"); 1082 this.blur(); 1083 i.contentWindow.focus(); 1084 e.returnValue = false; 1085 return false; 1086 } 1087 } 1088 else 1089 document.getElementById('<?php echo $prev_id; ?>').onkeypress = function (e) 1090 { 1091 e = e ? e : window.event; 1092 if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 1093 var i = tinyMCE.selectedInstance; 1094 if(typeof i == 'undefined') 1095 return true; 1096 tinyMCE.execCommand("mceStartTyping"); 1097 this.blur(); 1098 i.contentWindow.focus(); 1099 e.returnValue = false; 1100 return false; 1101 } 1102 } 1103 <?php endif; ?> 1104 //--> 1105 </script> 1106 <?php 1107 } 1108 1031 1109 ?> trunk/wp-includes/js/tinymce/langs/en.js
r3569 r3664 1 1 // UK lang variables 2 2 3 if (navigator.userAgent.indexOf('Mac OS') != -1) { 4 // Mac OS browsers use Ctrl to hit accesskeys 5 var metaKey = 'Ctrl'; 6 } 7 else { 8 var metaKey = 'Alt'; 9 } 10 11 tinyMCELang['lang_bold_desc'] = 'Bold (' + metaKey + '+b)'; 12 tinyMCELang['lang_italic_desc'] = 'Italic (' + metaKey + '+i)'; 13 tinyMCELang['lang_underline_desc'] = 'Underline'; 14 tinyMCELang['lang_striketrough_desc'] = 'Striketrough (' + metaKey + '-d)'; 15 tinyMCELang['lang_justifyleft_desc'] = 'Align left (' + metaKey + '-f)'; 16 tinyMCELang['lang_justifycenter_desc'] = 'Align center (' + metaKey + '-c)'; 17 tinyMCELang['lang_justifyright_desc'] = 'Align right (' + metaKey + '-r)'; 18 tinyMCELang['lang_justifyfull_desc'] = 'Align full'; 19 tinyMCELang['lang_bullist_desc'] = 'Unordered list (' + metaKey + '-l)'; 20 tinyMCELang['lang_numlist_desc'] = 'Ordered list (' + metaKey + '-o)'; 21 tinyMCELang['lang_outdent_desc'] = 'Outdent (' + metaKey + '-w)'; 22 tinyMCELang['lang_indent_desc'] = 'Indent/Blockquote (' + metaKey + '-q)'; 23 tinyMCELang['lang_undo_desc'] = 'Undo (' + metaKey + '-u)'; 24 tinyMCELang['lang_redo_desc'] = 'Redo (' + metaKey + '-y)'; 25 tinyMCELang['lang_link_desc'] = 'Insert/edit link (' + metaKey + '-a)'; 26 tinyMCELang['lang_unlink_desc'] = 'Unlink (' + metaKey + '-s)'; 27 tinyMCELang['lang_image_desc'] = 'Insert/edit image (' + metaKey + '-m)'; 28 tinyMCELang['lang_cleanup_desc'] = 'Cleanup messy code'; 29 tinyMCELang['lang_focus_alert'] = 'A editor instance must be focused before using this command.'; 30 tinyMCELang['lang_edit_confirm'] = 'Do you want to use the WYSIWYG mode for this textarea?'; 31 tinyMCELang['lang_insert_link_title'] = 'Insert/edit link'; 32 tinyMCELang['lang_insert'] = 'Insert'; 33 tinyMCELang['lang_update'] = 'Update'; 34 tinyMCELang['lang_cancel'] = 'Cancel'; 35 tinyMCELang['lang_insert_link_url'] = 'Link URL'; 36 tinyMCELang['lang_insert_link_target'] = 'Target'; 37 tinyMCELang['lang_insert_link_target_same'] = 'Open link in the same window'; 38 tinyMCELang['lang_insert_link_target_blank'] = 'Open link in a new window'; 39 tinyMCELang['lang_insert_image_title'] = 'Insert/edit image'; 40 tinyMCELang['lang_insert_image_src'] = 'Image URL'; 41 tinyMCELang['lang_insert_image_alt'] = 'Image description'; 42 tinyMCELang['lang_help_desc'] = 'Help'; 43 tinyMCELang['lang_bold_img'] = "bold.gif"; 44 tinyMCELang['lang_italic_img'] = "italic.gif"; 45 tinyMCELang['lang_underline_img'] = "underline.gif"; 46 tinyMCELang['lang_clipboard_msg'] = 'Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?'; 47 tinyMCELang['lang_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.'; 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 }); trunk/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js
r2993 r3664 1 /** 2 * $RCSfile: editor_plugin_src.js,v $ 3 * $Revision: 1.11 $ 4 * $Date: 2006/03/22 12:21:21 $ 5 * 6 * @author Moxiecode 7 * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved. 8 */ 9 1 10 /* Import plugin specific language pack */ 2 tinyMCE.importPluginLanguagePack('autosave','en,sv,cs,he,no,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,fi,cy,es,is,pl');function TinyMCE_autosave_getInfo(){return{longname:'Auto save',author:'Moxiecode Systems',authorurl:'http://tinymce.moxiecode.com',infourl:'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html',version:tinyMCE.majorVersion+"."+tinyMCE.minorVersion};};function TinyMCE_autosave_beforeUnloadHandler(){var msg=tinyMCE.getLang("lang_autosave_unload_msg");var anyDirty=false;for(var n in tinyMCE.instances){var inst=tinyMCE.instances[n];if(!tinyMCE.isInstance(inst))continue;if(inst.isDirty())return msg;}return;}window.onbeforeunload=TinyMCE_autosave_beforeUnloadHandler; 11 tinyMCE.importPluginLanguagePack('autosave', 'en,tr,sv,cs,he,nb,hu,de,da,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl,pt_br'); 12 13 var TinyMCE_AutoSavePlugin = { 14 getInfo : function() { 15 return { 16 longname : 'Auto save', 17 author : 'Moxiecode Systems', 18 authorurl : 'http://tinymce.moxiecode.com', 19 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_autosave.html', 20 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion 21 }; 22 }, 23 24 // Private plugin internal methods 25 26 _beforeUnloadHandler : function() { 27 var n, inst, anyDirty = false, msg = tinyMCE.getLang("lang_autosave_unload_msg"); 28 29 if (tinyMCE.getParam("fullscreen_is_enabled")) 30 return; 31 32 for (n in tinyMCE.instances) { 33 inst = tinyMCE.instances[n]; 34 35 if (!tinyMCE.isInstance(inst)) 36 continue; 37 38 if (inst.isDirty()) 39 return msg; 40 } 41 42 return; 43 } 44 }; 45 46 window.onbeforeunload = TinyMCE_AutoSavePlugin._beforeUnloadHandler; 47 48 tinyMCE.addPlugin("autosave", TinyMCE_AutoSavePlugin); trunk/wp-includes/js/tinymce/plugins/inlinepopups/css/inlinepopup.css
r3136 r3664 1 /* Window classes */ 2 3 .mceWindow { 4 position: absolute; 5 left: 0; 6 top: 0; 7 border: 1px solid black; 8 background-color: #D4D0C8; 9 } 10 11 .mceWindowHead { 12 background-color: #334F8D; 13 width: 100%; 14 height: 18px; 15 cursor: move; 16 overflow: hidden; 17 } 18 19 .mceWindowBody { 20 clear: both; 21 background-color: white; 22 } 23 24 .mceWindowStatusbar { 25 background-color: #D4D0C8; 26 height: 12px; 27 border-top: 1px solid black; 28 } 29 30 .mceWindowTitle { 31 float: left; 32 font-family: "MS Sans Serif"; 33 font-size: 9pt; 34 font-weight: bold; 35 line-height: 18px; 36 color: white; 37 margin-left: 2px; 38 overflow: hidden; 39 } 40 41 .mceWindowHeadTools { 42 margin-right: 2px; 43 } 44 45 .mceWindowClose, .mceWindowMinimize, .mceWindowMaximize { 46 display: block; 47 float: right; 48 overflow: hidden; 49 margin-top: 2px; 50 } 51 52 .mceWindowClose { 53 margin-left: 2px; 54 } 55 56 .mceWindowMinimize { 57 } 58 59 .mceWindowMaximize { 60 } 61 62 .mceWindowResize { 63 display: block; 64 float: right; 65 overflow: hidden; 66 cursor: se-resize; 67 width: 12px; 68 height: 12px; 69 } trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js
r3136 r3664 1 /** 2 * $RCSfile: editor_plugin_src.js,v $ 3 * $Revision: 1.8 $ 4 * $Date: 2006/02/06 20:02:38 $ 5 * 6 * Moxiecode DHTML Windows script. 7 * 8 * @author Moxiecode 9 * @copyright Copyright � 2004-2006, Moxiecode Systems AB, All rights reserved. 10 */ 11 12 // Patch openWindow, closeWindow TinyMCE functions 13 14 var TinyMCE_InlinePopupsPlugin = { 15 getInfo : function() { 16 return { 17 longname : 'Inline Popups', 18 author : 'Moxiecode Systems', 19 authorurl : 'http://tinymce.moxiecode.com', 20 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_inlinepopups.html', 21 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion 22 }; 23 } 24 }; 25 26 tinyMCE.addPlugin("inlinepopups", TinyMCE_InlinePopupsPlugin); 27 28 // Patch openWindow, closeWindow TinyMCE functions 29 30 TinyMCE_Engine.prototype.orgOpenWindow = TinyMCE_Engine.prototype.openWindow; 31 32 TinyMCE_Engine.prototype.openWindow = function(template, args) { 33 // Does the caller support inline 34 if (args['inline'] != "yes" || tinyMCE.isOpera || tinyMCE.getParam("plugins").indexOf('inlinepopups') == -1) { 35 mcWindows.selectedWindow = null; 36 args['mce_inside_iframe'] = false; 37 this.orgOpenWindow(template, args); 38 return; 39 } 40 41 var url, resizable, scrollbars; 42 43 args['mce_inside_iframe'] = true; 44 tinyMCE.windowArgs = args; 45 46 if (template['file'].charAt(0) != '/' && template['file'].indexOf('://') == -1) 47 url = tinyMCE.baseURL + "/themes/" + tinyMCE.getParam("theme") + "/" + template['file']; 48 else 49 url = template['file']; 50 51 if (!(width = parseInt(template['width']))) 52 width = 320; 53 54 if (!(height = parseInt(template['height']))) 55 height = 200; 56 57 resizable = (args && args['resizable']) ? args['resizable'] : "no"; 58 scrollbars = (args && args['scrollbars']) ? args['scrollbars'] : "no"; 59 60 height += 18; 61 62 // Replace all args as variables in URL 63 for (var name in args) { 64 if (typeof(args[name]) == 'function') 65 continue; 66 67 url = tinyMCE.replaceVar(url, name, escape(args[name])); 68 } 69 70 var elm = document.getElementById(this.selectedInstance.editorId + '_parent'); 71 var pos = tinyMCE.getAbsPosition(elm); 72 73 // Center div in editor area 74 pos.absLeft += Math.round((elm.firstChild.clientWidth / 2) - (width / 2)); 75 pos.absTop += Math.round((elm.firstChild.clientHeight / 2) - (height / 2)); 76 77 mcWindows.open(url, mcWindows.idCounter++, "modal=yes,width=" + width+ ",height=" + height + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",statusbar=" + resizable + ",left=" + pos.absLeft + ",top=" + pos.absTop); 78 }; 79 80 TinyMCE_Engine.prototype.orgCloseWindow = TinyMCE_Engine.prototype.closeWindow; 81 82 TinyMCE_Engine.prototype.closeWindow = function(win) { 83 if (mcWindows.selectedWindow != null) 84 mcWindows.selectedWindow.close(); 85 else 86 this.orgCloseWindow(win); 87 }; 88 89 TinyMCE_Engine.prototype.setWindowTitle = function(win_ref, title) { 90 for (var n in mcWindows.windows) { 91 var win = mcWindows.windows[n]; 92 if (typeof(win) == 'function') 93 continue; 94 95 if (win_ref.name == win.id + "_iframe") 96 window.frames[win.id + "_iframe"].document.getElementById(win.id + '_title').innerHTML = title; 97 } 98 }; 99 100 // * * * * * TinyMCE_Windows classes below 101 102 // Windows handler 103 function TinyMCE_Windows() { 104 this.settings = new Array(); 105 this.windows = new Array(); 106 this.isMSIE = (navigator.appName == "Microsoft Internet Explorer"); 107 this.isGecko = navigator.userAgent.indexOf('Gecko') != -1; 108 this.isSafari = navigator.userAgent.indexOf('Safari') != -1; 109 this.isMac = navigator.userAgent.indexOf('Mac') != -1; 110 this.isMSIE5_0 = this.isMSIE && (navigator.userAgent.indexOf('MSIE 5.0') != -1); 111 this.action = "none"; 112 this.selectedWindow = null; 113 this.lastSelectedWindow = null; 114 this.zindex = 100; 115 this.mouseDownScreenX = 0; 116 this.mouseDownScreenY = 0; 117 this.mouseDownLayerX = 0; 118 this.mouseDownLayerY = 0; 119 this.mouseDownWidth = 0; 120 this.mouseDownHeight = 0; 121 this.idCounter = 0; 122 }; 123 124 TinyMCE_Windows.prototype.init = function(settings) { 125 this.settings = settings; 126 127 if (this.isMSIE) 128 this.addEvent(document, "mousemove", mcWindows.eventDispatcher); 129 else 130 this.addEvent(window, "mousemove", mcWindows.eventDispatcher); 131 132 this.addEvent(document, "mouseup", mcWindows.eventDispatcher); 133 134 this.doc = document; 135 }; 136 137 TinyMCE_Windows.prototype.getParam = function(name, default_value) { 138 var value = null; 139 140 value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name]; 141 142 // Fix bool values 143 if (value == "true" || value == "false") 144 return (value == "true"); 145 146 return value; 147 }; 148 149 TinyMCE_Windows.prototype.eventDispatcher = function(e) { 150 e = typeof(e) == "undefined" ? window.event : e; 151 152 if (mcWindows.selectedWindow == null) 153 return; 154 155 // Switch focus 156 if (mcWindows.isGecko && e.type == "mousedown") { 157 var elm = e.currentTarget; 158 159 for (var n in mcWindows.windows) { 160 var win = mcWindows.windows[n]; 161 162 if (win.headElement == elm || win.resizeElement == elm) { 163 win.focus(); 164 break; 165 } 166 } 167 } 168 169 switch (e.type) { 170 case "mousemove": 171 mcWindows.selectedWindow.onMouseMove(e); 172 break; 173 174 case "mouseup": 175 mcWindows.selectedWindow.onMouseUp(e); 176 break; 177 178 case "mousedown": 179 mcWindows.selectedWindow.onMouseDown(e); 180 break; 181 182 case "focus": 183 mcWindows.selectedWindow.onFocus(e); 184 break; 185 } 186 }; 187 188 TinyMCE_Windows.prototype.addEvent = function(obj, name, handler) { 189 if (this.isMSIE) 190 obj.attachEvent("on" + name, handler); 191 else 192 obj.addEventListener(name, handler, true); 193 }; 194 195 TinyMCE_Windows.prototype.cancelEvent = function(e) { 196 if (this.isMSIE) { 197 e.returnValue = false; 198 e.cancelBubble = true; 199 } else 200 e.preventDefault(); 201 }; 202 203 TinyMCE_Windows.prototype.parseFeatures = function(opts) { 204 // Cleanup the options 205 opts = opts.toLowerCase(); 206 opts = opts.replace(/;/g, ","); 207 opts = opts.replace(/[^0-9a-z=,]/g, ""); 208 209 var optionChunks = opts.split(','); 210 var options = new Array(); 211 212 options['left'] = "10"; 213 options['top'] = "10"; 214 options['width'] = "300"; 215 options['height'] = "300"; 216 options['resizable'] = "yes"; 217 options['minimizable'] = "yes"; 218 options['maximizable'] = "yes"; 219 options['close'] = "yes"; 220 options['movable'] = "yes"; 221 options['statusbar'] = "yes"; 222 options['scrollbars'] = "auto"; 223 options['modal'] = "no"; 224 225 if (opts == "") 226 return options; 227 228 for (var i=0; i<optionChunks.length; i++) { 229 var parts = optionChunks[i].split('='); 230 231 if (parts.length == 2) 232 options[parts[0]] = parts[1]; 233 } 234 235 options['left'] = parseInt(options['left']); 236 options['top'] = parseInt(options['top']); 237 options['width'] = parseInt(options['width']); 238 options['height'] = parseInt(options['height']); 239 240 return options; 241 }; 242 243 TinyMCE_Windows.prototype.open = function(url, name, features) { 244 this.lastSelectedWindow = this.selectedWindow; 245 246 var win = new TinyMCE_Window(); 247 var winDiv, html = "", id; 248 var imgPath = this.getParam("images_path"); 249 250 features = this.parseFeatures(features); 251 252 // Create div 253 id = "mcWindow_" + name; 254 win.deltaHeight = 18; 255 256 if (features['statusbar'] == "yes") { 257 win.deltaHeight += 13; 258 259 if (this.isMSIE) 260 win.deltaHeight += 1; 261 } 262 263 width = parseInt(features['width']); 264 height = parseInt(features['height'])-win.deltaHeight; 265 266 if (this.isMSIE) 267 width -= 2; 268 269 // Setup first part of window 270 win.id = id; 271 win.url = url; 272 win.name = name; 273 win.features = features; 274 this.windows[name] = win; 275 276 iframeWidth = width; 277 iframeHeight = height; 278 279 // Create inner content 280 html += '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'; 281 html += '<html>'; 282 html += '<head>'; 283 html += '<title>Wrapper iframe</title>'; 284 html += '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">'; 285 html += '<link href="' + this.getParam("css_file") + '" rel="stylesheet" type="text/css" />'; 286 html += '</head>'; 287 html += '<body onload="parent.mcWindows.onLoad(\'' + name + '\');">'; 288 289 html += '<div id="' + id + '_container" class="mceWindow">'; 290 html += '<div id="' + id + '_head" class="mceWindowHead" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">'; 291 html += ' <div id="' + id + '_title" class="mceWindowTitle"'; 292 html += ' onselectstart="return false;" unselectable="on" style="-moz-user-select: none !important;"></div>'; 293 html += ' <div class="mceWindowHeadTools">'; 294 html += ' <a href="javascript:parent.mcWindows.windows[\'' + name + '\'].close();" target="_self" onmousedown="return false;" class="mceWindowClose"><img border="0" src="' + imgPath + '/window_close.gif" /></a>'; 295 // html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].maximize();" target="_self" onmousedown="return false;" class="mceWindowMaximize"></a>'; 296 // html += ' <a href="javascript:mcWindows.windows[\'' + name + '\'].minimize();" target="_self" onmousedown="return false;" class="mceWindowMinimize"></a>'; 297 html += ' </div>'; 298 html += '</div><div id="' + id + '_body" class="mceWindowBody" style="width: ' + width + 'px; height: ' + height + 'px;">'; 299 html += '<iframe id="' + id + '_iframe" name="' + id + '_iframe" frameborder="0" width="' + iframeWidth + '" height="' + iframeHeight + '" src="' + url + '" class="mceWindowBodyIframe" scrolling="' + features['scrollbars'] + '"></iframe></div>'; 300 301 if (features['statusbar'] == "yes") { 302 html += '<div id="' + id + '_statusbar" class="mceWindowStatusbar" onmousedown="parent.mcWindows.windows[\'' + name + '\'].focus();">'; 303
