Fix unfolding of the admin menu when no JS, fixes #17897

git-svn-id: http://svn.automattic.com/wordpress/trunk@18349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-06-27 20:40:04 +00:00
parent 1a50d6ee95
commit 06fd2002c5
10 changed files with 58 additions and 64 deletions

View File

@ -28,7 +28,6 @@ else
$admin_title = apply_filters( 'admin_title', $admin_title, $title );
wp_user_settings();
wp_menu_unfold();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

File diff suppressed because one or more lines are too long

View File

@ -78,8 +78,8 @@ table {
padding-bottom: 65px;
}
.folded #wpcontent,
.folded #footer {
.js.folded #wpcontent,
.js.folded #footer {
margin-left: 52px;
}
@ -91,8 +91,8 @@ table {
#adminmenuback,
#adminmenuwrap,
#adminmenu,
.folded #adminmenu .wp-submenu.sub-open,
.folded #adminmenu .wp-submenu-wrap {
.js.folded #adminmenu .wp-submenu.sub-open,
.js.folded #adminmenu .wp-submenu-wrap {
width: 145px;
}
@ -113,10 +113,10 @@ table {
list-style: none;
}
.folded #adminmenuback,
.folded #adminmenuwrap,
.folded #adminmenu,
.folded #adminmenu li.menu-top {
.js.folded #adminmenuback,
.js.folded #adminmenuwrap,
.js.folded #adminmenu,
.js.folded #adminmenu li.menu-top {
width: 32px;
}

File diff suppressed because one or more lines are too long

View File

