Media Grid: "Add New" should open and close, not just open.
See #24716. git-svn-id: https://develop.svn.wordpress.org/trunk@29087 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ce01c5c760
commit
aba2e372e0
@ -230,7 +230,7 @@
|
||||
},
|
||||
|
||||
addNewClickHandler: function() {
|
||||
this.trigger( 'show:upload:attachment' );
|
||||
this.trigger( 'toggle:upload:attachment' );
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -5602,7 +5602,8 @@
|
||||
AttachmentView: media.view.Attachment.Library
|
||||
});
|
||||
|
||||
this.listenTo( this.controller, 'show:upload:attachment', _.bind( this.showUploader, this ) );
|
||||
this.listenTo( this.controller, 'toggle:upload:attachment', _.bind( this.toggleUploader, this ) );
|
||||
|
||||
this.createToolbar();
|
||||
this.createUploader();
|
||||
this.createAttachments();
|
||||
@ -5744,8 +5745,12 @@
|
||||
this.views.add( this.uploader );
|
||||
},
|
||||
|
||||
showUploader: function() {
|
||||
this.uploader.show();
|
||||
toggleUploader: function() {
|
||||
if ( this.uploader.$el.hasClass( 'hidden' ) ) {
|
||||
this.uploader.show();
|
||||
} else {
|
||||
this.uploader.hide();
|
||||
}
|
||||
},
|
||||
|
||||
createAttachments: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user