Ticket #35483: 35483.patch
| File 35483.patch, 10.5 KB (added by , 10 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; 924 923 margin: 0; 925 924 padding: 0; … … 1127 1126 width: 8em; 1128 1127 } 1129 1128 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 1129 #bulk-titles-list, 1130 #bulk-titles-list li, 1148 1131 .inline-edit-row fieldset ul.cat-checklist li, 1149 1132 .inline-edit-row fieldset ul.cat-checklist input { 1150 1133 margin: 0; 1151 position: relative; /* RTL fix, #WP27629 */1134 position: relative; /* RTL fix, #WP27629. Couldn't reproduce any more in Chrome 47 */ 1152 1135 } 1153 1136 1154 .inline-edit-row fieldset ul.cat-checklist label, 1155 .inline-edit-row #bulk-titles div { 1156 font-style: normal; 1157 font-size: 11px; 1137 .inline-edit-row fieldset ul.cat-checklist input { 1138 margin-top: -1px; 1139 margin-left: 3px; 1158 1140 } 1159 1141 1160 1142 .inline-edit-row fieldset label input.inline-edit-menu-order-input { … … 1179 1161 float: left; 1180 1162 } 1181 1163 1182 #bulk-titles { 1183 line-height: 140%; 1164 /* common bulk edit styles */ 1165 1166 #bulk-titles, 1167 ul.cat-checklist { 1168 height: 12em; 1169 border: 1px solid #ddd; 1170 margin: 0 0 5px; 1171 padding: 0.2em 5px; 1172 overflow-y: scroll; 1184 1173 } 1185 #bulk-titles div {1186 margin: 0.2em 0.3em;1187 }1188 1174 1189 #bulk-titles div a {1190 cursor: pointer; 1175 #bulk-titles .ntdelbutton, 1176 .inline-edit-row fieldset ul.cat-checklist label { 1191 1177 display: block; 1192 float: left; 1193 height: 18px; 1194 margin: 0 3px 0 -2px; 1195 overflow: hidden; 1196 position: relative; 1197 width: 20px; 1178 margin: 0; 1179 padding: 3px 0; 1180 line-height: 20px; 1181 text-align: left; 1198 1182 } 1199 1183 1200 #bulk-titles div a:before { 1201 position: relative; 1202 top: -3px; 1184 /* end common bulk edit styles */ 1185 1186 #bulk-titles .ntdelbutton { 1187 padding-left: 20px; 1203 1188 } 1204 1189 1190 #bulk-titles .ntdelbutton:before { 1191 display: inline-block; 1192 margin-left: -20px; 1193 vertical-align: top; 1194 } 1195 1205 1196 /*------------------------------------------------------------------------------ 1206 1197 17.0 - Plugins 1207 1198 ------------------------------------------------------------------------------*/ … … 1990 1981 margin-bottom: 5px; 1991 1982 } 1992 1983 1984 #bulk-titles .ntdelbutton:before { 1985 font-size: 20px; 1986 line-height: 24px; 1987 } 1988 1993 1989 #wpbody .bulk-edit-row fieldset select { 1994 1990 display: block; 1995 1991 width: 100%; … … 2000 1996 } 2001 1997 2002 1998 .inline-edit-row fieldset ul.cat-checklist label, 2003 .inline-edit-row #bulk-titles div { 1999 .inline-edit-row #bulk-titles .ntdelbutton { 2000 margin: 0; 2004 2001 font-size: 16px; 2002 line-height: 24px; 2005 2003 } 2006 2004 2007 2005 .inline-edit-row fieldset label span.title, … … 2052 2050 display: block; 2053 2051 } 2054 2052 2055 #bulk-titles div {2056 margin: 0.8em 0.3em;2057 }2058 2059 #bulk-titles div a {2060 height: 22px;2061 }2062 2063 2053 /* Updates */ 2064 2054 #wpbody-content #update-themes-table .plugin-title { 2065 2055 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
1287 1287 $bulk = 0; 1288 1288 while ( $bulk < 2 ) { ?> 1289 1289 1290 <tr id="<?php echo $bulk ? 'bulk-edit' : 'inline-edit'; ?>" class="inline-edit-row inline-edit-row-<?php echo "$hclass inline-edit-" . $screen->post_type;1290 <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; 1291 1291 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}"; 1292 1292 ?>" style="display: none"><td colspan="<?php echo $this->get_column_count(); ?>" class="colspanchange"> 1293 1293 1294 1294 <fieldset class="inline-edit-col-left"> 1295 <legend class="inline-edit-legend" ><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend>1295 <legend class="inline-edit-legend" id="inline-edit-legend"><?php echo $bulk ? __( 'Bulk Edit' ) : __( 'Quick Edit' ); ?></legend> 1296 1296 <div class="inline-edit-col"> 1297 1297 <?php 1298 1298 … … 1475 1475 1476 1476 <?php foreach ( $flat_taxonomies as $taxonomy ) : ?> 1477 1477 <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) : ?> 1478 <div class="inline-edit-tags-wrap"> 1478 1479 <label class="inline-edit-tags"> 1479 1480 <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span> 1480 <textarea cols="22" rows="1" name="tax_input[<?php echo esc_attr( $taxonomy->name )?>]" class="tax_input_<?php echo esc_attr( $taxonomy->name )?>" ></textarea>1481 <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> 1481 1482 </label> 1483 <p class="howto" id="inline-edit-<?php echo esc_attr( $taxonomy->name ); ?>-desc"><?php echo esc_html( $taxonomy->labels->separate_items_with_commas ); ?></p> 1484 </div> 1482 1485 <?php endif; ?> 1483 1486 1484 1487 <?php endforeach; //$flat_taxonomies as $taxonomy ?> -
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><button type="button" id="_' + id + '" class="button-link ntdelbutton" aria-label="' + ariaLabel + '">' + theTitle + '</button></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 } 113 132 }); 114 133 115 134 // enable autocomplete for tags … … 119 138 $('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 139 } 121 140 $('html, body').animate( { scrollTop: 0 }, 'fast' ); 141 // Set initial focus on the first input, textarea, select or button element. 142 $( '#bulk-edit :input' ).first().focus(); 122 143 }, 123 144 124 145 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 'removed' => __( 'Item removed.' ), 570 571 ) ); 571 572 572 573 $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );