Sliding tabs for the nav menu admin UI. second pass. props koopersmith, see #13215.
git-svn-id: https://develop.svn.wordpress.org/trunk@14373 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e20e62c135
commit
80043f2232
File diff suppressed because one or more lines are too long
@ -135,9 +135,9 @@ body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.no-js #menu-management .nav-tabs {
|
||||
#menu-management .nav-tabs {
|
||||
padding-left: 30px;
|
||||
clear: both;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.js #menu-management .nav-tabs {
|
||||
float: left;
|
||||
|
@ -426,18 +426,29 @@ var WPNavMenuHandler = function ($) {
|
||||
}
|
||||
});
|
||||
|
||||
// Find the width of all tabs
|
||||
tabs.each(function(){
|
||||
tabsWidth += $(this).outerWidth(true);
|
||||
});
|
||||
|
||||
// Check if we need the tab manager
|
||||
if( tabsWidth <= fixed.width()
|
||||
- fluid.css('padding-left').slice(0,-2)
|
||||
- fluid.css('padding-right').slice(0,-2) )
|
||||
return;
|
||||
|
||||
// Set up right margin for overflow, unset padding
|
||||
fluid.css({
|
||||
'margin-right' : (-1 * tabsWidth) + 'px',
|
||||
'padding' : 0,
|
||||
});
|
||||
|
||||
// Build tab navigation
|
||||
arrowLeft = $('<div class="nav-tabs-arrow nav-tabs-arrow-left"><a>«</a></div>');
|
||||
arrowRight = $('<div class="nav-tabs-arrow nav-tabs-arrow-right"><a>»</a></div>');
|
||||
// Attach to the document
|
||||
fixed.wrap('<div class="nav-tabs-nav"/>').parent().prepend( arrowLeft ).append( arrowRight );
|
||||
|
||||
// Set up right margin
|
||||
tabs.each(function(){
|
||||
tabsWidth += $(this).outerWidth(true);
|
||||
});
|
||||
fluid.css('margin-right', (-1 * tabsWidth) + 'px');
|
||||
|
||||
// Set the menu tabs
|
||||
resetMenuTabs();
|
||||
// Make sure the tabs reset on resize
|
||||
|
File diff suppressed because one or more lines are too long
@ -393,7 +393,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
) );
|
||||
|
||||
// Custom Navigation
|
||||
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100503' );
|
||||
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100503a' );
|
||||
$scripts->localize( 'nav-menu', 'navMenuL10n', array(
|
||||
'custom' => _x('Custom', 'menu nav item type'),
|
||||
'thickbox' => _x('Edit Menu Item', 'Thickbox Title'),
|
||||
@ -474,7 +474,7 @@ function wp_default_styles( &$styles ) {
|
||||
$styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.2' );
|
||||
$styles->add( 'jcrop', '/wp-includes/js/jcrop/jquery.Jcrop.css', array(), '0.9.8' );
|
||||
$styles->add( 'imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.1' );
|
||||
$styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100503' );
|
||||
$styles->add( 'nav-menu', "/wp-admin/css/nav-menu$suffix.css", array(), '20100503a' );
|
||||
|
||||
foreach ( $rtl_styles as $rtl_style ) {
|
||||
$styles->add_data( $rtl_style, 'rtl', true );
|
||||
|
Loading…
Reference in New Issue
Block a user