Make WordPress Core

Ticket #29074: 29074.2.diff

File 29074.2.diff, 3.0 KB (added by celloexpressions, 11 years ago)

Also fix for plugin details, although this requires patching thickbox. Not sure if we should do that, but it doesn't seem to cause issues anywhere else.

  • src/wp-admin/css/common.css

     
    218218        padding-top: 1px;
    219219}
    220220
     221body.modal-open {
     222        overflow: hidden;
     223}
     224
    221225iframe,
    222226img {
    223227        border: 0;
  • src/wp-admin/css/themes.css

     
    409409        z-index: 10;
    410410}
    411411
    412 body.theme-overlay-open {
    413         overflow: hidden;
    414 }
    415 
    416412.theme-overlay .theme-header {
    417413        position: absolute;
    418414        top: 0;
  • src/wp-admin/js/theme.js

     
    701701        // Performs the actions to effectively close
    702702        // the theme details overlay
    703703        closeOverlay: function() {
    704                 $( 'body' ).removeClass( 'theme-overlay-open' );
     704                $( 'body' ).removeClass( 'modal-open' );
    705705                this.remove();
    706706                this.unbind();
    707707                this.trigger( 'theme:collapse' );
     
    10001000
    10011001                // Sets this.view to 'detail'
    10021002                this.setView( 'detail' );
    1003                 $( 'body' ).addClass( 'theme-overlay-open' );
     1003                $( 'body' ).addClass( 'modal-open' );
    10041004
    10051005                // Set up the theme details view
    10061006                this.overlay = new themes.view.Details({
  • src/wp-includes/js/media-views.js

     
    32283228                                };
    32293229                        }
    32303230
     3231                        // Disable page scrolling.
     3232                        $( 'body' ).addClass( 'modal-open' );
     3233
    32313234                        $el.show().find( '.media-modal-close' ).focus();
    32323235                        return this.propagate('open');
    32333236                },
     
    32433246                                return this;
    32443247                        }
    32453248
     3249                        // Enable page scrolling.
     3250                        $( 'body' ).removeClass( 'modal-open' );
     3251
    32463252                        // Hide modal and remove restricted media modal tab focus once it's closed
    32473253                        this.$el.hide().undelegate( 'keydown' );
    32483254
  • src/wp-includes/js/thickbox/thickbox.js

     
    4646                        if(document.getElementById("TB_overlay") === null){
    4747                                jQuery("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
    4848                                jQuery("#TB_overlay").click(tb_remove);
     49                                jQuery( 'body' ).addClass( 'modal-open' );
    4950                        }
    5051                }
    5152
     
    264265        jQuery("#TB_imageOff").unbind("click");
    265266        jQuery("#TB_closeWindowButton").unbind("click");
    266267        jQuery("#TB_window").fadeOut("fast",function(){jQuery('#TB_window,#TB_overlay,#TB_HideSelect').trigger("tb_unload").unbind().remove();});
     268        jQuery( 'body' ).removeClass( 'modal-open' );
    267269        jQuery("#TB_load").remove();
    268270        if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
    269271                jQuery("body","html").css({height: "auto", width: "auto"});