Media: Correctly set the edit gallery's library. see #21390.

git-svn-id: https://develop.svn.wordpress.org/trunk@22506 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-11-09 12:09:15 +00:00
parent 1d6fa49ae2
commit cc58e827f3
1 changed files with 5 additions and 0 deletions

View File

@ -502,6 +502,10 @@
},
initialize: function() {
// If we haven't been provided a `library`, create a `Selection`.
if ( ! this.get('library') )
this.set( 'library', new media.model.Selection() );
// The single `Attachment` view to be used in the `Attachments` view.
if ( ! this.get('AttachmentView') )
this.set( 'AttachmentView', media.view.Attachment.Gallery );
@ -846,6 +850,7 @@
// Gallery states.
new media.controller.Gallery({
library: options.selection,
editing: options.editing,
menu: 'gallery'
}),