Index: CHANGELOG.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/CHANGELOG.txt,v retrieving revision 1.33.2.29 diff -u -p -r1.33.2.29 CHANGELOG.txt --- CHANGELOG.txt 2 Nov 2008 17:48:26 -0000 1.33.2.29 +++ CHANGELOG.txt 2 Nov 2008 17:59:14 -0000 @@ -6,6 +6,7 @@ Admin Menu x.x-x.x, xxxx-xx-xx Admin Menu 6.x-1.x, xxxx-xx-xx ------------------------------ +#310423 by sun: Added optional position: fixed configuration setting. #292657 by smk-ka: Improved rendering performance. #234149 by yhager, sun: Fixed RTL support for IE. #323726 by danez1972: Added Spanish translation. Index: admin_menu.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.inc,v retrieving revision 1.11.2.12 diff -u -p -r1.11.2.12 admin_menu.inc --- admin_menu.inc 23 Oct 2008 11:11:10 -0000 1.11.2.12 +++ admin_menu.inc 2 Nov 2008 17:58:37 -0000 @@ -356,6 +356,12 @@ function admin_menu_theme_settings() { '#default_value' => variable_get('admin_menu_margin_top', 1), '#description' => t('If enabled, the output of this site will be shifted for approx. 20 pixels from the top of the viewport to make room for the Administration Menu. If this setting is disabled, some absolute or fixed positioned page elements at the top of the viewport may be covered by Administration Menu.'), ); + $form['admin_menu_position_fixed'] = array( + '#type' => 'checkbox', + '#title' => t('Use fixed instead of absolute positioning'), + '#default_value' => variable_get('admin_menu_position_fixed', 0), + '#description' => t('If enabled, the administration menu will always stay at the top of the browser viewport, even if you scroll down the page.') .'
'. t('Note: In some browsers this setting might cause malformed page contents, a disappearing cursor and not editable select lists in forms. If such effects occur, this setting should be disabled.'), + ); $form['tweaks'] = array( '#type' => 'fieldset', '#title' => t('Drupal Administration Tweaks'), Index: admin_menu.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.js,v retrieving revision 1.7.2.4 diff -u -p -r1.7.2.4 admin_menu.js --- admin_menu.js 8 Sep 2008 23:02:26 -0000 1.7.2.4 +++ admin_menu.js 2 Nov 2008 17:58:31 -0000 @@ -2,8 +2,13 @@ $(document).ready(function() { // Apply margin-top if enabled; directly applying marginTop doesn't work in IE. - if ($('#admin-menu').size() && Drupal.settings.admin_menu.margin_top) { - $('body').addClass('admin-menu'); + if ($('#admin-menu').size()) { + if (Drupal.settings.admin_menu.margin_top) { + $('body').addClass('admin-menu'); + } + if (Drupal.settings.admin_menu.position_fixed) { + $('#admin-menu').css('position', 'fixed'); + } } // Collapse fieldsets on Modules page. For why multiple selectors see #111719. Index: admin_menu.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.module,v retrieving revision 1.43.2.9 diff -u -p -r1.43.2.9 admin_menu.module --- admin_menu.module 2 Nov 2008 17:48:26 -0000 1.43.2.9 +++ admin_menu.module 2 Nov 2008 17:58:26 -0000 @@ -99,7 +99,12 @@ function admin_menu_init() { // Performance: Defer execution. drupal_add_js($path .'/admin_menu.js', 'module', 'header', TRUE); - drupal_add_js(array('admin_menu' => array('margin_top' => variable_get('admin_menu_margin_top', 1))), 'setting'); + if ($setting = variable_get('admin_menu_margin_top', 1)) { + drupal_add_js(array('admin_menu' => array('margin_top' => $setting)), 'setting'); + } + if ($setting = variable_get('admin_menu_position_fixed', 0)) { + drupal_add_js(array('admin_menu' => array('position_fixed' => $setting)), 'setting'); + } if ($_GET['q'] == 'admin/build/modules') { drupal_add_js(array('admin_menu' => array('tweak_modules' => variable_get('admin_menu_tweak_modules', 0))), 'setting'); }