Changeset 29189
- Timestamp:
- 07/16/2014 04:13:47 PM (11 years ago)
- Location:
- trunk/src/wp-includes/js
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/mce-view.js
r29187 r29189 131 131 node = $( node ).find( '.wpview-content' )[0]; 132 132 133 node.innerHTML = ''; 133 if ( node ) { 134 node.innerHTML = ''; 135 } 134 136 135 137 iframe = dom.add( node, 'iframe', { … … 153 155 '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />' + 154 156 '</head>' + 155 '<body style="padding: 0; margin: 0;" class="' + /* editor.getBody().className + */'">' +157 '<body data-context="iframe-sandbox" style="padding: 0; margin: 0;" class="' + editor.getBody().className + '">' + 156 158 content + 157 159 '</body>' + … … 508 510 this.fetching = false; 509 511 510 _.bindAll( this, 'createIframe', 'setNode', 'fetch' );512 _.bindAll( this, 'createIframe', 'setNode', 'fetch', 'pausePlayers' ); 511 513 $( this ).on( 'ready', this.setNode ); 512 514 }, 513 515 514 setNode: function () { 516 setNode: function ( event, editor, node ) { 517 this.node = node; 518 editor.on( 'hide', this.pausePlayers ); 519 515 520 if ( this.parsed ) { 516 521 this.createIframe( this.parsed ); … … 565 570 } 566 571 return this.parsed; 572 }, 573 574 pausePlayers: function() { 575 var p, win = $( 'iframe', this.node ).get(0).contentWindow; 576 if ( win.mejs ) { 577 for ( p in win.mejs.players ) { 578 win.mejs.players[p].pause(); 579 win.mejs.players[p].remove(); 580 } 581 } 567 582 } 568 583 }, -
trunk/src/wp-includes/js/mediaelement/wp-mediaelement.js
r28370 r29189 7 7 $(function () { 8 8 var settings = {}; 9 10 if ( $( document.body ).hasClass( 'mce-content-body' ) ) {11 return;12 }13 9 14 10 if ( typeof _wpmejsSettings !== 'undefined' ) {
Note: See TracChangeset
for help on using the changeset viewer.