Changeset 40827
- Timestamp:
- 05/24/2017 05:31:00 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/widgets/media-widgets.js
r40821 r40827 641 641 */ 642 642 selectMedia: function selectMedia() { 643 var control = this, selection, mediaFrame, defaultSync, mediaFrameProps ;643 var control = this, selection, mediaFrame, defaultSync, mediaFrameProps, selectionModels = []; 644 644 645 645 if ( control.isSelected() && 0 !== control.model.get( 'attachment_id' ) ) { 646 selection = new wp.media.model.Selection([ control.selectedAttachment ]);647 } else {648 selection = null; 649 }646 selectionModels.push( control.selectedAttachment ); 647 } 648 649 selection = new wp.media.model.Selection( selectionModels, { multiple: false } ); 650 650 651 651 mediaFrameProps = control.mapModelToMediaFrameProps( control.model.toJSON() );
Note: See TracChangeset
for help on using the changeset viewer.