| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 /* $Id: admin_menu.js,v 1.7.2.9 2010/02/20 23:53:18 sun Exp $ */ 2 3 $(document).ready(function() { 4 if (!$('#admin-menu').length) { 5 return; 6 } 7 8 // Apply margin-top if enabled; directly applying marginTop doesn't work in IE. 9 if (Drupal && Drupal.settings && Drupal.settings.admin_menu) { 10 if (Drupal.settings.admin_menu.margin_top) { 11 $('body').addClass('admin-menu'); 12 } 13 if (Drupal.settings.admin_menu.position_fixed) { 14 $('#admin-menu').css('position', 'fixed'); 15 } 16 // Move page tabs into administration menu. 17 if (Drupal.settings.admin_menu.tweak_tabs) { 18 $('ul.tabs.primary li').each(function() { 19 $(this).addClass('admin-menu-tab').appendTo('#admin-menu > ul'); 20 }); 21 $('ul.tabs.secondary').appendTo('#admin-menu > ul > li.admin-menu-tab.active').removeClass('secondary'); 22 } 23 // Collapse fieldsets on Modules page. For why multiple selectors see #111719. 24 if (Drupal.settings.admin_menu.tweak_modules) { 25 $('#system-modules fieldset:not(.collapsed), #system-modules-1 fieldset:not(.collapsed)').addClass('collapsed'); 26 } 27 } 28 29 // Hover emulation for IE 6. 30 if ($.browser.msie && parseInt(jQuery.browser.version) == 6) { 31 $('#admin-menu li').hover(function() { 32 $(this).addClass('iehover'); 33 }, function() { 34 $(this).removeClass('iehover'); 35 }); 36 } 37 38 // Delayed mouseout. 39 $('#admin-menu li').hover(function() { 40 // Stop the timer. 41 clearTimeout(this.sfTimer); 42 // Display child lists. 43 $('> ul', this).css({left: 'auto', display: 'block'}) 44 // Immediately hide nephew lists. 45 .parent().siblings('li').children('ul').css({left: '-999em', display: 'none'}); 46 }, function() { 47 // Start the timer. 48 var uls = $('> ul', this); 49 this.sfTimer = setTimeout(function() { 50 uls.css({left: '-999em', display: 'none'}); 51 }, 400); 52 }); 53 });
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |