Make WordPress Core

Changeset 29087


Ignore:
Timestamp:
07/11/2014 05:43:26 AM (10 years ago)
Author:
wonderboymusic
Message:

Media Grid: "Add New" should open and close, not just open.

See #24716.

Location:
trunk/src/wp-includes/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-grid.js

    r29086 r29087  
    231231
    232232        addNewClickHandler: function() {
    233             this.trigger( 'show:upload:attachment' );
     233            this.trigger( 'toggle:upload:attachment' );
    234234        },
    235235
  • trunk/src/wp-includes/js/media-views.js

    r29082 r29087  
    56035603            });
    56045604
    5605             this.listenTo( this.controller, 'show:upload:attachment', _.bind( this.showUploader, this ) );
     5605            this.listenTo( this.controller, 'toggle:upload:attachment', _.bind( this.toggleUploader, this ) );
     5606
    56065607            this.createToolbar();
    56075608            this.createUploader();
     
    57455746        },
    57465747
    5747         showUploader: function() {
    5748             this.uploader.show();
     5748        toggleUploader: function() {
     5749            if ( this.uploader.$el.hasClass( 'hidden' ) ) {
     5750                this.uploader.show();
     5751            } else {
     5752                this.uploader.hide();
     5753            }
    57495754        },
    57505755
Note: See TracChangeset for help on using the changeset viewer.