* Moved a few things around in the settings screen.
* Fixed a potential problem with themes.
This commit is contained in:
parent
1e627725ac
commit
f3409f422e
@ -50,6 +50,54 @@ function simplemenu_admin_settings() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// standard settings
|
||||||
|
$form['settings'] = array(
|
||||||
|
'#type' => 'fieldset',
|
||||||
|
'#title' => t('Advanced settings'),
|
||||||
|
'#collapsible' => TRUE,
|
||||||
|
'#collapsed' => TRUE,
|
||||||
|
);
|
||||||
|
|
||||||
|
$form['settings']['simplemenu_hide_delay'] = array(
|
||||||
|
'#type' => 'textfield',
|
||||||
|
'#title' => t('Hide delay'),
|
||||||
|
'#size' => 4,
|
||||||
|
'#default_value' => variable_get('simplemenu_hide_delay', 800),
|
||||||
|
'#description' => t('How long (in milliseconds) should a menu still appear after losing focus.'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$form['settings']['simplemenu_scroll_effect'] = array(
|
||||||
|
'#type' => 'radios',
|
||||||
|
'#title' => t('Scroll effect'),
|
||||||
|
'#options' => array(
|
||||||
|
'scroll' => t('Scroll with the page'),
|
||||||
|
'fixed' => t('Fixed'),
|
||||||
|
),
|
||||||
|
'#default_value' => variable_get('simplemenu_scroll_effect', 'scroll'),
|
||||||
|
'#description' => t('Whether the menu scrolls with the page or stays at the top or bottom (this should only be used when the menu is attached to the <body> tag.)'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$form['settings']['simplemenu_effect'] = array(
|
||||||
|
'#type' => 'radios',
|
||||||
|
'#title' => t('Show effect'),
|
||||||
|
'#options' => array(
|
||||||
|
'opacity' => t('Fade'),
|
||||||
|
'height' => t('Slide'),
|
||||||
|
'none' => t('None')
|
||||||
|
),
|
||||||
|
'#default_value' => variable_get('simplemenu_effect', 'opacity'),
|
||||||
|
'#description' => t('The effect used when displaying a menu.'),
|
||||||
|
);
|
||||||
|
|
||||||
|
$form['settings']['simplemenu_effect_speed'] = array(
|
||||||
|
'#type' => 'radios',
|
||||||
|
'#title' => t('Show speed'),
|
||||||
|
'#options' => array('slow' => t('Slow'), 'medium' => t('Medium'), 'fast' => t('Fast')),
|
||||||
|
'#default_value' => variable_get('simplemenu_effect_speed', 'fast'),
|
||||||
|
'#description' => t('The speed of the effect, not used when "none" is set to show effect.'),
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// advanced options
|
// advanced options
|
||||||
$form['advanced'] = array(
|
$form['advanced'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
@ -97,34 +145,6 @@ function simplemenu_admin_settings() {
|
|||||||
'#description' => t('Select which themes to <strong>not</strong> display the menu. Use this when you have a theme that displays its own admin navigation.'),
|
'#description' => t('Select which themes to <strong>not</strong> display the menu. Use this when you have a theme that displays its own admin navigation.'),
|
||||||
);
|
);
|
||||||
|
|
||||||
$form['advanced']['simplemenu_hide_delay'] = array(
|
|
||||||
'#type' => 'textfield',
|
|
||||||
'#title' => t('Hide delay'),
|
|
||||||
'#size' => 4,
|
|
||||||
'#default_value' => variable_get('simplemenu_hide_delay', 800),
|
|
||||||
'#description' => t('How long (in milliseconds) should a menu still appear after losing focus.'),
|
|
||||||
);
|
|
||||||
|
|
||||||
$form['advanced']['simplemenu_effect'] = array(
|
|
||||||
'#type' => 'radios',
|
|
||||||
'#title' => t('Show effect'),
|
|
||||||
'#options' => array(
|
|
||||||
'opacity' => t('Fade'),
|
|
||||||
'height' => t('Slide'),
|
|
||||||
'none' => t('None')
|
|
||||||
),
|
|
||||||
'#default_value' => variable_get('simplemenu_effect', 'opacity'),
|
|
||||||
'#description' => t('The effect used when displaying a menu.'),
|
|
||||||
);
|
|
||||||
|
|
||||||
$form['advanced']['simplemenu_effect_speed'] = array(
|
|
||||||
'#type' => 'radios',
|
|
||||||
'#title' => t('Show speed'),
|
|
||||||
'#options' => array('slow' => t('Slow'), 'medium' => t('Medium'), 'fast' => t('Fast')),
|
|
||||||
'#default_value' => variable_get('simplemenu_effect_speed', 'fast'),
|
|
||||||
'#description' => t('The speed of the effect, not used when "none" is set to show effect.'),
|
|
||||||
);
|
|
||||||
|
|
||||||
$form['advanced']['simplemenu_detect_popop'] = array(
|
$form['advanced']['simplemenu_detect_popop'] = array(
|
||||||
'#type' => 'checkbox',
|
'#type' => 'checkbox',
|
||||||
'#title' => t('Detect pop-up windows'),
|
'#title' => t('Detect pop-up windows'),
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
#simplemenu {
|
#simplemenu {
|
||||||
line-height: 1.0;
|
line-height: 1.0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
/*position: fixed;
|
||||||
|
top: 0;*/
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,10 +50,11 @@ function simplemenu_init() {
|
|||||||
if (user_access('view simplemenu') && simplemenu_enabled()) {
|
if (user_access('view simplemenu') && simplemenu_enabled()) {
|
||||||
$path = drupal_get_path('module', 'simplemenu');
|
$path = drupal_get_path('module', 'simplemenu');
|
||||||
drupal_add_css($path .'/simplemenu.css');
|
drupal_add_css($path .'/simplemenu.css');
|
||||||
$simplemenu_theme = variable_get('simplemenu_theme', 'original');
|
|
||||||
|
|
||||||
if ($simplemenu_theme != 'custom') {
|
$simplemenu_theme = variable_get('simplemenu_theme', 'original');
|
||||||
drupal_add_css($path .'/themes/'. $simplemenu_theme .'/'. $simplemenu_theme .'.css');
|
$theme_file = $path .'/themes/'. $simplemenu_theme .'/'. $simplemenu_theme .'.css';
|
||||||
|
if (is_file($theme_file)) {
|
||||||
|
drupal_add_css($theme_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
$settings = array(
|
$settings = array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user