Ticket #28842: 28842.disable-autoselect.patch
| File 28842.disable-autoselect.patch, 2.1 KB (added by , 11 years ago) |
|---|
-
src/wp-includes/js/media-grid.js
135 135 content: 'browse', 136 136 toolbar: 'select', 137 137 contentUserSetting: false, 138 filterable: 'all' 138 filterable: 'all', 139 autoSelect: false 139 140 }) 140 141 ]); 141 142 }, -
src/wp-includes/js/media-views.js
594 594 searchable: true, 595 595 filterable: false, 596 596 sortable: true, 597 597 autoSelect: true, 598 598 describe: false, 599 599 // Uses a user setting to override the content mode. 600 600 contentUserSetting: true, … … 751 751 if ( 'upload' === content.mode() ) { 752 752 this.frame.content.mode('browse'); 753 753 } 754 this.get('selection').add( attachment );755 754 755 if ( this.get('autoSelect') ) { 756 this.get('selection').add( attachment ); 757 } 758 756 759 // Set focus back to where it goes when an attachment is selected. 757 760 $( '.attachments-browser .attachments .attachment' ).first().focus(); 758 761 }, … … 5719 5722 }; 5720 5723 5721 5724 if ( media.view.settings.mediaTrash && 5722 this.controller. activeModes.where( { id: 'grid' } ).length) {5725 this.controller.isModeActive( 'grid' ) ) { 5723 5726 5724 5727 filters.trash = { 5725 5728 text: l10n.trash, … … 5835 5838 // Feels odd to bring the global media library switcher into the Attachment 5836 5839 // browser view. Is this a use case for doAction( 'add:toolbar-items:attachments-browser', this.toolbar ); 5837 5840 // which the controller can tap into and add this view? 5838 if ( this.controller. activeModes.where( { id: 'grid' } ).length) {5841 if ( this.controller.isModeActive( 'grid' ) ) { 5839 5842 LibraryViewSwitcher = media.View.extend({ 5840 5843 className: 'view-switch media-grid-view-switch', 5841 5844 template: media.template( 'media-library-view-switcher')