WordPress.org

Make WordPress Core

Ticket #34350: 34350.10b.patch

File 34350.10b.patch, 1.7 KB (added by imath, 6 years ago)
  • src/wp-includes/js/media-grid.js

    diff --git src/wp-includes/js/media-grid.js src/wp-includes/js/media-grid.js
    index 01db38b..6fe1d9f 100644
    var Button = wp.media.view.Button, 
    150150DeleteSelectedPermanently = DeleteSelected.extend({
    151151        initialize: function() {
    152152                DeleteSelected.prototype.initialize.apply( this, arguments );
    153                 this.listenTo( this.controller, 'select:activate', this.selectActivate );
    154                 this.listenTo( this.controller, 'select:deactivate', this.selectDeactivate );
     153                this.controller.on( 'select:activate', this.selectActivate );
     154                this.controller.on( 'select:deactivate', this.selectDeactivate );
    155155        },
    156156
    157157        filterChange: function( model ) {
    DeleteSelected = Button.extend({ 
    197197        initialize: function() {
    198198                Button.prototype.initialize.apply( this, arguments );
    199199                if ( this.options.filters ) {
    200                         this.listenTo( this.options.filters.model, 'change', this.filterChange );
     200                        this.options.filters.model.on( 'change', this.filterChange );
    201201                }
    202                 this.listenTo( this.controller, 'selection:toggle', this.toggleDisabled );
     202                this.controller.on( 'selection:toggle', this.toggleDisabled, this );
    203203        },
    204204
    205205        filterChange: function( model ) {
    SelectModeToggle = Button.extend({ 
    251251                } );
    252252
    253253                Button.prototype.initialize.apply( this, arguments );
    254                 this.listenTo( this.controller, 'select:activate select:deactivate', this.toggleBulkEditHandler );
    255                 this.listenTo( this.controller, 'selection:action:done', this.back );
     254                this.controller.on( 'select:activate select:deactivate', this.toggleBulkEditHandler, this );
     255                this.controller.on( 'selection:action:done', this.back, this );
    256256        },
    257257
    258258        back: function () {