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

git-svn-id: http://core.svn.wordpress.org/trunk@22506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith 2012-11-09 12:09:15 +00:00
parent 9af37358a9
commit db30495fcd

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'
}),