Make WordPress Core

Ticket #28330: 28330.2.patch

File 28330.2.patch, 2.5 KB (added by iseulde, 11 years ago)
  • src/wp-admin/js/wp-fullscreen.js

     
    66 * Access the API globally using the window.wp.editor.fullscreen variable.
    77 */
    88( function( $, window ) {
    9         var api, ps, s, toggleUI, uiTimer, PubSub,
     9        var api, ps, s, toggleUI, uiTimer, PubSub, editorBackgroundColor, editorColor,
    1010                uiScrollTop = 0,
    1111                transitionend = 'transitionend webkitTransitionEnd',
    1212                $body = $( document.body ),
     
    136136         * @param string mode Optional. Switch to the given mode before opening.
    137137         */
    138138        api.on = function() {
    139                 var id, $dfwWrap, titleId;
     139                var id, $dfwWrap, titleId, fullscreenStyle;
    140140
    141141                if ( s.visible ) {
    142142                        return;
     
    198198                        s.$dfwTitle = null;
    199199                }
    200200
     201                editorBackgroundColor = s.editor.dom.getStyle( s.editor.getBody(), 'background-color', true );
     202                editorColor = s.editor.dom.getStyle( s.editor.getBody(), 'color', true );
     203
     204                $( '#fullscreen-overlay' ).css( 'background-color', editorBackgroundColor );
     205                s.$dfwTitle.css( 'color', editorColor );
     206
     207                fullscreenStyle =
     208                        '<style id="wp-fullscreen-style" type="text/css">' +
     209                                '.wp-fullscreen-active.wp-dfw-show-ui .wp-fullscreen-title,' +
     210                                '.wp-fullscreen-active.wp-dfw-show-ui .wp-editor-container {' +
     211                                        'border-color: ' +
     212                                                editorColor.replace( /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi, function( match, r, g, b ) {
     213                                                        return 'rgba( ' + r + ', ' + g + ', ' + b + ', 0.5 )';
     214                                                } ) +
     215                                                '!important;' +
     216                                '}' +
     217                        '</style>';
     218
     219                if ( ! $( '#wp-fullscreen-style' ).replaceWith( fullscreenStyle ).length ) {
     220                        $( 'head' ).append( fullscreenStyle );
     221                }
     222
    201223                api.ui.fade( 'show', 'showing', 'shown' );
    202224        };
    203225
     
    413435        });
    414436
    415437        ps.subscribe( 'hiding', function() { // This event occurs while the overlay blocks the DFW UI.
     438                s.$dfwTitle.css( 'color', '' );
     439
    416440                $body.removeClass( 'wp-fullscreen-active' );
    417441
    418442                if ( s.$dfwTitle ) {
  • src/wp-includes/js/tinymce/skins/wordpress/wp-content.css

     
    2727/* DFW mode */
    2828html.wp-fullscreen,
    2929html.wp-fullscreen body {
    30         background: transparent;
    3130        width: auto;
    3231        max-width: none;
    3332        min-height: 0;