Allow the settings view for galleries to be disabled when instantiating `wp.media.controller.GalleryEdit`.

Props nd987.
Fixes #23116.


git-svn-id: https://develop.svn.wordpress.org/trunk@28577 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-05-26 22:48:56 +00:00
parent 92f79f5bcd
commit 5413bfc35a
1 changed files with 19 additions and 13 deletions

View File

@ -797,6 +797,7 @@
title: l10n.editGalleryTitle,
priority: 60,
dragInfo: true,
displaySettings: true,
// Don't sync the selection, as the Edit Gallery library
// *is* the selection.
@ -838,10 +839,15 @@
},
gallerySettings: function( browser ) {
if ( ! this.get('displaySettings') ) {
return;
}
var library = this.get('library');
if ( ! library || ! browser )
if ( ! library || ! browser ) {
return;
}
library.gallery = library.gallery || new Backbone.Model();