Ticket #10646: 10646-4.patch
File 10646-4.patch, 3.5 KB (added by , 14 years ago) |
---|
-
wp-admin/css/wp-admin.dev.css
854 854 } 855 855 856 856 .folded #adminmenu div.wp-submenu-head, 857 .folded #adminmenu li.wp-has-submenu div.sub-open {857 body.js.folded #adminmenu li.wp-has-submenu div.sub-open { 858 858 display: block; 859 859 } 860 860 861 861 .folded #adminmenu a.menu-top, 862 862 .folded #adminmenu .wp-submenu, 863 .folded #adminmenu li.wp-menu-open .wp-submenu, 863 .folded #adminmenu li.wp-has-current-submenu .wp-submenu, 864 body.no-js.folded #adminmenu .open-if-no-js .wp-submenu, 865 body.js.folded #adminmenu li.wp-menu-open .wp-submenu, 864 866 .folded #adminmenu div.wp-menu-toggle { 865 867 display: none; 866 868 } 867 869 868 #adminmenu li.wp-menu-open .wp-submenu, 869 .no-js #adminmenu .open-if-no-js .wp-submenu { 870 body.js #adminmenu li.wp-menu-open .wp-submenu, 871 body.no-js #adminmenu .open-if-no-js .wp-submenu, 872 body.no-js #adminmenu li.wp-has-current-submenu .wp-submenu { 870 873 display: block; 871 874 } 872 875 … … 1048 1051 cursor: default; 1049 1052 } 1050 1053 1054 body.no-js #adminmenu .wp-menu-toggle { 1055 display:none; 1056 } 1057 1051 1058 #adminmenu li.wp-has-current-submenu ul { 1052 1059 border-bottom-width: 1px; 1053 1060 border-bottom-style: solid; -
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 ( ! empty( $submenu[ $item[2] ] ) && isset( $user_settings[ 'm' . $menu_setting_increment ] ) && 'o' == $user_settings[ 'm' . $menu_setting_increment ] ) { 62 $class[] = 'wp-menu-open'; 56 63 } 57 64 58 65 if ( ! empty($item[4]) ) -
wp-admin/js/common.dev.js
28 28 29 29 if ( $('body').hasClass('folded') ) 30 30 this.fold(); 31 32 this.restoreMenuState();33 31 }, 34 32 35 33 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 }); 34 // (perhaps) needed for back-compat 46 35 }, 47 36 48 37 toggle : function(el) { 49 38 el.slideToggle(150, function() { 50 var id = el. parent().toggleClass( 'wp-menu-open' ).attr('id');39 var id = el.removeAttr('style').parent().toggleClass( 'wp-menu-open' ).attr('id'); 51 40 if ( id ) { 52 41 $('li.wp-has-submenu', '#adminmenu').each(function(i, e) { 53 42 if ( id == e.id ) {