Don't render Attachment Display Settings when display is set to false. Currently, the value for display in the media.view.AttachmentsBrowser instance in the media.view.MediaFrame.Select frame is set to the value for displaySettings.

These values do different things, so check for the existence of `display` on the state before arbitrarily setting it to the `displaySettings` value.

Real world: this hides display settings when you select an image while editing a Gallery.

Fixes #28653.

Built from https://develop.svn.wordpress.org/trunk@29285


git-svn-id: http://core.svn.wordpress.org/trunk@29067 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-07-24 20:58:16 +00:00
parent 78518beb6b
commit 9382741cbe
2 changed files with 3 additions and 2 deletions

View File

@ -830,6 +830,7 @@
// Attachments browser defaults. @see media.view.AttachmentsBrowser
searchable: false,
sortable: true,
display: false,
// Initial region modes.
content: 'browse',
toolbar: 'gallery-edit',
@ -2174,7 +2175,7 @@
sortable: state.get('sortable'),
search: state.get('searchable'),
filters: state.get('filterable'),
display: state.get('displaySettings'),
display: state.has('display') ? state.get('display') : state.get('displaySettings'),
dragInfo: state.get('dragInfo'),
suggestedWidth: state.get('suggestedWidth'),

File diff suppressed because one or more lines are too long