Ticket #22541: 22541.3.diff
File 22541.3.diff, 3.9 KB (added by , 11 years ago) |
---|
-
wp-admin/js/wp-fullscreen.js
482 482 } 483 483 484 484 api.medialib = function() { 485 if ( s.has_tinymce && 'tinymce' === s.mode ) { 486 tinyMCE.execCommand('WP_Medialib'); 487 } else { 488 var href = $('#wp-' + s.editor_id + '-media-buttons a.thickbox').attr('href') || ''; 489 490 if ( href ) 491 tb_show('', href); 492 } 485 if ( typeof wp !== 'undefined' && wp.media && wp.media.editor ) 486 wp.media.editor.open('content'); 493 487 } 494 488 495 489 api.refresh_buttons = function( fade ) { -
wp-includes/css/editor.css
1148 1148 padding: 2px; 1149 1149 position: absolute; 1150 1150 display: none; 1151 z-index: 999998;1151 z-index: 100000; 1152 1152 } 1153 1153 1154 1154 #wp_editimgbtn, -
wp-includes/css/media-views.css
62 62 left: 40px; 63 63 right: 40px; 64 64 bottom: 40px; 65 z-index: 1 25000;65 z-index: 160000; 66 66 } 67 67 68 68 .media-modal-backdrop { … … 73 73 bottom: 0; 74 74 background: #000; 75 75 opacity: 0.8; 76 z-index: 1 20000;76 z-index: 159900; 77 77 } 78 78 79 79 .media-modal-backdrop div { -
wp-includes/js/media-editor.js
470 470 }, 471 471 472 472 init: function() { 473 $(document.body).on( 'click', '.insert-media', function( event ) {473 $(document.body).on( 'click', '.insert-media', function( event ) { 474 474 var $this = $(this), 475 editor = $this.data('editor'), 476 workflow; 475 editor = $this.data('editor'); 477 476 478 477 event.preventDefault(); 479 478 … … 484 483 // See: http://core.trac.wordpress.org/ticket/22445 485 484 $this.blur(); 486 485 487 if ( ! _.isString( editor ) ) 488 return; 486 wp.media.editor.open( editor ); 487 }); 488 }, 489 489 490 workflow = wp.media.editor.get( editor ); 490 open: function( id ) { 491 var workflow; 491 492 492 // If the workflow exists, just open it. 493 if ( workflow ) { 494 workflow.open(); 495 return; 496 } 493 // If an empty `id` is provided, default to `wpActiveEditor`. 494 id = id || wpActiveEditor; 497 495 498 // Initialize the editor's workflow if we haven't yet. 499 wp.media.editor.add( editor ); 500 }); 496 // If that doesn't work, fall back to `tinymce.activeEditor`. 497 if ( ! id && typeof tinymce !== 'undefined' && tinymce.activeEditor ) 498 id = id || tinymce.activeEditor.id; 499 500 // Last but not least, fall back to the empty string. 501 id = id || ''; 502 503 workflow = wp.media.editor.get( id ); 504 505 // If the workflow exists, open it. 506 // Initialize the editor's workflow if we haven't yet. 507 if ( workflow ) 508 workflow.open(); 509 else 510 workflow = wp.media.editor.add( id ); 511 512 return workflow; 501 513 } 502 514 }; 503 515 504 516 $( wp.media.editor.init ); 505 }(jQuery)); 506 No newline at end of file 517 }(jQuery)); -
wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
63 63 }); 64 64 65 65 ed.addCommand('WP_Medialib', function() { 66 var id = ed.getParam('wp_fullscreen_editor_id') || ed.getParam('fullscreen_editor_id') || ed.id, 67 link = tinymce.DOM.select('#wp-' + id + '-media-buttons a.thickbox'); 68 69 if ( link && link[0] ) 70 link = link[0]; 71 else 72 return; 73 74 tb_show('', link.href); 66 if ( typeof wp !== 'undefined' && wp.media && wp.media.editor ) 67 wp.media.editor.open( ed.id ); 75 68 }); 76 69 77 70 // Register buttons