Make WordPress Core

Changeset 28577


Ignore:
Timestamp:
05/26/2014 10:48:56 PM (11 years ago)
Author:
wonderboymusic
Message:

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

Props nd987.
Fixes #23116.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r28371 r28577  
    786786    media.controller.GalleryEdit = media.controller.Library.extend({
    787787        defaults: {
    788             id:         'gallery-edit',
    789             multiple:   false,
    790             describe:   true,
    791             edge:       199,
    792             editing:    false,
    793             sortable:   true,
    794             searchable: false,
    795             toolbar:    'gallery-edit',
    796             content:    'browse',
    797             title:      l10n.editGalleryTitle,
    798             priority:   60,
    799             dragInfo:   true,
     788            id:              'gallery-edit',
     789            multiple:        false,
     790            describe:        true,
     791            edge:            199,
     792            editing:         false,
     793            sortable:        true,
     794            searchable:      false,
     795            toolbar:         'gallery-edit',
     796            content:         'browse',
     797            title:           l10n.editGalleryTitle,
     798            priority:        60,
     799            dragInfo:        true,
     800            displaySettings: true,
    800801
    801802            // Don't sync the selection, as the Edit Gallery library
     
    839840
    840841        gallerySettings: function( browser ) {
     842            if ( ! this.get('displaySettings') ) {
     843                return;
     844            }
     845
    841846            var library = this.get('library');
    842847
    843             if ( ! library || ! browser )
     848            if ( ! library || ! browser ) {
    844849                return;
     850            }
    845851
    846852            library.gallery = library.gallery || new Backbone.Model();
Note: See TracChangeset for help on using the changeset viewer.