Improved no-js styles
git-svn-id: http://svn.automattic.com/wordpress/trunk@10869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a4c45667e1
commit
7160187ec2
|
@ -59,28 +59,24 @@ do_action("admin_head-$hook_suffix");
|
|||
do_action('admin_head');
|
||||
|
||||
$admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix);
|
||||
?>
|
||||
|
||||
<noscript>
|
||||
<style type="text/css">
|
||||
.hide-if-no-js{display:none}
|
||||
.hide-if-js,.closed .inside{display:block}
|
||||
</style>
|
||||
</noscript>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
(function(){
|
||||
var ns = document.getElementsByTagName('noscript');
|
||||
if ( ns && (ns = ns[0]) ) ns.parentNode.removeChild(ns);
|
||||
})();
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<?php if ( $is_iphone ) { ?>
|
||||
if ( $is_iphone ) { ?>
|
||||
<style type="text/css">.row-actions{visibility:visible;}</style>
|
||||
<?php } ?>
|
||||
</head>
|
||||
<body class="wp-admin <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
|
||||
<body class="wp-admin no-js <?php echo apply_filters( 'admin_body_class', '' ) . " $admin_body_class"; ?>">
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
(function(){
|
||||
var c = document.body.className;
|
||||
c = c.replace(/no-js/, 'js');
|
||||
<?php if ( get_user_setting('mfold') == 'f' ) { ?>
|
||||
c += ' folded';
|
||||
<?php } ?>
|
||||
document.body.className = c;
|
||||
})();
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<div id="wpwrap">
|
||||
<div id="wpcontent">
|
||||
|
@ -118,10 +114,6 @@ if ( function_exists('mb_strlen') ) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ( get_user_setting('mfold') == 'f' ) { ?>
|
||||
<script type="text/javascript">jQuery('#wpcontent').addClass('folded');</script>
|
||||
<?php } ?>
|
||||
|
||||
<div id="wpbody">
|
||||
<?php require(ABSPATH . 'wp-admin/menu-header.php'); ?>
|
||||
|
||||
|
|
|
@ -185,8 +185,9 @@ table {
|
|||
}
|
||||
|
||||
.hidden,
|
||||
.closed .inside,
|
||||
.hide-if-js {
|
||||
.js .closed .inside,
|
||||
.js .hide-if-js,
|
||||
.no-js .hide-if-no-js {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ input.button-highlighted {
|
|||
margin-left: -80px;
|
||||
}
|
||||
|
||||
* html div.folded #adminmenu {
|
||||
* html .folded #adminmenu {
|
||||
margin-left: -22px;
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,9 @@ input.button-highlighted {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
#wpcontent.folded #adminmenu li.menu-top {
|
||||
.folded #adminmenu li.menu-top {
|
||||
display: block;
|
||||
zoom: 100%;
|
||||
}
|
||||
|
||||
ul#adminmenu {
|
||||
|
@ -100,7 +101,7 @@ ul#adminmenu {
|
|||
zoom: 100%;
|
||||
}
|
||||
|
||||
#wpcontent.folded #adminmenu li.wp-menu-separator {
|
||||
.folded #adminmenu li.wp-menu-separator {
|
||||
width: 28px;
|
||||
}
|
||||
|
||||
|
@ -109,7 +110,7 @@ ul#adminmenu {
|
|||
zoom: 100%;
|
||||
}
|
||||
|
||||
#wpcontent.folded #adminmenu .menu-top {
|
||||
.folded #adminmenu .menu-top {
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ adminMenu = {
|
|||
this.favorites();
|
||||
|
||||
$('.wp-menu-separator').click(function(){
|
||||
if ( $('#wpcontent').hasClass('folded') ) {
|
||||
if ( $('body').hasClass('folded') ) {
|
||||
adminMenu.fold(1);
|
||||
setUserSetting( 'mfold', 'o' );
|
||||
} else {
|
||||
|
@ -54,10 +54,10 @@ adminMenu = {
|
|||
|
||||
fold : function(off) {
|
||||
if (off) {
|
||||
$('#wpcontent').removeClass('folded');
|
||||
$('body').removeClass('folded');
|
||||
$('#adminmenu li.wp-has-submenu').unbind();
|
||||
} else {
|
||||
$('#wpcontent').addClass('folded');
|
||||
$('body').addClass('folded');
|
||||
$('#adminmenu li.wp-has-submenu').hoverIntent({
|
||||
over: function(e){
|
||||
var m = $(this).find('.wp-submenu'), t = e.clientY, H = $(window).height(), h = m.height(), o;
|
||||
|
@ -119,13 +119,11 @@ $(document).ready(function(){columns.init();});
|
|||
screenOptions = {
|
||||
init : function() {
|
||||
$('.screen-option').change(function() {
|
||||
var option = $(this).map(function() { return this.id; }).get();
|
||||
var value = $(this).val();
|
||||
var option = $(this).map(function() { return this.id; }).get(), value = $(this).val();
|
||||
screenOptions.save_screen_option(option, value);
|
||||
});
|
||||
$('.screen-option').submit(function() {
|
||||
var option = $(this).map(function() { return this.id; }).get();
|
||||
var value = $(this).val();
|
||||
var option = $(this).map(function() { return this.id; }).get(), value = $(this).val();
|
||||
screenOptions.save_screen_option(option, value);
|
||||
});
|
||||
},
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,7 @@ $menu[0] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top', 'menu-da
|
|||
|
||||
$menu[4] = array( '', 'read', '', '', 'wp-menu-separator' );
|
||||
|
||||
$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'wp-menu-open menu-top', 'menu-posts', 'div' );
|
||||
$menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu-top', 'menu-posts', 'div' );
|
||||
$submenu['edit.php'][5] = array( __('Edit'), 'edit_posts', 'edit.php' );
|
||||
/* translators: add new post */
|
||||
$submenu['edit.php'][10] = array( _x('Add New', 'post'), 'edit_posts', 'post-new.php' );
|
||||
|
|
|
@ -871,7 +871,8 @@ div.comment-item:hover .row-actions {
|
|||
display: none;
|
||||
}
|
||||
|
||||
#adminmenu li.wp-menu-open .wp-submenu {
|
||||
#adminmenu li.wp-menu-open .wp-submenu,
|
||||
.no-js #adminmenu .open-if-no-js .wp-submenu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
|
||||
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' );
|
||||
|
||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20090327' );
|
||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20090404' );
|
||||
$scripts->add_data( 'common', 'group', 1 );
|
||||
$scripts->localize( 'common', 'commonL10n', array(
|
||||
'warnDelete' => __("You are about to delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),
|
||||
|
@ -425,10 +425,10 @@ function wp_default_styles( &$styles ) {
|
|||
|
||||
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' );
|
||||
|
||||
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20090403' );
|
||||
$styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20090404' );
|
||||
$styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
|
||||
|
||||
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20081210' );
|
||||
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20090404' );
|
||||
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
||||
|
||||
$styles->add( 'colors', true, array(), '20081210' ); // Register "meta" stylesheet for admin colors
|
||||
|
@ -437,7 +437,7 @@ function wp_default_styles( &$styles ) {
|
|||
$styles->add( 'colors-classic', '/wp-admin/css/colors-classic.css', array(), '20081210');
|
||||
$styles->add_data( 'colors-classic', 'rtl', true );
|
||||
|
||||
$styles->add( 'global', '/wp-admin/css/global.css', array(), '20090403' );
|
||||
$styles->add( 'global', '/wp-admin/css/global.css', array(), '20090404' );
|
||||
$styles->add( 'media', '/wp-admin/css/media.css', array(), '20090325' );
|
||||
$styles->add( 'widgets', '/wp-admin/css/widgets.css', array(), '20081210' );
|
||||
$styles->add( 'dashboard', '/wp-admin/css/dashboard.css', array(), '20090305' );
|
||||
|
|
Loading…
Reference in New Issue