Ticket #26550: 26550.patch
File 26550.patch, 20.0 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/media.css
460 460 margin-bottom: 16px; 461 461 padding: 0 16px; 462 462 border-left: 4px solid #dd3d36; 463 464 box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); 465 background-color: #fff; 463 -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); 464 box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); 465 background-color: #fff; 466 466 } 467 467 468 468 .upload-php .mode-grid .hide-sidebar .media-sidebar { … … 485 485 } 486 486 487 487 .upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors { 488 font-size: 0;489 top: 0;490 right: -6px;488 top: -10px; 489 right: -14px; 490 padding: 10px; 491 491 } 492 492 493 493 .upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:before { 494 494 content: "\f153"; 495 display: block; 495 496 font: normal 16px/1 dashicons; 496 497 color: #bbb; 497 498 } … … 636 637 font-size: 22px; 637 638 } 638 639 639 .upload-php .media-modal-close .media-modal-icon {640 margin: 14px;641 width: 22px;642 }643 644 640 .upload-php .media-modal-close, 645 641 .edit-attachment-frame .edit-media-header .left, 646 642 .edit-attachment-frame .edit-media-header .right { … … 693 689 border-color: #ccc; 694 690 color: #000; 695 691 outline: none; 692 -webkit-box-shadow: none; 693 box-shadow: none; 696 694 } 697 695 698 696 .upload-php .media-modal-close:focus .media-modal-icon:before, -
src/wp-includes/css/buttons.css
100 100 outline: none; 101 101 } 102 102 103 .ie8 .wp-core-ui .button-link:focus { 104 outline: #5b9dd9 solid 1px; 105 } 106 103 107 .wp-core-ui .button.hidden { 104 108 display: none; 105 109 } … … 136 140 vertical-align: baseline; 137 141 } 138 142 143 .wp-core-ui .button-link { 144 border: 0; 145 background: none; 146 outline: none; 147 cursor: pointer; 148 } 149 139 150 .wp-core-ui .button.hover, 140 151 .wp-core-ui .button:hover, 141 152 .wp-core-ui .button-secondary:hover, … … 149 160 150 161 .wp-core-ui .button.focus, 151 162 .wp-core-ui .button:focus, 152 .wp-core-ui .button-secondary:focus { 163 .wp-core-ui .button-secondary:focus, 164 .wp-core-ui .button-link:focus { 153 165 -webkit-box-shadow: 154 166 0 0 0 1px #5b9dd9, 155 167 0 0 2px 1px rgba(30, 140, 190, .8); -
src/wp-includes/css/media-views.css
153 153 154 154 .media-modal-close { 155 155 position: absolute; 156 t ext-decoration: none;157 top: 10px;158 right: 10px;159 width: 30px;160 height: 30px;156 top: 0; 157 right: 0; 158 width: 50px; 159 height: 50px; 160 padding: 0; 161 161 z-index: 1000; 162 162 -webkit-transition: color .1s ease-in-out, background .1s ease-in-out; 163 163 transition: color .1s ease-in-out, background .1s ease-in-out; … … 169 169 } 170 170 171 171 .media-modal-close span.media-modal-icon { 172 display: block;173 margin-top: 5px;174 width: 30px;175 height: 15px;176 172 background-image: none; 177 text-align: center;178 173 } 179 174 180 175 .media-modal-close .media-modal-icon:before { … … 209 204 -webkit-font-smoothing: subpixel-antialiased; 210 205 } 211 206 212 .media-modal-icon { 207 /* higher specificity */ 208 .wp-core-ui .media-modal-icon { 213 209 background-image: url(../images/uploader-icons.png); 214 210 background-repeat: no-repeat; 215 211 } … … 935 931 position: absolute; 936 932 } 937 933 938 .wp-core-ui .attachment .close {934 .wp-core-ui .attachment-close { 939 935 display: block; 940 936 position: absolute; 941 937 top: 5px; … … 943 939 height: 22px; 944 940 width: 22px; 945 941 padding: 0; 946 font-size: 20px;947 line-height: 20px;948 text-align: center;949 text-decoration: none;950 color: #464646;951 942 background-color: #fff; 952 943 background-position: -96px 4px; 953 border-width: 0;954 944 -webkit-border-radius: 3px; 955 945 border-radius: 3px; 956 946 -webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 ); 957 947 box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.3 ); 958 -webkit-transition-duration: none;959 transition-duration: none;960 -webkit-transition-property: none;961 transition-property: none;962 948 } 963 949 964 .wp-core-ui .attachment a.close:hover, 965 .wp-core-ui .attachment a.close:focus { 966 -webkit-box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 ); 967 box-shadow: 0 0 0 1px rgba( 0, 0, 0, 0.6 ); 950 .wp-core-ui .attachment-close:hover, 951 .wp-core-ui .attachment-close:focus { 968 952 background-position: -36px 4px; 969 970 953 } 971 954 972 955 .wp-core-ui .attachment .check { … … 973 956 display: none; 974 957 height: 24px; 975 958 width: 24px; 959 padding: 0; 976 960 position: absolute; 977 961 z-index: 10; 978 962 top: 0; … … 983 967 box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba( 0, 0, 0, 0.15 ); 984 968 } 985 969 986 .wp-core-ui .attachment .check div { 970 .wp-core-ui .attachment .check .media-modal-icon { 971 display: block; 987 972 background-position: -1px 0; 988 973 height: 15px; 989 974 width: 15px; … … 990 975 margin: 5px; 991 976 } 992 977 993 .wp-core-ui .attachment .check:hover div{978 .wp-core-ui .attachment .check:hover .media-modal-icon { 994 979 background-position: -40px 0; 995 980 } 996 981 … … 1010 995 0 0 0 2px #1e8cbe; 1011 996 } 1012 997 1013 .wp-core-ui .attachment.details .check div,1014 .wp-core-ui .media-frame.mode-grid .attachment.selected .check div{998 .wp-core-ui .attachment.details .check .media-modal-icon, 999 .wp-core-ui .media-frame.mode-grid .attachment.selected .check .media-modal-icon { 1015 1000 background-position: -21px 0; 1016 1001 } 1017 1002 1018 .wp-core-ui .attachment.details .check:hover div,1019 .wp-core-ui .attachment.selected .check:focus div,1020 .wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover div{1003 .wp-core-ui .attachment.details .check:hover .media-modal-icon, 1004 .wp-core-ui .attachment.selected .check:focus .media-modal-icon, 1005 .wp-core-ui .media-frame.mode-grid .attachment.selected .check:hover .media-modal-icon { 1021 1006 background-position: -60px 0; 1022 1007 } 1023 1008 … … 1214 1199 position: absolute; 1215 1200 top: 0; 1216 1201 right: 0; 1202 padding: 10px; 1217 1203 } 1218 1204 1205 .media-sidebar .media-uploader-status .upload-dismiss-errors:before { 1206 content: "\f153"; 1207 display: block; 1208 font: normal 16px/1 dashicons; 1209 color: #bbb; 1210 } 1211 1212 .media-sidebar .media-uploader-status .upload-dismiss-errors:focus:before, 1213 .media-sidebar .media-uploader-status .upload-dismiss-errors:hover:before { 1214 color: #c00; 1215 } 1216 1219 1217 .upload-errors .upload-error { 1220 1218 padding: 12px; 1221 margin-bottom: 12px; 1222 background: #fff; 1223 border-left: 4px solid #dd3d36; 1224 -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); 1225 box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); 1219 margin-bottom: 12px; 1220 background: #fff; 1221 border-left: 4px solid #dd3d36; 1222 -webkit-box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); 1223 box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1); 1226 1224 } 1227 1225 1228 1226 .upload-errors .upload-error-filename { … … 1391 1389 font-weight: bold; 1392 1390 } 1393 1391 1394 .media-selection .selection-info a { 1395 display: block; 1392 .media-selection .button-link { 1396 1393 float: left; 1397 1394 padding: 1px 8px; 1398 1395 margin: 1px 8px 1px -8px; 1399 1396 line-height: 16px; 1400 text-decoration: none;1401 1397 border-right: 1px solid #dfdfdf; 1402 1398 color: #21759B; 1403 1399 } 1404 1400 1405 .media-selection .selection-info a:hover { 1401 .media-selection .button-link:hover, 1402 .media-selection .button-link:focus { 1406 1403 background: #21759B; 1407 1404 color: #fff; 1408 1405 border-color: transparent; 1409 1406 } 1410 1407 1411 .media-selection . selection-info a:last-child {1408 .media-selection .button-link:last-child { 1412 1409 border-right: 0; 1413 1410 margin-right: 0; 1414 1411 } 1415 1412 1416 . media-selection .selection-info .clear-selection {1413 .selection-info .clear-selection { 1417 1414 color: red; 1418 1415 } 1419 1416 1420 .media-selection .selection-info .clear-selection:hover { 1417 .selection-info .clear-selection:hover, 1418 .selection-info .clear-selection:focus { 1421 1419 background: red; 1420 color: #fff; 1422 1421 } 1423 1422 1424 1423 .media-selection .selection-view { … … 1643 1642 .media-modal .delete-attachment, 1644 1643 .media-modal .trash-attachment, 1645 1644 .media-modal .untrash-attachment { 1645 display: inline; 1646 padding: 0; 1646 1647 color: #bc0b0b; 1647 1648 } 1648 1649 1649 1650 .media-modal .delete-attachment:hover, 1651 .media-modal .delete-attachment:focus, 1650 1652 .media-modal .trash-attachment:hover, 1651 .media-modal .untrash-attachment:hover { 1653 .media-modal .trash-attachment:focus, 1654 .media-modal .untrash-attachment:hover, 1655 .media-modal .untrash-attachment:focus { 1652 1656 color: red; 1653 1657 } 1654 1658 … … 1881 1885 } 1882 1886 1883 1887 .image-details .advanced-toggle { 1888 padding: 0; 1884 1889 color: #666; 1885 text-decoration: none; 1886 display: block; 1890 text-transform: uppercase; 1887 1891 } 1888 1892 1889 1893 .image-details .advanced-toggle:after { -
src/wp-includes/js/media-views.js
2625 2625 'change [data-setting] input': 'updateSetting', 2626 2626 'change [data-setting] select': 'updateSetting', 2627 2627 'change [data-setting] textarea': 'updateSetting', 2628 'click . close':'removeFromLibrary',2628 'click .attachment-close': 'removeFromLibrary', 2629 2629 'click .check': 'checkClickHandler', 2630 'click a': 'preventDefault',2631 'keydown .close': 'removeFromLibrary',2632 2630 'keydown': 'toggleSelectionHandler' 2633 2631 }, 2634 2632 … … 2756 2754 toggleSelectionHandler: function( event ) { 2757 2755 var method; 2758 2756 2759 // Don't do anything inside inputs .2760 if ( 'INPUT' === event.target.nodeName ) {2757 // Don't do anything inside inputs and on the attachment check and remove buttons. 2758 if ( 'INPUT' === event.target.nodeName || 'BUTTON' === event.target.nodeName ) { 2761 2759 return; 2762 2760 } 2763 2761 … … 2943 2941 this.$el.toggleClass( 'details', details === this.model ); 2944 2942 }, 2945 2943 /** 2946 * @param {Object} event2947 */2948 preventDefault: function( event ) {2949 event.preventDefault();2950 },2951 /**2952 2944 * @param {string} size 2953 2945 * @returns {Object} 2954 2946 */ … … 3198 3190 3199 3191 initialFocus: function() { 3200 3192 if ( ! wp.media.isTouchDevice ) { 3201 this.$( ':input' ).eq( 0 ).focus(); 3193 /* 3194 Previously focused the first ':input' (the readonly URL text field). 3195 Since the first ':input' is now a button (delete/trash), when pressing 3196 Spacebar on an attachment Firefox fires deleteAttachment/trashAttachment 3197 as soon as focus is moved. Explicitly target the first text field for now. 3198 @todo change initial focus logic, also for accessibility. 3199 */ 3200 this.$( 'input[type=text]' ).eq( 0 ).focus(); 3202 3201 } 3203 3202 }, 3204 3203 /** -
src/wp-includes/js/media/views/attachment.js
33 33 'change [data-setting] input': 'updateSetting', 34 34 'change [data-setting] select': 'updateSetting', 35 35 'change [data-setting] textarea': 'updateSetting', 36 'click . close':'removeFromLibrary',36 'click .attachment-close': 'removeFromLibrary', 37 37 'click .check': 'checkClickHandler', 38 'click a': 'preventDefault',39 'keydown .close': 'removeFromLibrary',40 38 'keydown': 'toggleSelectionHandler' 41 39 }, 42 40 … … 164 162 toggleSelectionHandler: function( event ) { 165 163 var method; 166 164 167 // Don't do anything inside inputs .168 if ( 'INPUT' === event.target.nodeName ) {165 // Don't do anything inside inputs and on the attachment check and remove buttons. 166 if ( 'INPUT' === event.target.nodeName || 'BUTTON' === event.target.nodeName ) { 169 167 return; 170 168 } 171 169 … … 351 349 this.$el.toggleClass( 'details', details === this.model ); 352 350 }, 353 351 /** 354 * @param {Object} event355 */356 preventDefault: function( event ) {357 event.preventDefault();358 },359 /**360 352 * @param {string} size 361 353 * @returns {Object} 362 354 */ -
src/wp-includes/js/media/views/attachment/details.js
50 50 51 51 initialFocus: function() { 52 52 if ( ! wp.media.isTouchDevice ) { 53 this.$( ':input' ).eq( 0 ).focus(); 53 /* 54 Previously focused the first ':input' (the readonly URL text field). 55 Since the first ':input' is now a button (delete/trash), when pressing 56 Spacebar on an attachment Firefox fires deleteAttachment/trashAttachment 57 as soon as focus is moved. Explicitly target the first text field for now. 58 @todo change initial focus logic, also for accessibility. 59 */ 60 this.$( 'input[type=text]' ).eq( 0 ).focus(); 54 61 } 55 62 }, 56 63 /** -
src/wp-includes/js/mediaelement/wp-mediaelement.css
106 106 } 107 107 108 108 .media-embed-details .setting p, 109 .media-embed-details .setting a{109 .media-embed-details .setting .remove-setting { 110 110 color: #a00; 111 111 font-size: 10px; 112 112 text-transform: uppercase; 113 113 } 114 114 115 .media-embed-details .setting .remove-setting { 116 padding: 0; 117 } 118 115 119 .media-embed-details .setting a:hover { 116 120 color: #f00; 117 121 } -
src/wp-includes/media-template.php
166 166 167 167 <script type="text/html" id="tmpl-media-modal"> 168 168 <div class="<?php echo $class; ?>"> 169 < a class="media-modal-close" href="#"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></a>169 <button type="button" class="button-link media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button> 170 170 <div class="media-modal-content"></div> 171 171 </div> 172 172 <div class="media-modal-backdrop"></div> … … 261 261 262 262 <script type="text/html" id="tmpl-uploader-status"> 263 263 <h3><?php _e( 'Uploading' ); ?></h3> 264 < a class="upload-dismiss-errors" href="#"><?php _e('Dismiss Errors'); ?></a>264 <button type="button" class="button-link upload-dismiss-errors"><span class="screen-reader-text"><?php _e( 'Dismiss Errors' ); ?></span></button> 265 265 266 266 <div class="media-progress-bar"><div></div></div> 267 267 <div class="upload-details"> … … 432 432 <# if ( ! data.uploading && data.can.remove ) { #> | 433 433 <?php if ( MEDIA_TRASH ): ?> 434 434 <# if ( 'trash' === data.status ) { #> 435 < a class="untrash-attachment" href="#"><?php _e( 'Untrash' ); ?></a>435 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button> 436 436 <# } else { #> 437 < a class="trash-attachment" href="#"><?php _ex( 'Trash', 'verb' ); ?></a>437 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button> 438 438 <# } #> 439 439 <?php else: ?> 440 < a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>440 <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button> 441 441 <?php endif; ?> 442 442 <# } #> 443 443 </div> … … 468 468 <# } #> 469 469 </div> 470 470 <# if ( data.buttons.close ) { #> 471 < a class="close media-modal-icon" href="#" title="<?php esc_attr_e('Remove'); ?>"></a>471 <button type="button" class="button-link attachment-close media-modal-icon"><span class="screen-reader-text"><?php _e( 'Remove' ); ?></span></button> 472 472 <# } #> 473 473 </div> 474 474 <# if ( data.buttons.check ) { #> 475 < a class="check" href="#" title="<?php esc_attr_e('Deselect'); ?>" tabindex="-1"><div class="media-modal-icon"></div></a>475 <button type="button" class="button-link check" tabindex="-1"><span class="media-modal-icon"></span><span class="screen-reader-text"><?php _e( 'Deselect' ); ?></span></button> 476 476 <# } #> 477 477 <# 478 478 var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; … … 535 535 <# if ( ! data.uploading && data.can.remove ) { #> 536 536 <?php if ( MEDIA_TRASH ): ?> 537 537 <# if ( 'trash' === data.status ) { #> 538 < a class="untrash-attachment" href="#"><?php _e( 'Untrash' ); ?></a>538 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button> 539 539 <# } else { #> 540 < a class="trash-attachment" href="#"><?php _ex( 'Trash', 'verb' ); ?></a>540 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button> 541 541 <# } #> 542 542 <?php else: ?> 543 < a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>543 <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button> 544 544 <?php endif; ?> 545 545 <# } #> 546 546 … … 592 592 <div class="selection-info"> 593 593 <span class="count"></span> 594 594 <# if ( data.editable ) { #> 595 < a class="edit-selection" href="#"><?php _e( 'Edit Selection' ); ?></a>595 <button type="button" class="button-link edit-selection"><?php _e( 'Edit Selection' ); ?></button> 596 596 <# } #> 597 597 <# if ( data.clearable ) { #> 598 < a class="clear-selection" href="#"><?php _e('Clear'); ?></a>598 <button type="button" class="button-link clear-selection"><?php _e( 'Clear' ); ?></button> 599 599 <# } #> 600 600 </div> 601 601 <div class="selection-view"></div> … … 988 988 <input type="text" class="link-to-custom" data-setting="linkUrl" /> 989 989 </div> 990 990 <div class="advanced-section"> 991 <h3>< a class="advanced-toggle" href="#"><?php _e('Advanced Options'); ?></a></h3>991 <h3><button type="button" class="button-link advanced-toggle"><?php _e( 'Advanced Options' ); ?></button></h3> 992 992 <div class="advanced-settings hidden"> 993 993 <div class="advanced-image"> 994 994 <label class="setting title-text"> … … 1045 1045 <label class="setting"> 1046 1046 <span>SRC</span> 1047 1047 <input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" /> 1048 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1048 <button type="button" class="button-link remove-setting"><?php _e( 'Remove audio source' ); ?></button> 1049 1049 </label> 1050 1050 <# } #> 1051 1051 <?php … … 1059 1059 <label class="setting"> 1060 1060 <span><?php echo strtoupper( $type ) ?></span> 1061 1061 <input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type ?> }}" /> 1062 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1062 <button type="button" class="button-link remove-setting"><?php _e( 'Remove audio source' ); ?></button> 1063 1063 </label> 1064 1064 <# } #> 1065 1065 <?php endforeach ?> … … 1128 1128 <label class="setting"> 1129 1129 <span>SRC</span> 1130 1130 <input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" /> 1131 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1131 <button type="button" class="button-link remove-setting"><?php _e( 'Remove video source' ); ?></button> 1132 1132 </label> 1133 1133 <# } #> 1134 1134 <?php foreach ( $video_types as $type ): … … 1140 1140 <label class="setting"> 1141 1141 <span><?php echo strtoupper( $type ) ?></span> 1142 1142 <input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type ?> }}" /> 1143 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1143 <button type="button" class="button-link remove-setting"><?php _e( 'Remove video source' ); ?></button> 1144 1144 </label> 1145 1145 <# } #> 1146 1146 <?php endforeach ?> … … 1161 1161 <label class="setting"> 1162 1162 <span><?php _e( 'Poster Image' ); ?></span> 1163 1163 <input type="text" disabled="disabled" data-setting="poster" value="{{ data.model.poster }}" /> 1164 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1164 <button type="button" class="button-link remove-setting"><?php _e( 'Remove poster image' ); ?></button> 1165 1165 </label> 1166 1166 <# } #> 1167 1167 <div class="setting preload"> … … 1193 1193 content += track.outerHTML; #> 1194 1194 <p> 1195 1195 <input class="content-track" type="text" value="{{ track.outerHTML }}" /> 1196 < a class="remove-setting remove-track"><?php _e( 'Remove' ); ?></a>1196 <button type="button" class="button-link remove-setting remove-track""><?php _ex( 'Remove video track', 'media' ); ?></button> 1197 1197 </p> 1198 1198 <# } ); #> 1199 1199 <# } else { #>