Make WordPress Core

Changeset 22183


Ignore:
Timestamp:
10/11/2012 04:04:12 AM (12 years ago)
Author:
koopersmith
Message:

Media Modal: Attachments on the gallery page now inherit general events with the exception of click-to-select. see #21390.

File:
1 edited

Legend:

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

    r22175 r22183  
    386386
    387387        events: {
    388             'click .attachment-preview': 'toggleSelection',
     388            'click .attachment-preview':      'toggleSelection',
    389389            'mouseenter .attachment-preview': 'shrink',
    390390            'mouseleave .attachment-preview': 'expand',
    391             'change .describe': 'describe'
     391            'change .describe':               'describe',
     392            'click .close':                   'toggleSelection'
    392393        },
    393394
     
    563564        },
    564565
    565         events: {
    566             'click .close': 'toggleSelection'
    567         }
     566        events: (function() {
     567            var events = _.clone( media.view.Attachment.prototype.events );
     568            delete events['click .attachment-preview'];
     569            return events;
     570        }())
    568571    });
    569572
Note: See TracChangeset for help on using the changeset viewer.