Make WordPress Core

Changeset 9578


Ignore:
Timestamp:
11/09/2008 02:54:39 PM (16 years ago)
Author:
azaozz
Message:

Menu updates: single top level menus, B&W/color icons (sprite), fix for the Firefox bug of not firing mouseout on absolute positioned elements over textareas/text fields, scaling down properly for different user roles, includes patch by Ryan, fixes #7966

Location:
trunk
Files:
2 added
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-classic.css

    r9548 r9578  
    11
    22.find-box-search {
    3     background-color: #e4f2fd;
    4     border-color: #c6d9e9;
     3    border-color: #dfdfdf;
     4    background-color: #f1f1f1;
     5}
     6
     7.find-box {
     8    background-color: #f1f1f1;
     9}
     10
     11.find-box-inside {
     12    background-color: #fff;
    513}
    614
     
    1119body,
    1220#wpbody,
    13 .form-table .pre,
    14 .find-box-inside {
     21.form-table .pre {
    1522    color: #333;
    1623}
     
    4047#poststuff .inside .approved {
    4148    color: green;
     49}
     50
     51#postcustomstuff table {
     52    border-color: #dfdfdf;
     53    background-color: #F9F9F9;
     54}
     55
     56#postcustomstuff thead th {
     57    background-color: #F1F1F1;
     58}
     59
     60#postcustomstuff table input,
     61#postcustomstuff table textarea {
     62    border-color: #dfdfdf;
     63    background-color: #fff;
    4264}
    4365
     
    245267}
    246268
    247 .button {
     269.button,
     270.submit input {
    248271    border-color: #DCDCDC;
    249272    color: #464646;
     
    258281
    259282.button,
     283.submit input,
    260284.button-secondary {
    261285    background: #f2f2f2 url(../images/white-grad.png) repeat-x scroll left top;
     
    268292}
    269293
    270 .button[disabled], .button:disabled {
     294.button[disabled],
     295.button:disabled {
    271296    background-color: #999;
    272297}
    273298
    274299.button:hover,
    275 #edit-slug-buttons a.save:hover {
     300.submit input:hover,
     301#edit-slug-buttons a.save:hover,
     302#postcustomstuff .submit input:hover {
    276303    border-color: #535353;
    277304}
     
    339366
    340367.tablenav .dots {
    341     background-color: #e4f2fd;
    342     border-color: #e4f2fd;
     368    border-color: transparent;
    343369}
    344370
    345371.tablenav .next,
    346372.tablenav .prev {
    347     background-color: #e4f2fd;
    348     border-bottom-color: #2583ad;
    349     border-color: #e4f2fd;
     373    border-color: transparent;
    350374    color: #2583ad;
    351375}
     
    353377.tablenav .next:hover,
    354378.tablenav .prev:hover {
    355     border-bottom-color: #d54e21;
    356     border-color: #e4f2fd;
     379    border-color: transparent;
    357380    color: #d54e21;
    358381}
     
    904927}
    905928
    906 #adminmenu li.wp-has-current-submenu .wp-menu-toggle,
     929#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,
    907930#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle {
    908     background: transparent url(../images/menu-bits.gif) repeat-x scroll left -206px;
     931    background: transparent url(../images/menu-bits.gif) no-repeat scroll left -206px;
    909932}
    910933
    911934#adminmenu .wp-has-submenu:hover .wp-menu-toggle,
    912935#adminmenu .wp-menu-open .wp-menu-toggle {
    913     background: transparent url(../images/menu-bits.gif) repeat-x scroll left -108px;
    914 }
    915 
    916 #adminmenu a.wp-has-submenu {
     936    background: transparent url(../images/menu-bits.gif) no-repeat scroll left -108px;
     937}
     938
     939#adminmenu a.menu-top {
    917940    background: #f1f1f1 url(../images/menu-bits.gif) repeat-x scroll left -379px;
    918941}
     
    922945}
    923946
    924 #adminmenu li.current a,
    925 #adminmenu .wp-submenu a:hover {
     947#adminmenu .wp-has-current-submenu .wp-has-submenu,
     948#adminmenu .menu-top .current {
     949    background-color: #c0c0c0;
     950    background-image: none;
     951    border-color: #B5B5B5;
     952    color: #fff;
     953}
     954
     955#adminmenu li.menu-top .current:hover {
     956    background: #c0c0c0 none repeat scroll 0 0;
     957    border-color: #B5B5B5;
     958}
     959
     960#adminmenu .wp-submenu .current a.current {
    926961    background: transparent url(../images/menu-bits.gif) no-repeat scroll  0 -289px;
    927 }
    928 
    929 #adminmenu li.wp-has-current-submenu a.wp-has-submenu {
    930     background: #b5b5b5 url(../images/menu-bits.gif) repeat-x scroll left top;
    931     color: #fff;
    932962}
    933963
     
    937967}
    938968
    939 #adminmenu li.current a,
    940 #adminmenu li.current a:hover {
     969#adminmenu .wp-submenu li.current,
     970#adminmenu .wp-submenu li.current a,
     971#adminmenu .wp-submenu li.current a:hover {
    941972    color: #d54e21;
    942973    background-color: #fff;
    943 }
    944 
    945 #adminmenu .wp-submenu {
     974    border-color: #e3e3e3;
     975}
     976
     977#adminmenu .wp-submenu ul {
    946978    background-color: #fff;
    947979}
    948980
    949 #adminmenu.folded li.wp-has-submenu {
     981#adminmenu.folded li.menu-top,
     982#adminmenu .wp-submenu .wp-submenu-head {
    950983    background-color: #F1F1F1;
    951984}
    952985
    953 #adminmenu .wp-submenu li.wp-submenu-head {
    954     background-color: #F1F1F1;
    955 }
    956 
    957 #adminmenu.folded .wp-submenu {
    958     background-color: #fff;
     986#adminmenu div.wp-submenu {
     987    background-color: transparent;
     988}
     989
     990/* menu icons */
     991#adminmenu #menu-dashboard div.wp-menu-image {
     992    background: transparent url("../images/menu.png") no-repeat scroll -61px -34px;
     993}
     994
     995#adminmenu #menu-dashboard:hover div.wp-menu-image {
     996    background: transparent url("../images/menu.png") no-repeat scroll -61px -2px;
     997}
     998
     999#adminmenu #menu-posts div.wp-menu-image {
     1000    background: transparent url("../images/menu.png") no-repeat scroll -272px -33px;
     1001}
     1002
     1003#adminmenu #menu-posts:hover div.wp-menu-image {
     1004    background: transparent url("../images/menu.png") no-repeat scroll -272px -1px;
     1005}
     1006
     1007#adminmenu #menu-media div.wp-menu-image {
     1008    background: transparent url("../images/menu.png") no-repeat scroll -121px -33px;
     1009}
     1010
     1011#adminmenu #menu-media:hover div.wp-menu-image {
     1012    background: transparent url("../images/menu.png") no-repeat scroll -121px -1px;
     1013}
     1014
     1015#adminmenu #menu-links div.wp-menu-image {
     1016    background: transparent url("../images/menu.png") no-repeat scroll -91px -33px;
     1017}
     1018
     1019#adminmenu #menu-links:hover div.wp-menu-image {
     1020    background: transparent url("../images/menu.png") no-repeat scroll -91px -1px;
     1021}
     1022
     1023#adminmenu #menu-pages div.wp-menu-image {
     1024    background: transparent url("../images/menu.png") no-repeat scroll -151px -33px;
     1025}
     1026
     1027#adminmenu #menu-pages:hover div.wp-menu-image {
     1028    background: transparent url("../images/menu.png") no-repeat scroll -151px -1px;
     1029}
     1030
     1031#adminmenu #menu-comments div.wp-menu-image {
     1032    background: transparent url("../images/menu.png") no-repeat scroll -31px -33px;
     1033}
     1034
     1035#adminmenu #menu-comments:hover div.wp-menu-image {
     1036    background: transparent url("../images/menu.png") no-repeat scroll -31px -1px;
     1037}
     1038
     1039#adminmenu #menu-appearance div.wp-menu-image {
     1040    background: transparent url("../images/menu.png") no-repeat scroll -1px -32px;
     1041}
     1042
     1043#adminmenu #menu-appearance:hover div.wp-menu-image {
     1044    background: transparent url("../images/menu.png") no-repeat scroll -1px 0;
     1045}
     1046
     1047#adminmenu #menu-plugins div.wp-menu-image {
     1048    background: transparent url("../images/menu.png") no-repeat scroll -181px -33px;
     1049}
     1050
     1051#adminmenu #menu-plugins:hover div.wp-menu-image {
     1052    background: transparent url("../images/menu.png") no-repeat scroll -181px -1px;
     1053}
     1054
     1055#adminmenu #menu-users div.wp-menu-image {
     1056    background: transparent url("../images/menu.png") no-repeat scroll -301px -33px;
     1057}
     1058
     1059#adminmenu #menu-users:hover div.wp-menu-image {
     1060    background: transparent url("../images/menu.png") no-repeat scroll -301px -1px;
     1061}
     1062
     1063#adminmenu #menu-tools div.wp-menu-image {
     1064    background: transparent url("../images/menu.png") no-repeat scroll -211px -33px;
     1065}
     1066
     1067#adminmenu #menu-tools:hover div.wp-menu-image {
     1068    background: transparent url("../images/menu.png") no-repeat scroll -211px -1px;
     1069}
     1070
     1071#adminmenu #menu-settings div.wp-menu-image {
     1072    background: transparent url("../images/menu.png") no-repeat scroll -241px -33px;
     1073}
     1074
     1075#adminmenu #menu-settings:hover div.wp-menu-image {
     1076    background: transparent url("../images/menu.png") no-repeat scroll -241px -1px;
    9591077}
    9601078/* end menu */
     
    10261144}
    10271145
    1028 #plugin-information .fyi ul,
    1029 .find-box {
     1146#plugin-information .fyi ul {
    10301147    background-color: #eaf3fa;
    10311148}
     
    10751192    color: #D54E21;
    10761193}
     1194
     1195.ui-sortable .postbox:hover .handlediv {
     1196    background: transparent url(../images/menu-bits.gif) no-repeat scroll left -111px;
     1197}
  • trunk/wp-admin/css/colors-fresh.css

    r9564 r9578  
    927927}
    928928
    929 #adminmenu li.wp-has-current-submenu .wp-menu-toggle,
     929#adminmenu li.wp-has-current-submenu.wp-menu-open .wp-menu-toggle,
    930930#adminmenu li.wp-has-current-submenu:hover .wp-menu-toggle {
    931     background: transparent url(../images/menu-bits.gif) repeat-x scroll left -206px;
     931    background: transparent url(../images/menu-bits.gif) no-repeat scroll left -206px;
    932932}
    933933
    934934#adminmenu .wp-has-submenu:hover .wp-menu-toggle,
    935935#adminmenu .wp-menu-open .wp-menu-toggle {
    936     background: transparent url(../images/menu-bits.gif) repeat-x scroll left -108px;
    937 }
    938 
    939 #adminmenu a.wp-has-submenu {
     936    background: transparent url(../images/menu-bits.gif) no-repeat scroll left -108px;
     937}
     938
     939#adminmenu a.menu-top {
    940940    background: #f1f1f1 url(../images/menu-bits.gif) repeat-x scroll left -379px;
    941941}
     
    945945}
    946946
    947 #adminmenu li.current a,
    948 #adminmenu .wp-submenu a:hover {
     947#adminmenu .wp-has-current-submenu .wp-has-submenu,
     948#adminmenu .menu-top .current {
     949    background-color: #c0c0c0;
     950    background-image: none;
     951    border-color: #B5B5B5;
     952    color: #fff;
     953}
     954
     955#adminmenu li.menu-top .current:hover {
     956    background: #c0c0c0 none repeat scroll 0 0;
     957    border-color: #B5B5B5;
     958}
     959
     960#adminmenu .wp-submenu .current a.current {
    949961    background: transparent url(../images/menu-bits.gif) no-repeat scroll  0 -289px;
    950 }
    951 
    952 #adminmenu li.wp-has-current-submenu a.wp-has-submenu {
    953     background: #b5b5b5 url(../images/menu-bits.gif) repeat-x scroll left top;
    954     color: #fff;
    955962}
    956963
     
    960967}
    961968
    962 #adminmenu li.current a,
    963 #adminmenu li.current a:hover {
     969#adminmenu .wp-submenu li.current,
     970#adminmenu .wp-submenu li.current a,
     971#adminmenu .wp-submenu li.current a:hover {
    964972    color: #d54e21;
    965973    background-color: #fff;
    966 }
    967 
    968 #adminmenu .wp-submenu {
     974    border-color: #e3e3e3;
     975}
     976
     977#adminmenu .wp-submenu ul {
    969978    background-color: #fff;
    970979}
    971980
    972 #adminmenu.folded li.wp-has-submenu {
     981#adminmenu.folded li.menu-top,
     982#adminmenu .wp-submenu .wp-submenu-head {
    973983    background-color: #F1F1F1;
    974984}
    975985
    976 #adminmenu .wp-submenu li.wp-submenu-head {
    977     background-color: #F1F1F1;
    978 }
    979 
    980 #adminmenu.folded .wp-submenu {
    981     background-color: #fff;
     986#adminmenu div.wp-submenu {
     987    background-color: transparent;
     988}
     989
     990/* menu icons */
     991#adminmenu #menu-dashboard div.wp-menu-image {
     992    background: transparent url("../images/menu.png") no-repeat scroll -61px -34px;
     993}
     994
     995#adminmenu #menu-dashboard:hover div.wp-menu-image {
     996    background: transparent url("../images/menu.png") no-repeat scroll -61px -2px;
     997}
     998
     999#adminmenu #menu-posts div.wp-menu-image {
     1000    background: transparent url("../images/menu.png") no-repeat scroll -272px -33px;
     1001}
     1002
     1003#adminmenu #menu-posts:hover div.wp-menu-image {
     1004    background: transparent url("../images/menu.png") no-repeat scroll -272px -1px;
     1005}
     1006
     1007#adminmenu #menu-media div.wp-menu-image {
     1008    background: transparent url("../images/menu.png") no-repeat scroll -121px -33px;
     1009}
     1010
     1011#adminmenu #menu-media:hover div.wp-menu-image {
     1012    background: transparent url("../images/menu.png") no-repeat scroll -121px -1px;
     1013}
     1014
     1015#adminmenu #menu-links div.wp-menu-image {
     1016    background: transparent url("../images/menu.png") no-repeat scroll -91px -33px;
     1017}
     1018
     1019#adminmenu #menu-links:hover div.wp-menu-image {
     1020    background: transparent url("../images/menu.png") no-repeat scroll -91px -1px;
     1021}
     1022
     1023#adminmenu #menu-pages div.wp-menu-image {
     1024    background: transparent url("../images/menu.png") no-repeat scroll -151px -33px;
     1025}
     1026
     1027#adminmenu #menu-pages:hover div.wp-menu-image {
     1028    background: transparent url("../images/menu.png") no-repeat scroll -151px -1px;
     1029}
     1030
     1031#adminmenu #menu-comments div.wp-menu-image {
     1032    background: transparent url("../images/menu.png") no-repeat scroll -31px -33px;
     1033}
     1034
     1035#adminmenu #menu-comments:hover div.wp-menu-image {
     1036    background: transparent url("../images/menu.png") no-repeat scroll -31px -1px;
     1037}
     1038
     1039#adminmenu #menu-appearance div.wp-menu-image {
     1040    background: transparent url("../images/menu.png") no-repeat scroll -1px -32px;
     1041}
     1042
     1043#adminmenu #menu-appearance:hover div.wp-menu-image {
     1044    background: transparent url("../images/menu.png") no-repeat scroll -1px 0;
     1045}
     1046
     1047#adminmenu #menu-plugins div.wp-menu-image {
     1048    background: transparent url("../images/menu.png") no-repeat scroll -181px -33px;
     1049}
     1050
     1051#adminmenu #menu-plugins:hover div.wp-menu-image {
     1052    background: transparent url("../images/menu.png") no-repeat scroll -181px -1px;
     1053}
     1054
     1055#adminmenu #menu-users div.wp-menu-image {
     1056    background: transparent url("../images/menu.png") no-repeat scroll -301px -33px;
     1057}
     1058
     1059#adminmenu #menu-users:hover div.wp-menu-image {
     1060    background: transparent url("../images/menu.png") no-repeat scroll -301px -1px;
     1061}
     1062
     1063#adminmenu #menu-tools div.wp-menu-image {
     1064    background: transparent url("../images/menu.png") no-repeat scroll -211px -33px;
     1065}
     1066
     1067#adminmenu #menu-tools:hover div.wp-menu-image {
     1068    background: transparent url("../images/menu.png") no-repeat scroll -211px -1px;
     1069}
     1070
     1071#adminmenu #menu-settings div.wp-menu-image {
     1072    background: transparent url("../images/menu.png") no-repeat scroll -241px -33px;
     1073}
     1074
     1075#adminmenu #menu-settings:hover div.wp-menu-image {
     1076    background: transparent url("../images/menu.png") no-repeat scroll -241px -1px;
    9821077}
    9831078/* end menu */
     
    10971192    color: #D54E21;
    10981193}
     1194
     1195.ui-sortable .postbox:hover .handlediv {
     1196    background: transparent url(../images/menu-bits.gif) no-repeat scroll left -111px;
     1197}
  • trunk/wp-admin/css/ie.css

    r9498 r9578  
    3535}
    3636
     37* html #wpbody-content #screen-options-link-wrap {
     38    display: inline-block;
     39    width: 150px;
     40    text-align: center;
     41}
     42
     43* html #wpbody-content #contextual-help-link-wrap {
     44    display: inline-block;
     45    width: 100px;
     46    text-align: center;
     47}
     48
    3749/*
    3850* html body.minwidth {
     
    4759* html #adminmenu {
    4860    z-index: 1;
    49     width: 125px;
     61    width: 145px;
    5062    margin: 12px;
    5163    padding: 0;
    5264}
    5365
    54 * html #wpcontent #adminmenu.folded {
    55     width: 28px;
    56 }
    57 
    5866ul#adminmenu li.wp-has-submenu {
    5967    padding: 0;
     
    6169}
    6270
    63 #wpcontent #adminmenu ul.wp-submenu li {
    64     padding: 0;
    65 }
     71#wpcontent #adminmenu .wp-submenu li {
     72    padding: 0;
     73}
     74
    6675#adminmenu,
    6776#adminmenu .wp-menu-toggle,
    68 ul.wp-submenu li,
    69 ul.wp-submenu {
     77.wp-submenu li,
     78.wp-submenu {
    7079    zoom: 100%;
    7180}
     
    7584}
    7685
    77 #wpcontent #adminmenu ul.wp-submenu li.wp-submenu-head {
     86#wpcontent #adminmenu .wp-submenu li.wp-submenu-head {
    7887    padding: 3px 4px 4px 10px;
    7988    zoom: 100%;
    8089}
    8190
    82 #adminmenu.folded ul.wp-submenu {
    83     margin: -1px 0 0 13px;
     91#wpcontent #adminmenu.folded .menu-top {
     92    height: 30px;
     93}
     94
     95#adminmenu.folded .wp-submenu {
     96    margin: -1px 0 0 0;
    8497}
    8598
  • trunk/wp-admin/includes/media.php

    r9465 r9578  
    12531253            custom_settings : {
    12541254                degraded_element_id : "html-upload-ui", // id of the element displayed when swfupload is unavailable
    1255                 swfupload_element_id : "flash-upload-ui", // id of the element displayed when swfupload is available
     1255                swfupload_element_id : "flash-upload-ui" // id of the element displayed when swfupload is available
    12561256            },
    12571257            debug: false
     
    12631263<div id="flash-upload-ui">
    12641264<?php do_action('pre-flash-upload-ui'); ?>
    1265     <div id="flash-browse-button"></div>
    1266     <p><?php _e( 'Choose files to upload' ); ?></p>
     1265   
     1266    <div><?php _e( 'Choose files to upload' ); ?> <div id="flash-browse-button"></div></div>
    12671267<?php do_action('post-flash-upload-ui'); ?>
    12681268    <p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
  • trunk/wp-admin/includes/plugin.php

    r9537 r9578  
    550550
    551551    if ( empty($icon_url) )
    552         $icon_url = 'images/menu/generic.png';
     552        $icon_url = 'images/generic.png';
    553553   
    554     $menu[] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top-single ' . $hookname, $hookname, $icon_url );
    555     $menu[] = array ( '', $access_level, '', '', 'wp-menu-separator-last' );
     554    $menu[] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url );
    556555
    557556    return $hookname;
  • trunk/wp-admin/includes/template.php

    r9564 r9578  
    26532653                        $style = 'style="display:none;"';
    26542654                    echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . '" ' . $style . '>' . "\n";
    2655                     echo "<h3 class='hndle'><span>{$box['title']}</span></h3>\n";
     2655                    echo "<div class='handlediv'><br /></div><h3 class='hndle'><span>{$box['title']}</span></h3>\n";
    26562656                    echo '<div class="inside">' . "\n";
    26572657                    call_user_func($box['callback'], $object, $box);
  • trunk/wp-admin/js/menu.js

    r9539 r9578  
    55    init : function() {
    66        $('#adminmenu a').attr('tabindex', '10');
    7         $('#adminmenu div.wp-menu-toggle').click( function() { return adminMenu.toggle( $(this).siblings('ul') ); } );
    8         $('#adminmenu li.wp-has-submenu img.wp-menu-image').click( function() { window.location = $(this).siblings('a.wp-has-submenu')[0].href; } );
     7        $('#adminmenu div.wp-menu-toggle').each( function() {
     8            if ( $(this).siblings('.wp-submenu').length )
     9                $(this).click(function(){ adminMenu.toggle( $(this).siblings('.wp-submenu') ); });
     10            else
     11                $(this).hide();
     12        });
     13        $('#adminmenu li.menu-top .wp-menu-image').click( function() { window.location = $(this).siblings('a.menu-top')[0].href; } );
     14        this.favorites();
    915
    1016        $('.wp-menu-separator').click(function(){
     
    3541    },
    3642
    37     toggle : function(ul, effect) {
    38         if ( !effect )
    39             effect = 'slideToggle';
     43    toggle : function(el) {
    4044
    41         ul[effect](150).parent().toggleClass( 'wp-menu-open' );
     45        el['slideToggle'](150, function(){el.css('display','');}).parent().toggleClass( 'wp-menu-open' );
    4246
    4347        $('#adminmenu li.wp-has-submenu').each(function(i, e) {
     
    5256        if (off) {
    5357            $('#adminmenu').removeClass('folded');
    54             $('#adminmenu li.wp-submenu-head').hide();
    55             $('#adminmenu a.wp-has-submenu, #adminmenu .wp-menu-open .wp-submenu, #adminmenu div.wp-menu-toggle').show();
    56             $('#adminmenu li.wp-has-submenu').unbind().css('width', '');
    57             this.restoreMenuState();
     58            $('#adminmenu li.wp-has-submenu').unbind();
    5859        } else {
    5960            $('#adminmenu').addClass('folded');
    60             $('#adminmenu a.wp-has-submenu, #adminmenu .wp-submenu, #adminmenu div.wp-menu-toggle').hide();
    61             $('#adminmenu li.wp-submenu-head').show();
    62             $('#adminmenu li.wp-has-submenu').css({'width':'28px'}).hoverIntent({
     61            $('#adminmenu li.wp-has-submenu').hoverIntent({
    6362                over: function(e){
    6463                    var m = $(this).find('.wp-submenu'), t = e.clientY, H = $(window).height(), h = m.height(), o;
     
    6665                    if ( (t+h+10) > H ) {
    6766                        o = (t+h+10) - H;
    68                         m.css({'marginTop':'-'+o+'px'})
     67                        m.css({'marginTop':'-'+o+'px'});
     68                    } else if ( m.css('marginTop') ) {
     69                        m.css({'marginTop':''})
    6970                    }
    70                     m.show();
     71                    m.addClass('sub-open');
    7172                },
    72                 out: function(){ $(this).find('.wp-submenu').hide(); },
     73                out: function(){ $(this).find('.wp-submenu').removeClass('sub-open'); },
    7374                timeout: 220,
    7475                sensitivity: 8,
    7576                interval: 100
    7677            });
     78           
    7779        }
     80    },
     81   
     82    favorites : function() {
     83        $('#favorite-inside').width($('#favorite-actions').width()-4);
     84        $('#favorite-toggle, #favorite-inside').bind( 'mouseenter', function(){$('#favorite-inside').removeClass('slideUp').addClass('slideDown'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideDown') ) { $('#favorite-inside').slideDown(100); $('#favorite-first').addClass('slide-down'); }}, 200) } );
     85   
     86        $('#favorite-toggle, #favorite-inside').bind( 'mouseleave', function(){$('#favorite-inside').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideUp') ) { $('#favorite-inside').slideUp(100, function(){ $('#favorite-first').removeClass('slide-down'); } ); }}, 300) } );
    7887    }
    7988};
    8089
    81 $(document).ready(function(){
    82     adminMenu.init();
     90$(document).ready(function(){adminMenu.init();});
    8391
    84     $('#favorite-inside').width($('#favorite-actions').width()-4);
    85     $('#favorite-toggle, #favorite-inside').bind( 'mouseenter', function(){$('#favorite-inside').removeClass('slideUp').addClass('slideDown'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideDown') ) { $('#favorite-inside').slideDown(100); $('#favorite-first').addClass('slide-down'); }}, 200) } );
    86 
    87     $('#favorite-toggle, #favorite-inside').bind( 'mouseleave', function(){$('#favorite-inside').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( $('#favorite-inside').hasClass('slideUp') ) { $('#favorite-inside').slideUp(100, function(){ $('#favorite-first').removeClass('slide-down'); } ); }}, 300) } );
    88 });
    8992})(jQuery);
  • trunk/wp-admin/js/postbox.js

    r9510 r9578  
    22    postboxes = {
    33        add_postbox_toggles : function(page,args) {
    4             $('.postbox h3').click( function() {
     4            $('.postbox h3, .postbox .handlediv').click( function() {
    55                $($(this).parent().get(0)).toggleClass('closed');
    66                postboxes.save_state(page);
  • trunk/wp-admin/menu-header.php

    r9363 r9578  
    5858        $class = $class ? ' class="' . join( ' ', $class ) . '"' : '';
    5959        $id = isset($item[5]) && ! empty($item[5]) ? ' id="' . $item[5] . '"' : '';
    60         $img = isset($item[6]) && ! empty($item[6]) ? '<img class="wp-menu-image" src="' . $item[6] . '" alt="" />' : '';
     60        $img = '';
     61        if ( isset($item[6]) && ! empty($item[6]) ) {
     62            if ( 'div' === $item[6] )
     63                $img = '<div class="wp-menu-image"><br /></div>';
     64            else
     65                $img = '<img class="wp-menu-image" src="' . $item[6] . '" alt="" />';
     66        }
    6167        $toggle = '<div class="wp-menu-toggle"><br /></div>';
    6268
     
    8591
    8692        if ( !empty($submenu[$item[2]]) ) {
    87             echo "\n\t<ul class='wp-submenu'><li class='wp-submenu-head' style='display:none;'>{$item[0]}</li>";
     93            echo "\n\t<div class='wp-submenu'><div class='wp-submenu-head'>{$item[0]}</div><ul>";
    8894            $first = true;
    8995            foreach ( $submenu[$item[2]] as $sub_key => $sub_item ) {
     
    122128                }
    123129            }
    124             echo "</ul>";
     130            echo "</ul></div>";
    125131        }
    126132        echo "</li>";
  • trunk/wp-admin/menu.php

    r9543 r9578  
    2626$awaiting_mod = $awaiting_mod->moderated;
    2727
    28 $menu[0] = array( __('Dashboard'), 'read', 'index.php', '', 'wp-menu-open menu-top-single', 'menu-dashboard', 'images/menu/home.png' );
    29     $submenu['index.php'][5]  = array( __('Dashboard'), 'read' , 'index.php' );
     28$menu[0] = array( __('Dashboard'), 'read', 'index.php', '', 'menu-top', 'menu-dashboard', 'div' );
    3029
    3130$menu[4] = array( '', 'read', '', '', 'wp-menu-separator' );
    3231
    33 $menu[5] = array( __('Posts'), 'edit_posts', 'post-new.php', '', 'wp-menu-open menu-top-first', 'menu-posts', 'images/menu/posts.png' );
     32$menu[5] = array( __('Posts'), 'edit_posts', 'post-new.php', '', 'wp-menu-open menu-top', 'menu-posts', 'div' );
    3433    $submenu['post-new.php'][5]  = array( _c('Add New|post'), 'edit_posts', 'post-new.php' );
    3534    //$submenu['post-new.php'][10]  = array( __('Drafts'), 'edit_posts', 'edit-post-drafts.php' );
     
    3837    $submenu['post-new.php'][25] = array( __('Categories'), 'manage_categories', 'categories.php' );
    3938
    40 $menu[10] = array( __('Media'), 'upload_files', 'media-new.php', '', '', 'menu-media', 'images/menu/media.png' );
     39$menu[10] = array( __('Media'), 'upload_files', 'media-new.php', '', 'menu-top', 'menu-media', 'div' );
    4140    $submenu['media-new.php'][5] = array( _c('Add New|file'), 'upload_files', 'media-new.php');
    4241    $submenu['media-new.php'][10] = array( __('Edit'), 'upload_files', 'upload.php');
    4342
    44 $menu[15] = array( __('Links'), 'manage_links', 'link-add.php', '', '', 'menu-links', 'images/menu/links.png' );
     43$menu[15] = array( __('Links'), 'manage_links', 'link-add.php', '', 'menu-top', 'menu-links', 'div' );
    4544    $submenu['link-add.php'][5] = array( _c('Add New|links'), 'manage_links', 'link-add.php' );
    4645    $submenu['link-add.php'][10] = array( __('Edit'), 'manage_links', 'link-manager.php' );
    4746    $submenu['link-add.php'][15] = array( __('Link Categories'), 'manage_categories', 'edit-link-categories.php' );
    4847
    49 $menu[20] = array( __('Pages'), 'edit_pages', 'page-new.php', '', '', 'menu-pages', 'images/menu/pages.png' );
     48$menu[20] = array( __('Pages'), 'edit_pages', 'page-new.php', '', 'menu-top', 'menu-pages', 'div' );
    5049    $submenu['page-new.php'][5] = array( _c('Add New|page'), 'edit_pages', 'page-new.php' );
    5150    //$submenu['page-new.php'][10] = array( __('Drafts'), 'edit_pages', 'edit-page-drafts.php' );
    5251    $submenu['page-new.php'][15] = array( __('Edit'), 'edit_pages', 'edit-pages.php' );
    5352
    54 $menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top-last', 'menu-comments', 'images/menu/comments.png' );
    55     $submenu['edit-comments.php'][15] = array( __('Comments'), 'edit_posts', 'edit-comments.php' );
     53$menu[25] = array( sprintf( __('Comments %s'), "<span id='awaiting-mod' class='count-$awaiting_mod'><span class='comment-count'>" . number_format_i18n($awaiting_mod) . "</span></span>" ), 'edit_posts', 'edit-comments.php', '', 'menu-top', 'menu-comments', 'div' );
    5654
    5755$_wp_last_object_menu = 25; // The index of the last top-level menu in the object menu group
     
    5957$menu[29] = array( '', 'read', '', '', 'wp-menu-separator' );
    6058
    61 $menu[30] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top-first', 'menu-appearance', 'images/menu/appearance.png' );
     59$menu[30] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top', 'menu-appearance', 'div' );
    6260    $submenu['themes.php'][5]  = array(__('Themes'), 'switch_themes', 'themes.php');
    6361    $submenu['themes.php'][10] = array(__('Editor'), 'edit_themes', 'theme-editor.php');
     
    6866    $update_count = count( $update_plugins->response );
    6967
    70 $menu[35] = array( sprintf( __('Plugins %s'), "<span id='update-plugins' class='count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'activate_plugins', 'plugins.php', '', '', 'menu-plugins', 'images/menu/plugins.png' );
     68$menu[35] = array( sprintf( __('Plugins %s'), "<span id='update-plugins' class='count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'activate_plugins', 'plugins.php', '', 'menu-top', 'menu-plugins', 'div' );
    7169    $submenu['plugins.php'][5]  = array( __('Installed'), 'activate_plugins', 'plugins.php' );
    7270    $submenu['plugins.php'][10] = array(_c('Add New|plugin'), 'install_plugins', 'plugin-install.php');
     
    7472
    7573if ( current_user_can('edit_users') )
    76     $menu[40] = array( __('Users'), 'edit_users', 'users.php', '', '', 'menu-users', 'images/menu/users.png' );
     74    $menu[40] = array( __('Users'), 'edit_users', 'users.php', '', 'menu-top', 'menu-users', 'div' );
    7775else
    78     $menu[40] = array( __('Profile'), 'read', 'profile.php', '', '', 'menu-users', 'images/menu/users.png' );
     76    $menu[40] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top', 'menu-users', 'div' );
    7977
    8078if ( current_user_can('edit_users') ) {
     
    8785}
    8886
    89 $menu[45] = array( __('Tools'), 'manage_options', 'import.php', '', '', 'menu-tools', 'images/menu/tools.png' );
     87$menu[45] = array( __('Tools'), 'manage_options', 'import.php', '', 'menu-top', 'menu-tools', 'div' );
    9088    $submenu['import.php'][5] = array( __('Import'), 'import', 'import.php' );
    9189    $submenu['import.php'][10] = array( __('Export'), 'import', 'export.php' );
    9290    if ( ! $is_opera )
    9391        $submenu['import.php'][20] = array( __('Turbo'), 'read', 'turbo.php' );
    94     $submenu['import.php'][30] = array( __('Update'), 'read',  'update-core.php');
    95 
    96 $menu[50] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top-last', 'menu-settings', 'images/menu/settings.png' );
     92    $submenu['import.php'][30] = array( __('Update'), 'install_plugins',  'update-core.php');
     93
     94$menu[50] = array( __('Settings'), 'manage_options', 'options-general.php', '', 'menu-top', 'menu-settings', 'div' );
    9795    $submenu['options-general.php'][10] = array(__('General'), 'manage_options', 'options-general.php');
    9896    $submenu['options-general.php'][15] = array(__('Writing'), 'manage_options', 'options-writing.php');
     
    173171            $_wp_menu_nopriv[$data[2]] = true;
    174172            unset($menu[$id]);
    175         } elseif ( !empty($data[0]) ) {
    176             $submenu[$data[2]][0] = $data;
    177173        }
    178174    }
     
    180176
    181177unset($id);
     178
     179function add_cssclass($add, $class) {
     180    $class = empty($class) ? $add : $class .= ' ' . $add;
     181    return $class;
     182}
     183
     184function add_menu_classes($menu) {
     185
     186    $first = $lastorder = false;
     187    $i = 0;
     188    $mc = count($menu);
     189    foreach ( $menu as $order => $top ) {
     190        $i++;
     191
     192        if ( 0 == $order ) { // dashboard is always shown/single
     193            $menu[0][4] = add_cssclass('menu-top-first menu-top-last', $top[4]);
     194            continue;
     195        }
     196
     197        if ( empty($top[2]) ) { // if separator
     198            $first = true;
     199            if ( $lastorder ) {
     200                $c = $menu[$lastorder][4];
     201                $menu[$lastorder][4] = add_cssclass('menu-top-last', $c);
     202            }
     203            continue;
     204        }
     205
     206        if ( $first ) {
     207            $c = $menu[$order][4];
     208            $menu[$order][4] = add_cssclass('menu-top-first', $c);
     209            $first = false;
     210        }
     211
     212        if ( $mc == $i ) { // last item
     213            $c = $menu[$order][4];
     214            $menu[$order][4] = add_cssclass('menu-top-last', $c);
     215        }
     216
     217        $lastorder = $order;
     218    }
     219
     220    return apply_filters( 'add_menu_classes', $menu );
     221}
     222
     223$menu = add_menu_classes($menu);
    182224
    183225uksort($menu, "strnatcasecmp"); // make it all pretty
  • trunk/wp-admin/wp-admin.css

    r9569 r9578  
    863863}
    864864
    865 /* menu stuff */
     865/* side admin menu */
    866866#adminmenu .wp-submenu {
    867867    display: none;
    868868    list-style: none;
    869     margin: 2px 0 0;
    870     padding: 0;
    871 }
    872 
    873 /* side admin menu */
     869    padding: 0;
     870    margin: 0;
     871    position: relative;
     872    z-index: 2;
     873    border-width: 1px 0 0;
     874    border-style: solid none none;
     875}
     876
    874877#adminmenu {
    875878    padding: 0;
     879    width: 12em;
    876880    list-style: none;
    877881    font: normal 11.5px/16px Georgia, "Times New Roman", Times, serif;
    878882}
    879883
     884#adminmenu.folded,
     885#adminmenu.folded li.menu-top {
     886    width: 28px;
     887}
     888
     889#adminmenu div.wp-submenu-head {
     890    display: none;
     891}
     892
     893#adminmenu.folded div.wp-submenu-head,
     894#adminmenu.folded li.wp-has-submenu div.sub-open {
     895    display: block;
     896}
     897
     898#adminmenu.folded a.menu-top,
     899#adminmenu.folded .wp-submenu,
     900#adminmenu.folded li.wp-menu-open .wp-submenu,
     901#adminmenu.folded div.wp-menu-toggle {
     902    display: none;
     903}
     904
    880905#adminmenu li.wp-menu-open .wp-submenu {
    881906    display: block;
    882907}
     908
     909#adminmenu div.wp-menu-image {
     910    float: left;
     911    width: 28px;
     912    height: 30px;
     913}
     914
    883915/*
    884916#adminmenu a {
     
    903935}
    904936
    905 #adminmenu li.wp-has-submenu {
    906     width: 135px;
     937#adminmenu li.menu-top {
    907938    min-height: 28px;
    908939}
    909940
    910 #adminmenu a.wp-has-submenu {
     941#adminmenu a.menu-top {
    911942    line-height: 18px;
    912943    padding: 6px 5px;
     
    926957}
    927958
    928 #adminmenu .menu-top-last ul.wp-submenu,
    929 #adminmenu .menu-top-single ul.wp-submenu {
     959#adminmenu .menu-top-last ul.wp-submenu {
    930960    border-width: 0 0 1px;
    931961    border-style: none none solid;
    932 }
    933 
    934 #adminmenu .wp-submenu {
    935     margin: 0;
    936     position: relative;
    937     z-index: 2;
    938     border-width: 1px 0 0;
    939     border-style: solid none none;
    940962}
    941963
     
    954976}
    955977
    956 #adminmenu .menu-top-first a.wp-has-submenu,
     978#adminmenu .menu-top-first a.menu-top,
    957979#adminmenu.folded li.menu-top-first,
    958 #adminmenu .wp-submenu li.wp-submenu-head {
     980#adminmenu .wp-submenu .wp-submenu-head {
    959981    border-width: 1px 1px 0;
    960982    border-style: solid solid none;
    961     -moz-border-radius: 8px 8px 0 0;
     983    -moz-border-radius-topleft :8px;
     984    -moz-border-radius-topright: 8px;
    962985    -webkit-border-top-right-radius: 8px;
    963986    -webkit-border-top-left-radius: 8px;
     
    968991}
    969992
    970 #adminmenu .menu-top-last a.wp-has-submenu,
     993#adminmenu .menu-top-last a.menu-top,
    971994#adminmenu.folded li.menu-top-last {
    972995    border-width: 1px;
    973996    border-style: solid;
    974     -moz-border-radius: 0 0 8px 8px;
     997    -moz-border-radius-bottomleft: 8px;
     998    -moz-border-radius-bottomright: 8px;
    975999    -webkit-border-bottom-right-radius: 8px;
    9761000    -webkit-border-bottom-left-radius: 8px;
     
    9811005}
    9821006
    983 #adminmenu .menu-top-single a.wp-has-submenu,
    984 #adminmenu.folded li.menu-top-single {
    985     border-width: 1px;
    986     border-style: solid;
    987     -moz-border-radius: 8px;
    988     -webkit-border-radius: 8px;
    989     -khtml-border-radius: 8px;
    990     border-radius: 8px;
    991 }
    992 
    993 #adminmenu li.wp-menu-open a.menu-top-last,
    994 #adminmenu li.wp-menu-open a.menu-top-single {
     1007#adminmenu li.wp-menu-open a.menu-top-last {
     1008    border-bottom: 0 none;
    9951009    -moz-border-radius-bottomright: 0;
    9961010    -moz-border-radius-bottomleft: 0;
     
    10031017}
    10041018
    1005 #adminmenu .wp-menu-image {
     1019#adminmenu img.wp-menu-image {
    10061020    float: left;
    10071021    padding: 8px 6px 0;
    10081022}
    10091023
    1010 #adminmenu.folded .wp-menu-image {
     1024#adminmenu.folded img.wp-menu-image {
    10111025    padding: 7px 0 0 6px;
    10121026}
     
    10231037}
    10241038
    1025 #adminmenu .wp-submenu li.wp-submenu-head {
     1039#adminmenu .wp-submenu .wp-submenu-head {
    10261040    border-width: 1px;
    10271041    border-style: solid;
     
    10321046#adminmenu.folded .wp-submenu {
    10331047    position: absolute;
    1034     margin: -1px 0 0 33px;
     1048    margin: -1px 0 0 28px;
     1049    padding: 0 8px 8px;
    10351050    z-index: 999;
    1036     width: 135px;
     1051    border: 0 none;
     1052}
     1053
     1054#adminmenu.folded .wp-submenu ul {
     1055    width: 140px;
    10371056    border-width: 0 0 1px;
    10381057    border-style: none none solid;
     
    10491068#adminmenu.folded a.wp-has-submenu {
    10501069    margin-left: 40px;
     1070}
     1071
     1072#adminmenu li.menu-top-last .wp-submenu ul {
     1073    border-width: 0 0 1px;
     1074    border-style: none none solid;
    10511075}
    10521076
     
    15591583.ui-sortable .postbox .hndle {
    15601584    cursor: move;
     1585}
     1586
     1587.ui-sortable .postbox .handlediv {
     1588    float: right;
     1589    width: 24px;
     1590    height: 24px;
    15611591}
    15621592
     
    30143044    line-height: 2px;
    30153045}
     3046
     3047.swfupload {
     3048    margin: 0 10px;
     3049    vertical-align: middle;
     3050}
     3051
  • trunk/wp-includes/js/hoverIntent.js

    r9391 r9578  
    11/**
     2* hoverIntent is similar to jQuery's built-in "hover" function except that
     3* instead of firing the onMouseOver event immediately, hoverIntent checks
     4* to see if the user's mouse has slowed down (beneath the sensitivity
     5* threshold) before firing the onMouseOver event.
     6*
    27* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
    38* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
     
    712* the license that best suits your project, and use it accordingly.
    813*
     14* // basic usage (just like .hover) receives onMouseOver and onMouseOut functions
     15* $("ul li").hoverIntent( showNav , hideNav );
     16*
     17* // advanced usage receives configuration object only
     18* $("ul li").hoverIntent({
     19*   sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)
     20*   interval: 100,   // number = milliseconds of polling interval
     21*   over: showNav,  // function = onMouseOver callback (required)
     22*   timeout: 0,   // number = milliseconds delay before onMouseOut function call
     23*   out: hideNav    // function = onMouseOut callback (required)
     24* });
     25*
    926* @param  f  onMouseOver function || An object with configuration options
    1027* @param  g  onMouseOut function  || Nothing (use configuration options object)
    1128* @author    Brian Cherne <brian@cherne.net>
    1229*/
    13 (function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);
     30(function($) {
     31    $.fn.hoverIntent = function(f,g) {
     32        // default configuration options
     33        var cfg = {
     34            sensitivity: 7,
     35            interval: 100,
     36            timeout: 0
     37        };
     38        // override configuration options with user supplied object
     39        cfg = $.extend(cfg, g ? { over: f, out: g } : f );
     40
     41        // instantiate variables
     42        // cX, cY = current X and Y position of mouse, updated by mousemove event
     43        // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
     44        var cX, cY, pX, pY;
     45
     46        // A private function for getting mouse position
     47        var track = function(ev) {
     48            cX = ev.pageX;
     49            cY = ev.pageY;
     50        };
     51
     52        // A private function for comparing current and previous mouse position
     53        var compare = function(ev,ob) {
     54            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
     55            // compare mouse positions to see if they've crossed the threshold
     56            if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
     57                $(ob).unbind("mousemove",track);
     58                // set hoverIntent state to true (so mouseOut can be called)
     59                ob.hoverIntent_s = 1;
     60                return cfg.over.apply(ob,[ev]);
     61            } else {
     62                // set previous coordinates for next time
     63                pX = cX; pY = cY;
     64                // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
     65                ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
     66            }
     67        };
     68
     69        // A private function for delaying the mouseOut function
     70        var delay = function(ev,ob) {
     71            ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
     72            ob.hoverIntent_s = 0;
     73            return cfg.out.apply(ob,[ev]);
     74        };
     75       
     76        // workaround for Mozilla bug: not firing mouseout/mouseleave on absolute positioned elements over textareas and input type="text"
     77        var handleHover = function(e) {
     78            var t = this;
     79           
     80            // next two lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut
     81            var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
     82            while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }
     83            if ( p == this ) {
     84                if ( $.browser.mozilla ) {
     85                    if ( e.type == "mouseout" ) {
     86                        t.mtout = setTimeout( function(){doHover(e,t);}, 30 );
     87                    } else {
     88                        if (t.mtout) { t.mtout = clearTimeout(t.mtout); }
     89                    }
     90                }
     91                return;
     92            } else {
     93                if (t.mtout) { t.mtout = clearTimeout(t.mtout); }
     94                doHover(e,t);
     95            }
     96        };
     97
     98        // A private function for handling mouse 'hovering'
     99        var doHover = function(e,ob) {
     100
     101            // copy objects to be passed into t (required for event object to be passed in IE)
     102            var ev = jQuery.extend({},e);
     103
     104            // cancel hoverIntent timer if it exists
     105            if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
     106
     107            // else e.type == "onmouseover"
     108            if (e.type == "mouseover") {
     109                // set "previous" X and Y position based on initial entry point
     110                pX = ev.pageX; pY = ev.pageY;
     111                // update "current" X and Y position based on mousemove
     112                $(ob).bind("mousemove",track);
     113                // start polling interval (self-calling timeout) to compare mouse coordinates over time
     114                if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
     115
     116            // else e.type == "onmouseout"
     117            } else {
     118                // unbind expensive mousemove event
     119                $(ob).unbind("mousemove",track);
     120                // if hoverIntent state is true, then call the mouseOut function after the specified delay
     121                if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
     122            }
     123        };
     124
     125        // bind the function to the two event listeners
     126        return this.mouseover(handleHover).mouseout(handleHover);
     127    };
     128})(jQuery);
  • trunk/wp-includes/script-loader.php

    r9573 r9578  
    167167        $scripts->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' );
    168168        $scripts->add( 'upload', '/wp-admin/js/upload.js', array('jquery'), '20070518' );
    169         $scripts->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery-ui-sortable'), '20081104' );
     169        $scripts->add( 'postbox', '/wp-admin/js/postbox.js', array('jquery-ui-sortable'), '20081109' );
    170170        $scripts->localize( 'postbox', 'postboxL10n', array(
    171171            'requestFile' => admin_url('admin-ajax.php'),
     
    297297        $scripts->add( 'dashboard', '/wp-admin/js/dashboard.js', array( 'jquery', 'admin-comments', 'postbox', 'settings-box' ), '20081016' );
    298298
    299         $scripts->add( 'hoverIntent', '/wp-includes/js/hoverIntent.js', array('jquery'), '20070327' );
    300         $scripts->add( 'menu', '/wp-admin/js/menu.js', array( 'jquery', 'hoverIntent' ), '20081105' );
     299        $scripts->add( 'hoverIntent', '/wp-includes/js/hoverIntent.js', array('jquery'), '20081109' );
     300        $scripts->add( 'menu', '/wp-admin/js/menu.js', array( 'jquery', 'hoverIntent' ), '20081109' );
    301301
    302302    }
     
    329329    $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'press-this-ie', 'plugin-install', 'farbtastic' );
    330330
    331     $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081107' );
     331    $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081109' );
    332332    $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
    333333
     
    336336
    337337    $styles->add( 'colors', true ); // Register "meta" stylesheet for admin colors
    338     $styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081031'); // for login.php.  Is there a better way?
     338    $styles->add( 'colors-fresh', '/wp-admin/css/colors-fresh.css', array(), '20081109'); // for login.php.  Is there a better way?
    339339    $styles->add_data( 'colors-fresh', 'rtl', true );
    340340
Note: See TracChangeset for help on using the changeset viewer.