Menus: Fix proximity of controls to Save and Delete menus.

Move the position of the Save and Delete buttons in menu editing so they are immediate neighbors, improving the proximity of related controls. 

Props 90lines, sabernhardt, costdev.
See #56594.
Built from https://develop.svn.wordpress.org/trunk@56449


git-svn-id: http://core.svn.wordpress.org/trunk@55961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
joedolson 2023-08-24 15:59:12 +00:00
parent 64e114f233
commit ad66de2933
23 changed files with 51 additions and 65 deletions

View File

@ -571,7 +571,7 @@ th.sorted.desc:hover .sorting-indicator.asc:before {
position: relative;
}
.check-column .label-covers-full-cell {
.check-column label {
width: 100%;
height: 100%;
display: block;
@ -580,12 +580,12 @@ th.sorted.desc:hover .sorting-indicator.asc:before {
right: 0;
}
.check-column .label-covers-full-cell + input {
.check-column input {
position: relative;
z-index: 1;
}
.check-column .label-covers-full-cell:hover + input {
.check-column:hover input {
box-shadow: 0 0 0 1px #2271b1;
}

File diff suppressed because one or more lines are too long

View File

@ -570,7 +570,7 @@ th.sorted.desc:hover .sorting-indicator.asc:before {
position: relative;
}
.check-column .label-covers-full-cell {
.check-column label {
width: 100%;
height: 100%;
display: block;
@ -579,12 +579,12 @@ th.sorted.desc:hover .sorting-indicator.asc:before {
left: 0;
}
.check-column .label-covers-full-cell + input {
.check-column input {
position: relative;
z-index: 1;
}
.check-column .label-covers-full-cell:hover + input {
.check-column:hover input {
box-shadow: 0 0 0 1px #2271b1;
}

File diff suppressed because one or more lines are too long

View File

@ -838,20 +838,13 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
/* Major/minor publishing actions (classes) */
.nav-menus-php .major-publishing-actions {
clear: both;
padding: 10px 0;
line-height: 2.15384615;
display: flex;
align-items: center;
}
.nav-menus-php .major-publishing-actions .publishing-action {
text-align: left;
float: left;
}
/* Same as the Publish Meta Box #delete-action */
.nav-menus-php .delete-action {
float: right;
line-height: 2.1;
.nav-menus-php .major-publishing-actions > * {
margin-left: 10px;
}
.nav-menus-php .major-publishing-actions .form-invalid {

File diff suppressed because one or more lines are too long

View File

@ -837,20 +837,13 @@ body.menu-max-depth-11 { min-width: 1280px !important; }
/* Major/minor publishing actions (classes) */
.nav-menus-php .major-publishing-actions {
clear: both;
padding: 10px 0;
line-height: 2.15384615;
display: flex;
align-items: center;
}
.nav-menus-php .major-publishing-actions .publishing-action {
text-align: right;
float: right;
}
/* Same as the Publish Meta Box #delete-action */
.nav-menus-php .delete-action {
float: left;
line-height: 2.1;
.nav-menus-php .major-publishing-actions > * {
margin-right: 10px;
}
.nav-menus-php .major-publishing-actions .form-invalid {

File diff suppressed because one or more lines are too long

View File

@ -895,7 +895,8 @@ class WP_Comments_List_Table extends WP_List_Table {
if ( $this->user_can ) {
?>
<label class="label-covers-full-cell" for="cb-select-<?php echo $comment->comment_ID; ?>">
<input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
<label for="cb-select-<?php echo $comment->comment_ID; ?>">
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. */
@ -903,7 +904,6 @@ class WP_Comments_List_Table extends WP_List_Table {
?>
</span>
</label>
<input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
<?php
}
}

View File

@ -174,7 +174,8 @@ class WP_Links_List_Table extends WP_List_Table {
$link = $item;
?>
<label class="label-covers-full-cell" for="cb-select-<?php echo $link->link_id; ?>">
<input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" />
<label for="cb-select-<?php echo $link->link_id; ?>">
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. %s: Link name. */
@ -182,7 +183,6 @@ class WP_Links_List_Table extends WP_List_Table {
?>
</span>
</label>
<input type="checkbox" name="linkcheck[]" id="cb-select-<?php echo $link->link_id; ?>" value="<?php echo esc_attr( $link->link_id ); ?>" />
<?php
}

View File

@ -1399,13 +1399,13 @@ class WP_List_Table {
if ( ! empty( $columns['cb'] ) ) {
static $cb_counter = 1;
$columns['cb'] = '<label class="label-covers-full-cell" for="cb-select-all-' . $cb_counter . '">' .
$columns['cb'] = '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />
<label for="cb-select-all-' . $cb_counter . '">' .
'<span class="screen-reader-text">' .
/* translators: Hidden accessibility text. */
__( 'Select All' ) .
'</span>' .
'</label>' .
'<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
'</label>';
$cb_counter++;
}

View File

@ -419,7 +419,8 @@ class WP_Media_List_Table extends WP_List_Table {
if ( current_user_can( 'edit_post', $post->ID ) ) {
?>
<label class="label-covers-full-cell" for="cb-select-<?php echo $post->ID; ?>">
<input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
<label for="cb-select-<?php echo $post->ID; ?>">
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. %s: Attachment title. */
@ -427,7 +428,6 @@ class WP_Media_List_Table extends WP_List_Table {
?>
</span>
</label>
<input type="checkbox" name="media[]" id="cb-select-<?php echo $post->ID; ?>" value="<?php echo $post->ID; ?>" />
<?php
}
}

View File

@ -420,7 +420,9 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
if ( ! is_main_site( $blog['blog_id'] ) ) :
$blogname = untrailingslashit( $blog['domain'] . $blog['path'] );
?>
<label class="label-covers-full-cell" for="blog_<?php echo $blog['blog_id']; ?>">
<input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]"
value="<?php echo esc_attr( $blog['blog_id'] ); ?>" />
<label for="blog_<?php echo $blog['blog_id']; ?>">
<span class="screen-reader-text">
<?php
/* translators: %s: Site URL. */
@ -428,8 +430,6 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
?>
</span>
</label>
<input type="checkbox" id="blog_<?php echo $blog['blog_id']; ?>" name="allblogs[]"
value="<?php echo esc_attr( $blog['blog_id'] ); ?>" />
<?php
endif;
}

View File

@ -512,7 +512,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
$theme = $item;
$checkbox_id = 'checkbox_' . md5( $theme->get( 'Name' ) );
?>
<label class="label-covers-full-cell" for="<?php echo $checkbox_id; ?>" >
<input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" id="<?php echo $checkbox_id; ?>" />
<label for="<?php echo $checkbox_id; ?>" >
<span class="screen-reader-text">
<?php
printf(
@ -523,7 +524,6 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
?>
</span>
</label>
<input type="checkbox" name="checked[]" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" id="<?php echo $checkbox_id; ?>" />
<?php
}

View File

@ -235,7 +235,8 @@ class WP_MS_Users_List_Table extends WP_List_Table {
return;
}
?>
<label class="label-covers-full-cell" for="blog_<?php echo $user->ID; ?>">
<input type="checkbox" id="blog_<?php echo $user->ID; ?>" name="allusers[]" value="<?php echo esc_attr( $user->ID ); ?>" />
<label for="blog_<?php echo $user->ID; ?>">
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. %s: User login. */
@ -243,7 +244,6 @@ class WP_MS_Users_List_Table extends WP_List_Table {
?>
</span>
</label>
<input type="checkbox" id="blog_<?php echo $user->ID; ?>" name="allusers[]" value="<?php echo esc_attr( $user->ID ); ?>" />
<?php
}

View File

@ -993,8 +993,8 @@ class WP_Plugins_List_Table extends WP_List_Table {
$checkbox = '';
} else {
$checkbox = sprintf(
'<label class="label-covers-full-cell" for="%1$s"><span class="screen-reader-text">%2$s</span></label>' .
'<input type="checkbox" name="checked[]" value="%3$s" id="%1$s" />',
'<input type="checkbox" name="checked[]" value="%3$s" id="%1$s" />' .
'<label for="%1$s"><span class="screen-reader-text">%2$s</span></label>',
$checkbox_id,
/* translators: Hidden accessibility text. %s: Plugin name. */
sprintf( __( 'Select %s' ), $plugin_data['Name'] ),

View File

@ -1033,7 +1033,8 @@ class WP_Posts_List_Table extends WP_List_Table {
*/
if ( apply_filters( 'wp_list_table_show_post_checkbox', $show, $post ) ) :
?>
<label class="label-covers-full-cell" for="cb-select-<?php the_ID(); ?>">
<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
<label for="cb-select-<?php the_ID(); ?>">
<span class="screen-reader-text">
<?php
/* translators: %s: Post title. */
@ -1041,7 +1042,6 @@ class WP_Posts_List_Table extends WP_List_Table {
?>
</span>
</label>
<input id="cb-select-<?php the_ID(); ?>" type="checkbox" name="post[]" value="<?php the_ID(); ?>" />
<div class="locked-indicator">
<span class="locked-indicator-icon" aria-hidden="true"></span>
<span class="screen-reader-text">

View File

@ -416,8 +416,8 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table {
*/
public function column_cb( $item ) {
return sprintf(
'<label class="label-covers-full-cell" for="requester_%1$s"><span class="screen-reader-text">%2$s</span></label>' .
'<input type="checkbox" name="request_id[]" id="requester_%1$s" value="%1$s" /><span class="spinner"></span>',
'<input type="checkbox" name="request_id[]" id="requester_%1$s" value="%1$s" /><span class="spinner"></span>' .
'<label for="requester_%1$s"><span class="screen-reader-text">%2$s</span></label>',
esc_attr( $item->ID ),
/* translators: Hidden accessibility text. %s: Email address. */
sprintf( __( 'Select %s' ), $item->email )

View File

@ -365,8 +365,8 @@ class WP_Terms_List_Table extends WP_List_Table {
if ( current_user_can( 'delete_term', $tag->term_id ) ) {
return sprintf(
'<label class="label-covers-full-cell" for="cb-select-%1$s"><span class="screen-reader-text">%2$s</span></label>' .
'<input type="checkbox" name="delete_tags[]" value="%1$s" id="cb-select-%1$s" />',
'<input type="checkbox" name="delete_tags[]" value="%1$s" id="cb-select-%1$s" />' .
'<label for="cb-select-%1$s"><span class="screen-reader-text">%2$s</span></label>',
$tag->term_id,
/* translators: Hidden accessibility text. %s: Taxonomy term name. */
sprintf( __( 'Select %s' ), $tag->name )

View File

@ -524,8 +524,8 @@ class WP_Users_List_Table extends WP_List_Table {
// Set up the checkbox (because the user is editable, otherwise it's empty).
$checkbox = sprintf(
'<label class="label-covers-full-cell" for="user_%1$s"><span class="screen-reader-text">%2$s</span></label>' .
'<input type="checkbox" name="users[]" id="user_%1$s" class="%3$s" value="%1$s" />',
'<input type="checkbox" name="users[]" id="user_%1$s" class="%3$s" value="%1$s" />' .
'<label for="user_%1$s"><span class="screen-reader-text">%2$s</span></label>',
$user_object->ID,
/* translators: Hidden accessibility text. %s: User login. */
sprintf( __( 'Select %s' ), $user_object->user_login ),

View File

@ -1149,7 +1149,10 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
</div><!-- /#post-body-content -->
</div><!-- /#post-body -->
<div id="nav-menu-footer">
<div class="major-publishing-actions wp-clearfix">
<div class="major-publishing-actions">
<div class="publishing-action">
<?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
</div><!-- END .publishing-action -->
<?php if ( $menu_count > 0 ) : ?>
<?php if ( $add_new_screen ) : ?>
@ -1178,9 +1181,6 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<?php endif; ?>
<?php endif; ?>
<div class="publishing-action">
<?php submit_button( empty( $nav_menu_selected_id ) ? __( 'Create Menu' ) : __( 'Save Menu' ), 'primary large menu-save', 'save_menu', false, array( 'id' => 'save_menu_footer' ) ); ?>
</div><!-- END .publishing-action -->
</div><!-- END .major-publishing-actions -->
</div><!-- /#nav-menu-footer -->
</div><!-- /.menu-edit -->

View File

@ -571,7 +571,7 @@ function list_plugin_updates() {
<tr>
<td class="check-column">
<?php if ( $compatible_php ) : ?>
<label for="<?php echo $checkbox_id; ?>" class="label-covers-full-cell">
<label for="<?php echo $checkbox_id; ?>">
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. %s: Plugin name. */
@ -749,7 +749,7 @@ function list_theme_updates() {
<tr>
<td class="check-column">
<?php if ( $compatible_wp && $compatible_php ) : ?>
<label for="<?php echo $checkbox_id; ?>" class="label-covers-full-cell">
<label for="<?php echo $checkbox_id; ?>">
<span class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. %s: Theme name. */

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.4-alpha-56448';
$wp_version = '6.4-alpha-56449';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.