Ticket #37188: 37188.6.diff
File 37188.6.diff, 8.3 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/css/media-views.css
1133 1133 border: 0; 1134 1134 cursor: pointer; 1135 1135 height: 48px; 1136 outline: none; 1137 padding: 0; 1136 1138 position: absolute; 1137 right: 0;1139 right: 2px; 1138 1140 text-align: center; 1139 top: 0;1140 width: 50px;1141 top: 2px; 1142 width: 48px; 1141 1143 z-index: 1; 1142 1144 } 1143 1145 1144 1146 .uploader-inline .close:before { 1145 font: normal 30px/ 50pxdashicons !important;1146 color: # 72777c;1147 font: normal 30px/1 dashicons !important; 1148 color: #555d66; 1147 1149 display: inline-block; 1148 1150 content: "\f335"; 1149 1151 font-weight: 300; 1152 margin-top: 1px; 1150 1153 } 1151 1154 1155 .uploader-inline .close:focus { 1156 outline: 1px solid #5b9dd9; 1157 -webkit-box-shadow: 0 0 3px rgba( 0, 115, 170, .8 ); 1158 box-shadow: 0 0 3px rgba( 0, 115, 170, .8 ); 1159 } 1160 1152 1161 .attachments-browser.hide-sidebar .attachments, 1153 1162 .attachments-browser.hide-sidebar .uploader-inline { 1154 1163 right: 0; -
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 ) { … … 343 359 canClose: this.controller.isModeActive( 'grid' ) 344 360 }); 345 361 346 this.uploader. hide();362 this.uploader.$el.addClass( 'hidden' ); 347 363 this.views.add( this.uploader ); 348 364 }, 349 365 -
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' ) 43 .attr( 'aria-expanded', 'false' ) 44 .on( 'click', _.bind( this.addNewClickHandler, this ) ); 45 41 46 this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) ); 42 $( document ).on( 'click', '.page-title-action', _.bind( this.addNewClickHandler, this ) );43 47 44 48 // Ensure core and media grid view UI is enabled. 45 49 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.length ) { 123 this.controller.$uploaderToggler.attr( 'aria-expanded', 'true' ); 124 } 122 125 }, 123 126 hide: function() { 124 127 this.$el.addClass( 'hidden' ); 128 if ( this.controller.$uploaderToggler.length ) { 129 this.controller.$uploaderToggler 130 .attr( 'aria-expanded', 'false' ) 131 // Move focus back to the toggle button when closing the uploader. 132 .focus(); 133 } 125 134 } 126 135 127 136 }); -
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' ) 628 .attr( 'aria-expanded', 'false' ) 629 .on( 'click', _.bind( this.addNewClickHandler, this ) ); 630 626 631 this.$window.on( 'scroll resize', _.debounce( _.bind( this.fixPosition, this ), 15 ) ); 627 $( document ).on( 'click', '.page-title-action', _.bind( this.addNewClickHandler, this ) );628 632 629 633 // Ensure core and media grid view UI is enabled. 630 634 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 ) { … … 4074 4090 canClose: this.controller.isModeActive( 'grid' ) 4075 4091 }); 4076 4092 4077 this.uploader. hide();4093 this.uploader.$el.addClass( 'hidden' ); 4078 4094 this.views.add( this.uploader ); 4079 4095 }, 4080 4096 … … 8210 8226 }, 8211 8227 show: function() { 8212 8228 this.$el.removeClass( 'hidden' ); 8229 if ( this.controller.$uploaderToggler.length ) { 8230 this.controller.$uploaderToggler.attr( 'aria-expanded', 'true' ); 8231 } 8213 8232 }, 8214 8233 hide: function() { 8215 8234 this.$el.addClass( 'hidden' ); 8235 if ( this.controller.$uploaderToggler.length ) { 8236 this.controller.$uploaderToggler 8237 .attr( 'aria-expanded', 'false' ) 8238 // Move focus back to the toggle button when closing the uploader. 8239 .focus(); 8240 } 8216 8241 } 8217 8242 8218 8243 });