Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Side folding for the menu, first run, still needs colours, styling an…
…d perhaps different icons. git-svn-id: http://svn.automattic.com/wordpress/trunk@9154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Loading branch information
azaozz
committed
Oct 14, 2008
1 parent
b5bdfd4
commit 7a2fb7d
Showing
23 changed files
with
281 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
(function($){ | ||
|
||
adminMenu = { | ||
|
||
init : function() { | ||
$('#adminmenu a.wp-has-submenu').click( function() { return adminMenu.toggle( $(this).siblings('ul') ); } ); | ||
|
||
var li = document.createElement('li'); // temp | ||
$(li).attr('id', 'menu-toggle').html('««').click(function(){ | ||
if ( 'o' == getUserSetting( 'mfold' ) ) { | ||
adminMenu.fold(); | ||
setUserSetting( 'mfold', 'f' ); | ||
$(this).html('»»'); | ||
} else { | ||
adminMenu.fold(1); | ||
setUserSetting( 'mfold', 'o' ); | ||
$(this).html('««'); | ||
} | ||
}); | ||
$('#adminmenu').prepend(li); | ||
|
||
if ( 'o' == getUserSetting( 'mfold' ) ) { | ||
$('#adminmenu li.wp-has-submenu').each(function(i, e) { | ||
var v = getUserSetting( 'm'+i ); | ||
if ( $(e).hasClass('wp-has-current-submenu') ) return true; // leave the current parent open | ||
|
||
if ( 'o' == v ) $(e).addClass('wp-menu-open'); | ||
else if ( 'c' == v ) $(e).removeClass('wp-menu-open'); | ||
}); | ||
} else { | ||
this.fold(); | ||
$('#menu-toggle').html('»»'); | ||
} | ||
}, | ||
|
||
toggle : function(ul, effect) { | ||
if ( !effect ) | ||
effect = 'slideToggle'; | ||
|
||
ul[effect](150).parent().toggleClass( 'wp-menu-open' ); | ||
|
||
$('#adminmenu li.wp-has-submenu').each(function(i, e) { | ||
var v = $(e).hasClass('wp-menu-open') ? 'o' : 'c'; | ||
setUserSetting( 'm'+i, v ); | ||
}); | ||
|
||
return false; | ||
}, | ||
|
||
fold : function(off) { | ||
if (off) { | ||
$('#wpbody-content').css('marginLeft', '140px'); | ||
$('#adminmenu').removeClass('folded'); | ||
$('#adminmenu li.wp-has-submenu').unbind().css('width', '125px'); | ||
$('#adminmenu a.wp-has-submenu').unbind().click( function() { return adminMenu.toggle( $(this).siblings('ul') ); } ); | ||
} else { | ||
$('#adminmenu').addClass('folded'); | ||
$('#adminmenu .wp-submenu').hide(); | ||
$('#wpbody-content').css('marginLeft', '38px'); | ||
$('#adminmenu a.wp-has-submenu').unbind().click(function(){return false;}); | ||
$('#adminmenu li.wp-has-submenu').css({'width':'24px'}).hoverIntent({ | ||
over: function(){ $(this).find('.wp-submenu').show(100); }, | ||
out: function(){ $(this).find('.wp-submenu').hide(100); }, | ||
timeout: 150, | ||
sensitivity: 6, | ||
interval: 100 | ||
}); | ||
} | ||
} | ||
}; | ||
|
||
$(document).ready(function(){adminMenu.init();}); | ||
})(jQuery); | ||
|
||
jQuery( function($) { | ||
$('#favorite-actions').bind( 'mouseenter', function(){$('#favorite-action').removeClass('slideUp').addClass('slideDown'); setTimeout(function(){if ( $('#favorite-action').hasClass('slideDown') ) { $('#favorite-action').slideDown('fast') }}, 300) } ); | ||
$('#favorite-actions').bind( 'mouseleave', function(){$('#favorite-action').removeClass('slideDown').addClass('slideUp'); setTimeout(function(){if ( $('#favorite-action').hasClass('slideUp') ) { $('#favorite-action').slideUp('fast') }}, 500) } ); | ||
// $('#dashmenu li.wp-has-submenu').bind( 'mouseenter mouseleave', function() { return adminMenu.toggle( $(this).children('ul'), 'toggle' ); } ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.