Remove the other tab before sliding down.

git-svn-id: https://develop.svn.wordpress.org/trunk@9561 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2008-11-07 22:07:58 +00:00
parent b5a79bce8d
commit 13372af2c7
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,8 @@
jQuery(document).ready( function($) {
$('#show-settings-link').click(function () {
if ( ! $('#screen-options-wrap').hasClass('screen-options-open') ) {
$('#contextual-help-link-wrap').addClass('invisible');
}
$('#screen-options-wrap').slideToggle('fast', function(){
if ( $(this).hasClass('screen-options-open') ) {
$('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right.gif")'});
@ -8,13 +11,15 @@ jQuery(document).ready( function($) {
} else {
$('#show-settings-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'});
$('#contextual-help-link-wrap').addClass('invisible');
$(this).addClass('screen-options-open');
}
});
return false;
}).parent();
$('#contextual-help-link').click(function () {
if ( ! $('#contextual-help-wrap').hasClass('contextual-help-open') ) {
$('#screen-options-link-wrap').addClass('invisible');
}
$('#contextual-help-wrap').slideToggle('fast', function(){
if ( $(this).hasClass('contextual-help-open') ) {
$('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right.gif")'});
@ -22,7 +27,6 @@ jQuery(document).ready( function($) {
$(this).removeClass('contextual-help-open');
} else {
$('#contextual-help-link').css({'backgroundImage':'url("images/screen-options-right-up.gif")'});
$('#screen-options-link-wrap').addClass('invisible');
$(this).addClass('contextual-help-open');
}
});

View File

@ -292,7 +292,7 @@ function wp_default_scripts( &$scripts ) {
'requestFile' => admin_url('admin-ajax.php'),
) );
$scripts->add( 'settings-box', '/wp-admin/js/settings-box.js', array( 'jquery' ), '20081105' );
$scripts->add( 'settings-box', '/wp-admin/js/settings-box.js', array( 'jquery' ), '20081107' );
$scripts->add( 'dashboard', '/wp-admin/js/dashboard.js', array( 'jquery', 'admin-comments', 'postbox', 'settings-box' ), '20081016' );