Revert placement of Help and Screen Options to under the admin bar on the right, see #18197, see #18785

git-svn-id: http://svn.automattic.com/wordpress/trunk@19130 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-11-03 17:08:12 +00:00
parent eb835e1901
commit f73e6b3228
15 changed files with 75 additions and 81 deletions

File diff suppressed because one or more lines are too long

View File

@ -1618,9 +1618,8 @@ table.diff .diff-addedline ins {
#contextual-help-back { #contextual-help-back {
background-color: #EFF8FF; background-color: #EFF8FF;
border-color: #D1E5EE; border-color: #D1E5EE;
-webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 ); -webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 ); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 );
} }
.contextual-help-tabs a:hover { .contextual-help-tabs a:hover {

File diff suppressed because one or more lines are too long

View File

@ -784,13 +784,12 @@ table.widefat span.spam a,
#screen-meta { #screen-meta {
background-color: #fff; background-color: #fff;
} }
#contextual-help-back { #contextual-help-back {
background-color: #f1f1f1; background-color: #f1f1f1;
border-color: #ccc; border-color: #ccc;
-webkit-box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 ); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 );
box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.05 );
} }
.contextual-help-tabs a:hover { .contextual-help-tabs a:hover {

File diff suppressed because one or more lines are too long

View File

@ -1311,6 +1311,10 @@ table .column-rating {
text-align: right; text-align: right;
} }
.screen-meta-toggle {
right: auto;
left: 15px;
}
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
23.0 - Dead 23.0 - Dead

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,6 @@ TABLE OF CONTENTS:
20.0 - Settings 20.0 - Settings
21.0 - Admin Footer 21.0 - Admin Footer
22.0 - Misc 22.0 - Misc
23.0 - Dead
------------------------------------------------------------------------*/ ------------------------------------------------------------------------*/
@ -1029,16 +1028,15 @@ th.action-links {
4.0 - Notifications 4.0 - Notifications
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
#update-nag, .update-nag { #update-nag,
.update-nag {
line-height: 19px; line-height: 19px;
padding: 5px 0; padding: 5px 0;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
margin: 0 15px; margin: 0 15px 0 0;
border-width: 1px; border-width: 0 1px 1px;
border-style: solid; border-style: none solid solid;
border-top-width: 0;
border-top-style: none;
-webkit-border-bottom-right-radius: 3px; -webkit-border-bottom-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px; -webkit-border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px; border-bottom-right-radius: 3px;
@ -1367,12 +1365,26 @@ form.upgrade .hint {
padding: 8px 20px 12px; padding: 8px 20px 12px;
max-height: 300px; max-height: 300px;
overflow: auto; overflow: auto;
position: relative;
overflow: auto;
} }
#screen-meta .screen-reader-text { #screen-meta .screen-reader-text {
visibility: hidden; visibility: hidden;
} }
.screen-meta-toggle {
font-size: 12px;
position: absolute;
right: 15px;
top: 20px;
display: none;
}
.screen-meta-toggle a {
text-decoration: none;
}
.toggle-arrow { .toggle-arrow {
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: top left; background-position: top left;
@ -1428,9 +1440,7 @@ form.upgrade .hint {
} }
#contextual-help-wrap { #contextual-help-wrap {
position: relative;
padding: 0 0 0 4px; padding: 0 0 0 4px;
overflow: auto;
} }
.contextual-help-tabs { .contextual-help-tabs {
@ -4624,7 +4634,8 @@ input.button-highlighted,
22.0 - Misc 22.0 - Misc
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
#excerpt, .attachmentlinks { #excerpt,
.attachmentlinks {
margin: 0; margin: 0;
height: 4em; height: 4em;
width: 98%; width: 98%;
@ -4744,16 +4755,19 @@ table.form-table td .updated {
padding: 0; padding: 0;
} }
#titlediv, #poststuff .postarea { #titlediv,
#poststuff .postarea {
margin-bottom: 20px; margin-bottom: 20px;
} }
td.post-title strong, td.plugin-title strong { td.post-title strong,
td.plugin-title strong {
display: block; display: block;
margin-bottom: .2em; margin-bottom: .2em;
} }
td.post-title p, td.plugin-title p { td.post-title p,
td.plugin-title p {
margin: 6px 0; margin: 6px 0;
} }
@ -4814,7 +4828,8 @@ td.post-title p, td.plugin-title p {
display: none; display: none;
} }
.plugin-install #description, .plugin-install-network #description { .plugin-install #description,
.plugin-install-network #description {
width: 60%; width: 60%;
} }

View File

@ -689,20 +689,9 @@ final class WP_Screen {
) ); ) );
} }
// Add screen options tab
if ( $this->show_screen_options() ) {
$this->add_help_tab( array(
'id' => 'screen-options',
'title' => __('Screen Options'),
'callback' => array( $this, 'render_screen_options' ),
) );
$_options_tab = array_pop( $this->_help_tabs );
array_unshift( $this->_help_tabs, $_options_tab );
}
// Time to render! // Time to render!
?> ?>
<div id="screen-meta" class='metabox-prefs'> <div id="screen-meta" class="metabox-prefs">
<div id="contextual-help-back"></div> <div id="contextual-help-back"></div>
<div id="contextual-help-wrap" class="hidden"> <div id="contextual-help-wrap" class="hidden">
<div class="contextual-help-tabs"> <div class="contextual-help-tabs">
@ -748,6 +737,19 @@ final class WP_Screen {
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
</div> </div>
<?php
// Add screen options
if ( $this->show_screen_options() )
$this->render_screen_options();
?>
</div>
<div class="screen-meta-toggle">
<?php
if ( $this->show_screen_options() )
echo '<a href="#screen-options-wrap">' . __('Screen Options') . '</a> |';
?>
<a href="#contextual-help-wrap"><?php _e('Help'); ?></a>
</div> </div>
<?php <?php
} }
@ -789,6 +791,7 @@ final class WP_Screen {
$hidden = get_hidden_columns( $this ); $hidden = get_hidden_columns( $this );
?> ?>
<div id="screen-options-wrap" class="hidden">
<form id="adv-settings" action="" method="post"> <form id="adv-settings" action="" method="post">
<?php <?php
if ( $this->get_option('overview') ) if ( $this->get_option('overview') )
@ -840,6 +843,7 @@ final class WP_Screen {
?> ?>
<div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div> <div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div>
</form> </form>
</div>
<?php <?php
} }

