WordPress.org

Make WordPress Core

Changeset 18776


Ignore:
Timestamp:
09/25/2011 11:30:40 PM (7 years ago)
Author:
koopersmith
Message:

Second pass, admin bar overhaul. see #18197.

Location:
trunk/wp-includes
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r18745 r18776  
    6868
    6969/**
     70 * Add the WordPress logo menu.
     71 *
     72 * @since 3.3.0
     73 */
     74function wp_admin_bar_wp_menu( $wp_admin_bar ) {
     75    $wp_admin_bar->add_menu( array(
     76        'id'    => 'wp-logo',
     77        'title' => ' ',
     78        'href'  => '#',
     79        'meta'  => array(
     80            'class' => 'wp-admin-bar-logo',
     81        ),
     82    ) );
     83
     84    // Add "About This Version" link
     85    $wp_admin_bar->add_menu( array(
     86        'parent' => 'wp-logo',
     87        'id'     => 'about',
     88        'title'  => __('About This Version'),
     89        'href'   => admin_url('about.php'),
     90    ) );
     91
     92    // Add codex link
     93    $wp_admin_bar->add_menu( array(
     94        'parent' => 'wp-logo',
     95        'id'     => 'documentation',
     96        'title'  => __('Documentation'),
     97        'href'   => 'http://codex.wordpress.org',
     98    ) );
     99
     100    // Add forums link
     101    $wp_admin_bar->add_menu( array(
     102        'parent' => 'wp-logo',
     103        'id'     => 'support-forums',
     104        'title'  => __('Support Forums'),
     105        'href'   => 'http://wordpress.org/support/',
     106    ) );
     107
     108    // Add WordPress.org link
     109    $wp_admin_bar->add_menu( array(
     110        'parent' => 'wp-logo',
     111        'id'     => 'wporg',
     112        'title'  => __('WordPress.org'),
     113        'href'   => 'http://wordpress.org',
     114    ) );
     115}
     116
     117/**
    70118 * Add the "My Account" menu and all submenus.
    71119 *
     
    75123    global $user_identity;
    76124
    77     $user_id = get_current_user_id();
     125    $user_id      = get_current_user_id();
     126    $current_user = wp_get_current_user();
    78127
    79128    if ( 0 != $user_id ) {
    80129        /* Add the 'My Account' menu */
    81130        $avatar = get_avatar( get_current_user_id(), 28 );
    82         $id     = ( ! empty( $avatar ) ) ? 'my-account-with-avatar' : 'my-account';
    83131        $howdy  = sprintf( __('Howdy, %1$s'), $user_identity );
    84 
    85         $wp_admin_bar->add_menu( array( 'id' => $id, 'title' => $howdy . $avatar,  'href' => get_edit_profile_url( $user_id ) ) );
     132        $class  = 'opposite';
     133
     134        if ( ! empty( $avatar ) )
     135            $class .= ' with-avatar';
     136
     137        $wp_admin_bar->add_menu( array(
     138            'id'    => 'my-account',
     139            'title' => $howdy . $avatar,
     140            'href'  => get_edit_profile_url( $user_id ),
     141            'meta'  => array(
     142                'class' => $class,
     143            ),
     144        ) );
    86145
    87146        /* Add the "My Account" sub menus */
    88         $wp_admin_bar->add_menu( array( 'id' => 'edit-profile', 'parent' => $id, 'title' => __( 'Edit My Profile' ), 'href' => get_edit_profile_url( $user_id ) ) );
    89         $wp_admin_bar->add_menu( array( 'id' => 'logout', 'parent' => $id, 'title' => __( 'Log Out' ), 'href' => wp_logout_url() ) );
     147
     148
     149
     150        $user_info  = get_avatar( get_current_user_id(), 64 );
     151        $user_info .= "<span class='display-name'>{$current_user->display_name}</span>";
     152
     153        if ( $current_user->display_name !== $current_user->user_nicename )
     154            $user_info .= "<span class='username'>{$current_user->user_nicename}</span>";
     155
     156        $wp_admin_bar->add_menu( array(
     157            'parent' => 'my-account',
     158            'id'     => 'user-info',
     159            'title'  => $user_info,
     160            'meta'   => array(
     161                'class' => 'user-info user-info-item'
     162            ),
     163        ) );
     164        $wp_admin_bar->add_menu( array(
     165            'parent' => 'my-account',
     166            'id'     => 'edit-profile',
     167            'title'  => __( 'Edit My Profile' ),
     168            'href' => get_edit_profile_url( $user_id ),
     169            'meta'   => array(
     170                'class' => 'user-info-item',
     171            ),
     172        ) );
     173        $wp_admin_bar->add_menu( array(
     174            'parent' => 'my-account',
     175            'id'     => 'logout',
     176            'title'  => __( 'Log Out' ),
     177            'href'   => wp_logout_url(),
     178            'meta'   => array(
     179                'class' => 'user-info-item',
     180            ),
     181        ) );
     182
     183        $wp_admin_bar->add_menu( array(
     184            'parent' => 'my-account',
     185            'id'     => 'my-account-secondary',
     186            'title'  => '&nbsp;',
     187            'meta'   => array(
     188                'class' => 'secondary',
     189            ),
     190        ) );
     191    }
     192
     193    wp_admin_bar_my_sites_menu( $wp_admin_bar );
     194}
     195
     196/**
     197 * Add the "Network Admin" menu.
     198 *
     199 * @since 3.3.0
     200 */
     201function wp_admin_bar_network_admin_menu( $wp_admin_bar ) {
     202    if ( is_multisite() && is_super_admin() && ! is_network_admin() ) {
     203        $wp_admin_bar->add_menu( array(
     204            'id'    => 'network-admin',
     205            'title' => __('Network Admin'),
     206            'href'  => network_admin_url(),
     207            'meta'  => array(
     208                'class' => 'opposite',
     209            ),
     210        ) );
    90211    }
    91212}
     
    160281    global $wpdb;
    161282
    162     /* Add the 'My Sites' menu if the user has more than one site. */
    163     // if ( count( $wp_admin_bar->user->blogs ) <= 1 )
    164     //  return;
    165 
    166     if ( is_multisite() )
    167         $url = admin_url( 'my-sites.php' );
    168     else
    169         $url = admin_url();
    170 
    171     $wp_admin_bar->add_menu( array(
    172         'id'    => 'my-blogs',
    173         'title' => '&nbsp;',
    174         'href'  => $url,
    175         'meta'  => array(
    176             'class' => 'wp-admin-bar-logo',
    177         ),
    178     ) );
    179 
    180     // Add network admin link
    181     if ( is_multisite() && is_super_admin() && ! is_network_admin() ) {
    182         $wp_admin_bar->add_menu( array(
    183             'parent' => 'my-blogs',
    184             'id'     => 'network-admin',
    185             'title'  => __('Network Admin'),
    186             'href'   => network_admin_url(),
    187         ) );
    188     }
    189 
    190283    if ( is_user_logged_in() ) {
    191284        // Add blog links
     
    203296
    204297            $blogname = empty( $blog->blogname ) ? $blog->domain : $blog->blogname;
    205 
    206             $wp_admin_bar->add_menu( array( 'parent' => 'my-blogs', 'id' => 'blog-' . $blog->userblog_id, 'title' => $blavatar . $blogname,  'href' => get_admin_url($blog->userblog_id) ) );
    207             $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-d', 'title' => __( 'Dashboard' ), 'href' => get_admin_url($blog->userblog_id) ) );
     298            $menu_id  = 'blog-' . $blog->userblog_id;
     299
     300            $wp_admin_bar->add_menu( array(
     301                'parent' => 'my-account-secondary',
     302                'id'     => $menu_id,
     303                'title'  => $blavatar . $blogname,
     304                'href'   => get_admin_url( $blog->userblog_id ),
     305            ) );
     306
     307            $wp_admin_bar->add_menu( array(
     308                'parent' => $menu_id,
     309                'id'     => $menu_id . '-d',
     310                'title'  => __( 'Dashboard' ),
     311                'href'   => get_admin_url( $blog->userblog_id ),
     312            ) );
    208313
    209314            if ( current_user_can_for_blog( $blog->userblog_id, 'edit_posts' ) ) {
    210                 $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-n', 'title' => __( 'New Post' ), 'href' => get_admin_url($blog->userblog_id, 'post-new.php') ) );
    211                 $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-c', 'title' => __( 'Manage Comments' ), 'href' => get_admin_url($blog->userblog_id, 'edit-comments.php') ) );
     315                $wp_admin_bar->add_menu( array(
     316                    'parent' => $menu_id,
     317                    'id'     => $menu_id . '-n',
     318                    'title'  => __( 'New Post' ),
     319                    'href'   => get_admin_url( $blog->userblog_id, 'post-new.php' ),
     320                ) );
     321                $wp_admin_bar->add_menu( array(
     322                    'parent' => $menu_id,
     323                    'id'     => $menu_id . '-c',
     324                    'title'  => __( 'Manage Comments' ),
     325                    'href'   => get_admin_url( $blog->userblog_id, 'edit-comments.php' ),
     326                ) );
    212327            }
    213328
    214             $wp_admin_bar->add_menu( array( 'parent' => 'blog-' . $blog->userblog_id, 'id' => 'blog-' . $blog->userblog_id . '-v', 'title' => __( 'Visit Site' ), 'href' => get_home_url($blog->userblog_id) ) );
     329            $wp_admin_bar->add_menu( array(
     330                'parent' => $menu_id,
     331                'id'     => $menu_id . '-v',
     332                'title'  => __( 'Visit Site' ),
     333                'href'   => get_home_url( $blog->userblog_id ),
     334            ) );
    215335        }
    216336    }
    217 
    218     // Add WordPress.org link
    219     $wp_admin_bar->add_menu( array(
    220         'parent' => 'my-blogs',
    221         'id'     => 'about',
    222         'title'  => __('About This Version'),
    223         'href'   => admin_url('about.php'),
    224     ) );
    225 
    226     // Add WordPress.org link
    227     $wp_admin_bar->add_menu( array(
    228         'parent' => 'my-blogs',
    229         'id'     => 'wporg',
    230         'title'  => __('WordPress.org'),
    231         'href'   => 'http://wordpress.org',
    232     ) );
    233337}
    234338
  • trunk/wp-includes/class-wp-admin-bar.php

    r18690 r18776  
    8989    function render() {
    9090        ?>
    91         <div id="wpadminbar" class="nojq">
     91        <div id="wpadminbar" class="nojq nojs">
    9292            <div class="quicklinks">
    93                 <ul>
     93                <ul class="ab-top-menu">
    9494                    <?php foreach ( (array) $this->menu as $id => $menu_item ) : ?>
    9595                        <?php $this->recursive_render( $id, $menu_item ) ?>
     
    174174
    175175    function add_menus() {
     176        add_action( 'admin_bar_menu', 'wp_admin_bar_wp_menu', 10 );
    176177        add_action( 'admin_bar_menu', 'wp_admin_bar_my_account_menu', 10 );
    177         add_action( 'admin_bar_menu', 'wp_admin_bar_my_sites_menu', 20 );
    178178        add_action( 'admin_bar_menu', 'wp_admin_bar_edit_menu', 30 );
     179        add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 40 );
     180        add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 );
    179181        add_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 );
    180182        add_action( 'admin_bar_menu', 'wp_admin_bar_shortlink_menu', 80 );
     183        add_action( 'admin_bar_menu', 'wp_admin_bar_network_admin_menu', 80 );
    181184
    182185        if ( ! is_admin() ) {
    183186            add_action( 'admin_bar_menu', 'wp_admin_bar_blog_front_menu', 25 );
    184             add_action( 'admin_bar_menu', 'wp_admin_bar_new_content_menu', 40 );
    185             add_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 50 );
    186187            add_action( 'admin_bar_menu', 'wp_admin_bar_search_menu', 100 );
    187188        } else {
  • trunk/wp-includes/css/admin-bar.css

    r18696 r18776  
    1 #wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-transform:none;letter-spacing:normal;line-height:1;font:normal 12px/28px "Helvetica Neue",sans-serif;color:#ccc;text-shadow:#444 0 -1px 0;}#wpadminbar :before,#wpadminbar :after{content:normal;}#wpadminbar a,#wpadminbar a:hover,#wpadminbar a img,#wpadminbar a img:hover{outline:none;border:none;text-decoration:none;background:none;}#wpadminbar{direction:ltr;color:#ccc;font:normal 12px/28px "Helvetica Neue",sans-serif;height:28px;position:fixed;top:0;left:0;width:100%;z-index:99999;min-width:960px;background-color:#464646;background-image:-ms-linear-gradient(bottom,#464646,#373737 5px);background-image:-moz-linear-gradient(bottom,#464646,#373737 5px);background-image:-o-linear-gradient(bottom,#464646,#373737);background-image:-webkit-gradient(linear,left bottom,left top,from(#464646),to(#373737));background-image:-webkit-linear-gradient(bottom,#373737,#464646 5px);background-image:linear-gradient(bottom,#464646,#373737);}#wpadminbar ul,#wpadminbar ul li{background:none;list-style:none;margin:0;padding:0;position:relative;z-index:99999;}#wpadminbar .quicklinks ul{text-align:left;}#wpadminbar .quicklinks ul li{float:left;}#wpadminbar .quicklinks>ul>li>a{border-right:1px solid #555;border-left:1px solid #333;}#wpadminbar .quicklinks>ul>li:last-child>a{border-right:none;}#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:28px;display:block;padding:0 .85em;margin:0;}#wpadminbar .quicklinks a>span{line-height:28px;}#wpadminbar .quicklinks .menupop ul,#wpadminbar .shortlink-input{margin:0 0 0 1px;padding:6px 0;-moz-box-shadow:0 4px 8px rgba(0,0,0,0.2);-webkit-box-shadow:0 4px 8px rgba(0,0,0,0.2);box-shadow:0 4px 8px rgba(0,0,0,0.2);background:#fff;display:none;position:absolute;border-top:none;float:none;}#wpadminbar .selected .shortlink-input{display:block;}#wpadminbar .quicklinks .menupop ul li{float:none;}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:bold;}#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a span,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .shortlink-input{line-height:26px;height:26px;color:#21759B;text-shadow:none;white-space:nowrap;min-width:140px;}#wpadminbar .shortlink-input{width:200px;}#wpadminbar.nojq .quicklinks li:hover>ul,#wpadminbar .quicklinks li.hover>ul{display:block;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-left:100%;margin-top:-28px;}#wpadminbar .quicklinks li:hover,#wpadminbar .quicklinks .selected{background-color:#fff;}#wpadminbar .quicklinks li:hover a,#wpadminbar .quicklinks .selected a,#wpadminbar .quicklinks li:hover span,#wpadminbar .quicklinks .selected span{color:#333;text-shadow:none;}#wpadminbar .quicklinks .menupop li:hover{background:#f8fbfe;}#wpadminbar .quicklinks .menupop a>span{display:inline;background:url(../images/admin-bar-sprite.png?d=11122010) right -58px no-repeat;padding-right:.8em;}#wpadminbar .quicklinks .menupop ul li a>span{display:block;background:url(../images/admin-bar-sprite.png?d=11122010) right -29px no-repeat;padding-right:1.5em;}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:bold;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000;}#wpadminbar #wp-admin-bar-my-account,#wpadminbar #wp-admin-bar-my-account-with-avatar{float:right;}#wpadminbar .quicklinks li#wp-admin-bar-my-account>a{border:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a{border:none;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar>a img{width:16px;height:16px;border:1px solid #999;padding:0;background:#eee;line-height:24px;vertical-align:middle;margin:-2px 0 0 6px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul{left:0;}#wpadminbar .quicklinks li img.blavatar{vertical-align:middle;margin:-3px 4px 0 0;padding:0;}#wpadminbar #wp-admin-bar-search a{padding:0;}#wpadminbar .quicklinks .admin-bar-search:hover{background:transparent;}#wpadminbar .quicklinks .admin-bar-search:hover>a{border-right:none;border-left:1px solid #333;}#wpadminbar #adminbarsearch{float:right;height:26px;padding:2px 4px;margin:0;}#wpadminbar #adminbarsearch .adminbar-input{height:23px;width:140px;float:left;font:12px "Helvetica Neue",sans-serif;border:none;padding:0 3px 0 24px;margin:0 3px 0 0;color:#ccc;text-shadow:#444 0 -1px 0;background-color:rgba(255,255,255,0);background-image:url('../../wp-content/themes/twentyeleven/images/search.png');background-repeat:no-repeat;background-position:4px 2px;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-transition-duration:400ms;-webkit-transition-property:width,background;-webkit-transition-timing-function:ease;-moz-transition-duration:400ms;-moz-transition-property:width,background;-moz-transition-timing-function:ease;-o-transition-duration:400ms;-o-transition-property:width,background;-o-transition-timing-function:ease;}#wpadminbar #adminbarsearch .adminbar-input:focus{color:#555;text-shadow:0 1px 0 #fff;width:200px;background-color:rgba(255,255,255,0.9);}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-button{display:none;}#wpadminbar #adminbarsearch .adminbar-button:active{background:#a0a0a0;background:-moz-linear-gradient(bottom,#a0a0a0,#c1c1c1);background:-webkit-gradient(linear,left bottom,left top,from(#a0a0a0),to(#c1c1c1));-moz-box-shadow:inset 1px 1px 1px #9b9b9b;-webkit-box-shadow:inset 1px 1px 1px #9b9b9b;box-shadow:inset 1px 1px 1px #9b9b9b;}#wpadminbar #adminbarsearch .adminbar-button:hover{color:#000;}#wpadminbar #adminbarsearch .adminbar-button::-moz-focus-inner{border:none;}#wpadminbar .wp-admin-bar-logo{background:url(../images/wp-logo-white.png) no-repeat 8px 6px;}#wpadminbar .wp-admin-bar-logo>a{padding-left:22px;}#wpadminbar .wp-admin-bar-logo:hover{background:url(../images/wp-logo-dark.png) no-repeat 8px 6px;}#wpadminbar .ab-comments-icon{position:relative;padding-top:5px;float:left;}#wpadminbar .ab-comments-icon-body{margin:3px 4px 0 -2px;background:#999;height:10px;width:14px;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar a:hover .ab-comments-icon-body{background:#bbb;color:#555;}#wpadminbar a .ab-comments-icon-arrow{height:0;position:absolute;bottom:-3px;left:1px;border-left:4px solid #999;border-bottom:4px solid transparent;}#wpadminbar a:hover .ab-comments-icon-arrow{border-left-color:#bbb;}* html #wpadminbar{overflow:hidden;position:absolute;}* html #wpadminbar .quicklinks ul li a{float:left;}* html #wpadminbar .menupop a span{background-image:none;}
     1#wpadminbar *{height:auto;width:auto;margin:0;padding:0;position:static;text-transform:none;letter-spacing:normal;line-height:1;font:normal 13px/28px "Helvetica Neue",sans-serif;color:#ccc;text-shadow:#444 0 -1px 0;}#wpadminbar :before,#wpadminbar :after{content:normal;}#wpadminbar a,#wpadminbar a:hover,#wpadminbar a img,#wpadminbar a img:hover{outline:none;border:none;text-decoration:none;background:none;}#wpadminbar{direction:ltr;color:#ccc;font:normal 13px/28px "Helvetica Neue",sans-serif;height:28px;position:fixed;top:0;left:0;width:100%;z-index:99999;min-width:960px;background-color:#464646;background-image:-ms-linear-gradient(bottom,#464646,#373737 5px);background-image:-moz-linear-gradient(bottom,#464646,#373737 5px);background-image:-o-linear-gradient(bottom,#464646,#373737);background-image:-webkit-gradient(linear,left bottom,left top,from(#464646),to(#373737));background-image:-webkit-linear-gradient(bottom,#373737,#464646 5px);background-image:linear-gradient(bottom,#464646,#373737);}#wpadminbar ul,#wpadminbar ul li{background:none;list-style:none;margin:0;padding:0;position:relative;z-index:99999;}#wpadminbar .quicklinks ul{text-align:left;}#wpadminbar li{float:left;}#wpadminbar .quicklinks>ul>li{border-right:1px solid #555;}#wpadminbar .quicklinks>ul>li>a{border-right:1px solid #333;}#wpadminbar .quicklinks>ul>li.opposite{border-left:1px solid #333;border-right:0;}#wpadminbar .quicklinks>ul>li.opposite>a{border-left:1px solid #555;border-right:0;}#wpadminbar .quicklinks a,#wpadminbar .shortlink-input{height:28px;display:block;padding:0 1em;margin:0;}#wpadminbar .quicklinks a>span{line-height:28px;}#wpadminbar .quicklinks .menupop ul,#wpadminbar .shortlink-input{margin:0 0 0 -1px;padding:6px 0;-moz-box-shadow:0 4px 6px rgba(0,0,0,0.2);-webkit-box-shadow:0 4px 6px rgba(0,0,0,0.2);box-shadow:0 4px 6px rgba(0,0,0,0.2);background:#fff;display:none;position:absolute;float:none;border-width:0 1px 1px 1px;border-style:solid;border-color:#dfdfdf;}#wpadminbar .quicklinks .opposite.menupop ul{right:0;margin:0 -1px 0 0;}#wpadminbar .selected .shortlink-input{display:block;}#wpadminbar .quicklinks .menupop ul li{float:none;}#wpadminbar .quicklinks .menupop ul li a strong{font-weight:bold;}#wpadminbar .quicklinks .menupop ul li a,#wpadminbar .quicklinks .menupop ul li a span,#wpadminbar .quicklinks .menupop ul li a strong,#wpadminbar .quicklinks .menupop.hover ul li a,#wpadminbar .quicklinks .menupop.hover ul li a span,#wpadminbar.nojs .quicklinks .menupop:hover ul li a,#wpadminbar.nojs .quicklinks .menupop:hover ul li a span,#wpadminbar .shortlink-input{line-height:26px;height:26px;color:#21759B;text-shadow:none;white-space:nowrap;min-width:140px;}#wpadminbar .shortlink-input{width:200px;}#wpadminbar.nojs .quicklinks li:hover>ul,#wpadminbar .quicklinks li.hover>ul{display:block;}#wpadminbar .quicklinks .menupop li:hover>ul,#wpadminbar .quicklinks .menupop li.hover>ul{margin-left:100%;margin-top:-33px;border-width:1px;}#wpadminbar .quicklinks .opposite.menupop li:hover>ul,#wpadminbar .quicklinks .opposite.menupop li.hover>ul{margin-left:0;left:inherit;right:100%;}#wpadminbar .ab-top-menu>li:hover{background-image:-webkit-linear-gradient(bottom,#3a3a3a,#222);}#wpadminbar.nojs .ab-top-menu>li.menupop:hover,#wpadminbar .ab-top-menu li.menupop.hover{background:#fff;}#wpadminbar .ab-top-menu .selected.screen-meta-toggle{background:#f1f1f1;}#wpadminbar.nojs .quicklinks .menupop:hover a,#wpadminbar.nojs .quicklinks .menupop:hover span,#wpadminbar .quicklinks .menupop.hover a,#wpadminbar .quicklinks .menupop.hover span,#wpadminbar .ab-top-menu .selected.screen-meta-toggle a,#wpadminbar .ab-top-menu .selected.screen-meta-toggle span{color:#333;text-shadow:none;}#wpadminbar .quicklinks .menupop li:hover,#wpadminbar .quicklinks .menupop li.hover{background-color:#eaf2fa;}#wpadminbar .ab-top-menu>.menupop>a span{padding-right:10px;margin-right:-10px;}#wpadminbar .ab-top-menu>li>a:hover,#wpadminbar .ab-top-menu>li>a:hover span{color:#fafafa;}#wpadminbar .ab-top-menu>li>a:hover span{background:url(../images/admin-bar-sprite.png?d=11122010) right -57px no-repeat;}#wpadminbar.nojs .ab-top-menu>li>a:hover span,#wpadminbar .ab-top-menu>li.hover>a:hover span{background:none;}#wpadminbar .menupop li a>span{display:block;background:url(../images/admin-bar-sprite.png?d=11122010) right -31px no-repeat;padding:0 1.5em 0 0;}#wpadminbar .opposite.menupop li a>span{background-position:-28px -31px;padding:0 0 0 1.5em;}#wpadminbar .quicklinks .menupop .secondary{background:#eee;margin:6px 0 -6px;border-top:1px solid #dfdfdf;}#wpadminbar .quicklinks .menupop .secondary>a{display:none;}#wpadminbar .quicklinks .menupop li.secondary>ul,#wpadminbar .quicklinks .opposite.menupop li.secondary>ul{display:block;position:relative;right:auto;margin:0;border:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;background:#eee;}#wpadminbar .quicklinks .menupop li.secondary>ul>li:hover,#wpadminbar .quicklinks .menupop li.secondary>ul>li.hover{background:#dfdfdf;}#wpadminbar .quicklinks a span#ab-updates{background:#eee;color:#333;text-shadow:none;display:inline;padding:2px 5px;font-size:10px;font-weight:bold;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar .quicklinks a:hover span#ab-updates{background:#fff;color:#000;}#wpadminbar li.opposite{float:right;}#wp-admin-bar-my-account>ul{min-width:270px;}#wpadminbar #wp-admin-bar-my-account .user-info-item{margin-left:88px;margin-right:16px;}#wpadminbar #wp-admin-bar-my-account .user-info-item>a{padding-left:8px;}#wpadminbar #wp-admin-bar-my-account .user-info{margin-top:6px;margin-bottom:15px;height:auto;background:none;}#wp-admin-bar-my-account .user-info .avatar{position:absolute;left:-72px;top:4px;}#wpadminbar #wp-admin-bar-my-account .user-info a{height:auto;}#wpadminbar #wp-admin-bar-my-account .user-info span{background:none;padding:0;height:18px;}#wpadminbar #wp-admin-bar-my-account .user-info .display-name{color:#333;}#wpadminbar #wp-admin-bar-my-account .user-info .username{color:#999;font-size:11px;}#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar>a img{width:16px;height:16px;border:1px solid #999;padding:0;background:#eee;line-height:24px;vertical-align:middle;margin:-2px 0 0 6px;}#wpadminbar .quicklinks li img.blavatar{vertical-align:middle;margin:-3px 4px 0 0;padding:0;}#wpadminbar #wp-admin-bar-search{border-right:0;}#wpadminbar #wp-admin-bar-search a{padding:0;border-right:0;}#wpadminbar .quicklinks .admin-bar-search:hover{background:transparent;}#wpadminbar #adminbarsearch{float:right;height:24px;padding:2px 4px;margin:0;}#wpadminbar #adminbarsearch .adminbar-input{height:23px;width:140px;float:left;font:13px "Helvetica Neue",sans-serif;border:none;padding:0 3px 0 24px;margin:0 3px 0 0;color:#ccc;text-shadow:#444 0 -1px 0;background-color:rgba(255,255,255,0);background-image:url('../../wp-content/themes/twentyeleven/images/search.png');background-repeat:no-repeat;background-position:4px 2px;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;outline:none;-webkit-transition-duration:400ms;-webkit-transition-property:width,background;-webkit-transition-timing-function:ease;-moz-transition-duration:400ms;-moz-transition-property:width,background;-moz-transition-timing-function:ease;-o-transition-duration:400ms;-o-transition-property:width,background;-o-transition-timing-function:ease;}#wpadminbar #adminbarsearch .adminbar-input:focus{color:#555;text-shadow:0 1px 0 #fff;width:200px;background-color:rgba(255,255,255,0.9);}#wpadminbar #adminbarsearch .adminbar-input::-webkit-input-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-input:-moz-placeholder{color:#ddd;}#wpadminbar #adminbarsearch .adminbar-button{display:none;}#wpadminbar #adminbarsearch .adminbar-button:active{background:#a0a0a0;background:-moz-linear-gradient(bottom,#a0a0a0,#c1c1c1);background:-webkit-gradient(linear,left bottom,left top,from(#a0a0a0),to(#c1c1c1));-moz-box-shadow:inset 1px 1px 1px #9b9b9b;-webkit-box-shadow:inset 1px 1px 1px #9b9b9b;box-shadow:inset 1px 1px 1px #9b9b9b;}#wpadminbar #adminbarsearch .adminbar-button:hover{color:#000;}#wpadminbar #adminbarsearch .adminbar-button::-moz-focus-inner{border:none;}#wpadminbar .wp-admin-bar-logo>a{padding-left:24px;background:url(../images/wp-logo-white.png) no-repeat 13px 6px;}#wpadminbar .wp-admin-bar-logo>a span{height:28px;}#wpadminbar.nojs .wp-admin-bar-logo:hover>a,#wpadminbar .wp-admin-bar-logo.hover>a{background:url(../images/wp-logo-dark.png) no-repeat 12px 6px;}#wpadminbar .ab-comments-icon{position:relative;padding-top:5px;float:left;}#wpadminbar .ab-comments-icon-body{margin:3px 4px 0 -2px;background:#999;height:10px;width:14px;-moz-border-radius:10px;-khtml-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;}#wpadminbar a:hover .ab-comments-icon-body{background:#bbb;color:#555;}#wpadminbar a .ab-comments-icon-arrow{height:0;position:absolute;bottom:-3px;left:1px;border-left:4px solid #999;border-bottom:4px solid transparent;}#wpadminbar a:hover .ab-comments-icon-arrow{border-left-color:#bbb;}* html #wpadminbar{overflow:hidden;position:absolute;}* html #wpadminbar .quicklinks ul li a{float:left;}* html #wpadminbar .menupop a span{background-image:none;}
  • trunk/wp-includes/css/admin-bar.dev.css

    r18696 r18776  
    88    letter-spacing: normal;
    99    line-height: 1;
    10     font: normal 12px/28px "Helvetica Neue", sans-serif;
     10    font: normal 13px/28px "Helvetica Neue", sans-serif;
    1111    color: #ccc;
    1212    text-shadow: #444 0px -1px 0px;
     
    3131    direction: ltr;
    3232    color: #ccc;
    33     font: normal 12px/28px "Helvetica Neue", sans-serif;
     33    font: normal 13px/28px "Helvetica Neue", sans-serif;
    3434    height: 28px;
    3535    position: fixed;
     
    6363}
    6464
    65 #wpadminbar .quicklinks ul li {
     65#wpadminbar li {
    6666    float: left;
    6767}
    6868
     69
     70#wpadminbar .quicklinks > ul > li {
     71    border-right: 1px solid #555;
     72}
    6973#wpadminbar .quicklinks > ul > li > a {
    70     border-right: 1px solid #555;
     74    border-right: 1px solid #333;
     75}
     76#wpadminbar .quicklinks > ul > li.opposite {
    7177    border-left: 1px solid #333;
    72 }
    73 
    74 #wpadminbar .quicklinks > ul > li:last-child > a {
     78    border-right: 0;
     79}
     80#wpadminbar .quicklinks > ul > li.opposite > a {
     81    border-left: 1px solid #555;
     82    border-right: 0;
     83}
     84
     85/*#wpadminbar .quicklinks > ul > li:last-child > a {
    7586    border-right: none;
    76 }
     87}*/
    7788
    7889#wpadminbar .quicklinks a,
     
    8091    height: 28px;
    8192    display: block;
    82     padding: 0 0.85em;
     93    padding: 0 1em;
    8394    margin: 0;
    8495}
     
    90101#wpadminbar .quicklinks .menupop ul,
    91102#wpadminbar .shortlink-input {
    92     margin: 0 0 0 1px;
     103    margin: 0 0 0 -1px;
    93104    padding: 6px 0;
    94     -moz-box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    95     -webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    96     box-shadow: 0 4px 8px rgba(0,0,0,0.2);
     105    -moz-box-shadow: 0 4px 6px rgba(0,0,0,0.2);
     106    -webkit-box-shadow: 0 4px 6px rgba(0,0,0,0.2);
     107    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    97108    background: #fff;
    98109    display: none;
    99110    position: absolute;
    100     border-top: none;
    101111    float: none;
     112    border-width: 0 1px 1px 1px;
     113    border-style: solid;
     114    border-color: #dfdfdf;
     115}
     116#wpadminbar .quicklinks .opposite.menupop ul {
     117    right: 0;
     118    margin: 0 -1px 0 0;
    102119}
    103120
     
    117134#wpadminbar .quicklinks .menupop ul li a span,
    118135#wpadminbar .quicklinks .menupop ul li a strong,
     136#wpadminbar .quicklinks .menupop.hover ul li a,
     137#wpadminbar .quicklinks .menupop.hover ul li a span,
     138#wpadminbar.nojs .quicklinks .menupop:hover ul li a,
     139#wpadminbar.nojs .quicklinks .menupop:hover ul li a span,
    119140#wpadminbar .shortlink-input {
    120141    line-height: 26px;
     
    130151}
    131152
    132 #wpadminbar.nojq .quicklinks li:hover > ul,
     153#wpadminbar.nojs .quicklinks li:hover > ul,
    133154#wpadminbar .quicklinks li.hover > ul {
    134155    display: block;
     
    138159#wpadminbar .quicklinks .menupop li.hover > ul {
    139160    margin-left: 100%;
    140     margin-top: -28px;
    141 }
    142 
    143 #wpadminbar .quicklinks li:hover,
    144 #wpadminbar .quicklinks .selected {
    145     background-color: #fff;
    146 }
    147 
    148 #wpadminbar .quicklinks li:hover a,
    149 #wpadminbar .quicklinks .selected a,
    150 #wpadminbar .quicklinks li:hover span,
    151 #wpadminbar .quicklinks .selected span {
     161    margin-top: -33px;
     162    border-width: 1px;
     163}
     164
     165#wpadminbar .quicklinks .opposite.menupop li:hover > ul,
     166#wpadminbar .quicklinks .opposite.menupop li.hover > ul {
     167    margin-left: 0;
     168    left: inherit;
     169    right: 100%;
     170}
     171
     172#wpadminbar .ab-top-menu > li:hover {
     173    /* @todo: add other gradients */
     174    background-image: -webkit-linear-gradient(bottom, #3a3a3a, #222); /* new Webkit */
     175}
     176
     177#wpadminbar.nojs .ab-top-menu > li.menupop:hover,
     178#wpadminbar .ab-top-menu li.menupop.hover {
     179    background: #fff;
     180}
     181#wpadminbar .ab-top-menu .selected.screen-meta-toggle {
     182    background: #f1f1f1;
     183}
     184
     185#wpadminbar.nojs .quicklinks .menupop:hover a,
     186#wpadminbar.nojs .quicklinks .menupop:hover span,
     187#wpadminbar .quicklinks .menupop.hover a,
     188#wpadminbar .quicklinks .menupop.hover span,
     189#wpadminbar .ab-top-menu .selected.screen-meta-toggle a,
     190#wpadminbar .ab-top-menu .selected.screen-meta-toggle span {
    152191    color: #333;
    153192    text-shadow: none;
     
    155194
    156195
    157 #wpadminbar .quicklinks .menupop li:hover {
    158 /*  background: #888;
    159     background: -moz-linear-gradient(bottom,  #888,  #9d9d9d);
    160     background: -webkit-gradient(linear, left bottom, left top, from(#888), to(#9d9d9d));*/
    161     background: #f8fbfe;
    162 }
    163 
    164 #wpadminbar .quicklinks .menupop a > span {
    165     display: inline;
    166     background: url(../images/admin-bar-sprite.png?d=11122010) right -58px no-repeat;
    167     padding-right: .8em;
    168 }
    169 
    170 #wpadminbar .quicklinks .menupop ul li a > span {
     196#wpadminbar .quicklinks .menupop li:hover,
     197#wpadminbar .quicklinks .menupop li.hover {
     198    background-color: #eaf2fa;
     199}
     200
     201#wpadminbar .ab-top-menu > .menupop > a span {
     202    padding-right: 10px;
     203    margin-right: -10px;
     204}
     205#wpadminbar .ab-top-menu > li > a:hover,
     206#wpadminbar .ab-top-menu > li > a:hover span {
     207    color: #fafafa;
     208}
     209#wpadminbar .ab-top-menu > li > a:hover span {
     210    background: url(../images/admin-bar-sprite.png?d=11122010) right -57px no-repeat;
     211}
     212#wpadminbar.nojs .ab-top-menu > li > a:hover span,
     213#wpadminbar .ab-top-menu > li.hover > a:hover span {
     214    background: none;
     215}
     216
     217#wpadminbar .menupop li a > span {
    171218    display: block;
    172     background: url(../images/admin-bar-sprite.png?d=11122010) right -29px no-repeat;
    173     padding-right: 1.5em;
     219    background: url(../images/admin-bar-sprite.png?d=11122010) right -31px no-repeat;
     220    padding: 0 1.5em 0 0;
     221}
     222#wpadminbar .opposite.menupop li a > span {
     223    background-position: -28px -31px;
     224    padding: 0 0 0 1.5em;
     225}
     226
     227#wpadminbar .quicklinks .menupop .secondary {
     228    background: #eee;
     229    margin: 6px 0 -6px;
     230    border-top: 1px solid #dfdfdf;
     231}
     232
     233#wpadminbar .quicklinks .menupop .secondary > a {
     234    display: none;
     235}
     236#wpadminbar .quicklinks .menupop li.secondary > ul,
     237#wpadminbar .quicklinks .opposite.menupop li.secondary > ul {
     238    display: block;
     239    position: relative;
     240    right: auto;
     241    margin: 0;
     242    border: 0;
     243
     244    -moz-box-shadow: none;
     245    -webkit-box-shadow: none;
     246    box-shadow: none;
     247
     248    background: #eee;
     249}
     250
     251#wpadminbar .quicklinks .menupop li.secondary > ul > li:hover,
     252#wpadminbar .quicklinks .menupop li.secondary > ul > li.hover {
     253    background: #dfdfdf;
    174254}
    175255
     
    193273}
    194274
    195 #wpadminbar #wp-admin-bar-my-account,
    196 #wpadminbar #wp-admin-bar-my-account-with-avatar {
     275#wpadminbar li.opposite {
    197276    float: right;
    198277}
    199278
    200 #wpadminbar .quicklinks li#wp-admin-bar-my-account > a {
    201     border: none;
    202 }
    203 
    204 #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a {
    205     border: none;
    206 }
    207 
    208 #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar > a img {
     279#wp-admin-bar-my-account > ul {
     280    min-width: 270px;
     281}
     282#wpadminbar #wp-admin-bar-my-account .user-info-item {
     283    margin-left: 88px;
     284    margin-right: 16px;
     285}
     286#wpadminbar #wp-admin-bar-my-account .user-info-item > a {
     287    padding-left: 8px;
     288}
     289
     290#wpadminbar #wp-admin-bar-my-account .user-info {
     291    margin-top: 6px;
     292    margin-bottom: 15px;
     293    height: auto;
     294    background: none;
     295}
     296#wp-admin-bar-my-account .user-info .avatar {
     297    position: absolute;
     298    left: -72px;
     299    top: 4px;
     300}
     301#wpadminbar #wp-admin-bar-my-account .user-info a {
     302    height: auto;
     303}
     304#wpadminbar #wp-admin-bar-my-account .user-info span {
     305    background: none;
     306    padding: 0;
     307    height: 18px;
     308}
     309#wpadminbar #wp-admin-bar-my-account .user-info .display-name {
     310    color: #333;
     311}
     312#wpadminbar #wp-admin-bar-my-account .user-info .username {
     313    color: #999;
     314    font-size: 11px;
     315}
     316
     317#wpadminbar .quicklinks li#wp-admin-bar-my-account.with-avatar > a img {
    209318    width: 16px;
    210319    height: 16px;
     
    217326}
    218327
    219 #wpadminbar .quicklinks li#wp-admin-bar-my-account-with-avatar ul ul {
    220     left: 0;
    221 }
    222 
    223328#wpadminbar .quicklinks li img.blavatar {
    224329    vertical-align: middle;
     
    227332}
    228333
     334#wpadminbar #wp-admin-bar-search {
     335    border-right: 0;
     336}
     337
    229338#wpadminbar #wp-admin-bar-search a {
    230339    padding: 0;
     340    border-right: 0;
    231341}
    232342
     
    235345    background: transparent;
    236346}
    237 #wpadminbar .quicklinks .admin-bar-search:hover > a {
    238     /* default borders */
    239     border-right: none;
    240     border-left: 1px solid #333;
    241 }
    242347
    243348#wpadminbar #adminbarsearch {
    244349    float: right;
    245     height: 26px;
     350    height: 24px;
    246351    padding: 2px 4px;
    247 /*  padding: 0;*/
    248352    margin: 0;
    249353}
     354
    250355
    251356#wpadminbar #adminbarsearch .adminbar-input {
     
    253358    width: 140px;
    254359    float: left;
    255     font: 12px "Helvetica Neue", sans-serif;
     360    font: 13px "Helvetica Neue", sans-serif;
    256361    border: none;
    257362    padding: 0 3px 0 24px;
     
    334439 */
    335440
    336 #wpadminbar .wp-admin-bar-logo {
    337     background: url(../images/wp-logo-white.png) no-repeat 8px 6px;
    338 }
    339441#wpadminbar .wp-admin-bar-logo > a {
    340     padding-left: 22px;
    341 }
    342 
    343 #wpadminbar .wp-admin-bar-logo:hover {
    344     background: url(../images/wp-logo-dark.png) no-repeat 8px 6px;
     442    padding-left: 24px;
     443    background: url(../images/wp-logo-white.png) no-repeat 13px 6px;
     444}
     445#wpadminbar .wp-admin-bar-logo > a span {
     446    height: 28px;
     447}
     448
     449#wpadminbar.nojs .wp-admin-bar-logo:hover > a,
     450#wpadminbar .wp-admin-bar-logo.hover > a {
     451    background: url(../images/wp-logo-dark.png) no-repeat 12px 6px;
    345452}
    346453
  • trunk/wp-includes/js/admin-bar.dev.js

    r18495 r18776  
    55
    66    jQuery(document).ready(function($){
    7         $('#wpadminbar').removeClass('nojq').find('li.menupop').hoverIntent({
     7        $('#wpadminbar').removeClass('nojq').removeClass('nojs').find('li.menupop').hoverIntent({
    88            over: function(e){
    99                $(this).addClass('hover');
     
    3232                obj.attachEvent('on' + type, function() { return fn.call(obj, window.event);});
    3333        },
    34    
     34
    3535        aB, hc = new RegExp('\\bhover\\b', 'g'), q = [],
    3636        rselected = new RegExp('\\bselected\\b', 'g'),
    37    
     37
    3838        /**
    3939         * Get the timeout ID of the given element
     
    4646            return false;
    4747        },
    48    
     48
    4949        addHoverClass = function(t) {
    5050            var i, id, inA, hovering, ul, li,
    5151                ancestors = [],
    5252                ancestorLength = 0;
    53    
     53
    5454            while ( t && t != aB && t != d ) {
    5555                if( 'LI' == t.nodeName.toUpperCase() ) {
     
    6363                t = t.parentNode;
    6464            }
    65    
     65
    6666            // Remove any selected classes.
    6767            if ( hovering && hovering.parentNode ) {
     
    7676                }
    7777            }
    78    
     78
    7979            /* remove the hover class for any objects not in the immediate element's ancestry */
    8080            i = q.length;
     
    8686                        inA = true;
    8787                }
    88    
     88
    8989                if ( ! inA )
    9090                    q[i][1].className = q[i][1].className ? q[i][1].className.replace(hc, '') : '';
    9191            }
    9292        },
    93    
     93
    9494        removeHoverClass = function(t) {
    9595            while ( t && t != aB && t != d ) {
     
    105105            }
    106106        },
    107    
     107
    108108        clickShortlink = function(e) {
    109109            var i, l, node,
    110110                t = e.target || e.srcElement;
    111    
     111
    112112            // Make t the shortlink menu item, or return.
    113113            while ( true ) {
     
    121121                t = t.parentNode;
    122122            }
    123    
     123
    124124            // IE doesn't support preventDefault, and does support returnValue
    125125            if ( e.preventDefault )
    126126                e.preventDefault();
    127127            e.returnValue = false;
    128    
     128
    129129            if ( -1 == t.className.indexOf('selected') )
    130130                t.className += ' selected';
    131    
     131
    132132            for ( i = 0, l = t.childNodes.length; i < l; i++ ) {
    133133                node = t.childNodes[i];
     
    143143            return false;
    144144        };
    145    
     145
    146146        addEvent(w, 'load', function() {
    147147            aB = d.getElementById('wpadminbar');
    148    
     148
    149149            if ( d.body && aB ) {
    150150                d.body.appendChild( aB );
    151    
     151
     152                if ( aB.className )
     153                    aB.className = aB.className.replace(/nojs/, '');
     154
    152155                addEvent(aB, 'mouseover', function(e) {
    153156                    addHoverClass( e.target || e.srcElement );
    154157                });
    155    
     158
    156159                addEvent(aB, 'mouseout', function(e) {
    157160                    removeHoverClass( e.target || e.srcElement );
    158161                });
    159    
     162
    160163                addEvent(aB, 'click', clickShortlink );
    161164            }
    162    
     165
    163166            if ( w.location.hash )
    164167                w.scrollBy(0,-32);
  • trunk/wp-includes/js/admin-bar.js

    r18495 r18776  
    1 if(typeof(jQuery)!="undefined"){if(typeof(jQuery.fn.hoverIntent)=="undefined"){(function(a){a.fn.hoverIntent=function(l,j){var m={sensitivity:7,interval:100,timeout:0};m=a.extend(m,j?{over:l,out:j}:l);var o,n,h,d;var e=function(f){o=f.pageX;n=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-o)+Math.abs(d-n))<m.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return m.over.apply(f,[g])}else{h=o;d=n;f.hoverIntent_t=setTimeout(function(){c(g,f)},m.interval)}};var i=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return m.out.apply(f,[g])};var b=function(q){var f=this;var g=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(g&&g!=this){try{g=g.parentNode}catch(q){g=this}}if(g==this){if(a.browser.mozilla){if(q.type=="mouseout"){f.mtout=setTimeout(function(){k(q,f)},30)}else{if(f.mtout){f.mtout=clearTimeout(f.mtout)}}}return}else{if(f.mtout){f.mtout=clearTimeout(f.mtout)}k(q,f)}};var k=function(p,f){var g=jQuery.extend({},p);if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(p.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},m.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){i(g,f)},m.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);}jQuery(document).ready(function(a){a("#wpadminbar").removeClass("nojq").find("li.menupop").hoverIntent({over:function(b){a(this).addClass("hover")},out:function(b){a(this).removeClass("hover")},timeout:200,sensitivity:7,interval:120});a("#wp-admin-bar-get-shortlink").click(function(b){b.preventDefault();a(this).addClass("selected").children(".shortlink-input").blur(function(){a(this).parents("#wp-admin-bar-get-shortlink").removeClass("selected")}).focus().select()})})}else{(function(i,k){var c=function(n,m,d){if(n.addEventListener){n.addEventListener(m,d,false)}else{if(n.attachEvent){n.attachEvent("on"+m,function(){return d.call(n,window.event)})}}},e,f=new RegExp("\\bhover\\b","g"),a=[],j=new RegExp("\\bselected\\b","g"),g=function(m){var d=a.length;while(d--){if(a[d]&&m==a[d][1]){return a[d][0]}}return false},h=function(s){var n,d,q,m,p,r,u=[],o=0;while(s&&s!=e&&s!=i){if("LI"==s.nodeName.toUpperCase()){u[u.length]=s;d=g(s);if(d){clearTimeout(d)}s.className=s.className?(s.className.replace(f,"")+" hover"):"hover";m=s}s=s.parentNode}if(m&&m.parentNode){p=m.parentNode;if(p&&"UL"==p.nodeName.toUpperCase()){n=p.childNodes.length;while(n--){r=p.childNodes[n];if(r!=m){r.className=r.className?r.className.replace(j,""):""}}}}n=a.length;while(n--){q=false;o=u.length;while(o--){if(u[o]==a[n][1]){q=true}}if(!q){a[n][1].className=a[n][1].className?a[n][1].className.replace(f,""):""}}},l=function(d){while(d&&d!=e&&d!=i){if("LI"==d.nodeName.toUpperCase()){(function(m){var n=setTimeout(function(){m.className=m.className?m.className.replace(f,""):""},500);a[a.length]=[n,m]})(d)}d=d.parentNode}},b=function(p){var n,d,o,m=p.target||p.srcElement;while(true){if(!m||m==i||m==e){return}if(m.id&&m.id=="wp-admin-bar-get-shortlink"){break}m=m.parentNode}if(p.preventDefault){p.preventDefault()}p.returnValue=false;if(-1==m.className.indexOf("selected")){m.className+=" selected"}for(n=0,d=m.childNodes.length;n<d;n++){o=m.childNodes[n];if(o.className&&-1!=o.className.indexOf("shortlink-input")){o.focus();o.select();o.onblur=function(){m.className=m.className?m.className.replace(j,""):""};break}}return false};c(k,"load",function(){e=i.getElementById("wpadminbar");if(i.body&&e){i.body.appendChild(e);c(e,"mouseover",function(d){h(d.target||d.srcElement)});c(e,"mouseout",function(d){l(d.target||d.srcElement)});c(e,"click",b)}if(k.location.hash){k.scrollBy(0,-32)}})})(document,window)};
     1if(typeof(jQuery)!="undefined"){if(typeof(jQuery.fn.hoverIntent)=="undefined"){(function(b){b.fn.hoverIntent=function(p,r){var g={sensitivity:7,interval:100,timeout:0};g=b.extend(g,r?{over:p,out:r}:p);var a,f,t,v;var u=function(c){a=c.pageX;f=c.pageY};var w=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);if((Math.abs(t-a)+Math.abs(v-f))<g.sensitivity){b(d).unbind("mousemove",u);d.hoverIntent_s=1;return g.over.apply(d,[c])}else{t=a;v=f;d.hoverIntent_t=setTimeout(function(){w(c,d)},g.interval)}};var s=function(c,d){d.hoverIntent_t=clearTimeout(d.hoverIntent_t);d.hoverIntent_s=0;return g.out.apply(d,[c])};var x=function(e){var d=this;var c=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(c&&c!=this){try{c=c.parentNode}catch(e){c=this}}if(c==this){if(b.browser.mozilla){if(e.type=="mouseout"){d.mtout=setTimeout(function(){q(e,d)},30)}else{if(d.mtout){d.mtout=clearTimeout(d.mtout)}}}return}else{if(d.mtout){d.mtout=clearTimeout(d.mtout)}q(e,d)}};var q=function(e,d){var c=jQuery.extend({},e);if(d.hoverIntent_t){d.hoverIntent_t=clearTimeout(d.hoverIntent_t)}if(e.type=="mouseover"){t=c.pageX;v=c.pageY;b(d).bind("mousemove",u);if(d.hoverIntent_s!=1){d.hoverIntent_t=setTimeout(function(){w(c,d)},g.interval)}}else{b(d).unbind("mousemove",u);if(d.hoverIntent_s==1){d.hoverIntent_t=setTimeout(function(){s(c,d)},g.timeout)}}};return this.mouseover(x).mouseout(x)}})(jQuery)}jQuery(document).ready(function(a){a("#wpadminbar").removeClass("nojq").removeClass("nojs").find("li.menupop").hoverIntent({over:function(b){a(this).addClass("hover")},out:function(b){a(this).removeClass("hover")},timeout:200,sensitivity:7,interval:120});a("#wp-admin-bar-get-shortlink").click(function(b){b.preventDefault();a(this).addClass("selected").children(".shortlink-input").blur(function(){a(this).parents("#wp-admin-bar-get-shortlink").removeClass("selected")}).focus().select()})})}else{(function(i,k){var c=function(n,m,d){if(n.addEventListener){n.addEventListener(m,d,false)}else{if(n.attachEvent){n.attachEvent("on"+m,function(){return d.call(n,window.event)})}}},e,f=new RegExp("\\bhover\\b","g"),a=[],j=new RegExp("\\bselected\\b","g"),g=function(m){var d=a.length;while(d--){if(a[d]&&m==a[d][1]){return a[d][0]}}return false},h=function(s){var n,d,q,m,p,r,u=[],o=0;while(s&&s!=e&&s!=i){if("LI"==s.nodeName.toUpperCase()){u[u.length]=s;d=g(s);if(d){clearTimeout(d)}s.className=s.className?(s.className.replace(f,"")+" hover"):"hover";m=s}s=s.parentNode}if(m&&m.parentNode){p=m.parentNode;if(p&&"UL"==p.nodeName.toUpperCase()){n=p.childNodes.length;while(n--){r=p.childNodes[n];if(r!=m){r.className=r.className?r.className.replace(j,""):""}}}}n=a.length;while(n--){q=false;o=u.length;while(o--){if(u[o]==a[n][1]){q=true}}if(!q){a[n][1].className=a[n][1].className?a[n][1].className.replace(f,""):""}}},l=function(d){while(d&&d!=e&&d!=i){if("LI"==d.nodeName.toUpperCase()){(function(m){var n=setTimeout(function(){m.className=m.className?m.className.replace(f,""):""},500);a[a.length]=[n,m]})(d)}d=d.parentNode}},b=function(p){var n,d,o,m=p.target||p.srcElement;while(true){if(!m||m==i||m==e){return}if(m.id&&m.id=="wp-admin-bar-get-shortlink"){break}m=m.parentNode}if(p.preventDefault){p.preventDefault()}p.returnValue=false;if(-1==m.className.indexOf("selected")){m.className+=" selected"}for(n=0,d=m.childNodes.length;n<d;n++){o=m.childNodes[n];if(o.className&&-1!=o.className.indexOf("shortlink-input")){o.focus();o.select();o.onblur=function(){m.className=m.className?m.className.replace(j,""):""};break}}return false};c(k,"load",function(){e=i.getElementById("wpadminbar");if(i.body&&e){i.body.appendChild(e);if(e.className){e.className=e.className.replace(/nojs/,"")}c(e,"mouseover",function(d){h(d.target||d.srcElement)});c(e,"mouseout",function(d){l(d.target||d.srcElement)});c(e,"click",b)}if(k.location.hash){k.scrollBy(0,-32)}})})(document,window)};
  • trunk/wp-includes/script-loader.php

    r18774 r18776  
    259259    $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter' ), '20110628', 1 );
    260260
    261     $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20110801' );
     261    $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", false, '20110925' );
    262262    $scripts->add_data( 'admin-bar', 'group', 1 );
    263263
     
    451451    $styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
    452452    $styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
    453     $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20110916b' );
     453    $styles->add( 'admin-bar', "/wp-includes/css/admin-bar$suffix.css", array(), '20110925' );
    454454    $styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array(), '20101224' );
    455455    $styles->add( 'editor-buttons', "/wp-includes/css/editor-buttons$suffix.css", array(), '20110802' );
Note: See TracChangeset for help on using the changeset viewer.