Changeset 32952
- Timestamp:
- 06/26/2015 05:00:42 AM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/media.css
r32862 r32952 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; … … 635 636 content: '\f335'; 636 637 font-size: 22px; 637 }638 639 .upload-php .media-modal-close .media-modal-icon {640 margin: 14px;641 width: 22px;642 638 } 643 639 … … 694 690 color: #000; 695 691 outline: none; 692 -webkit-box-shadow: none; 693 box-shadow: none; 696 694 } 697 695 -
trunk/src/wp-includes/css/buttons.css
r32051 r32952 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; … … 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, … … 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, -
trunk/src/wp-includes/css/media-views.css
r32909 r32952 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; … … 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 … … 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; … … 936 932 } 937 933 938 .wp-core-ui .attachment .close {934 .wp-core-ui .attachment-close { 939 935 display: block; 940 936 position: absolute; … … 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 } 963 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 ); 948 } 949 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 … … 974 957 height: 24px; 975 958 width: 24px; 959 padding: 0; 976 960 position: absolute; 977 961 z-index: 10; … … 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; … … 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 } … … 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 } … … 1392 1377 } 1393 1378 1394 .media-selection .selection-info a { 1395 display: block; 1379 .media-selection .button-link { 1396 1380 float: left; 1397 1381 padding: 1px 8px; 1398 1382 margin: 1px 8px 1px -8px; 1399 1383 line-height: 16px; 1400 text-decoration: none;1401 1384 border-right: 1px solid #dfdfdf; 1402 1385 color: #21759B; 1403 1386 } 1404 1387 1405 .media-selection .selection-info a:hover { 1388 .media-selection .button-link:hover, 1389 .media-selection .button-link:focus { 1406 1390 background: #21759B; 1407 1391 color: #fff; … … 1409 1393 } 1410 1394 1411 .media-selection . selection-info a:last-child {1395 .media-selection .button-link:last-child { 1412 1396 border-right: 0; 1413 1397 margin-right: 0; 1414 1398 } 1415 1399 1416 . media-selection .selection-info .clear-selection {1400 .selection-info .clear-selection { 1417 1401 color: red; 1418 1402 } 1419 1403 1420 .media-selection .selection-info .clear-selection:hover { 1404 .selection-info .clear-selection:hover, 1405 .selection-info .clear-selection:focus { 1421 1406 background: red; 1407 color: #fff; 1422 1408 } 1423 1409 … … 1641 1627 .media-modal .trash-attachment, 1642 1628 .media-modal .untrash-attachment { 1629 display: inline; 1630 padding: 0; 1643 1631 color: #bc0b0b; 1644 1632 } 1645 1633 1646 1634 .media-modal .delete-attachment:hover, 1635 .media-modal .delete-attachment:focus, 1647 1636 .media-modal .trash-attachment:hover, 1648 .media-modal .untrash-attachment:hover { 1637 .media-modal .trash-attachment:focus, 1638 .media-modal .untrash-attachment:hover, 1639 .media-modal .untrash-attachment:focus { 1649 1640 color: red; 1650 1641 } … … 1892 1883 1893 1884 .image-details .advanced-toggle { 1885 padding: 0; 1894 1886 color: #666; 1895 text-decoration: none; 1896 display: block; 1887 text-transform: uppercase; 1897 1888 } 1898 1889 -
trunk/src/wp-includes/js/media-views.js
r32909 r32952 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 }, … … 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 } … … 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} … … 3198 3190 initialFocus: function() { 3199 3191 if ( ! wp.media.isTouchDevice ) { 3200 this.$( ':input' ).eq( 0 ).focus(); 3192 /* 3193 Previously focused the first ':input' (the readonly URL text field). 3194 Since the first ':input' is now a button (delete/trash): when pressing 3195 spacebar on an attachment, Firefox fires deleteAttachment/trashAttachment 3196 as soon as focus is moved. Explicitly target the first text field for now. 3197 @todo change initial focus logic, also for accessibility. 3198 */ 3199 this.$( 'input[type="text"]' ).eq( 0 ).focus(); 3201 3200 } 3202 3201 }, -
trunk/src/wp-includes/js/media/views/attachment.js
r31960 r32952 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 }, … … 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 } … … 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} -
trunk/src/wp-includes/js/media/views/attachment/details.js
r32909 r32952 50 50 initialFocus: function() { 51 51 if ( ! wp.media.isTouchDevice ) { 52 this.$( ':input' ).eq( 0 ).focus(); 52 /* 53 Previously focused the first ':input' (the readonly URL text field). 54 Since the first ':input' is now a button (delete/trash): when pressing 55 spacebar on an attachment, Firefox fires deleteAttachment/trashAttachment 56 as soon as focus is moved. Explicitly target the first text field for now. 57 @todo change initial focus logic, also for accessibility. 58 */ 59 this.$( 'input[type="text"]' ).eq( 0 ).focus(); 53 60 } 54 61 }, -
trunk/src/wp-includes/js/mediaelement/wp-mediaelement.css
r32051 r32952 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 } 114 115 .media-embed-details .setting .remove-setting { 116 padding: 0; 113 117 } 114 118 -
trunk/src/wp-includes/media-template.php
r32909 r32952 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> … … 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> … … 435 435 <?php if ( MEDIA_TRASH ): ?> 436 436 <# if ( 'trash' === data.status ) { #> 437 < a class="untrash-attachment" href="#"><?php _e( 'Untrash' ); ?></a>437 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button> 438 438 <# } else { #> 439 < a class="trash-attachment" href="#"><?php _ex( 'Trash', 'verb' ); ?></a>439 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button> 440 440 <# } #> 441 441 <?php else: ?> 442 < a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>442 <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button> 443 443 <?php endif; ?> 444 444 <# } #> … … 471 471 </div> 472 472 <# if ( data.buttons.close ) { #> 473 < a class="close media-modal-icon" href="#" title="<?php esc_attr_e('Remove'); ?>"></a>473 <button type="button" class="button-link attachment-close media-modal-icon"><span class="screen-reader-text"><?php _e( 'Remove' ); ?></span></button> 474 474 <# } #> 475 475 </div> 476 476 <# if ( data.buttons.check ) { #> 477 < a class="check" href="#" title="<?php esc_attr_e('Deselect'); ?>" tabindex="-1"><div class="media-modal-icon"></div></a>477 <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> 478 478 <# } #> 479 479 <# … … 537 537 <?php if ( MEDIA_TRASH ): ?> 538 538 <# if ( 'trash' === data.status ) { #> 539 < a class="untrash-attachment" href="#"><?php _e( 'Untrash' ); ?></a>539 <button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button> 540 540 <# } else { #> 541 < a class="trash-attachment" href="#"><?php _ex( 'Trash', 'verb' ); ?></a>541 <button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button> 542 542 <# } #> 543 543 <?php else: ?> 544 < a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>544 <button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button> 545 545 <?php endif; ?> 546 546 <# } #> … … 596 596 <span class="count"></span> 597 597 <# if ( data.editable ) { #> 598 < a class="edit-selection" href="#"><?php _e( 'Edit Selection' ); ?></a>598 <button type="button" class="button-link edit-selection"><?php _e( 'Edit Selection' ); ?></button> 599 599 <# } #> 600 600 <# if ( data.clearable ) { #> 601 < a class="clear-selection" href="#"><?php _e('Clear'); ?></a>601 <button type="button" class="button-link clear-selection"><?php _e( 'Clear' ); ?></button> 602 602 <# } #> 603 603 </div> … … 992 992 </div> 993 993 <div class="advanced-section"> 994 <h3>< a class="advanced-toggle" href="#"><?php _e('Advanced Options'); ?></a></h3>994 <h3><button type="button" class="button-link advanced-toggle"><?php _e( 'Advanced Options' ); ?></button></h3> 995 995 <div class="advanced-settings hidden"> 996 996 <div class="advanced-image"> … … 1049 1049 <span>SRC</span> 1050 1050 <input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" /> 1051 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1051 <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button> 1052 1052 </label> 1053 1053 <# } #> … … 1063 1063 <span><?php echo strtoupper( $type ) ?></span> 1064 1064 <input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type ?> }}" /> 1065 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1065 <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button> 1066 1066 </label> 1067 1067 <# } #> … … 1132 1132 <span>SRC</span> 1133 1133 <input type="text" disabled="disabled" data-setting="src" value="{{ data.model.src }}" /> 1134 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1134 <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button> 1135 1135 </label> 1136 1136 <# } #> … … 1144 1144 <span><?php echo strtoupper( $type ) ?></span> 1145 1145 <input type="text" disabled="disabled" data-setting="<?php echo $type ?>" value="{{ data.model.<?php echo $type ?> }}" /> 1146 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1146 <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button> 1147 1147 </label> 1148 1148 <# } #> … … 1165 1165 <span><?php _e( 'Poster Image' ); ?></span> 1166 1166 <input type="text" disabled="disabled" data-setting="poster" value="{{ data.model.poster }}" /> 1167 < a class="remove-setting"><?php _e( 'Remove' ); ?></a>1167 <button type="button" class="button-link remove-setting"><?php _e( 'Remove' ); ?></button> 1168 1168 </label> 1169 1169 <# } #> … … 1197 1197 <p> 1198 1198 <input class="content-track" type="text" value="{{ track.outerHTML }}" /> 1199 < a class="remove-setting remove-track"><?php _e( 'Remove' ); ?></a>1199 <button type="button" class="button-link remove-setting remove-track"><?php _ex( 'Remove', 'media' ); ?></button> 1200 1200 </p> 1201 1201 <# } ); #>
Note: See TracChangeset
for help on using the changeset viewer.