View File

@ -95,29 +95,24 @@ screenMeta = {
page: null, // #wpcontent page: null, // #wpcontent
padding: null, // the closed page padding-top property padding: null, // the closed page padding-top property
top: null, // the closed element top property top: null, // the closed element top property
map: {
'wp-admin-bar-screen-options': 'screen-options-wrap',
'wp-admin-bar-help': 'contextual-help-wrap'
},
init: function() { init: function() {
screenMeta.element = $('#screen-meta'); this.element = $('#screen-meta');
screenMeta.toggles = $('.screen-meta-toggle'); this.toggles = $('.screen-meta-toggle a');
screenMeta.page = $('#wpcontent'); this.page = $('#wpcontent');
screenMeta.toggles.click( screenMeta.toggleEvent ); this.toggles.click( this.toggleEvent );
$('.screen-meta-toggle').css('top', ($('h2').offset().top - 12) + 'px' ).fadeIn();
}, },
toggleEvent: function( e ) { toggleEvent: function( e ) {
var panel; var panel = $( this.href.replace(/.+#/, '#') );
e.preventDefault(); e.preventDefault();
// Check to see if we found a panel. if ( !panel.length )
if ( ! screenMeta.map[ this.id ] )
return; return;
panel = $('#' + screenMeta.map[ this.id ]);
if ( panel.is(':visible') ) if ( panel.is(':visible') )
screenMeta.close( panel, $(this) ); screenMeta.close( panel, $(this) );
else else

File diff suppressed because one or more lines are too long

View File

@ -616,22 +616,6 @@ function wp_admin_bar_updates_menu( $wp_admin_bar ) {
$wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => network_admin_url( 'update-core.php' ) ) ); $wp_admin_bar->add_menu( array( 'id' => 'updates', 'title' => $update_title, 'href' => network_admin_url( 'update-core.php' ) ) );
} }
/**
* Add help link.
*
* @since 3.3.0
*/
function wp_admin_bar_help_menu( $wp_admin_bar ) {
$wp_admin_bar->add_menu( array(
'id' => 'help',
'title' => __('Help'),
'href' => '#',
'meta' => array(
'class' => 'screen-meta-toggle hide-if-no-js',
),
) );
}
/** /**
* Add search form. * Add search form.
* *

View File

@ -201,11 +201,8 @@ class WP_Admin_Bar {
add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 ); add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 80 );
add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 90 ); add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 90 );
if ( ! is_admin() ) { if ( ! is_admin() )
add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 100 ); add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 100 );
} else {
add_action( 'admin_bar_menu', 'wp_admin_bar_help_menu', 90 );
}
do_action( 'add_admin_bar_menus' ); do_action( 'add_admin_bar_menus' );
} }

View File

@ -178,17 +178,14 @@
} }
#wpadminbar.nojs .ab-top-menu > li.menupop:hover, #wpadminbar.nojs .ab-top-menu > li.menupop:hover,
#wpadminbar .ab-top-menu li.menupop.hover, #wpadminbar .ab-top-menu li.menupop.hover {
#wpadminbar .ab-top-menu .selected.screen-meta-toggle {
background: #fff; background: #fff;
} }
#wpadminbar.nojs .quicklinks .menupop:hover a, #wpadminbar.nojs .quicklinks .menupop:hover a,
#wpadminbar.nojs .quicklinks .menupop:hover span, #wpadminbar.nojs .quicklinks .menupop:hover span,
#wpadminbar .quicklinks .menupop.hover a, #wpadminbar .quicklinks .menupop.hover a,
#wpadminbar .quicklinks .menupop.hover span, #wpadminbar .quicklinks .menupop.hover span {
#wpadminbar .ab-top-menu .selected.screen-meta-toggle a,
#wpadminbar .ab-top-menu .selected.screen-meta-toggle span {
color: #333; color: #333;
text-shadow: none; text-shadow: none;
} }

View File

@ -61,7 +61,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' ); $scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20101110' );
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111029', 1 ); $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20111103', 1 );
$scripts->add_script_data( 'common', 'commonL10n', array( $scripts->add_script_data( 'common', 'commonL10n', array(
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.") 'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete.")
) ); ) );
@ -431,13 +431,13 @@ function wp_default_styles( &$styles ) {
// Any rtl stylesheets that don't have a .dev version for ltr // Any rtl stylesheets that don't have a .dev version for ltr
$no_suffix = array( 'farbtastic' ); $no_suffix = array( 'farbtastic' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20111101' ); $styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20111103' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20111015' ); $styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20111015' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' ); $styles->add_data( 'ie', 'conditional', 'lte IE 7' );
// all colors stylesheets need to have the same query strings (cache manifest compat) // all colors stylesheets need to have the same query strings (cache manifest compat)
$colors_version = '20111102'; $colors_version = '20111103';
// Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string. // Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
$styles->add( 'colors', true, array('wp-admin'), $colors_version ); $styles->add( 'colors', true, array('wp-admin'), $colors_version );