Make WordPress Core

Ticket #29074: 29074.diff

File 29074.diff, 2.1 KB (added by celloexpressions, 11 years ago)

Disable page scrolling for media, standardize themes to use the same class.

  • 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