WordPress.org

Plugin Directory

Changeset 353954


Ignore:
Timestamp:
03/02/11 00:02:25 (3 years ago)
Author:
ozh
Message:

3.5:
Updated: finished compat with WP 3.1 (added missing icons + proper init hooks used)
Fixed: JS bug introduced with WP 3.1 when resizing menus

Location:
ozh-admin-drop-down-menu/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ozh-admin-drop-down-menu/trunk/inc/adminmenu.css.php

    r272645 r353954  
    248248#oam_menu-tools div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -211px -35px no-repeat;} 
    249249#oam_menu-tools:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -211px -3px no-repeat;} 
     250#oam_menu-update div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -211px -35px no-repeat;} 
     251#oam_menu-update:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -211px -3px no-repeat;} 
    250252#oam_menu-settings div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -241px -35px no-repeat;} 
    251253#oam_menu-settings:hover div.wp-menu-image {background:transparent url(<?php echo $admin; ?>/images/menu.png) -241px -3px no-repeat;} 
  • ozh-admin-drop-down-menu/trunk/inc/core.php

    r350099 r353954  
    312312     
    313313    $wp_ozh_adminmenu = array_merge($defaults, $wp_ozh_adminmenu); 
     314     
    314315    // Cannot have wpicons == 0 && compact == 1 
    315316    if ($wp_ozh_adminmenu['compact'] == 1) 
  • ozh-admin-drop-down-menu/trunk/inc/icons.php

    r350099 r353954  
    7777        'options-permalink.php' => 'link_edit', 
    7878 
    79 /* Network Admin */ 
     79/* Network Admin, missing icons only */ 
    8080 
    81     /* TODO */ 
     81    /* Sites */ 
     82        'sites.php' => 'world_link', 
     83        'site-new.php' => 'world_edit', 
     84     
     85    /* Settings */ 
     86        'settings.php' => 'wrench_orange', 
     87        'setup.php' => 'computer_edit', 
     88     
     89    /* Update */ 
     90        'upgrade.php' => 'lightning_go', 
    8291 
    83     /* Super Admin */ 
    84         'ms-admin.php' => 'tux', 
    85         'ms-sites.php' => 'world_link', 
    86         'ms-users.php' => 'user_go', 
    87         'ms-themes.php' => 'layers', 
    88         'ms-options.php' => 'computer_edit', 
    89         'ms-upgrade-network.php' => 'lightning_go', 
    9092); 
    9193 
  • ozh-admin-drop-down-menu/trunk/inc/js/adminmenu.js

    r253071 r353954  
    3737                jQuery('#'+target+' ul').css('min-width', parentwidth+'px'); 
    3838                // Now check if we need to split in columns 
    39                 var menulength = jQuery('#'+target+' ul li').length; 
     39                var menulength = jQuery('#'+target+' ul li.ozhmenu_sublevel').length; 
    4040                if (menulength > oam_toomanypluygins) { 
    4141                    var maxw = 0; 
    4242                    // float every item to the left and get the biggest size 
    43                     jQuery('#'+target+' ul li').each(function(){ 
     43                    jQuery('#'+target+' ul li.ozhmenu_sublevel').each(function(){ 
    4444                        var width = parseInt(jQuery(this).css('width')) || '180'; 
     45                        console.log( width ); 
    4546                        maxw = Math.max( width, maxw ); 
    46                         jQuery(this).css('float', 'left'); 
    4747                    }); 
    4848                    // Resize the whole submenu 
    49                     if (maxw) { 
     49                    if ( maxw ) { 
    5050                        var cols = parseInt(menulength / oam_toomanypluygins)+1; 
    51                         jQuery('#'+target+' ul li').each(function(){ 
    52                             jQuery(this).css('width', maxw+'px'); 
     51                        jQuery('#'+target+' ul li.ozhmenu_sublevel').each(function(){ 
     52                            jQuery(this).css('width', maxw+'px').css('float', 'left'); 
    5353                        }); 
    5454                        // Give the submenu a width = (max item width)*number of columns + 5px between each column 
  • ozh-admin-drop-down-menu/trunk/wp_ozh_adminmenu.php

    r350234 r353954  
    44Plugin URI: http://planetozh.com/blog/my-projects/wordpress-admin-menu-drop-down-css/ 
    55Description: All admin links available in a neat horizontal drop down menu. Saves lots of screen real estate! <strong>For WordPress 3.0+</strong> 
    6 Version: 3.4.99 
     6Version: 3.5 
    77Author: Ozh 
    88Author URI: http://ozh.org/ 
     
    103103 * 3.4.99:    Updated: Quick compatibility with WP 3.1 (missing icons) 
    104104              Fixed: (some?) notices when debug mode on 
     105 * 3.5:       Updated: finished compat with WP 3.1 (added missing icons + proper init hooks used) 
     106              Fixed: JS bug introduced with WP 3.1 when resizing menus 
    105107 */ 
    106108 
     
    109111    global $wp_ozh_adminmenu; 
    110112    require_once(dirname(__FILE__).'/inc/core.php'); 
    111     add_action('admin_menu', 'wp_ozh_adminmenu_init', -1000);   // Init plugin defaults or read options 
     113    add_action('admin_init', 'wp_ozh_adminmenu_init', -1000);   // Init plugin defaults or read options 
    112114    add_action('admin_menu', 'wp_ozh_adminmenu_add_page', -999); // Add option page 
    113115    add_action('admin_head', 'wp_ozh_adminmenu_head', 999); // Insert CSS & JS in <head> 
     
    118120} 
    119121 
    120 // Make sure it's WP 3.0+ only 
     122// Make sure it's WP 3.1+ only 
    121123function wp_ozh_adminmenu_check(){ 
    122124    global $wp_version; 
Note: See TracChangeset for help on using the changeset viewer.