Changeset 8189
- Timestamp:
- 06/24/2008 09:59:06 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r8172 r8189 66 66 ?> 67 67 <script type="text/javascript"> 68 <!-- 69 top.send_to_editor('<?php echo addslashes($html); ?>');70 top.tb_remove();71 --> 68 /* <![CDATA[ */ 69 var win = window.dialogArguments || opener || parent || top; 70 win.send_to_editor('<?php echo addslashes($html); ?>'); 71 /* ]]> */ 72 72 </script> 73 73 <?php -
trunk/wp-admin/js/media-upload.js
r7989 r8189 1 1 // send html to the post editor 2 2 function send_to_editor(h) { 3 var win = window.dialogArguments || opener || parent || top; 3 if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.activeEditor ) && !ed.isHidden() ) { 4 ed.focus(); 5 if (tinymce.isIE) 6 ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark); 4 7 5 tinyMCE = win.tinyMCE; 6 if ( typeof tinyMCE != 'undefined' && ( ed = tinyMCE.getInstanceById('content') ) && !ed.isHidden() ) { 7 tinyMCE.selectedInstance.getWin().focus(); 8 tinyMCE.execCommand('mceInsertContent', false, h); 8 ed.execCommand('mceInsertContent', false, h); 9 9 } else 10 win.edInsertContent(win.edCanvas, h); 10 edInsertContent(edCanvas, h); 11 12 tb_remove(); 11 13 } 12 14 … … 36 38 }); 37 39 }; 40 41 jQuery('a.thickbox').click(function(){ 42 if ( typeof tinyMCE != 'undefined' && tinyMCE.activeEditor ) { 43 tinyMCE.get('content').focus(); 44 tinyMCE.activeEditor.windowManager.bookmark = tinyMCE.activeEditor.selection.getBookmark('simple'); 45 } 46 }); 38 47 39 48 $(window).resize( function() { tb_position() } ); -
trunk/wp-includes/script-loader.php
r8182 r8189 160 160 ) ); 161 161 $scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080520' ); 162 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080 523' );162 $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080624' ); 163 163 $scripts->localize( 'upload', 'uploadL10n', array( 164 164 'browseTitle' => attribute_escape(__('Browse your files')),
Note: See TracChangeset
for help on using the changeset viewer.