Ticket #37188: 37188.5.diff
File 37188.5.diff, 6.9 KB (added by , 8 years ago) |
---|
-
src/wp-admin/css/media.css
469 469 .upload-php .mode-grid .media-sidebar { 470 470 position: relative; 471 471 width: auto; 472 margin- bottom: 16px;472 margin-top: 12px; 473 473 padding: 0 16px; 474 474 border-left: 4px solid #dd3d36; 475 475 -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); … … 526 526 left: auto; 527 527 bottom: auto; 528 528 padding-top: 0; 529 margin-top: 0;529 margin-top: 20px; 530 530 border: 4px dashed #b4b9be; 531 531 } 532 532 -
src/wp-admin/upload.php
77 77 78 78 <?php 79 79 if ( current_user_can( 'upload_files' ) ) { ?> 80 <a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action "><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php80 <a href="<?php echo admin_url( 'media-new.php' ); ?>" class="page-title-action aria-button-if-js"><?php echo esc_html_x( 'Add New', 'file' ); ?></a><?php 81 81 } 82 82 ?> 83 83 -
src/wp-includes/js/media/views/attachments/browser.js
40 40 41 41 this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this ); 42 42 this.controller.on( 'edit:selection', this.editSelection ); 43 this.createToolbar(); 43 44 44 // In the Media Library, the sidebar is used to display errors before the attachments grid. 45 45 if ( this.options.sidebar && 'errors' === this.options.sidebar ) { 46 46 this.createSidebar(); 47 47 } 48 49 /* 50 * For accessibility reasons, place the Inline Uploader before other sections. 51 * This way, in the Media Library, it's right after the Add New button, see ticket #37188. 52 */ 48 53 this.createUploader(); 54 55 /* 56 * Create a multi-purpose toolbar. Used as main toolbar in the Media Library 57 * and also for other things, for example the "Drag and drop to reorder" and 58 * "Suggested dimensions" info in the media modal. 59 */ 60 this.createToolbar(); 61 62 // Create the list of attachments. 49 63 this.createAttachments(); 64 50 65 // For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909. 51 66 if ( this.options.sidebar && 'errors' !== this.options.sidebar ) { 52 67 this.createSidebar(); 53 68 } 69 54 70 this.updateContent(); 55 71 56 72 if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) { -
src/wp-includes/js/media/views/frame/manage.js
38 38 this.$body = $( document.body ); 39 39 this.$window = $( window ); 40 40 this.$adminBar = $( '#wpadminbar' ); 41 // Store the Add New button for later reuse in wp.media.view.UploaderInline. 42 this.$uploaderToggler = $( '.page-title-action' ); 41 43 this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) ); 42 $( document ).on( 'click', '.page-title-action', _.bind( this.addNewClickHandler, this ) );44 this.$uploaderToggler.on( 'click', _.bind( this.addNewClickHandler, this ) ); 43 45 44 46 // Ensure core and media grid view UI is enabled. 45 47 this.$el.addClass('wp-core-ui'); -
src/wp-includes/js/media/views/uploader/inline.js
119 119 }, 120 120 show: function() { 121 121 this.$el.removeClass( 'hidden' ); 122 if ( this.controller.$uploaderToggler ) { 123 this.controller.$uploaderToggler.attr( 'aria-expanded', 'true' ); 124 } 122 125 }, 123 126 hide: function() { 127 // This runs also when creating the uploader, see wp.media.view.AttachmentsBrowser.createUploader(). 124 128 this.$el.addClass( 'hidden' ); 129 if ( this.controller.$uploaderToggler ) { 130 this.controller.$uploaderToggler.attr( 'aria-expanded', 'false' ); 131 } 125 132 } 126 133 127 134 }); -
src/wp-includes/js/media-grid.js
623 623 this.$body = $( document.body ); 624 624 this.$window = $( window ); 625 625 this.$adminBar = $( '#wpadminbar' ); 626 // Store the Add New button for later reuse in wp.media.view.UploaderInline. 627 this.$uploaderToggler = $( '.page-title-action' ); 626 628 this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) ); 627 $( document ).on( 'click', '.page-title-action', _.bind( this.addNewClickHandler, this ) );629 this.$uploaderToggler.on( 'click', _.bind( this.addNewClickHandler, this ) ); 628 630 629 631 // Ensure core and media grid view UI is enabled. 630 632 this.$el.addClass('wp-core-ui'); -
src/wp-includes/js/media-views.js
3771 3771 3772 3772 this.controller.on( 'toggle:upload:attachment', this.toggleUploader, this ); 3773 3773 this.controller.on( 'edit:selection', this.editSelection ); 3774 this.createToolbar(); 3774 3775 3775 // In the Media Library, the sidebar is used to display errors before the attachments grid. 3776 3776 if ( this.options.sidebar && 'errors' === this.options.sidebar ) { 3777 3777 this.createSidebar(); 3778 3778 } 3779 3780 /* 3781 * For accessibility reasons, place the Inline Uploader before other sections. 3782 * This way, in the Media Library, it's right after the Add New button, see ticket #37188. 3783 */ 3779 3784 this.createUploader(); 3785 3786 /* 3787 * Create a multi-purpose toolbar. Used as main toolbar in the Media Library 3788 * and also for other things, for example the "Drag and drop to reorder" and 3789 * "Suggested dimensions" info in the media modal. 3790 */ 3791 this.createToolbar(); 3792 3793 // Create the list of attachments. 3780 3794 this.createAttachments(); 3795 3781 3796 // For accessibility reasons, place the normal sidebar after the attachments, see ticket #36909. 3782 3797 if ( this.options.sidebar && 'errors' !== this.options.sidebar ) { 3783 3798 this.createSidebar(); 3784 3799 } 3800 3785 3801 this.updateContent(); 3786 3802 3787 3803 if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) { … … 8210 8226 }, 8211 8227 show: function() { 8212 8228 this.$el.removeClass( 'hidden' ); 8229 if ( this.controller.$uploaderToggler ) { 8230 this.controller.$uploaderToggler.attr( 'aria-expanded', 'true' ); 8231 } 8213 8232 }, 8214 8233 hide: function() { 8234 // This runs also when creating the uploader, see wp.media.view.AttachmentsBrowser.createUploader(). 8215 8235 this.$el.addClass( 'hidden' ); 8236 if ( this.controller.$uploaderToggler ) { 8237 this.controller.$uploaderToggler.attr( 'aria-expanded', 'false' ); 8238 } 8216 8239 } 8217 8240 8218 8241 });