Changeset 22875
- Timestamp:
- 11/27/2012 07:09:00 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/js/wp-fullscreen.js
r22019 r22875 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(s.editor_id); 493 487 } 494 488 -
trunk/wp-includes/css/editor.css
r22640 r22875 1149 1149 position: absolute; 1150 1150 display: none; 1151 z-index: 999998;1151 z-index: 100000; 1152 1152 } 1153 1153 -
trunk/wp-includes/css/media-views.css
r22870 r22875 69 69 right: 40px; 70 70 bottom: 40px; 71 z-index: 1 25000;71 z-index: 160000; 72 72 } 73 73 … … 80 80 background: #000; 81 81 opacity: 0.8; 82 z-index: 1 20000;82 z-index: 159900; 83 83 } 84 84 -
trunk/wp-includes/js/media-editor.js
r22865 r22875 472 472 473 473 init: function() { 474 $(document.body).on( 'click', '.insert-media', function( event ) {474 $(document.body).on( 'click', '.insert-media', function( event ) { 475 475 var $this = $(this), 476 editor = $this.data('editor'), 477 workflow; 476 editor = $this.data('editor'); 478 477 479 478 event.preventDefault(); … … 486 485 $this.blur(); 487 486 488 if ( ! _.isString( editor ) ) 489 return; 490 491 workflow = wp.media.editor.get( editor ); 492 493 // If the workflow exists, just open it. 494 if ( workflow ) { 495 workflow.open(); 496 return; 497 } 498 499 // Initialize the editor's workflow if we haven't yet. 500 wp.media.editor.add( editor ); 487 wp.media.editor.open( editor ); 501 488 }); 489 }, 490 491 open: function( id ) { 492 var workflow; 493 494 // If an empty `id` is provided, default to `wpActiveEditor`. 495 id = id || wpActiveEditor; 496 497 // If that doesn't work, fall back to `tinymce.activeEditor`. 498 if ( ! id && typeof tinymce !== 'undefined' && tinymce.activeEditor ) 499 id = id || tinymce.activeEditor.id; 500 501 // Last but not least, fall back to the empty string. 502 id = id || ''; 503 504 workflow = wp.media.editor.get( id ); 505 506 // If the workflow exists, open it. 507 // Initialize the editor's workflow if we haven't yet. 508 if ( workflow ) 509 workflow.open(); 510 else 511 workflow = wp.media.editor.add( id ); 512 513 return workflow; 502 514 } 503 515 }; -
trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
r22857 r22875 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
Note: See TracChangeset
for help on using the changeset viewer.