Save menu sections' opened/closed state separately, fixes #10366
git-svn-id: http://svn.automattic.com/wordpress/trunk@12347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
944bdb29a6
commit
b52703b322
|
@ -12,9 +12,9 @@ adminMenu = {
|
||||||
else
|
else
|
||||||
t.hide();
|
t.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.favorites();
|
this.favorites();
|
||||||
|
|
||||||
$('.separator', menu).click(function(){
|
$('.separator', menu).click(function(){
|
||||||
if ( $('body').hasClass('folded') ) {
|
if ( $('body').hasClass('folded') ) {
|
||||||
adminMenu.fold(1);
|
adminMenu.fold(1);
|
||||||
|
@ -28,7 +28,7 @@ adminMenu = {
|
||||||
|
|
||||||
if ( $('body').hasClass('folded') )
|
if ( $('body').hasClass('folded') )
|
||||||
this.fold();
|
this.fold();
|
||||||
|
|
||||||
this.restoreMenuState();
|
this.restoreMenuState();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -46,14 +46,18 @@ adminMenu = {
|
||||||
},
|
},
|
||||||
|
|
||||||
toggle : function(el) {
|
toggle : function(el) {
|
||||||
el['slideToggle'](150, function() {
|
var id = el.slideToggle(150, function() {
|
||||||
el.css('display','');
|
el.css('display','');
|
||||||
}).parent().toggleClass( 'wp-menu-open' );
|
}).parent().toggleClass( 'wp-menu-open' ).attr('id');
|
||||||
|
|
||||||
$('li.wp-has-submenu', '#adminmenu').each(function(i, e) {
|
if ( id ) {
|
||||||
var v = $(e).hasClass('wp-menu-open') ? 'o' : 'c';
|
$('li.wp-has-submenu', '#adminmenu').each(function(i, e) {
|
||||||
setUserSetting( 'm'+i, v );
|
if ( id == e.id ) {
|
||||||
});
|
var v = $(e).hasClass('wp-menu-open') ? 'o' : 'c';
|
||||||
|
setUserSetting( 'm'+i, v );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
@ -240,7 +244,7 @@ jQuery(document).ready( function($) {
|
||||||
var c = $(this).attr('checked'),
|
var c = $(this).attr('checked'),
|
||||||
kbtoggle = 'undefined' == typeof toggleWithKeyboard ? false : toggleWithKeyboard,
|
kbtoggle = 'undefined' == typeof toggleWithKeyboard ? false : toggleWithKeyboard,
|
||||||
toggle = e.shiftKey || kbtoggle;
|
toggle = e.shiftKey || kbtoggle;
|
||||||
|
|
||||||
$(this).closest( 'table' ).children( 'tbody' ).filter(':visible')
|
$(this).closest( 'table' ).children( 'tbody' ).filter(':visible')
|
||||||
.children().children('.check-column').find(':checkbox')
|
.children().children('.check-column').find(':checkbox')
|
||||||
.attr('checked', function() {
|
.attr('checked', function() {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -61,7 +61,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
|
|
||||||
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' );
|
$scripts->add( 'utils', "/wp-admin/js/utils$suffix.js", false, '20090102' );
|
||||||
|
|
||||||
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20091207' );
|
$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), '20091208' );
|
||||||
$scripts->add_data( 'common', 'group', 1 );
|
$scripts->add_data( 'common', 'group', 1 );
|
||||||
$scripts->localize( 'common', 'commonL10n', array(
|
$scripts->localize( 'common', 'commonL10n', array(
|
||||||
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),
|
'warnDelete' => __("You are about to permanently delete the selected items.\n 'Cancel' to stop, 'OK' to delete."),
|
||||||
|
|
Loading…
Reference in New Issue