Trigger 'howdy' dropdown by click instead of hover. see #17324.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2011-05-10 20:36:12 +00:00
parent d822248130
commit 33a0cf3286
7 changed files with 38 additions and 19 deletions

File diff suppressed because one or more lines are too long

View File

@ -726,7 +726,8 @@ table.widefat span.spam a,
background: transparent url(../images/arrows.png) no-repeat 6px 6px;
}
#user_info:hover #user_info_arrow {
#user_info:hover #user_info_arrow,
#user_info.active #user_info_arrow {
background: transparent url(../images/arrows-dark.png) no-repeat 6px 6px;
}

File diff suppressed because one or more lines are too long

View File

@ -833,7 +833,7 @@ form.upgrade .hint {
line-height: 36px;
height: 36px;
position: relative;
z-index: 999;
z-index: 49;
}
#user_info p {
@ -863,28 +863,28 @@ form.upgrade .hint {
overflow: hidden;
}
#user_info:hover #user_info_links_wrap {
#user_info.active #user_info_links_wrap {
top: 28px;
right: -8px;
padding: 8px;
}
#user_info:hover #user_info_links ul {
#user_info.active #user_info_links ul {
margin-top: 0;
-moz-transition: margin-top 150ms ease-out 300ms;
-webkit-transition: margin-top 150ms ease-out 300ms;
-o-transition: margin-top 150ms ease-out 300ms;
transition: margin-top 150ms ease-out 300ms;
-moz-transition: margin-top 150ms ease-out;
-webkit-transition: margin-top 150ms ease-out;
-o-transition: margin-top 150ms ease-out;
transition: margin-top 150ms ease-out;
}
#user_info_links ul {
border-width: 1px;
border-style: solid;
margin-top: -100%;
-moz-transition: margin-top 300ms ease-in 400ms;
-webkit-transition: margin-top 300ms ease-in 400ms;
-o-transition: margin-top 300ms ease-in 400ms;
transition: margin-top 300ms ease-in 400ms;
-moz-transition: margin-top 300ms ease-in;
-webkit-transition: margin-top 300ms ease-in;
-o-transition: margin-top 300ms ease-in;
transition: margin-top 300ms ease-in;
}
#user_info_links ul,

View File

@ -226,7 +226,7 @@ screenMeta = {
};
$(document).ready( function() {
var lastClicked = false, checks, first, last, checked;
var lastClicked = false, checks, first, last, checked, dropdown;
// Move .updated and .error alert boxes. Don't move boxes designed to be inline.
$('div.wrap h2:first').nextAll('div.updated, div.error').addClass('below-h2');
@ -235,6 +235,24 @@ $(document).ready( function() {
// Init screen meta
screenMeta.init();
// User info dropdown.
dropdown = {
doc: $(document),
element: $('#user_info'),
open: function() {
if ( ! dropdown.element.hasClass('active') ) {
dropdown.element.addClass('active');
dropdown.doc.one( 'click', dropdown.close );
return false;
}
},
close: function() {
dropdown.element.removeClass('active');
}
};
dropdown.element.click( dropdown.open );
// check all checkboxes
$('tbody').children().children('.check-column').find(':checkbox').click( function(e) {
if ( 'undefined' == e.shiftKey ) { return true; }

File diff suppressed because one or more lines are too long

View File

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