Use admin menu API when responsively collapsing the menu. CSS fixes. see #18382.

git-svn-id: http://svn.automattic.com/wordpress/trunk@18761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2011-09-23 20:22:52 +00:00
parent 1b6afc2077
commit 27d6351a64
7 changed files with 12 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -991,7 +991,8 @@ table.widefat .spam a:hover,
border-color: #dfdfdf; border-color: #dfdfdf;
} }
#adminmenu .wp-submenu-wrap { #adminmenu .wp-submenu-wrap,
.folded #adminmenu .wp-has-current-submenu .wp-submenu-wrap {
-moz-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 ); -moz-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
-webkit-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 ); -webkit-box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );
box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 ); box-shadow: 2px 2px 5px rgba( 0, 0, 0, 0.4 );

File diff suppressed because one or more lines are too long

View File

@ -1785,6 +1785,7 @@ body.no-js #adminmenu li.wp-has-current-submenu .wp-submenu {
.js.folded #adminmenu .wp-submenu .wp-submenu-wrap { .js.folded #adminmenu .wp-submenu .wp-submenu-wrap {
margin-top: 4px; margin-top: 4px;
border-width: 0 1px 1px 0; border-width: 0 1px 1px 0;
border-style: solid;
} }
.js.folded #adminmenu .wp-submenu ul { .js.folded #adminmenu .wp-submenu ul {

View File

@ -352,12 +352,10 @@ $(document).ready( function() {
if ( getUserSetting('mfold') == 'f' ) if ( getUserSetting('mfold') == 'f' )
return; return;
var w = $(window).width(); var width = $(window).width();
if ( w <= 800 ) // fold admin menu // fold admin menu
$(document.body).addClass('folded'); adminMenu.fold( width >= 800 );
else
$(document.body).removeClass('folded');
}).triggerHandler('resize'); }).triggerHandler('resize');
}); });

File diff suppressed because one or more lines are too long

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'), '20110922', 1 ); $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20110923', 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.")
) ); ) );
@ -429,13 +429,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(), '20110923' ); $styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110923b' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20110919' ); $styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20110919' );
$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 = '20110923'; $colors_version = '20110923b';
// 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 );