Make WordPress Core

Changeset 9182


Ignore:
Timestamp:
10/15/2008 06:54:25 AM (18 years ago)
Author:
azaozz
Message:

Admin menu: add generic icon, fix hover in IE, speed up response timing

Location:
trunk/wp-admin
Files:
1 added
6 edited

Legend:

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

    r9170 r9182  
    356356
    357357/* Because we don't want visited on these links */
    358 #adminmenu li.current a, #sidemenu a.current, body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
     358body.press-this .ui-tabs-selected a, body.press-this .ui-tabs-selected a:hover {
    359359        background-color: #fff;
    360360        border-color: #c6d9e9;
    … …  
    363363}
    364364
     365#adminmenu li.current a, #sidemenu a.current {
     366        background-color: #fff;
     367        color: #d54e21;
     368}
     369
    365370#adminmenu li.current {
    366371        background-color: #fff;
    367         border-color: #c6d9e9;
    368         border-right-color: #fff;
    369372}
    370373
  • trunk/wp-admin/css/ie.css

    r9161 r9182  
    2222}
    2323
     24#adminmenu.folded .wp-submenu {
     25        margin: -1px 0 0 4px;
     26}
     27
    2428#adminmenu li.wp-has-submenu {
    25         margin-top: 2px;
     29        margin: 2px 0;
    2630}
    2731
    … …  
    3034}
    3135
    32 * html #wpcontent #adminmenu ul.wp-submenu li {
    33         margin: 0;
    34         padding: 0;
    35 }
    36 
    37 * html #wpcontent #adminmenu ul.wp-submenu a {
     36#wpcontent #adminmenu ul.wp-submenu a {
    3837        padding: 2px 4px 2px 8px;
    3938        margin: 0;
    … …  
    4140}
    4241
    43 * html #wpcontent #adminmenu ul.wp-submenu li a.current,
    44 * html #wpcontent #adminmenu ul.wp-submenu li.current {
    45         border: 0;
    46         background-color: #fff;
     42ul.wp-submenu, ul.wp-submenu li, ul.wp-submenu a {
     43        display: block;
     44        zoom: 100%;
     45}
     46
     47* html #wpcontent #adminmenu {
     48        margin: 8px 4px;
     49}
     50
     51#wpcontent #adminmenu ul.wp-submenu li {
     52        padding: 0;
    4753}
    4854
    4955ul#adminmenu li.wp-menu-separator {
    5056        background-color: #fff;
    51         height: 5px;
    52         width: 1px;
    53         line-height: 5px;
    54         font-size: 5px;
    55         padding: 0;
    56         margin: 0;
     57        height: 3px;
     58        line-height: 3px;
     59        font-size: 3px;
    5760}
    5861
  • trunk/wp-admin/includes/plugin.php

    r9178 r9182  
    493493//
    494494
    495 function add_menu_page( $page_title, $menu_title, $access_level, $file, $function = '' ) {
     495function add_menu_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '' ) {
    496496        global $menu, $admin_page_hooks;
    497497
    … …  
    504504                add_action( $hookname, $function );
    505505
    506         $menu[] = array ( $menu_title, $access_level, $file, $page_title, $hookname, $hookname );
     506        if ( empty($icon_url) )
     507                $icon_url = 'images/menu/generic.png';
     508       
     509        $menu[] = array ( $menu_title, $access_level, $file, $page_title, $hookname, $hookname, $icon_url );
    507510
    508511        return $hookname;
  • trunk/wp-admin/js/menu.js

    r9170 r9182  
    44               
    55        init : function() {
     6                $('#adminmenu a').attr('tabindex', '10');
    67                $('#adminmenu a.wp-has-submenu').click( function() { return adminMenu.toggle( $(this).siblings('ul') ); } );
    78               
    … …  
    5253                        $('#wpbody-content').css('marginLeft', '140px');
    5354                        $('#adminmenu').removeClass('folded');
    54                         $('#adminmenu li.wp-has-submenu').unbind().css('width', '125px');
    55                         $('#adminmenu a.wp-has-submenu').unbind().click( function() { return adminMenu.toggle( $(this).siblings('ul') ); } );
     55                        $('#adminmenu a.wp-has-submenu').show();
     56                        $('#adminmenu li.wp-has-submenu').unbind().css('width', '');
    5657                } else {
    5758                        $('#adminmenu').addClass('folded');
     59                        $('#adminmenu a.wp-has-submenu').hide();
    5860                        $('#adminmenu .wp-submenu').hide();
    5961                        $('#wpbody-content').css('marginLeft', '38px');
    60                         $('#adminmenu a.wp-has-submenu').unbind().click(function(){return false;});
    6162                        $('#adminmenu li.wp-has-submenu').css({'width':'24px'}).hoverIntent({
    62                                 over: function(){ $(this).find('.wp-submenu').show(100); },
    63                                 out: function(){ $(this).find('.wp-submenu').hide(100); },
    64                                 timeout: 150,
    65                                 sensitivity: 6,
     63                                over: function(){ $(this).find('.wp-submenu').show(); },
     64                                out: function(){ $(this).find('.wp-submenu').hide(); },
     65                                timeout: 220,
     66                                sensitivity: 8,
    6667                                interval: 100
    6768                        });
  • trunk/wp-admin/menu.php

    r9178 r9182  
    9696        $submenu['options-general.php'][45] = array(__('Miscellaneous'), 'manage_options', 'options-misc.php');
    9797
     98$menu[55] = array( '', 'read', '', '', 'wp-menu-separator' );
     99
    98100// Back-compat for old top-levels
    99101$_wp_real_parent_file['post.php'] = 'post-new.php';
  • trunk/wp-admin/wp-admin.css

    r9169 r9182  
    489489}
    490490
    491 .page-numbers.current {
     491#tablenav-pages .page-numbers.current {
    492492        font-weight: bold;
    493493        border-width: 1px;
    … …  
    678678/* side admin menu */
    679679#adminmenu {
    680         margin: 0;
    681680        padding: 0;
    682681        list-style: none;
    … …  
    725724#adminmenu .wp-menu-image {
    726725        float: left;
    727         padding: 4px 6px 0 4px;
     726        padding: 4px 4px 0;
    728727}
    729728
    … …  
    733732
    734733#adminmenu a {
     734        display: block;
    735735        font-size: 13px !important;
    736         padding: 5px 4px 6px 0;
    737         line-height: 13px;
    738         display: block;
     736        line-height: 18px;
     737        padding: 3px 4px;
    739738}
    740739
    741740#adminmenu .wp-submenu a {
    742         margin: 0 0 0 12px;
     741        margin: 0;
     742        padding-left: 12px;
    743743}
    744744
    745745#adminmenu .wp-menu-separator {
    746746        background-color: transparent;
    747         height: 8px;
     747        height: 6px;
     748        width: 1px;
    748749        padding: 0;
    749750        margin: 0;
    … …  
    752753#adminmenu.folded .wp-submenu {
    753754        position: absolute;
    754         margin: -25px 0 0 30px;
    755         zIndex: 999;
     755        margin: -1px 0 0 30px;
     756        z-index: 999;
    756757        width: 125px;
    757758        border-width: 1px;
    … …  
    759760       
    760761
     762        background-color: #fff;
    761763        border-color: #C6D9E9;
    762764}
    … …  
    767769
    768770#adminmenu.folded .wp-submenu a {
    769         margin: 0 0 0 10px;
     771        padding-left: 10px;
    770772}
    771773
Note: See TracChangeset for help on using the changeset viewer.