Ticket #47048: 47048.2.diff
File 47048.2.diff, 3.2 KB (added by , 6 years ago) |
---|
-
src/js/_enqueues/lib/nav-menu.js
1090 1090 } 1091 1091 1092 1092 e.preventDefault(); 1093 } else if ( target.hasClass('select-all') ) { 1094 selectAreaMatch = /#(.*)$/.exec(e.target.href); 1095 if ( selectAreaMatch && selectAreaMatch[1] ) { 1096 items = $('#' + selectAreaMatch[1] + ' .tabs-panel-active .menu-item-title input'); 1097 if( items.length === items.filter(':checked').length ) 1098 items.removeAttr('checked'); 1099 else 1100 items.prop('checked', true); 1101 return false; 1093 } else if ( target.hasClass( 'select-all' ) ) { 1094 selectAreaMatch = target.closest( '.button-controls' ).data( 'area' ); 1095 if ( selectAreaMatch ) { 1096 items = $( '#' + selectAreaMatch + ' .tabs-panel-active .menu-item-title input' ); 1097 1098 if ( items.length === items.filter( ':checked' ).length ) { 1099 items.removeAttr( 'checked' ); 1100 } else { 1101 items.prop( 'checked', true ); 1102 } 1102 1103 } 1103 1104 } else if ( target.hasClass('submit-add-to-menu') ) { 1104 1105 api.registerChange(); -
src/wp-admin/includes/nav-menu.php
606 606 <?php endif; ?> 607 607 </div><!-- /.tabs-panel --> 608 608 609 <p class="button-controls wp-clearfix"> 610 <span class="list-controls"> 611 <a href=" 612 <?php 613 echo esc_url( 614 add_query_arg( 615 array( 616 $post_type_name . '-tab' => 'all', 617 'selectall' => 1, 618 ), 619 remove_query_arg( $removed_args ) 620 ) 621 ); 622 ?> 623 #posttype-<?php echo $post_type_name; ?>" class="select-all aria-button-if-js"><?php _e( 'Select All' ); ?></a> 609 <p class="button-controls wp-clearfix" data-area="posttype-<?php echo esc_attr( $post_type_name ); ?>"> 610 <span class="list-controls hide-if-no-js"> 611 <input type="checkbox" id="<?php echo esc_attr( $post_type_name . '-tab' ); ?>" class="select-all" /> 612 <label for="<?php echo esc_attr( $post_type_name . '-tab' ); ?>"><?php _e( 'Select All' ); ?></label> 624 613 </span> 625 614 626 615 <span class="add-to-menu"> … … 843 832 </ul> 844 833 </div><!-- /.tabs-panel --> 845 834 846 <p class="button-controls wp-clearfix"> 847 <span class="list-controls"> 848 <a href=" 849 <?php 850 echo esc_url( 851 add_query_arg( 852 array( 853 $taxonomy_name . '-tab' => 'all', 854 'selectall' => 1, 855 ), 856 remove_query_arg( $removed_args ) 857 ) 858 ); 859 ?> 860 #taxonomy-<?php echo $taxonomy_name; ?>" class="select-all aria-button-if-js"><?php _e( 'Select All' ); ?></a> 835 <p class="button-controls wp-clearfix" data-area="taxonomy-<?php echo esc_attr( $taxonomy_name ); ?>"> 836 <span class="list-controls hide-if-no-js"> 837 <input type="checkbox" id="<?php echo esc_attr( $taxonomy_name . '-tab' ); ?>" class="select-all" /> 838 <label for="<?php echo esc_attr( $taxonomy_name . '-tab' ); ?>"><?php _e( 'Select All' ); ?></label> 861 839 </span> 862 840 863 841 <span class="add-to-menu">