@ -34,16 +34,23 @@
}
#wpbody-content input.button,
#wpbody-content input.button-primary,
#wpbody-content input.button-secondary,
#wpbody-content input.button-highlighted {
padding: 2px 3px;
overflow: visible;
}
#minor-publishing-actions input,
#major-publishing-actions input {
min-width: auto;
padding-left: 0;
padding-right: 0;
#dashboard-widgets #dashboard_quick_press form p.submit #publish {
float: none;
}
#dashboard-widgets h3 a {
height: 14px;
line-height: 14px;
}
.tablenav-pages .current-page {
vertical-align: middle;
}
#wpbody-content .postbox {
@ -97,7 +104,7 @@
margin: 0;
}
.folded #adminmenu li.menu-top {
.js.folded #adminmenu li.menu-top {
display: block;
zoom: 100%;
}
@ -139,7 +146,12 @@ ul#adminmenu {
.major-publishing-actions,
.wp-submenu,
.wp-submenu li,
.wp-menu-toggle {
.wp-menu-toggle,
#template,
#template div,
#editcat,
#addcat,
* html .stuffbox h3 {
zoom: 100%;
}
@ -148,20 +160,16 @@ ul#adminmenu {
zoom: 100%;
}
.folded #adminmenu .menu-top {
.js.folded #adminmenu .menu-top {
height: 30px;
}
.folded #adminmenu .wp-submenu {
.js.folded #adminmenu .wp-submenu {
margin: -1px 0 0 0;
}
#template,
#template div,
#editcat,
#addcat,
* html .stuffbox h3 {
zoom: 100%;
.wp-menu-arrow {
height: 28px;
}
.submitbox {
@ -213,19 +221,10 @@ ul#adminmenu {
}
/* end Inline Editor */
input {
line-height: 1;
}
* html .row-actions {
visibility: visible;
}
#dashboard-widgets h3 a {
height: 20px;
line-height: 20px;
}
#wphead-info {
float: right;
}
@ -343,9 +342,10 @@ div#dashboard-widgets {
margin: 4px 0 0 -9px;
}
.tablenav .button-secondary, .nav .button-secondary {
padding: 0 1px;
vertical-align: middle;
.tablenav .button-secondary,
.nav .button-secondary {
padding-top: 2px;
padding-bottom: 2px;
}
.tablenav select {

File diff suppressed because one or more lines are too long

View File

@ -1219,13 +1219,13 @@ form.upgrade .hint {
display: none;
}
.folded #adminmenu div.wp-submenu-head {
.js.folded #adminmenu div.wp-submenu-head {
display: block;
}
.folded #adminmenu a.menu-top,
.js.folded #adminmenu a.menu-top,
body.no-js #adminmenu .wp-menu-toggle,
.folded #adminmenu div.wp-menu-toggle {
.js.folded #adminmenu div.wp-menu-toggle {
display: none;
}
@ -1240,7 +1240,7 @@ body.no-js #adminmenu li.wp-has-current-submenu .wp-submenu {
width: 28px;
height: 28px;
}
.folded #adminmenu div.wp-menu-image {
.js.folded #adminmenu div.wp-menu-image {
width: 32px;
}
@ -1303,7 +1303,7 @@ body.no-js #adminmenu li.wp-has-current-submenu .wp-submenu {
margin: 0;
}
.folded #adminmenu li.menu-top {
.js.folded #adminmenu li.menu-top {
width: 32px;
height: 29px;
border-width: 1px 0;
@ -1339,7 +1339,7 @@ body.no-js #adminmenu li.wp-has-current-submenu .wp-submenu {
border-style: solid;
}
.folded #adminmenu .wp-submenu {
.js.folded #adminmenu .wp-submenu {
display: block;
position: absolute;
top: -5px;
@ -1353,7 +1353,7 @@ body.no-js #adminmenu li.wp-has-current-submenu .wp-submenu {
-o-transition: width 200ms ease-out;
transition: width 200ms ease-out;
}
.folded #adminmenu .wp-submenu.sub-open {
.js.folded #adminmenu .wp-submenu.sub-open {
padding: 0 8px 8px 0;
}
@ -1364,7 +1364,7 @@ body.no-js #adminmenu li.wp-has-current-submenu .wp-submenu {
border-style: solid;
}
.folded #adminmenu .wp-submenu-wrap {
.js.folded #adminmenu .wp-submenu-wrap {
margin-top: 4px;
border-width: 0 1px 1px 0;
border-style: solid;
@ -1379,16 +1379,16 @@ body.no-js #adminmenu li.wp-has-current-submenu .wp-submenu {
border-top-right-radius: 3px;
}
.folded #adminmenu .wp-submenu ul {
.js.folded #adminmenu .wp-submenu ul {
border-width: 0 0 0 1px;
border-style: solid;
}
.folded #adminmenu .wp-submenu a {
.js.folded #adminmenu .wp-submenu a {
padding-left: 10px;
}
.folded #adminmenu a.wp-has-submenu {
.js.folded #adminmenu a.wp-has-submenu {
margin-left: 40px;
}
@ -1495,14 +1495,17 @@ strong .post-com-count {
font-size: 12px;
line-height: 34px;
}
.folded #collapse-menu span {
.js.folded #collapse-menu span {
display: none;
}
#collapse-button,
#collapse-button div {
width: 15px;
height: 15px;
}
#collapse-button {
float: left;
margin: 8px 6px;

View File

@ -373,14 +373,6 @@ function set_screen_options() {
}
}
function wp_menu_unfold() {
if ( isset($_GET['unfoldmenu']) ) {
delete_user_setting('mfold');
wp_redirect( remove_query_arg( 'unfoldmenu', stripslashes($_SERVER['REQUEST_URI']) ) );
exit;
}
}
/**
* Check if rewrite rule for WordPress already exists in the IIS 7 configuration file
*

View File

@ -169,7 +169,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {
echo "</li>";
}
echo '<li id="collapse-menu"><div id="collapse-button"><div></div></div>';
echo '<li id="collapse-menu" class="hide-if-no-js"><div id="collapse-button"><div></div></div>';
echo '<span>' . esc_html__( 'Collapse menu' ) . '</span>';
echo '</li>';
}

View File

@ -482,9 +482,9 @@ 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(), '20110614' );
$styles->add( 'wp-admin', "/wp-admin/css/wp-admin$suffix.css", array(), '20110627' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20110601' );
$styles->add( 'ie', "/wp-admin/css/ie$suffix.css", array(), '20110627' );
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
// all colors stylesheets need to have the same query strings (cache manifest compat)
@ -498,7 +498,7 @@ function wp_default_styles( &$styles ) {
$styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array(), $colors_version );
$styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20110623' );
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20110610' );
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20110627' );
$styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20110614' );
$styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20110606' );
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20110627' );