Ticket #10646: 10646.diff
File 10646.diff, 2.9 KB (added by , 14 years ago) |
---|
-
wp-admin/menu-header.php
36 36 function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { 37 37 global $self, $parent_file, $submenu_file, $plugin_page, $pagenow, $typenow; 38 38 39 $menu_setting_increment = -1; 40 $user_settings = get_all_user_settings(); 41 39 42 $first = true; 40 43 // 0 = name, 1 = capability, 2 = file, 3 = class, 4 = id, 5 = icon src 41 44 foreach ( $menu as $key => $item ) { … … 45 48 $class[] = 'wp-first-item'; 46 49 $first = false; 47 50 } 48 if ( !empty($submenu[$item[2]]) ) 51 if ( !empty($submenu[$item[2]]) ) { 49 52 $class[] = 'wp-has-submenu'; 53 $menu_setting_increment++; 54 } 50 55 51 56 if ( ( $parent_file && $item[2] == $parent_file ) || ( empty($typenow) && $self == $item[2] ) ) { 52 57 if ( !empty($submenu[$item[2]]) ) 53 58 $class[] = 'wp-has-current-submenu wp-menu-open'; 54 59 else 55 60 $class[] = 'current'; 61 } elseif ( isset( $user_settings[ 'm' . $menu_setting_increment ] ) && 'o' == $user_settings[ 'm' . $menu_setting_increment ] ) { 62 $class[] = 'wp-menu-open-if-js'; 56 63 } 57 64 58 65 if ( ! empty($item[4]) ) -
wp-admin/js/common.dev.js
33 33 }, 34 34 35 35 restoreMenuState : function() { 36 $('li.wp-has-submenu', '#adminmenu').each(function(i, e) { 37 var v = getUserSetting( 'm'+i ); 38 if ( $(e).hasClass('wp-has-current-submenu') ) 39 return true; // leave the current parent open 40 41 if ( 'o' == v ) 42 $(e).addClass('wp-menu-open'); 43 else if ( 'c' == v ) 44 $(e).removeClass('wp-menu-open'); 45 }); 36 $('#adminmenu').find('li.wp-menu-open-if-js') 37 .addClass('wp-menu-open') 38 .removeClass('wp-menu-open-if-js'); 46 39 }, 47 40 48 41 toggle : function(el) { -
wp-admin/css/wp-admin.dev.css
861 861 .folded #adminmenu a.menu-top, 862 862 .folded #adminmenu .wp-submenu, 863 863 .folded #adminmenu li.wp-menu-open .wp-submenu, 864 body.js .folded #adminmenu li.wp-menu-open-if-js .wp-submenu, 864 865 .folded #adminmenu div.wp-menu-toggle { 865 866 display: none; 866 867 } 867 868 868 869 #adminmenu li.wp-menu-open .wp-submenu, 869 .no-js #adminmenu .open-if-no-js .wp-submenu { 870 .no-js #adminmenu .open-if-no-js .wp-submenu, 871 body.js #adminmenu .wp-menu-open-if-js .wp-submenu { 870 872 display: block; 871 873 } 872 874 … … 954 956 border-bottom-left-radius: 6px; 955 957 } 956 958 957 #adminmenu li.wp-menu-open a.menu-top-last { 959 #adminmenu li.wp-menu-open a.menu-top-last, 960 body.js #adminmenu li.wp-menu-open-if-js a.menu-top-last { 958 961 border-bottom: 0 none; 959 962 -moz-border-radius-bottomright: 0; 960 963 -moz-border-radius-bottomleft: 0;