Ticket #35483: 35483.2.patch
File 35483.2.patch, 13.4 KB (added by , 5 years ago) |
---|
-
src/wp-admin/css/common.css
761 761 /* @todo can we combine these into a class or use an existing dashicon one? */ 762 762 .welcome-panel .welcome-panel-close:before, 763 763 .tagchecklist span a:before, 764 #bulk-titles div a:before,764 #bulk-titles .ntdelbutton:before, 765 765 .notice-dismiss:before { 766 766 background: none; 767 767 color: #b4b9be; … … 780 780 margin: 0; 781 781 } 782 782 783 .tagchecklist span a:before, 784 #bulk-titles div a:before { 783 .tagchecklist span a:before { 785 784 margin: 1px 0; 786 785 } 787 786 … … 788 787 .welcome-panel .welcome-panel-close:hover:before, 789 788 .welcome-panel .welcome-panel-close:focus:before, 790 789 .tagchecklist span a:hover:before, 791 #bulk-titles div a:hover:before { 790 #bulk-titles .ntdelbutton:hover:before, 791 #bulk-titles .ntdelbutton:focus:before { 792 792 color: #c00; 793 793 } 794 794 -
src/wp-admin/css/list-tables.css
919 919 /* Layout */ 920 920 921 921 #wpbody-content .inline-edit-row fieldset { 922 font-size: 12px;923 922 float: left; 923 width: 100%; 924 924 margin: 0; 925 padding: 0; 926 width: 100%; 925 padding: 0 12px 0 0; 926 -webkit-box-sizing: border-box; 927 -moz-box-sizing: border-box; 928 box-sizing: border-box; 927 929 } 928 930 929 tr.inline-edit-row td, 930 #wpbody-content .inline-edit-row fieldset .inline-edit-col { 931 padding: 0 0.5em; 931 #wpbody-content #bulk-edit td fieldset:last-of-type { 932 padding-right: 0; 932 933 } 933 934 935 tr.inline-edit-row td { 936 padding: 0 12px; 937 } 938 934 939 #wpbody-content .quick-edit-row-post .inline-edit-col-left { 935 940 width: 40%; 936 941 } … … 949 954 950 955 #wpbody-content .quick-edit-row-page .inline-edit-col-right, 951 956 #wpbody-content .bulk-edit-row-post .inline-edit-col-right { 952 width: 49%;957 width: 50%; 953 958 } 954 959 955 960 #wpbody-content .bulk-edit-row .inline-edit-col-left { … … 984 989 985 990 .inline-edit-row p.submit { 986 991 clear: both; 987 padding: 0.5em;988 margin: 0.5em 0 0;992 margin: 0; 993 padding: 0.5em 0 1em; 989 994 } 990 995 991 996 .inline-edit-row span.error { … … 999 1004 /* Needs higher specificity for the padding */ 1000 1005 #the-list .inline-edit-row .inline-edit-legend { 1001 1006 margin: 0; 1002 padding: 0.2em 0 .5em 0;1007 padding: 0.2em 0; 1003 1008 line-height: 2.5; 1004 1009 font-weight: 600; 1005 1010 } 1006 1011 1007 #the-list #bulk-edit.inline-edit-row .inline-edit-legend {1008 padding: 0.2em 0.5em;1009 }1010 1011 1012 .inline-edit-row fieldset span.title, 1012 1013 .inline-edit-row fieldset span.checkbox-title { 1013 1014 margin: 0; … … 1127 1128 width: 8em; 1128 1129 } 1129 1130 1130 ul.cat-checklist { 1131 height: 12em; 1132 border: solid 1px #ddd; 1133 overflow-y: scroll; 1134 padding: 0 5px; 1135 margin: 0; 1136 background-color: #fff; 1137 } 1138 1139 #bulk-titles { 1140 display: block; 1141 height: 12em; 1142 border: 1px solid #ddd; 1143 overflow-y: scroll; 1144 padding: 0 5px; 1145 margin: 0 0 5px; 1146 } 1147 1131 #bulk-titles-list, 1132 #bulk-titles-list li, 1148 1133 .inline-edit-row fieldset ul.cat-checklist li, 1149 1134 .inline-edit-row fieldset ul.cat-checklist input { 1150 1135 margin: 0; 1151 position: relative; /* RTL fix, #WP27629 */1136 position: relative; /* RTL fix, #WP27629. Couldn't reproduce any more in Chrome 47 */ 1152 1137 } 1153 1138 1154 .inline-edit-row fieldset ul.cat-checklist label, 1155 .inline-edit-row #bulk-titles div { 1156 font-style: normal; 1157 font-size: 11px; 1139 .inline-edit-row fieldset ul.cat-checklist input { 1140 margin-top: -1px; 1141 margin-left: 3px; 1158 1142 } 1159 1143 1160 1144 .inline-edit-row fieldset label input.inline-edit-menu-order-input { … … 1179 1163 float: left; 1180 1164 } 1181 1165 1182 #bulk-titles { 1183 line-height: 140%; 1166 /* common bulk edit styles */ 1167 1168 #bulk-titles, 1169 ul.cat-checklist { 1170 height: 14em; 1171 border: 1px solid #ddd; 1172 margin: 0 0 5px; 1173 padding: 0.2em 5px; 1174 overflow-y: scroll; 1184 1175 } 1185 #bulk-titles div { 1186 margin: 0.2em 0.3em; 1176 1177 /* end common bulk edit styles */ 1178 1179 #bulk-titles .ntdelbutton, 1180 #bulk-titles .ntdeltitle, 1181 .inline-edit-row fieldset ul.cat-checklist label { 1182 display: inline-block; 1183 margin: 0; 1184 padding: 3px 0; 1185 line-height: 20px; 1186 vertical-align: top; 1187 1187 } 1188 1188 1189 #bulk-titles div a { 1190 cursor: pointer; 1191 display: block; 1192 float: left; 1193 height: 18px; 1194 margin: 0 3px 0 -2px; 1189 #bulk-titles .ntdelitem { 1190 padding-left: 23px; 1191 } 1192 1193 #bulk-titles .ntdelbutton { 1194 width: 26px; 1195 height: 26px; 1196 margin: 0 0 0 -26px; 1195 1197 overflow: hidden; 1196 position: relative;1197 width: 20px;1198 1198 } 1199 1199 1200 #bulk-titles div a:before {1201 position: relative;1202 top: -3px;1200 #bulk-titles .ntdelbutton:before { 1201 display: inline-block; 1202 vertical-align: top; 1203 1203 } 1204 1204 1205 1205 /*------------------------------------------------------------------------------ … … 1979 1979 #wpbody-content .bulk-edit-row .inline-edit-col-bottom { 1980 1980 float: none; 1981 1981 width: 100%; 1982 padding: 0; 1982 1983 } 1983 1984 1985 #the-list .inline-edit-row .inline-edit-legend, 1986 .inline-edit-row span.title { 1987 font-size: 16px; 1988 background: lightblue; 1989 } 1990 1991 .inline-edit-row p.howto { 1992 font-size: 14px; 1993 } 1994 1995 #wpbody-content .inline-edit-row-page .inline-edit-col-right { 1996 margin-top: 0; 1997 } 1998 1984 1999 #wpbody-content .quick-edit-row fieldset .inline-edit-col label, 1985 2000 #wpbody-content .quick-edit-row fieldset .inline-edit-group label, 1986 2001 #wpbody-content .bulk-edit-row fieldset .inline-edit-col label, … … 1999 2014 box-sizing: border-box; 2000 2015 } 2001 2016 2002 .inline-edit-row fieldset ul.cat-checklist label, 2003 .inline-edit-row #bulk-titles div { 2017 #bulk-titles .ntdelbutton, 2018 #bulk-titles .ntdeltitle, 2019 .inline-edit-row fieldset ul.cat-checklist label { 2020 padding: 6px 0; 2004 2021 font-size: 16px; 2022 line-height: 28px; 2005 2023 } 2006 2024 2025 #bulk-titles .ntdelitem { 2026 padding-left: 37px; 2027 } 2028 2029 #bulk-titles .ntdelbutton { 2030 width: 40px; 2031 height: 40px; 2032 margin: 0 0 0 -40px; 2033 overflow: hidden; 2034 } 2035 2036 #bulk-titles .ntdelbutton:before { 2037 font-size: 20px; 2038 line-height: 28px; 2039 } 2040 2007 2041 .inline-edit-row fieldset label span.title, 2008 2042 .inline-edit-row fieldset.inline-edit-date legend { 2009 2043 float: none; 2010 2044 } 2011 2045 2012 .inline-edit-row fieldset label.inline-edit-tags {2013 padding: 0 0.5em;2014 }2015 2016 2046 .inline-edit-row fieldset .inline-edit-col label.inline-edit-tags { 2017 2047 padding: 0; 2018 2048 } … … 2052 2082 display: block; 2053 2083 } 2054 2084 2055 #bulk-titles div {2056 margin: 0.8em 0.3em;2057 }2058 2059 #bulk-titles div a {2060 height: 22px;2061 }2062 2063 2085 /* Updates */ 2064 2086 #wpbody-content #update-themes-table .plugin-title { 2065 2087 width: auto; -
src/wp-admin/includes/class-wp-list-table.php
471 471 472 472 echo "</select>\n"; 473 473 474 submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );474 submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two", 'aria-label' => __( 'Apply bulk action' ) ) ); 475 475 echo "\n"; 476 476 } 477 477 -
src/wp-admin/includes/class-wp-posts-list-table.php
1336 1336 $bulk = 0; 1337 1337 while ( $bulk < 2 ) { ?> 1338 1338 1339 <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="inline-edit-row inline-edit-row-<?php echo "$hclass inline-edit-" . $screen->post_type;1339 <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" role="form" aria-labelledby="inline-edit-legend" class="inline-edit-row inline-edit-row-<?php echo "$hclass inline-edit-" . $screen->post_type; 1340 1340 echo $bulk ? " bulk-edit-row bulk-edit-row-$hclass bulk-edit-{$screen->post_type}" : " quick-edit-row quick-edit-row-$hclass inline-edit-{$screen->post_type}"; 1341 1341 ?>" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange"> 1342 1342 1343 1343 <fieldset class="inline-edit-col-left"> 1344 <legend class="inline-edit-legend" ><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>1344 <legend class="inline-edit-legend" id="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend> 1345 1345 <div class="inline-edit-col"> 1346 1346 <?php 1347 1347 … … 1524 1524 1525 1525 <?php foreach ( $flat_taxonomies as $taxonomy ) : ?> 1526 1526 <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) : ?> 1527 <div class="inline-edit-tags-wrap"> 1527 1528 <label class="inline-edit-tags"> 1528 1529 <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span> 1529 <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr( $taxonomy->name )?>]" class="tax_input_<?php echo esc_attr( $taxonomy->name )?>" ></textarea>1530 <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr( $taxonomy->name )?>]" class="tax_input_<?php echo esc_attr( $taxonomy->name )?>" aria-describedby="inline-edit-<?php echo esc_attr( $taxonomy->name )?>-desc"></textarea> 1530 1531 </label> 1532 <p class="howto" id="inline-edit-<?php echo esc_attr( $taxonomy->name ); ?>-desc"><?php echo esc_html( $taxonomy->labels->separate_items_with_commas ); ?></p> 1533 </div> 1531 1534 <?php endif; ?> 1532 1535 1533 1536 <?php endforeach; //$flat_taxonomies as $taxonomy ?> … … 1686 1689 } 1687 1690 ?> 1688 1691 <p class="submit inline-edit-save"> 1689 <button type="button" class="button -secondarycancel alignleft"><?php _e( 'Cancel' ); ?></button>1692 <button type="button" class="button cancel alignleft"><?php _e( 'Cancel' ); ?></button> 1690 1693 <?php if ( ! $bulk ) { 1691 1694 wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ); 1692 1695 ?> -
src/wp-admin/js/inline-edit-post.js
57 57 $('#bulk-edit').find('fieldset:first').after( 58 58 $('#inline-edit fieldset.inline-edit-categories').clone() 59 59 ).siblings( 'fieldset:last' ).prepend( 60 $( '#inline-edit label.inline-edit-tags').clone()60 $( '#inline-edit .inline-edit-tags-wrap' ).clone() 61 61 ); 62 62 63 63 $('select[name="_status"] option[value="future"]', bulkRow).remove(); … … 94 94 $( 'tbody th.check-column input[type="checkbox"]' ).each( function() { 95 95 if ( $(this).prop('checked') ) { 96 96 c = false; 97 var id = $(this).val(), theTitle; 98 theTitle = $('#inline_'+id+' .post_title').html() || inlineEditL10n.notitle; 99 te += '<div id="ttle'+id+'"><a id="_'+id+'" class="ntdelbutton" title="'+inlineEditL10n.ntdeltitle+'">X</a>'+theTitle+'</div>'; 97 var id = $( this ).val(), 98 theTitle = $( '#inline_' + id + ' .post_title' ).html() || inlineEditL10n.notitle, 99 ariaLabel = inlineEditL10n.ariaLabel.replace( '%s', theTitle.replace( /<.[^<>]*?>/g, '' ) ); 100 101 te += '<li class="ntdelitem"><button type="button" id="_' + id + '" class="button-link ntdelbutton" aria-label="' + ariaLabel + '">' + inlineEditL10n.remove + '</button><span class="ntdeltitle" aria-hidden="true">' + theTitle + '</span></li>'; 100 102 } 101 103 }); 102 104 … … 104 106 return this.revert(); 105 107 } 106 108 107 $('#bulk-titles').html(te); 108 $('#bulk-titles a').click(function(){ 109 var id = $(this).attr('id').substr(1); 109 // Populate the list of items to bulk edit. 110 $( '#bulk-titles' ).html( '<ul id="bulk-titles-list">' + te + '</ul>' ); 110 111 112 // Handle the list of items to bulk edit. 113 $( '#bulk-titles .ntdelbutton' ).click( function() { 114 var $this = $( this ), 115 id = $this.attr( 'id' ).substr( 1 ), 116 $prev = $this.parent().prev().children( '.ntdelbutton' ), 117 $next = $this.parent().next().children( '.ntdelbutton' ); 118 111 119 $('table.widefat input[value="' + id + '"]').prop('checked', false); 112 $('#ttle'+id).remove(); 120 $( '#_' + id ).parent().remove(); 121 wp.a11y.speak( inlineEditL10n.removed ); 122 123 // Move focus to a proper place when items are removed. 124 if ( $prev.length ) { 125 $prev.focus(); 126 } else if ( $next.length ) { 127 $next.focus(); 128 } else { 129 // $( '.inline-edit-save .cancel' ).focus(); 130 $( '#bulk-titles-list' ).remove(); 131 inlineEditPost.revert(); 132 wp.a11y.speak( inlineEditL10n.allRemoved ); 133 } 113 134 }); 114 135 115 136 // enable autocomplete for tags … … 119 140 $('tr.inline-editor textarea[name="tax_input['+tax+']"]').suggest( ajaxurl + '?action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma } ); 120 141 } 121 142 $('html, body').animate( { scrollTop: 0 }, 'fast' ); 143 // Set initial focus on the first input, textarea, select or button element. 144 $( '#bulk-edit :input' ).first().focus(); 122 145 }, 123 146 124 147 edit : function(id) { -
src/wp-includes/script-loader.php
563 563 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest', 'wp-a11y' ), false, 1 ); 564 564 did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array( 565 565 'error' => __( 'Error while saving the changes.' ), 566 ' ntdeltitle' => __( 'Remove From Bulk Edit' ),566 'ariaLabel' => esc_attr__( 'Remove “%s” from Bulk Edit' ), 567 567 'notitle' => __( '(no title)' ), 568 568 'comma' => trim( _x( ',', 'tag delimiter' ) ), 569 569 'saved' => __( 'Changes saved.' ), 570 'remove' => __( 'Remove' ), 571 'removed' => __( 'Item removed.' ), 572 'allRemoved' => __( 'All selected items have been removed. Select new items to use Bulk Actions.' ), 570 573 ) ); 571 574 572 575 $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );