WordPress.org

Make WordPress Core

Ticket #27423: 27423.22.patch

File 27423.22.patch, 2.5 KB (added by iseulde, 6 years ago)
  • src/wp-includes/css/media-views.css

     
    25112511        }
    25122512}
    25132513
    2514 .attachments[data-columns="1"] .attachment {
     2514.media-frame-content[data-columns="1"] .attachment {
    25152515        width: 100%;
    25162516}
    25172517
    2518 .attachments[data-columns="2"] .attachment {
     2518.media-frame-content[data-columns="2"] .attachment {
    25192519        width: 50%;
    25202520}
    25212521
    2522 .attachments[data-columns="3"] .attachment {
     2522.media-frame-content[data-columns="3"] .attachment {
    25232523        width: 33.3%;
    25242524}
    25252525
    2526 .attachments[data-columns="4"] .attachment {
     2526.media-frame-content[data-columns="4"] .attachment {
    25272527        width: 25%;
    25282528}
    25292529
    2530 .attachments[data-columns="5"] .attachment {
     2530.media-frame-content[data-columns="5"] .attachment {
    25312531        width: 20%;
    25322532}
    25332533
    2534 .attachments[data-columns="6"] .attachment {
     2534.media-frame-content[data-columns="6"] .attachment {
    25352535        width: 16.6%;
    25362536}
    25372537
    2538 .attachments[data-columns="7"] .attachment {
     2538.media-frame-content[data-columns="7"] .attachment {
    25392539        width: 14.2%;
    25402540}
    25412541
    2542 .attachments[data-columns="8"] .attachment {
     2542.media-frame-content[data-columns="8"] .attachment {
    25432543        width: 12.5%;
    25442544}
    25452545
    2546 .attachments[data-columns="9"] .attachment {
     2546.media-frame-content[data-columns="9"] .attachment {
    25472547        width: 11.1%;
    25482548}
    25492549
    2550 .attachments[data-columns="10"] .attachment {
     2550.media-frame-content[data-columns="10"] .attachment {
    25512551        width: 10%;
    25522552}
    25532553
    2554 .attachments[data-columns="11"] .attachment {
     2554.media-frame-content[data-columns="11"] .attachment {
    25552555        width: 9%;
    25562556}
    25572557
    2558 .attachments[data-columns="12"] .attachment {
     2558.media-frame-content[data-columns="12"] .attachment {
    25592559        width: 8.3%;
    25602560}
  • src/wp-includes/js/media-views.js

     
    52305230                        _.bindAll( this, 'setColumns' );
    52315231
    52325232                        if ( this.options.resize ) {
    5233                                 $( window ).on( 'resize.media-modal-columns', this.setColumns );
     5233                                $( window ).on( 'resize.media-modal-columns', _.debounce( this.setColumns, this.options.refreshSensitivity ) );
    52345234                                this.controller.on( 'open', this.setColumns );
    52355235                        }
    52365236
     
    53085308                                this.columns = Math.min( Math.round( width / this.options.idealColumnWidth ), 12 ) || 1;
    53095309
    53105310                                if ( ! prev || prev !== this.columns ) {
    5311                                         this.$el.attr( 'data-columns', this.columns );
     5311                                        this.$el.parents( '.media-frame-content' ).attr( 'data-columns', this.columns );
    53125312                                }
    53135313                        }
    53145314                },