Media Grid: "Add New" should open and close, not just open.
See #24716. Built from https://develop.svn.wordpress.org/trunk@29087 git-svn-id: http://core.svn.wordpress.org/trunk@28873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ea42b8e48e
commit
c22c49a1ba
|
@ -230,7 +230,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
addNewClickHandler: function() {
|
addNewClickHandler: function() {
|
||||||
this.trigger( 'show:upload:attachment' );
|
this.trigger( 'toggle:upload:attachment' );
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5602,7 +5602,8 @@
|
||||||
AttachmentView: media.view.Attachment.Library
|
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.createToolbar();
|
||||||
this.createUploader();
|
this.createUploader();
|
||||||
this.createAttachments();
|
this.createAttachments();
|
||||||
|
@ -5744,8 +5745,12 @@
|
||||||
this.views.add( this.uploader );
|
this.views.add( this.uploader );
|
||||||
},
|
},
|
||||||
|
|
||||||
showUploader: function() {
|
toggleUploader: function() {
|
||||||
|
if ( this.uploader.$el.hasClass( 'hidden' ) ) {
|
||||||
this.uploader.show();
|
this.uploader.show();
|
||||||
|
} else {
|
||||||
|
this.uploader.hide();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
createAttachments: function() {
|
createAttachments: function() {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue