Make WordPress Core

Ticket #22748: 22748.diff

File 22748.diff, 1.2 KB (added by koopersmith, 12 years ago)
  • wp-includes/js/media-views.js

     
    31113111                                refreshSensitivity: 200,
    31123112                                refreshThreshold:   3,
    31133113                                AttachmentView:     media.view.Attachment,
    3114                                 sortable:           false
     3114                                sortable:           false,
     3115                                resize:             true
    31153116                        });
    31163117
    31173118                        this._viewsByCid = {};
     
    31403141                        _.bindAll( this, 'css' );
    31413142                        this.model.on( 'change:edge change:gutter', this.css, this );
    31423143                        this._resizeCss = _.debounce( _.bind( this.css, this ), this.refreshSensitivity );
    3143                         $(window).on( 'resize.attachments', this._resizeCss );
     3144                        if ( this.options.resize )
     3145                                $(window).on( 'resize.attachments', this._resizeCss );
    31443146                        this.css();
    31453147                },
    31463148
     
    31703172                        if ( ! this.$el.is(':visible') )
    31713173                                return edge;
    31723174
    3173 
    31743175                        gutter  = this.model.get('gutter') * 2;
    31753176                        width   = this.$el.width() - gutter;
    31763177                        columns = Math.ceil( width / ( edge + gutter ) );
     
    36723673                                collection: this.collection,
    36733674                                selection:  this.collection,
    36743675                                sortable:   true,
     3676                                resize:     false,
    36753677                                model:      new Backbone.Model({
    36763678                                        edge:   40,
    36773679                                        gutter: 5