mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 22:27:04 +00:00
Auto-fold the admin menu with CSS, fixes #20642
git-svn-id: https://develop.svn.wordpress.org/trunk@20749 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -160,7 +160,7 @@ $('.contextual-help-tabs').delegate('a', 'click focus', function(e) {
|
||||
|
||||
$(document).ready( function() {
|
||||
var lastClicked = false, checks, first, last, checked, menu = $('#adminmenu'),
|
||||
pageInput = $('input.current-page'), currentPage = pageInput.val(), folded, refresh;
|
||||
pageInput = $('input.current-page'), currentPage = pageInput.val(), refresh;
|
||||
|
||||
// admin menu
|
||||
refresh = function(i, el){ // force the browser to refresh the tabbing index
|
||||
@@ -354,28 +354,6 @@ $(document).ready( function() {
|
||||
});
|
||||
}
|
||||
|
||||
// auto-fold the menu when screen is under 900px
|
||||
$(window).bind('resize.autofold', function(){
|
||||
if ( getUserSetting('mfold') == 'f' )
|
||||
return;
|
||||
|
||||
var width = $(window).width();
|
||||
|
||||
// fold admin menu
|
||||
if ( width <= 900 ) {
|
||||
if ( !folded ) {
|
||||
$(document.body).addClass('folded');
|
||||
folded = true;
|
||||
}
|
||||
} else {
|
||||
if ( folded ) {
|
||||
$(document.body).removeClass('folded');
|
||||
folded = false;
|
||||
}
|
||||
}
|
||||
|
||||
}).triggerHandler('resize');
|
||||
|
||||
});
|
||||
|
||||
// internal use
|
||||
|
||||
Reference in New Issue
Block a user