simplemenu become editmenu
Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
parent
60518fcfc2
commit
6a13522171
14
README.txt
14
README.txt
@ -2,7 +2,7 @@
|
||||
|
||||
--- README -------------------------------------------------------------
|
||||
|
||||
SimpleMenu, Version 6.0
|
||||
EditMenu, Version 6.0
|
||||
|
||||
Written by Ted Serbinski, aka, m3avrck
|
||||
hello@tedserbinski.com
|
||||
@ -16,13 +16,13 @@ jQuery Superfish: http://users.tpg.com.au/j_birch/plugins/superfish/
|
||||
|
||||
--- INSTALLATION --------------------------------------------------------
|
||||
|
||||
1. Place simplemenu folder in your modules directory
|
||||
1. Place editmenu folder in your modules directory
|
||||
|
||||
2. Enable "SimpleMenu" under administer > site building > modules
|
||||
2. Enable "EditMenu" under administer > site building > modules
|
||||
|
||||
3. Enable access to "view simplemenu" under administer > user management > access control
|
||||
3. Enable access to "view editmenu" under administer > user management > access control
|
||||
|
||||
4. Configure menu to use under administer > site configuration > simplemenu
|
||||
4. Configure menu to use under administer > site configuration > editmenu
|
||||
|
||||
|
||||
|
||||
@ -53,10 +53,10 @@ jQuery Superfish: http://users.tpg.com.au/j_birch/plugins/superfish/
|
||||
- upgrade to bgIframe 2.1.1 (for IE6 compatibility with forms)
|
||||
- #136478 - fix Opera compatibility
|
||||
- remove RTL option; this conflicts with other changes and is properly implemented in Drupal 6
|
||||
- new option to select which theme to style SimpleMenu with, or provide a custom one
|
||||
- new option to select which theme to style EditMenu with, or provide a custom one
|
||||
- #184051 - don't hardcode CSS, add class to body
|
||||
- #180106 - fix missing translatable strings
|
||||
- #144742 - don't show annoying anchor titles
|
||||
- remove dependency on menu module, now works with menu module off
|
||||
- new black & blue theme, design by Jeremy Caldwell (http://nerdliness.com/article/2007/11/01/simplemenu-module-customizations)
|
||||
- new black & blue theme, design by Jeremy Caldwell (http://nerdliness.com/article/2007/11/01/editmenu-module-customizations)
|
||||
- alter height of menu and rollover to fix gaps
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Settings of the simplemenu.
|
||||
* Settings of the editmenu.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SimpleMenu settings page.
|
||||
* EditMenu settings page.
|
||||
*/
|
||||
function simplemenu_admin_settings() {
|
||||
$simplemenu_path = drupal_get_path('module', 'simplemenu');
|
||||
function editmenu_admin_settings() {
|
||||
$editmenu_path = drupal_get_path('module', 'editmenu');
|
||||
|
||||
// menu selection
|
||||
$form['default_menu'] = array(
|
||||
@ -20,27 +20,27 @@ function simplemenu_admin_settings() {
|
||||
);
|
||||
|
||||
if (module_exists('menu')) {
|
||||
$form['default_menu']['simplemenu_menu'] = array(
|
||||
$form['default_menu']['editmenu_menu'] = array(
|
||||
'#type' => 'select',
|
||||
'#title' => t('Menu'),
|
||||
'#options' => menu_parent_options(menu_get_menus(), array('mlid' => 0)), // return complete tree
|
||||
'#default_value' => variable_get('simplemenu_menu', 'management:0'),
|
||||
'#default_value' => variable_get('editmenu_menu', 'management:0'),
|
||||
'#description' => t('Select the menu to display.'),
|
||||
'#weight' => -1,
|
||||
);
|
||||
}
|
||||
|
||||
$themes = file_scan_directory($simplemenu_path . '/themes', '%.*%',
|
||||
$themes = file_scan_directory($editmenu_path . '/themes', '%.*%',
|
||||
array('key' => 'filename', 'recurse' => FALSE));
|
||||
$theme_selection = array('custom' => 'custom');
|
||||
foreach ($themes as $name => $ignore) {
|
||||
$theme_selection[$name] = $name;
|
||||
}
|
||||
$form['default_menu']['simplemenu_theme'] = array(
|
||||
$form['default_menu']['editmenu_theme'] = array(
|
||||
'#type' => 'select',
|
||||
'#title' => t('Theme'),
|
||||
'#options' => $theme_selection,
|
||||
'#default_value' => variable_get('simplemenu_theme', 'original'),
|
||||
'#default_value' => variable_get('editmenu_theme', 'original'),
|
||||
'#description' => t('Select which theme to use. If you specify custom, you need to define CSS in your theme.'),
|
||||
);
|
||||
|
||||
@ -48,7 +48,7 @@ function simplemenu_admin_settings() {
|
||||
// standard settings
|
||||
$form['settings'] = array(
|
||||
'#type' => 'fieldset',
|
||||
'#title' => t('Simplemenu settings'),
|
||||
'#title' => t('Editmenu settings'),
|
||||
'#collapsible' => TRUE,
|
||||
'#collapsed' => TRUE,
|
||||
);
|
||||
@ -58,25 +58,25 @@ function simplemenu_admin_settings() {
|
||||
'top' => t('Fix at the Top (Forces Body, Prepend)'),
|
||||
//'bottom' => t('Fix at the Bottom (Forces Body, Append)'), -- this requires another CSS... hmmm...
|
||||
);
|
||||
$form['settings']['simplemenu_fix'] = array(
|
||||
$form['settings']['editmenu_fix'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Scroll or fix menu'),
|
||||
'#options' => $fix_options,
|
||||
'#default_value' => variable_get('simplemenu_fix', 'scroll'),
|
||||
'#default_value' => variable_get('editmenu_fix', 'scroll'),
|
||||
'#description' => t('Select the mode to use. The default is to let the menu scroll with the page.')
|
||||
. '<br /><span style="color: red;">' . t('WARNING') . ':</span> '
|
||||
. t('The At the Top option prevents you from ever seeing the bottom of your drop-down menus when they are too long. In other words, if you have many modules installed, it is not unlikely that some drop down menus will not fit the height of the screen and the last few entries won\'t be accessible via Simplemenu.'),
|
||||
. t('The At the Top option prevents you from ever seeing the bottom of your drop-down menus when they are too long. In other words, if you have many modules installed, it is not unlikely that some drop down menus will not fit the height of the screen and the last few entries won\'t be accessible via Editmenu.'),
|
||||
);
|
||||
|
||||
$form['settings']['simplemenu_hide_delay'] = array(
|
||||
$form['settings']['editmenu_hide_delay'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Hide delay'),
|
||||
'#size' => 4,
|
||||
'#default_value' => variable_get('simplemenu_hide_delay', 800),
|
||||
'#default_value' => variable_get('editmenu_hide_delay', 800),
|
||||
'#description' => t('How long (in milliseconds) should a menu still appear after losing focus.'),
|
||||
);
|
||||
|
||||
$form['settings']['simplemenu_effect'] = array(
|
||||
$form['settings']['editmenu_effect'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Show effect'),
|
||||
'#options' => array(
|
||||
@ -84,15 +84,15 @@ function simplemenu_admin_settings() {
|
||||
'height' => t('Slide'),
|
||||
'none' => t('None')
|
||||
),
|
||||
'#default_value' => variable_get('simplemenu_effect', 'opacity'),
|
||||
'#default_value' => variable_get('editmenu_effect', 'opacity'),
|
||||
'#description' => t('The effect used when displaying a menu.'),
|
||||
);
|
||||
|
||||
$form['settings']['simplemenu_effect_speed'] = array(
|
||||
$form['settings']['editmenu_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'),
|
||||
'#default_value' => variable_get('editmenu_effect_speed', 'fast'),
|
||||
'#description' => t('The speed of the effect, not used when "none" is set to show effect.'),
|
||||
);
|
||||
|
||||
@ -105,69 +105,69 @@ function simplemenu_admin_settings() {
|
||||
'#collapsed' => TRUE,
|
||||
);
|
||||
|
||||
$form['advanced']['simplemenu_uid1'] = array(
|
||||
$form['advanced']['editmenu_uid1'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Show to User ID 1'),
|
||||
'#description' => t('Check this option to enable simplemenu for user 1 (superuser/administration). This is useful if you want to use a different menu (such as admin_menu) for the superuser/admin and simplemenu for others.'),
|
||||
'#default_value' => variable_get('simplemenu_uid1', 1),
|
||||
'#description' => t('Check this option to enable editmenu for user 1 (superuser/administration). This is useful if you want to use a different menu (such as admin_menu) for the superuser/admin and editmenu for others.'),
|
||||
'#default_value' => variable_get('editmenu_uid1', 1),
|
||||
);
|
||||
|
||||
$superfish_js = file_scan_directory($simplemenu_path, '%^superfish-[0-9.]*\.js$%',
|
||||
$superfish_js = file_scan_directory($editmenu_path, '%^superfish-[0-9.]*\.js$%',
|
||||
array('key' => 'filename', 'recurse' => FALSE));
|
||||
$superfish = array('custom' => 'custom or theme');
|
||||
foreach ($superfish_js as $name => $ignore) {
|
||||
$superfish[$name] = $name;
|
||||
}
|
||||
$form['advanced']['simplemenu_superfish_version'] = array(
|
||||
$form['advanced']['editmenu_superfish_version'] = array(
|
||||
'#type' => 'select',
|
||||
'#title' => t('SuperFish Version'),
|
||||
'#options' => $superfish,
|
||||
'#description' => t('Select which version of SuperFish you prefer using. The choice "custom or theme" means that Simplemenu does not include one of its own version of Superfish. It is expected that another module or your theme does so already.'),
|
||||
'#default_value' => variable_get('simplemenu_superfish_version', 'superfish-1.4.1.js'),
|
||||
'#description' => t('Select which version of SuperFish you prefer using. The choice "custom or theme" means that Editmenu does not include one of its own version of Superfish. It is expected that another module or your theme does so already.'),
|
||||
'#default_value' => variable_get('editmenu_superfish_version', 'superfish-1.4.1.js'),
|
||||
);
|
||||
|
||||
$scope = array(
|
||||
'header' => 'Header',
|
||||
'footer' => 'Footer',
|
||||
);
|
||||
$form['advanced']['simplemenu_menu_scope'] = array(
|
||||
$form['advanced']['editmenu_menu_scope'] = array(
|
||||
'#type' => 'select',
|
||||
'#title' => t('Scope of simplemenu variable'),
|
||||
'#title' => t('Scope of editmenu variable'),
|
||||
'#options' => $scope,
|
||||
'#description' => t('By default, the <code>simplemenu</code> variable is put in the footer (backward compatible.) It is possible to put it in the header instead.'),
|
||||
'#default_value' => variable_get('simplemenu_menu_scope', 'footer'),
|
||||
'#description' => t('By default, the <code>editmenu</code> variable is put in the footer (backward compatible.) It is possible to put it in the header instead.'),
|
||||
'#default_value' => variable_get('editmenu_menu_scope', 'footer'),
|
||||
);
|
||||
|
||||
$form['advanced']['simplemenu_cache_menu'] = array(
|
||||
$form['advanced']['editmenu_cache_menu'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Cache the simplemenu variable'),
|
||||
'#description' => t('The Simplemenu now has the capability to cache the simplemenu variable in a .js file. This accelerate the transfer by using the Browser cache.'),
|
||||
'#default_value' => variable_get('simplemenu_cache_menu', TRUE),
|
||||
'#title' => t('Cache the editmenu variable'),
|
||||
'#description' => t('The Editmenu now has the capability to cache the editmenu variable in a .js file. This accelerate the transfer by using the Browser cache.'),
|
||||
'#default_value' => variable_get('editmenu_cache_menu', TRUE),
|
||||
);
|
||||
|
||||
$form['advanced']['simplemenu_menubar_zindex'] = array(
|
||||
$form['advanced']['editmenu_menubar_zindex'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Menubar CSS z-index value'),
|
||||
'#description' => t('By default, the menubar CSS z-index is set to 9999. Some themes or other modules may require you to change this value. Use -1 to completely disable the z-index in the menubar. If this value is not set to -1, then the following z-index will not have any effect and can as well be set to -1.'),
|
||||
'#default_value' => variable_get('simplemenu_menubar_zindex', 9999),
|
||||
'#default_value' => variable_get('editmenu_menubar_zindex', 9999),
|
||||
);
|
||||
|
||||
$form['advanced']['simplemenu_dropdown_zindex'] = array(
|
||||
$form['advanced']['editmenu_dropdown_zindex'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Dropdown CSS z-index value'),
|
||||
'#description' => t('By default, the dropdown CSS z-index is set to 9999. However, some themes and modules use an even larger z-index. For instance, the AddThis overlay is put at z-index 100,000 (although from my tests, it seems that they use a much higher z-index...). So if you want the Simplemenu to appear over the AddThis pop-up, you want to use a z-index which is even larger (i.e. 2,000,000 [do not enter the commas!].) On the other hand, 9999 may be too large for your site. You can use a smaller number if that works better for you. Use -1 to not remove the z-index from your dropdown.'),
|
||||
'#default_value' => variable_get('simplemenu_dropdown_zindex', 9999),
|
||||
'#description' => t('By default, the dropdown CSS z-index is set to 9999. However, some themes and modules use an even larger z-index. For instance, the AddThis overlay is put at z-index 100,000 (although from my tests, it seems that they use a much higher z-index...). So if you want the Editmenu to appear over the AddThis pop-up, you want to use a z-index which is even larger (i.e. 2,000,000 [do not enter the commas!].) On the other hand, 9999 may be too large for your site. You can use a smaller number if that works better for you. Use -1 to not remove the z-index from your dropdown.'),
|
||||
'#default_value' => variable_get('editmenu_dropdown_zindex', 9999),
|
||||
);
|
||||
|
||||
$form['advanced']['simplemenu_element'] = array(
|
||||
$form['advanced']['editmenu_element'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('CSS selector to attach menu to'),
|
||||
'#default_value' => variable_get('simplemenu_element', 'body'),
|
||||
'#default_value' => variable_get('editmenu_element', 'body'),
|
||||
'#description' => t('A valid CSS selector to attach the menu to. <em>Example: body, #primary, div.my-class</em>'),
|
||||
'#required' => TRUE,
|
||||
);
|
||||
|
||||
$form['advanced']['simplemenu_element_method'] = array(
|
||||
$form['advanced']['editmenu_element_method'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Attach method'),
|
||||
'#options' => array(
|
||||
@ -175,7 +175,7 @@ function simplemenu_admin_settings() {
|
||||
'append' => t('Append'),
|
||||
'replace' => t('Replace'),
|
||||
),
|
||||
'#default_value' => variable_get('simplemenu_element_method', 'prepend'),
|
||||
'#default_value' => variable_get('editmenu_element_method', 'prepend'),
|
||||
'#description' => t('Choose how the menu should be attached to the above selector.<br /><span style="color: red;">WARNING:</span> The Replace option should only be used with a specialized theme that offers a tag that is to be replaced by the simple menu. Make sure you don\'t use that option with your body!'),
|
||||
'#required' => TRUE,
|
||||
);
|
||||
@ -183,43 +183,43 @@ function simplemenu_admin_settings() {
|
||||
// when someone has many themes, this list grows big!
|
||||
$themes = list_themes();
|
||||
$use_list = count($themes) > 15;
|
||||
$form['advanced']['simplemenu_exclusions'] = array(
|
||||
$form['advanced']['editmenu_exclusions'] = array(
|
||||
'#type' => $use_list ? 'select' : 'checkboxes',
|
||||
'#title' => t('Theme exclusions'),
|
||||
'#options' => drupal_map_assoc(array_keys($themes)),
|
||||
'#multiple' => $use_list,
|
||||
'#default_value' => variable_get('simplemenu_exclusions', array()),
|
||||
'#default_value' => variable_get('editmenu_exclusions', array()),
|
||||
'#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_detect_popup'] = array(
|
||||
$form['advanced']['editmenu_detect_popup'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Detect pop-up windows'),
|
||||
'#default_value' => variable_get('simplemenu_detect_popup', 1),
|
||||
'#description' => t("Choose whether SimpleMenu should attempt to detect if it is inside of a pop-up window. If enabled, SimpleMenu will not display if it is inside of a pop-up window."),
|
||||
'#default_value' => variable_get('editmenu_detect_popup', 1),
|
||||
'#description' => t("Choose whether EditMenu should attempt to detect if it is inside of a pop-up window. If enabled, EditMenu will not display if it is inside of a pop-up window."),
|
||||
);
|
||||
|
||||
$form['advanced']['simplemenu_visibility_operator'] = array(
|
||||
$form['advanced']['editmenu_visibility_operator'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Show block on specific pages'),
|
||||
'#default_value' => variable_get('simplemenu_visibility_operator', 0),
|
||||
'#default_value' => variable_get('editmenu_visibility_operator', 0),
|
||||
'#options' => array(
|
||||
0 => t('Show on every page except the listed pages.'),
|
||||
1 => t('Show on only the listed pages.'),
|
||||
),
|
||||
);
|
||||
|
||||
$form['advanced']['simplemenu_visibility_pages'] = array(
|
||||
$form['advanced']['editmenu_visibility_pages'] = array(
|
||||
'#type' => 'textarea',
|
||||
'#title' => t('Pages'),
|
||||
'#default_value' => variable_get('simplemenu_visibility_pages', ''),
|
||||
'#default_value' => variable_get('editmenu_visibility_pages', ''),
|
||||
'#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.",
|
||||
array('%blog' => 'blog', '%blog-wildcard' => 'blog/*', '%front' => '<front>')),
|
||||
'#wysiwyg' => FALSE,
|
||||
);
|
||||
|
||||
$form['#validate'][] = 'simplemenu_admin_settings_validate';
|
||||
$form['#submit'][] = 'simplemenu_admin_settings_submit';
|
||||
$form['#validate'][] = 'editmenu_admin_settings_validate';
|
||||
$form['#submit'][] = 'editmenu_admin_settings_submit';
|
||||
|
||||
return system_settings_form($form);
|
||||
}
|
||||
@ -227,19 +227,19 @@ function simplemenu_admin_settings() {
|
||||
/**
|
||||
* Verify that we have settings that are sensical.
|
||||
*/
|
||||
function simplemenu_admin_settings_validate($form, &$form_state) {
|
||||
function editmenu_admin_settings_validate($form, &$form_state) {
|
||||
$values = &$form_state['values'];
|
||||
if ($values['simplemenu_fix'] != 'scroll' && $values['simplemenu_menubar_zindex'] < 1) {
|
||||
form_set_error('simplemenu_menubar_zindex', t('In order to use a Fix mode, you want to increase the menubar z-index value to 1 or more.'));
|
||||
if ($values['editmenu_fix'] != 'scroll' && $values['editmenu_menubar_zindex'] < 1) {
|
||||
form_set_error('editmenu_menubar_zindex', t('In order to use a Fix mode, you want to increase the menubar z-index value to 1 or more.'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle some special cases.
|
||||
*/
|
||||
function simplemenu_admin_settings_submit($form, $form_state) {
|
||||
function editmenu_admin_settings_submit($form, $form_state) {
|
||||
// make sure we regenerate the CSS file
|
||||
variable_set('simplemenu_css_filename', '');
|
||||
variable_set('editmenu_css_filename', '');
|
||||
}
|
||||
|
||||
// vim: ts=2 sw=2 et syntax=php
|
@ -4,13 +4,13 @@
|
||||
*/
|
||||
|
||||
/*** ESSENTIAL STYLES ***/
|
||||
#simplemenu, #simplemenu * {
|
||||
#editmenu, #editmenu * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#simplemenu {
|
||||
#editmenu {
|
||||
line-height: 1.0;
|
||||
position: relative;
|
||||
/*position: fixed;
|
||||
@ -18,7 +18,7 @@
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
#simplemenu ul {
|
||||
#editmenu ul {
|
||||
position: absolute;
|
||||
top: -999em;
|
||||
width: 14em;
|
||||
@ -26,34 +26,34 @@
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
#simplemenu ul li,
|
||||
#simplemenu a {
|
||||
#editmenu ul li,
|
||||
#editmenu a {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#simplemenu li {
|
||||
#editmenu li {
|
||||
float: left;
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
#simplemenu a {
|
||||
#editmenu a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#simplemenu li:hover ul,
|
||||
ul#simplemenu li.sfHover ul {
|
||||
#editmenu li:hover ul,
|
||||
ul#editmenu li.sfHover ul {
|
||||
left: 0px;
|
||||
top: 21px;
|
||||
}
|
||||
|
||||
#simplemenu li:hover li ul,
|
||||
#simplemenu li.sfHover li ul {
|
||||
#editmenu li:hover li ul,
|
||||
#editmenu li.sfHover li ul {
|
||||
top: -999em;
|
||||
}
|
||||
|
||||
#simplemenu li li:hover ul,
|
||||
ul#simplemenu li li.sfHover ul {
|
||||
#editmenu li li:hover ul,
|
||||
ul#editmenu li li.sfHover ul {
|
||||
left: 14em;
|
||||
top: -1px;
|
||||
}
|
@ -4,19 +4,19 @@
|
||||
*/
|
||||
|
||||
/*** ESSENTIAL STYLES ***/
|
||||
#simplemenu, #simplemenu * {
|
||||
#editmenu, #editmenu * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#simplemenu {
|
||||
#editmenu {
|
||||
line-height: 1.0;
|
||||
@FIX@
|
||||
@MENUBAR_ZINDEX@
|
||||
}
|
||||
|
||||
#simplemenu ul {
|
||||
#editmenu ul {
|
||||
position: absolute;
|
||||
top: -999em;
|
||||
width: 14em;
|
||||
@ -24,37 +24,37 @@
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
#simplemenu ul li,
|
||||
#simplemenu a {
|
||||
#editmenu ul li,
|
||||
#editmenu a {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#simplemenu li {
|
||||
#editmenu li {
|
||||
float: left;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#simplemenu a {
|
||||
#editmenu a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#simplemenu li ul {
|
||||
#editmenu li ul {
|
||||
@DROPDOWN_ZINDEX@
|
||||
}
|
||||
|
||||
#simplemenu li:hover ul,
|
||||
ul#simplemenu li.sfHover ul {
|
||||
#editmenu li:hover ul,
|
||||
ul#editmenu li.sfHover ul {
|
||||
left: 0px;
|
||||
top: 21px;
|
||||
}
|
||||
|
||||
#simplemenu li:hover li ul,
|
||||
#simplemenu li.sfHover li ul {
|
||||
#editmenu li:hover li ul,
|
||||
#editmenu li.sfHover li ul {
|
||||
top: -999em;
|
||||
}
|
||||
|
||||
#simplemenu li li:hover ul,
|
||||
ul#simplemenu li li.sfHover ul {
|
||||
#editmenu li li:hover ul,
|
||||
ul#editmenu li li.sfHover ul {
|
||||
left: 14em;
|
||||
top: -1px;
|
||||
}
|
@ -1,20 +1,20 @@
|
||||
name = SimpleMenu
|
||||
name = EditMenu
|
||||
description = Displays a menu bar with drop down items. By default it appears at the top of the screen with the Navigation menu.
|
||||
core = 7.x
|
||||
package = Menu
|
||||
files[] = simplemenu.admin.inc
|
||||
files[] = simplemenu.install
|
||||
files[] = simplemenu.module
|
||||
configure = admin/config/simplemenu
|
||||
files[] = editmenu.admin.inc
|
||||
files[] = editmenu.install
|
||||
files[] = editmenu.module
|
||||
configure = admin/config/editmenu
|
||||
|
||||
; Normally aded by Drupal
|
||||
version = "7.x-1.x-dev"
|
||||
project = simplemenu
|
||||
project = editmenu
|
||||
datestamp = "1274876110"
|
||||
|
||||
; Information added by drupal.org packaging script on 2011-11-10
|
||||
version = "7.x-1.x-dev"
|
||||
core = "7.x"
|
||||
project = "simplemenu"
|
||||
project = "editmenu"
|
||||
datestamp = "1320887030"
|
||||
|
34
editmenu.install
Normal file
34
editmenu.install
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* EditMenu module installation file.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function editmenu_uninstall() {
|
||||
// Get rid of the variables used by simple menu.
|
||||
variable_del('editmenu_cache_menu');
|
||||
variable_del('editmenu_css_error');
|
||||
variable_del('editmenu_css_filename');
|
||||
variable_del('editmenu_detect_popup');
|
||||
variable_del('editmenu_dropdown_zindex');
|
||||
variable_del('editmenu_effect');
|
||||
variable_del('editmenu_effect_speed');
|
||||
variable_del('editmenu_element');
|
||||
variable_del('editmenu_element_method');
|
||||
variable_del('editmenu_exclusions');
|
||||
variable_del('editmenu_fix');
|
||||
variable_del('editmenu_hide_delay');
|
||||
variable_del('editmenu_menu');
|
||||
variable_del('editmenu_menu_scope');
|
||||
variable_del('editmenu_menubar_zindex');
|
||||
variable_del('editmenu_running');
|
||||
variable_del('editmenu_superfish_version');
|
||||
variable_del('editmenu_theme');
|
||||
variable_del('editmenu_uid1');
|
||||
variable_del('editmenu_visibility_operator');
|
||||
variable_del('editmenu_visibility_pages');
|
||||
}
|
@ -1,29 +1,29 @@
|
||||
(function($){
|
||||
|
||||
Drupal.behaviors.simplemenuAttach = {
|
||||
Drupal.behaviors.editmenuAttach = {
|
||||
attach: function(context, settings) {
|
||||
// If detect pop-ups setting is enabled and we are in a pop-up window
|
||||
if (settings.simplemenu.detectPopup && window.opener) {
|
||||
if (settings.editmenu.detectPopup && window.opener) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($('body').hasClass('simplemenu-enabled')) {
|
||||
if ($('body').hasClass('editmenu-enabled')) {
|
||||
return;
|
||||
}
|
||||
$('body').addClass('simplemenu-enabled');
|
||||
$('body').addClass('editmenu-enabled');
|
||||
|
||||
|
||||
// get the element to add the menu to
|
||||
var element = settings.simplemenu.element;
|
||||
var element = settings.editmenu.element;
|
||||
if ($(element).length == 0) {
|
||||
// this happens when you open a pop-up or a different theme
|
||||
// that does not have such an element or the named element
|
||||
// just does not exist in the first place.
|
||||
return;
|
||||
}
|
||||
var menu = $(simplemenu);
|
||||
var menu = $(editmenu);
|
||||
|
||||
switch (settings.simplemenu.placement) {
|
||||
switch (settings.editmenu.placement) {
|
||||
case 'prepend':
|
||||
$(menu).prependTo(element);
|
||||
break;
|
||||
@ -36,16 +36,16 @@ Drupal.behaviors.simplemenuAttach = {
|
||||
}
|
||||
|
||||
var animation = {};
|
||||
animation[settings.simplemenu.effect] = 'toggle';
|
||||
animation[settings.editmenu.effect] = 'toggle';
|
||||
|
||||
// Build menu
|
||||
$(menu)
|
||||
.find('#simplemenu')
|
||||
.find('#editmenu')
|
||||
.superfish({
|
||||
pathClass: 'current',
|
||||
animation: animation,
|
||||
delay: settings.simplemenu.hideDelay,
|
||||
speed: settings.simplemenu.effectSpeed,
|
||||
delay: settings.editmenu.hideDelay,
|
||||
speed: settings.editmenu.effectSpeed,
|
||||
autoArrows: false
|
||||
})
|
||||
.find(">li:has(ul)")
|
||||
@ -61,7 +61,7 @@ Drupal.behaviors.simplemenuAttach = {
|
||||
.find("a")
|
||||
.removeAttr('title');
|
||||
|
||||
$('#simplemenu').children('li.expanded').addClass('root');
|
||||
$('#editmenu').children('li.expanded').addClass('root');
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
@ -2,22 +2,22 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Creates a simplemenu.
|
||||
* Creates a editmenu.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function simplemenu_menu() {
|
||||
function editmenu_menu() {
|
||||
$items = array();
|
||||
|
||||
$items['admin/config/user-interface/simplemenu'] = array(
|
||||
'title' => 'SimpleMenu',
|
||||
$items['admin/config/user-interface/editmenu'] = array(
|
||||
'title' => 'EditMenu',
|
||||
'description' => 'Select the menu to display.',
|
||||
'page callback' => 'drupal_get_form',
|
||||
'page arguments' => array('simplemenu_admin_settings'),
|
||||
'access arguments' => array('administer simplemenu'),
|
||||
'file' => 'simplemenu.admin.inc',
|
||||
'page arguments' => array('editmenu_admin_settings'),
|
||||
'access arguments' => array('administer editmenu'),
|
||||
'file' => 'editmenu.admin.inc',
|
||||
'type' => MENU_NORMAL_ITEM,
|
||||
);
|
||||
|
||||
@ -25,9 +25,9 @@ function simplemenu_menu() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Is simplemenu enabled for this page request?
|
||||
* Is editmenu enabled for this page request?
|
||||
*/
|
||||
function simplemenu_enabled() {
|
||||
function editmenu_enabled() {
|
||||
$enabled = &drupal_static(__FUNCTION__);
|
||||
|
||||
if (!isset($enabled)) {
|
||||
@ -38,11 +38,11 @@ function simplemenu_enabled() {
|
||||
$is_overlay = (overlay_get_mode() == 'child') ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
$exclusions = variable_get('simplemenu_exclusions', array());
|
||||
$exclusions = variable_get('editmenu_exclusions', array());
|
||||
$enabled = (!isset($exclusions[$theme]) || !$exclusions[$theme])
|
||||
&& user_access('view simplemenu')
|
||||
&& _simplemenu_page_visibility()
|
||||
&& _simplemenu_superuser_active()
|
||||
&& user_access('view editmenu')
|
||||
&& _editmenu_page_visibility()
|
||||
&& _editmenu_superuser_active()
|
||||
&& !$is_overlay;
|
||||
}
|
||||
|
||||
@ -52,44 +52,44 @@ function simplemenu_enabled() {
|
||||
/**
|
||||
* Implements hook_init().
|
||||
*/
|
||||
function simplemenu_init() {
|
||||
function editmenu_init() {
|
||||
// do a simple access check here, since theme isn't available to check yet
|
||||
if (simplemenu_enabled()) {
|
||||
_simplemenu_add_menu();
|
||||
_simplemenu_add_css(); // basic CSS must be before _simplemenu_add_theme()
|
||||
_simplemenu_add_theme();
|
||||
_simplemenu_add_js();
|
||||
if (editmenu_enabled()) {
|
||||
_editmenu_add_menu();
|
||||
_editmenu_add_css(); // basic CSS must be before _editmenu_add_theme()
|
||||
_editmenu_add_theme();
|
||||
_editmenu_add_js();
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Add the simplemenu variable with the menu to be displayed.
|
||||
/** \brief Add the editmenu variable with the menu to be displayed.
|
||||
*
|
||||
* This function loads the menu to be displayed and transforms it so
|
||||
* it works with superfish.
|
||||
*
|
||||
* If the cache version of the simplemenu JavaScript string cannot be
|
||||
* If the cache version of the editmenu JavaScript string cannot be
|
||||
* created, then it is sent inline whether or not the user asked for it
|
||||
* to be sent inline.
|
||||
*/
|
||||
function _simplemenu_add_menu() {
|
||||
function _editmenu_add_menu() {
|
||||
// XXX -- should we put that in the settings instead? why put it in its own variable?
|
||||
$simplemenu = 'var simplemenu=' . drupal_json_encode(simplemenu_get_menu()) . ';';
|
||||
$editmenu = 'var editmenu=' . drupal_json_encode(editmenu_get_menu()) . ';';
|
||||
|
||||
$has_file = variable_get('simplemenu_cache_menu', TRUE);
|
||||
$has_file = variable_get('editmenu_cache_menu', TRUE);
|
||||
if ($has_file) {
|
||||
$js_hash = drupal_hash_base64($simplemenu);
|
||||
$js_hash = drupal_hash_base64($editmenu);
|
||||
$js_path = 'public://js'; // same path as concatenated Core JS
|
||||
$js_filename = $js_path . '/simplemenu_' . $js_hash . '.js';
|
||||
$js_filename = $js_path . '/editmenu_' . $js_hash . '.js';
|
||||
if (!file_exists($js_filename)) {
|
||||
file_prepare_directory($js_path, FILE_CREATE_DIRECTORY);
|
||||
if (!file_unmanaged_save_data($simplemenu, $js_filename, FILE_EXISTS_REPLACE)) {
|
||||
if (!file_unmanaged_save_data($editmenu, $js_filename, FILE_EXISTS_REPLACE)) {
|
||||
$has_file = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$options = array(
|
||||
'scope' => variable_get('simplemenu_menu_scope', 'footer'),
|
||||
'scope' => variable_get('editmenu_menu_scope', 'footer'),
|
||||
// 'version' => ?, -- could we make use of the version?
|
||||
);
|
||||
if ($has_file) {
|
||||
@ -99,7 +99,7 @@ function _simplemenu_add_menu() {
|
||||
else {
|
||||
// inline adds the value as is (untouched)
|
||||
$options['type'] = 'inline';
|
||||
drupal_add_js($simplemenu, $options);
|
||||
drupal_add_js($editmenu, $options);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,21 +114,21 @@ function _simplemenu_add_menu() {
|
||||
* The function has a fall back, in case the dynamic CSS cannot
|
||||
* be created.
|
||||
*/
|
||||
function _simplemenu_add_css() {
|
||||
function _editmenu_add_css() {
|
||||
global $user;
|
||||
|
||||
$simplemenu_path = drupal_get_path('module', 'simplemenu');
|
||||
$editmenu_path = drupal_get_path('module', 'editmenu');
|
||||
$css_path = 'public://css'; // same path as concatenated Core CSS
|
||||
if (file_prepare_directory($css_path, FILE_CREATE_DIRECTORY | FILE_MODIFY_PERMISSIONS)) {
|
||||
$fix = variable_get('simplemenu_fix', 'scroll');
|
||||
$fix = variable_get('editmenu_fix', 'scroll');
|
||||
|
||||
// XXX add a variable simplemenu_update which is set to TRUE whenever
|
||||
// XXX add a variable editmenu_update which is set to TRUE whenever
|
||||
// the settings get modified and false here
|
||||
$output_filename = variable_get('simplemenu_css_filename', '');
|
||||
$output_filename = variable_get('editmenu_css_filename', '');
|
||||
if (!$output_filename) {
|
||||
$tags = array(
|
||||
'@MENUBAR_ZINDEX@' => simplemnu_get_zindex('simplemenu_menubar_zindex', 9999),
|
||||
'@DROPDOWN_ZINDEX@' => simplemnu_get_zindex('simplemenu_dropdown_zindex', 9999),
|
||||
'@MENUBAR_ZINDEX@' => simplemnu_get_zindex('editmenu_menubar_zindex', 9999),
|
||||
'@DROPDOWN_ZINDEX@' => simplemnu_get_zindex('editmenu_dropdown_zindex', 9999),
|
||||
);
|
||||
switch ($fix) {
|
||||
case 'top':
|
||||
@ -144,58 +144,58 @@ function _simplemenu_add_css() {
|
||||
break;
|
||||
|
||||
}
|
||||
$css = file_get_contents($simplemenu_path . '/simplemenu.css.tpl');
|
||||
$css = file_get_contents($editmenu_path . '/editmenu.css.tpl');
|
||||
$css = strtr($css, $tags);
|
||||
$css_hash = hash('sha256', $css);
|
||||
$output_filename = $css_path . '/simplemenu-' . $css_hash . '.css';
|
||||
$output_filename = $css_path . '/editmenu-' . $css_hash . '.css';
|
||||
if (!file_exists($output_filename)) {
|
||||
// new content, create a new file
|
||||
file_put_contents($output_filename, $css);
|
||||
}
|
||||
else {
|
||||
// this call is rather ugly, but we must make sure that the
|
||||
// system cache will take the current Simplemenu CSS in account
|
||||
// system cache will take the current Editmenu CSS in account
|
||||
_drupal_flush_css_js();
|
||||
}
|
||||
//variable_set('simplemenu_css_filename', $output_filename);
|
||||
//variable_set('editmenu_css_filename', $output_filename);
|
||||
}
|
||||
drupal_add_css($output_filename);
|
||||
}
|
||||
else {
|
||||
// in case we cannot create the dynamic CSS
|
||||
$last_msg = variable_get('simplemenu_css_error', 0);
|
||||
$last_msg = variable_get('editmenu_css_error', 0);
|
||||
if (($last_msg != -1 && $last_msg + 3600 > time()) || $user->uid == 1) {
|
||||
// avoid displaying the error on each page... only once per hour.
|
||||
// (unless you are the admin, in which case you probably want to know!)
|
||||
variable_set('simplemenu_css_error', time());
|
||||
drupal_set_message(t('Simplemenu could not create the folder @path in order to save the dynamic CSS data.',
|
||||
variable_set('editmenu_css_error', time());
|
||||
drupal_set_message(t('Editmenu could not create the folder @path in order to save the dynamic CSS data.',
|
||||
array('@path' => $css_path)), 'warning');
|
||||
}
|
||||
|
||||
// use a default that cannot react to the dynamic changes...
|
||||
drupal_add_css($simplemenu_path .'/simplemenu.css');
|
||||
drupal_add_css($editmenu_path .'/editmenu.css');
|
||||
}
|
||||
}
|
||||
|
||||
/** \brief Add the module theme.
|
||||
*
|
||||
* This function adds a theme for the Simplemenu look.
|
||||
* This function adds a theme for the Editmenu look.
|
||||
*
|
||||
* By default, the original theme is used. The module also offers the
|
||||
* blackblue theme. It is also possible to create new themes or use
|
||||
* the theming of the current theme for simplemenu (so the menu fits
|
||||
* the theming of the current theme for editmenu (so the menu fits
|
||||
* perfectly for that theme.)
|
||||
*/
|
||||
function _simplemenu_add_theme() {
|
||||
// we want to put the simplemenu theme CSS first
|
||||
function _editmenu_add_theme() {
|
||||
// we want to put the editmenu theme CSS first
|
||||
// so we can change some CSS entries dynamically
|
||||
// but at this time the simplemenu.css is used to
|
||||
// but at this time the editmenu.css is used to
|
||||
// reset many of the CSS entries... Hmmm...
|
||||
$simplemenu_theme = variable_get('simplemenu_theme', 'original');
|
||||
if ($simplemenu_theme != 'custom') {
|
||||
$simplemenu_path = drupal_get_path('module', 'simplemenu');
|
||||
$theme_file = $simplemenu_path . '/themes/' . $simplemenu_theme
|
||||
. '/' . $simplemenu_theme . '.css';
|
||||
$editmenu_theme = variable_get('editmenu_theme', 'original');
|
||||
if ($editmenu_theme != 'custom') {
|
||||
$editmenu_path = drupal_get_path('module', 'editmenu');
|
||||
$theme_file = $editmenu_path . '/themes/' . $editmenu_theme
|
||||
. '/' . $editmenu_theme . '.css';
|
||||
if (is_file($theme_file)) {
|
||||
drupal_add_css($theme_file);
|
||||
}
|
||||
@ -204,14 +204,14 @@ function _simplemenu_add_theme() {
|
||||
|
||||
/** \brief Add the JavaScript that makes it all work.
|
||||
*
|
||||
* This function adds the Simplemenu JavaScript, the Superfish JavaScript
|
||||
* This function adds the Editmenu JavaScript, the Superfish JavaScript
|
||||
* and settings from the user.
|
||||
*/
|
||||
function _simplemenu_add_js() {
|
||||
$simplemenu_path = drupal_get_path('module', 'simplemenu');
|
||||
function _editmenu_add_js() {
|
||||
$editmenu_path = drupal_get_path('module', 'editmenu');
|
||||
|
||||
// Settings
|
||||
$fix = variable_get('simplemenu_fix', 'scroll');
|
||||
$fix = variable_get('editmenu_fix', 'scroll');
|
||||
switch ($fix) {
|
||||
case 'top':
|
||||
$element = 'body';
|
||||
@ -225,29 +225,29 @@ function _simplemenu_add_js() {
|
||||
|
||||
default: // 'scroll'
|
||||
// let user defined other elements when not fixed
|
||||
$element = variable_get('simplemenu_element', 'body');
|
||||
$placement = variable_get('simplemenu_element_method', 'prepend');
|
||||
$element = variable_get('editmenu_element', 'body');
|
||||
$placement = variable_get('editmenu_element_method', 'prepend');
|
||||
break;
|
||||
|
||||
}
|
||||
$settings = array(
|
||||
'effect' => variable_get('simplemenu_effect', 'opacity'),
|
||||
'effectSpeed' => variable_get('simplemenu_effect_speed', 'fast'),
|
||||
'effect' => variable_get('editmenu_effect', 'opacity'),
|
||||
'effectSpeed' => variable_get('editmenu_effect_speed', 'fast'),
|
||||
'element' => $element,
|
||||
'placement' => $placement,
|
||||
'hideDelay' => variable_get('simplemenu_hide_delay', 800),
|
||||
'detectPopup' => variable_get('simplemenu_detect_popup', 1),
|
||||
'hideDelay' => variable_get('editmenu_hide_delay', 800),
|
||||
'detectPopup' => variable_get('editmenu_detect_popup', 1),
|
||||
);
|
||||
drupal_add_js(array('simplemenu' => $settings), array('type' => 'setting'));
|
||||
drupal_add_js(array('editmenu' => $settings), array('type' => 'setting'));
|
||||
|
||||
// Simplemenu
|
||||
drupal_add_js($simplemenu_path . '/simplemenu.js', array('version' => '1.2'));
|
||||
// Editmenu
|
||||
drupal_add_js($editmenu_path . '/editmenu.js', array('version' => '1.2'));
|
||||
|
||||
// Superfish
|
||||
$superfish = variable_get('simplemenu_superfish_version', 'superfish-1.4.1.js');
|
||||
$superfish = variable_get('editmenu_superfish_version', 'superfish-1.4.1.js');
|
||||
if ($superfish != 'custom') {
|
||||
$sf_version = str_replace(array('superfish-', '.js'), '', $superfish);
|
||||
drupal_add_js($simplemenu_path . '/' . $superfish, array('version' => $sf_version));
|
||||
drupal_add_js($editmenu_path . '/' . $superfish, array('version' => $sf_version));
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,15 +278,15 @@ function simplemnu_get_zindex($name, $default) {
|
||||
/**
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function simplemenu_permission() {
|
||||
function editmenu_permission() {
|
||||
return array(
|
||||
'view simplemenu' => array(
|
||||
'title' => t('View SimpleMenu'),
|
||||
'description' => t('Display SimpleMenu to this user.'),
|
||||
'view editmenu' => array(
|
||||
'title' => t('View EditMenu'),
|
||||
'description' => t('Display EditMenu to this user.'),
|
||||
),
|
||||
'administer simplemenu' => array(
|
||||
'title' => t('Administer SimpleMenu'),
|
||||
'description' => t('Change settings of SimpleMenu.'),
|
||||
'administer editmenu' => array(
|
||||
'title' => t('Administer EditMenu'),
|
||||
'description' => t('Change settings of EditMenu.'),
|
||||
),
|
||||
);
|
||||
}
|
||||
@ -294,13 +294,13 @@ function simplemenu_permission() {
|
||||
/**
|
||||
* Render an HTML list of links for a given menu.
|
||||
*/
|
||||
function simplemenu_get_menu() {
|
||||
variable_set('simplemenu_running', TRUE);
|
||||
function editmenu_get_menu() {
|
||||
variable_set('editmenu_running', TRUE);
|
||||
|
||||
// if a user turned off menu module but SimpleMenu was previously set
|
||||
// if a user turned off menu module but EditMenu was previously set
|
||||
// reset variable so a menu appears
|
||||
$all_menus = array(variable_get('simplemenu_menu', 'management:0'));
|
||||
drupal_alter('simplemenu_menus', $all_menus);
|
||||
$all_menus = array(variable_get('editmenu_menu', 'management:0'));
|
||||
drupal_alter('editmenu_menus', $all_menus);
|
||||
|
||||
if (count($all_menus) > 1) {
|
||||
// if menu is not enable then we cannot have a count other than 1
|
||||
@ -310,36 +310,36 @@ function simplemenu_get_menu() {
|
||||
list($menu_name, $mlid) = explode(':', $full_name);
|
||||
$tree[] = array(
|
||||
'link' => array(
|
||||
'simplemenu_multi_menu_root' => TRUE,
|
||||
'editmenu_multi_menu_root' => TRUE,
|
||||
'mlid' => $mlid,
|
||||
'menu_name' => $full_name,
|
||||
'hidden' => FALSE,
|
||||
'title' => $menu_titles[$menu_name],
|
||||
'href' => 'admin/settings/simplemenu', /// ??? -- we should not have a link here
|
||||
'href' => 'admin/settings/editmenu', /// ??? -- we should not have a link here
|
||||
'in_active_trail' => FALSE,
|
||||
'has_children' => TRUE,
|
||||
'localized_options' => array(
|
||||
'attributes' => array('class' => 'simplemenu-top-level'),
|
||||
'attributes' => array('class' => 'editmenu-top-level'),
|
||||
),
|
||||
),
|
||||
'below' => simplemenu_menu_tree($full_name),
|
||||
'below' => editmenu_menu_tree($full_name),
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
reset($all_menus);
|
||||
$tree = simplemenu_menu_tree(current($all_menus));
|
||||
$tree = editmenu_menu_tree(current($all_menus));
|
||||
}
|
||||
|
||||
// allow other modules to modify the menu tree
|
||||
drupal_alter('simplemenu_tree', $tree);
|
||||
$tree = simplemenu_tree_remove_hidden($tree);
|
||||
drupal_alter('editmenu_tree', $tree);
|
||||
$tree = editmenu_tree_remove_hidden($tree);
|
||||
|
||||
// now generate the output
|
||||
$menu_form = menu_tree_output($tree);
|
||||
$menu = drupal_render($menu_form);
|
||||
if (!$menu) {
|
||||
$menu = '<ul class="menu"><li><a href="' . url('admin/settings/simplemenu') . '">'
|
||||
$menu = '<ul class="menu"><li><a href="' . url('admin/settings/editmenu') . '">'
|
||||
. t('No menu items found. Try a different menu as the default.') . '</a></li></ul>';
|
||||
}
|
||||
|
||||
@ -347,10 +347,10 @@ function simplemenu_get_menu() {
|
||||
// otherwise it could be added to the <div> tag instead...
|
||||
$pos = strpos($menu, '>');
|
||||
$menu = str_replace('class="menu', 'class="menu clear-block', substr($menu, 0, $pos))
|
||||
. ' id="simplemenu"' . substr($menu, $pos);
|
||||
. ' id="editmenu"' . substr($menu, $pos);
|
||||
|
||||
variable_set('simplemenu_running', FALSE);
|
||||
return '<div class="simplemenu-block">' . $menu . ' </div>';
|
||||
variable_set('editmenu_running', FALSE);
|
||||
return '<div class="editmenu-block">' . $menu . ' </div>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -359,13 +359,13 @@ function simplemenu_get_menu() {
|
||||
* aren't... unless we make sure we remove the children
|
||||
* ourselves.
|
||||
*/
|
||||
function simplemenu_tree_remove_hidden($tree) {
|
||||
function editmenu_tree_remove_hidden($tree) {
|
||||
$clean = array();
|
||||
|
||||
foreach ($tree as $key => $data) {
|
||||
if (!$data['link']['hidden']) {
|
||||
if ($data['below']) {
|
||||
$data['below'] = simplemenu_tree_remove_hidden($data['below']);
|
||||
$data['below'] = editmenu_tree_remove_hidden($data['below']);
|
||||
if (count($data['below']) == 0) {
|
||||
$data['below'] = 0;
|
||||
}
|
||||
@ -382,7 +382,7 @@ function simplemenu_tree_remove_hidden($tree) {
|
||||
* We want to retrieve the entire menu structure for a given menu,
|
||||
* regardless of whether or not the menu item is expanded or not.
|
||||
*/
|
||||
function simplemenu_menu_tree($menu_name = 'management:0') {
|
||||
function editmenu_menu_tree($menu_name = 'management:0') {
|
||||
$menu_tree = &drupal_static(__FUNCTION__, array());
|
||||
|
||||
// until we take $mlid in account, we can use $mname
|
||||
@ -404,7 +404,7 @@ function simplemenu_menu_tree($menu_name = 'management:0') {
|
||||
*
|
||||
* @todo we don't actually need $menu_name, $mlid would be sufficient
|
||||
*/
|
||||
function simplemenu_tree_all_data($root_menu = 'management:0') {
|
||||
function editmenu_tree_all_data($root_menu = 'management:0') {
|
||||
$tree = &drupal_static(__FUNCTION__, array());
|
||||
|
||||
list($menu_name, $mlid) = explode(':', $root_menu);
|
||||
@ -487,13 +487,13 @@ function simplemenu_tree_all_data($root_menu = 'management:0') {
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if simplemenu should be displayed based on visibility settings.
|
||||
* Determine if editmenu should be displayed based on visibility settings.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
function _simplemenu_page_visibility() {
|
||||
$operator = variable_get('simplemenu_visibility_operator', 0);
|
||||
$pages = variable_get('simplemenu_visibility_pages', '');
|
||||
function _editmenu_page_visibility() {
|
||||
$operator = variable_get('editmenu_visibility_operator', 0);
|
||||
$pages = variable_get('editmenu_visibility_pages', '');
|
||||
|
||||
if ($pages) {
|
||||
$path = drupal_get_path_alias($_GET['q']);
|
||||
@ -515,9 +515,9 @@ function _simplemenu_page_visibility() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the superuser/admin should be shown simplemenu.
|
||||
* Check whether the superuser/admin should be shown editmenu.
|
||||
*/
|
||||
function _simplemenu_superuser_active() {
|
||||
function _editmenu_superuser_active() {
|
||||
global $user;
|
||||
return $user->uid != 1 || variable_get('simplemenu_uid1', 1) == 1;
|
||||
return $user->uid != 1 || variable_get('editmenu_uid1', 1) == 1;
|
||||
}
|
@ -1,22 +1,22 @@
|
||||
name = SimpleMenu Devel Menu
|
||||
description = Include the developer menu in the simplemenu tree.
|
||||
dependencies[] = simplemenu
|
||||
name = EditMenu Devel Menu
|
||||
description = Include the developer menu in the editmenu tree.
|
||||
dependencies[] = editmenu
|
||||
dependencies[] = devel
|
||||
files[] = simplemenu_devel.module
|
||||
files[] = editmenu_devel.module
|
||||
core = 7.x
|
||||
package = Menu
|
||||
project = simplemenu
|
||||
project = editmenu
|
||||
|
||||
; Information added by drupal.org packaging script on 2010-05-26
|
||||
version = "7.x-1.x-dev"
|
||||
core = "7.x"
|
||||
project = "simplemenu"
|
||||
project = "editmenu"
|
||||
datestamp = "1274876110"
|
||||
|
||||
|
||||
; Information added by drupal.org packaging script on 2011-11-10
|
||||
version = "7.x-1.x-dev"
|
||||
core = "7.x"
|
||||
project = "simplemenu"
|
||||
project = "editmenu"
|
||||
datestamp = "1320887030"
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Prepend the devel menu to Simplemenu.
|
||||
* Prepend the devel menu to Editmenu.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implementation of hook_simplemenu_tree_alter()
|
||||
* Implementation of hook_editmenu_tree_alter()
|
||||
*/
|
||||
function simplemenu_devel_simplemenu_tree_alter(&$tree) {
|
||||
function editmenu_devel_editmenu_tree_alter(&$tree) {
|
||||
if (user_access('access devel information')) {
|
||||
$devel = array(
|
||||
'link' => array(
|
||||
@ -21,10 +21,10 @@ function simplemenu_devel_simplemenu_tree_alter(&$tree) {
|
||||
'in_active_trail' => FALSE,
|
||||
'has_children' => TRUE,
|
||||
'localized_options' => array(
|
||||
'attributes' => array('id' => 'simplemenu_devel'),
|
||||
'attributes' => array('id' => 'editmenu_devel'),
|
||||
),
|
||||
),
|
||||
'below' => simplemenu_menu_tree('devel:0'),
|
||||
'below' => editmenu_menu_tree('devel:0'),
|
||||
);
|
||||
array_unshift($tree, $devel);
|
||||
}
|
@ -1,21 +1,21 @@
|
||||
name = SimpleMenu Inactive Parent Menu
|
||||
name = EditMenu Inactive Parent Menu
|
||||
description = Make all the parent menus inactive so users cannot click on them inadvertendly.
|
||||
dependencies[] = simplemenu
|
||||
files[] = simplemenu_inactive_parents.module
|
||||
dependencies[] = editmenu
|
||||
files[] = editmenu_inactive_parents.module
|
||||
core = 7.x
|
||||
package = Menu
|
||||
project = simplemenu
|
||||
project = editmenu
|
||||
|
||||
; Information added by drupal.org packaging script on 2010-05-26
|
||||
version = "7.x-1.x-dev"
|
||||
core = "7.x"
|
||||
project = "simplemenu"
|
||||
project = "editmenu"
|
||||
datestamp = "1274876110"
|
||||
|
||||
|
||||
; Information added by drupal.org packaging script on 2011-11-10
|
||||
version = "7.x-1.x-dev"
|
||||
core = "7.x"
|
||||
project = "simplemenu"
|
||||
project = "editmenu"
|
||||
datestamp = "1320887030"
|
||||
|
@ -2,17 +2,17 @@
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Make all the simplemenu parent menu items non-clickable.
|
||||
* Make all the editmenu parent menu items non-clickable.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Alter the menu item link theme registry.
|
||||
*
|
||||
* This function grabs the simplemenu theme registry for the
|
||||
* This function grabs the editmenu theme registry for the
|
||||
* menu_link theming. This gives us a way to remove the
|
||||
* link and replace it with a name (anchor) instead.
|
||||
*
|
||||
* This is only applied to the Simplemenu as intefering with
|
||||
* This is only applied to the Editmenu as intefering with
|
||||
* other menus could have unwanted side effects.
|
||||
*
|
||||
* \note
|
||||
@ -21,16 +21,16 @@
|
||||
* is built by the system (i.e. caches are cleared by user,
|
||||
* because a module is installed, etc.)
|
||||
*/
|
||||
function simplemenu_inactive_parents_theme_registry_alter(&$theme_registry) {
|
||||
function editmenu_inactive_parents_theme_registry_alter(&$theme_registry) {
|
||||
global $theme;
|
||||
|
||||
// Save theme function
|
||||
$themes = variable_get('simplemenu_inactive_parents_theme_function', array());
|
||||
$themes = variable_get('editmenu_inactive_parents_theme_function', array());
|
||||
$themes[$theme] = $theme_registry['menu_link']['function'];
|
||||
variable_set('simplemenu_inactive_parents_theme_function', $themes);
|
||||
variable_set('editmenu_inactive_parents_theme_function', $themes);
|
||||
|
||||
// Replace with our own
|
||||
$theme_registry['menu_item_link']['function'] = 'simplemenu_inactive_parents_theme_menu_link';
|
||||
$theme_registry['menu_item_link']['function'] = 'editmenu_inactive_parents_theme_menu_link';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -39,18 +39,18 @@ function simplemenu_inactive_parents_theme_registry_alter(&$theme_registry) {
|
||||
* This function intercepts the menu item link theming function of
|
||||
* the system and
|
||||
*/
|
||||
function simplemenu_inactive_parents_theme_menu_link($link) {
|
||||
function editmenu_inactive_parents_theme_menu_link($link) {
|
||||
global $theme;
|
||||
static $cnt = 0;
|
||||
|
||||
// this is a drop down?
|
||||
if (!empty($link['has_children']) && variable_get('simplemenu_running', FALSE)) {
|
||||
if (!empty($link['has_children']) && variable_get('editmenu_running', FALSE)) {
|
||||
++$cnt;
|
||||
return '<a name="menu-id-' . $cnt . '">' . $link['title'] . '</a>';
|
||||
}
|
||||
|
||||
// got a theme function?
|
||||
$themes = variable_get('simplemenu_inactive_parents_theme_function', array());
|
||||
$themes = variable_get('editmenu_inactive_parents_theme_function', array());
|
||||
if (isset($themes[$theme])) {
|
||||
return $themes[$theme]($link);
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
name = SimpleMenu Multi-Menu support
|
||||
name = EditMenu Multi-Menu support
|
||||
description = Give support to display multiple menu in the top row.
|
||||
dependencies[] = simplemenu
|
||||
dependencies[] = editmenu
|
||||
dependencies[] = menu
|
||||
files[] = simplemenu_multi_menu.install
|
||||
files[] = simplemenu_multi_menu.module
|
||||
files[] = editmenu_multi_menu.install
|
||||
files[] = editmenu_multi_menu.module
|
||||
core = 7.x
|
||||
package = Menu
|
||||
project = simplemenu
|
||||
project = editmenu
|
||||
|
||||
version = "7.x-1.x-dev"
|
||||
|
||||
@ -14,13 +14,13 @@ version = "7.x-1.x-dev"
|
||||
; Information added by drupal.org packaging script on 2010-05-26
|
||||
version = "7.x-1.x-dev"
|
||||
core = "7.x"
|
||||
project = "simplemenu"
|
||||
project = "editmenu"
|
||||
datestamp = "1274876110"
|
||||
|
||||
|
||||
; Information added by drupal.org packaging script on 2011-11-10
|
||||
version = "7.x-1.x-dev"
|
||||
core = "7.x"
|
||||
project = "simplemenu"
|
||||
project = "editmenu"
|
||||
datestamp = "1320887030"
|
||||
|
8
editmenu_multi_menu.install
Normal file
8
editmenu_multi_menu.install
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
function editmenu_multi_menu_uninstall() {
|
||||
variable_del('editmenu_menus');
|
||||
variable_del('editmenu_multi_menu_theme_function');
|
||||
}
|
||||
|
||||
// vim: ts=2 sw=2 et syntax=php
|
89
editmenu_multi_menu.module
Normal file
89
editmenu_multi_menu.module
Normal file
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Make all the editmenu parent menu items non-clickable.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Make the 'select' a list.
|
||||
*
|
||||
* Transform the menu selector from a drop-down to a list so people
|
||||
* can select more than one menu.
|
||||
*/
|
||||
function editmenu_multi_menu_form_editmenu_admin_settings_alter(&$form, $form_state) {
|
||||
$form['default_menu']['editmenu_menus'] = $form['default_menu']['editmenu_menu'];
|
||||
unset($form['default_menu']['editmenu_menu']);
|
||||
$def = variable_get('editmenu_menus', array(variable_get('editmenu_menu', 'navigation:0')));
|
||||
$form['default_menu']['editmenu_menus']['#multiple'] = TRUE;
|
||||
$form['default_menu']['editmenu_menus']['#title'] = t('Menus');
|
||||
$form['default_menu']['editmenu_menus']['#default_value'] = $def;
|
||||
$form['default_menu']['editmenu_menus']['#description'] = t('Select one or more menus to show each one of them (use Ctrl or Shift to select multiple entries.) Please, avoid selecting a parent and a child from the same menu.');
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Replace the default with our own user selection.
|
||||
*
|
||||
* In this case we ignore the user selection unless the editmenu_menus
|
||||
* was not yet defined, then we keep the default.
|
||||
*/
|
||||
function editmenu_multi_menu_editmenu_menus_alter($all_menus) {
|
||||
$all_menus = variable_get('editmenu_menus', $all_menus);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Alter the menu item link theme registry.
|
||||
*
|
||||
* This function grabs the editmenu theme registry for the
|
||||
* menu_item_link theming. This gives us a way to remove the
|
||||
* link and replace it with a name (anchor) instead.
|
||||
*
|
||||
* This is only applied to the Editmenu as intefering with
|
||||
* other menus could have unwanted side effects.
|
||||
*
|
||||
* \note
|
||||
* This is called at the time the theme registry is built.
|
||||
* It is then put in the cache until next time the registry
|
||||
* is built by the system (i.e. caches are cleared by user,
|
||||
* because a module is installed, etc.)
|
||||
*/
|
||||
function editmenu_multi_menu_theme_registry_alter(&$theme_registry) {
|
||||
global $theme;
|
||||
|
||||
// Save theme function
|
||||
$themes = variable_get('editmenu_multi_menu_theme_function', array());
|
||||
$themes[$theme] = $theme_registry['menu_item_link']['function'];
|
||||
variable_set('editmenu_multi_menu_theme_function', $themes);
|
||||
|
||||
// Replace with our own
|
||||
$theme_registry['menu_item_link']['function'] = 'editmenu_multi_menu_theme_menu_item_link';
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Transform the menu item link.
|
||||
*
|
||||
* This function intercepts the menu item link theming function of
|
||||
* the system and
|
||||
*/
|
||||
function editmenu_multi_menu_theme_menu_item_link($link) {
|
||||
global $theme;
|
||||
static $cnt = 0;
|
||||
|
||||
// this is a drop down?
|
||||
if (!empty($link['editmenu_multi_menu_root']) && variable_get('editmenu_running', FALSE)) {
|
||||
++$cnt;
|
||||
return '<a name="menu-id-' . $cnt . '">' . $link['title'] . '</a>';
|
||||
}
|
||||
|
||||
// got a theme function?
|
||||
$themes = variable_get('editmenu_multi_menu_theme_function', array());
|
||||
if (isset($themes[$theme])) {
|
||||
return $themes[$theme]($link);
|
||||
}
|
||||
|
||||
// somehow the preprocess function did not get called?!
|
||||
// use the core default
|
||||
return theme_menu_item_link($link);
|
||||
}
|
||||
|
||||
// vim: ts=2 sw=2 et syntax=php
|
@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* SimpleMenu module installation file.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function simplemenu_uninstall() {
|
||||
// Get rid of the variables used by simple menu.
|
||||
variable_del('simplemenu_cache_menu');
|
||||
variable_del('simplemenu_css_error');
|
||||
variable_del('simplemenu_css_filename');
|
||||
variable_del('simplemenu_detect_popup');
|
||||
variable_del('simplemenu_dropdown_zindex');
|
||||
variable_del('simplemenu_effect');
|
||||
variable_del('simplemenu_effect_speed');
|
||||
variable_del('simplemenu_element');
|
||||
variable_del('simplemenu_element_method');
|
||||
variable_del('simplemenu_exclusions');
|
||||
variable_del('simplemenu_fix');
|
||||
variable_del('simplemenu_hide_delay');
|
||||
variable_del('simplemenu_menu');
|
||||
variable_del('simplemenu_menu_scope');
|
||||
variable_del('simplemenu_menubar_zindex');
|
||||
variable_del('simplemenu_running');
|
||||
variable_del('simplemenu_superfish_version');
|
||||
variable_del('simplemenu_theme');
|
||||
variable_del('simplemenu_uid1');
|
||||
variable_del('simplemenu_visibility_operator');
|
||||
variable_del('simplemenu_visibility_pages');
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
<?php
|
||||
|
||||
function simplemenu_multi_menu_uninstall() {
|
||||
variable_del('simplemenu_menus');
|
||||
variable_del('simplemenu_multi_menu_theme_function');
|
||||
}
|
||||
|
||||
// vim: ts=2 sw=2 et syntax=php
|
@ -1,89 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Make all the simplemenu parent menu items non-clickable.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Make the 'select' a list.
|
||||
*
|
||||
* Transform the menu selector from a drop-down to a list so people
|
||||
* can select more than one menu.
|
||||
*/
|
||||
function simplemenu_multi_menu_form_simplemenu_admin_settings_alter(&$form, $form_state) {
|
||||
$form['default_menu']['simplemenu_menus'] = $form['default_menu']['simplemenu_menu'];
|
||||
unset($form['default_menu']['simplemenu_menu']);
|
||||
$def = variable_get('simplemenu_menus', array(variable_get('simplemenu_menu', 'navigation:0')));
|
||||
$form['default_menu']['simplemenu_menus']['#multiple'] = TRUE;
|
||||
$form['default_menu']['simplemenu_menus']['#title'] = t('Menus');
|
||||
$form['default_menu']['simplemenu_menus']['#default_value'] = $def;
|
||||
$form['default_menu']['simplemenu_menus']['#description'] = t('Select one or more menus to show each one of them (use Ctrl or Shift to select multiple entries.) Please, avoid selecting a parent and a child from the same menu.');
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Replace the default with our own user selection.
|
||||
*
|
||||
* In this case we ignore the user selection unless the simplemenu_menus
|
||||
* was not yet defined, then we keep the default.
|
||||
*/
|
||||
function simplemenu_multi_menu_simplemenu_menus_alter($all_menus) {
|
||||
$all_menus = variable_get('simplemenu_menus', $all_menus);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Alter the menu item link theme registry.
|
||||
*
|
||||
* This function grabs the simplemenu theme registry for the
|
||||
* menu_item_link theming. This gives us a way to remove the
|
||||
* link and replace it with a name (anchor) instead.
|
||||
*
|
||||
* This is only applied to the Simplemenu as intefering with
|
||||
* other menus could have unwanted side effects.
|
||||
*
|
||||
* \note
|
||||
* This is called at the time the theme registry is built.
|
||||
* It is then put in the cache until next time the registry
|
||||
* is built by the system (i.e. caches are cleared by user,
|
||||
* because a module is installed, etc.)
|
||||
*/
|
||||
function simplemenu_multi_menu_theme_registry_alter(&$theme_registry) {
|
||||
global $theme;
|
||||
|
||||
// Save theme function
|
||||
$themes = variable_get('simplemenu_multi_menu_theme_function', array());
|
||||
$themes[$theme] = $theme_registry['menu_item_link']['function'];
|
||||
variable_set('simplemenu_multi_menu_theme_function', $themes);
|
||||
|
||||
// Replace with our own
|
||||
$theme_registry['menu_item_link']['function'] = 'simplemenu_multi_menu_theme_menu_item_link';
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Transform the menu item link.
|
||||
*
|
||||
* This function intercepts the menu item link theming function of
|
||||
* the system and
|
||||
*/
|
||||
function simplemenu_multi_menu_theme_menu_item_link($link) {
|
||||
global $theme;
|
||||
static $cnt = 0;
|
||||
|
||||
// this is a drop down?
|
||||
if (!empty($link['simplemenu_multi_menu_root']) && variable_get('simplemenu_running', FALSE)) {
|
||||
++$cnt;
|
||||
return '<a name="menu-id-' . $cnt . '">' . $link['title'] . '</a>';
|
||||
}
|
||||
|
||||
// got a theme function?
|
||||
$themes = variable_get('simplemenu_multi_menu_theme_function', array());
|
||||
if (isset($themes[$theme])) {
|
||||
return $themes[$theme]($link);
|
||||
}
|
||||
|
||||
// somehow the preprocess function did not get called?!
|
||||
// use the core default
|
||||
return theme_menu_item_link($link);
|
||||
}
|
||||
|
||||
// vim: ts=2 sw=2 et syntax=php
|
@ -1,46 +1,46 @@
|
||||
|
||||
.simplemenu-block {
|
||||
.editmenu-block {
|
||||
height: 21px;
|
||||
}
|
||||
#simplemenu {
|
||||
#editmenu {
|
||||
background: #000;
|
||||
color: #fff;
|
||||
font:11px Verdana, Helvetica, sans-serif;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
#simplemenu a {
|
||||
#editmenu a {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
padding: 3px 12px 5px 12px;
|
||||
width: auto;
|
||||
}
|
||||
#simplemenu li {
|
||||
#editmenu li {
|
||||
background: transparent;
|
||||
}
|
||||
#simplemenu li.expanded > a {
|
||||
#editmenu li.expanded > a {
|
||||
background: url(arrow_right.gif) no-repeat 94%;
|
||||
padding-right: 18px;
|
||||
}
|
||||
#simplemenu li.root > a {
|
||||
#editmenu li.root > a {
|
||||
background: url(arrow_down.gif) no-repeat 94%;
|
||||
padding-right: 18px;
|
||||
}
|
||||
#simplemenu li:hover, #simplemenu li.sfHover,
|
||||
#simplemenu a:focus, #simplemenu a:hover, #simplemenu a:active {
|
||||
#editmenu li:hover, #editmenu li.sfHover,
|
||||
#editmenu a:focus, #editmenu a:hover, #editmenu a:active {
|
||||
background: #4c77b3;
|
||||
color: #fff;
|
||||
}
|
||||
#simplemenu li ul {
|
||||
#editmenu li ul {
|
||||
border: 1px solid #ccc;
|
||||
background: #fafcff;
|
||||
}
|
||||
#simplemenu li ul a {
|
||||
#editmenu li ul a {
|
||||
color: #4e4e4e;
|
||||
height: auto;
|
||||
}
|
||||
#simplemenu li ul li:hover, #simplemenu li ul li.sfHover,
|
||||
#simplemenu li ul a:focus, #simplemenu li ul a:hover, #simplemenu li ul a:active {
|
||||
#editmenu li ul li:hover, #editmenu li ul li.sfHover,
|
||||
#editmenu li ul a:focus, #editmenu li ul a:hover, #editmenu li ul a:active {
|
||||
background-color: #cde;
|
||||
color: #4e4e4e;
|
||||
}
|
||||
|
@ -1,22 +1,22 @@
|
||||
/* ------ DISPLAY ------ */
|
||||
body.simplemenu-enabled{margin-top:23px;}
|
||||
.simplemenu-block{height:23px;position:fixed;top:0;left:0;width:100%;}
|
||||
ul#simplemenu,ul#simplemenu *{margin:0;padding:0;list-style:none;}
|
||||
ul#simplemenu{line-height:1.0;position:relative;width:100%;z-index:9999;}
|
||||
ul#simplemenu ul{position:absolute;top:-999em;width:14em;font-size:1em;line-height:1em;}
|
||||
ul#simplemenu ul li{width:100%;}
|
||||
ul#simplemenu a{width:auto;}
|
||||
ul#simplemenu li{float:left;position:relative;z-index:99;}
|
||||
ul#simplemenu a{display:block;}
|
||||
ul#simplemenu li:hover ul,
|
||||
ul#simplemenu li.sfHover ul{left:0px;top:30px;}
|
||||
ul#simplemenu li:hover li ul,
|
||||
ul#simplemenu li.sfHover li ul{top:-999em;}
|
||||
ul#simplemenu li li:hover ul,
|
||||
ul#simplemenu li li.sfHover ul{left:14em;top:-1px;}
|
||||
body.editmenu-enabled{margin-top:23px;}
|
||||
.editmenu-block{height:23px;position:fixed;top:0;left:0;width:100%;}
|
||||
ul#editmenu,ul#editmenu *{margin:0;padding:0;list-style:none;}
|
||||
ul#editmenu{line-height:1.0;position:relative;width:100%;z-index:9999;}
|
||||
ul#editmenu ul{position:absolute;top:-999em;width:14em;font-size:1em;line-height:1em;}
|
||||
ul#editmenu ul li{width:100%;}
|
||||
ul#editmenu a{width:auto;}
|
||||
ul#editmenu li{float:left;position:relative;z-index:99;}
|
||||
ul#editmenu a{display:block;}
|
||||
ul#editmenu li:hover ul,
|
||||
ul#editmenu li.sfHover ul{left:0px;top:30px;}
|
||||
ul#editmenu li:hover li ul,
|
||||
ul#editmenu li.sfHover li ul{top:-999em;}
|
||||
ul#editmenu li li:hover ul,
|
||||
ul#editmenu li li.sfHover ul{left:14em;top:-1px;}
|
||||
.superfish li:hover ul,
|
||||
.superfish li li:hover ul{top:-999em;}
|
||||
ul#simplemenu:after{
|
||||
ul#editmenu:after{
|
||||
clear: both;
|
||||
content: '.';
|
||||
display: block;
|
||||
@ -28,14 +28,14 @@ ul#simplemenu:after{
|
||||
|
||||
|
||||
/* ------ STYLE ------ */
|
||||
ul#simplemenu {
|
||||
ul#editmenu {
|
||||
background-color:#333;
|
||||
border-bottom: 1px dotted #9A9A9A;
|
||||
box-shadow: 0 0 15px #000000 inset;
|
||||
-moz-box-shadow: 0 0 15px #000000 inset;
|
||||
-webkit-box-shadow: 0 0 15px #000000 inset;
|
||||
}
|
||||
.simplemenu-block:after{
|
||||
.editmenu-block:after{
|
||||
content:'by g.u.i.';
|
||||
color:#fff;
|
||||
font: italic 600 1em 'Baskerville',serif;
|
||||
@ -45,14 +45,14 @@ ul#simplemenu {
|
||||
right:1em;
|
||||
z-index:10000;
|
||||
}
|
||||
ul#simplemenu li:hover ul,
|
||||
ul#simplemenu li.sfHover ul{
|
||||
ul#editmenu li:hover ul,
|
||||
ul#editmenu li.sfHover ul{
|
||||
background:#1a1a1a;
|
||||
border: 1px dotted #9A9A9A;
|
||||
padding: 6px 0;
|
||||
}
|
||||
ul#simplemenu li:hover ul:before,
|
||||
ul#simplemenu li.sfHover ul:before{
|
||||
ul#editmenu li:hover ul:before,
|
||||
ul#editmenu li.sfHover ul:before{
|
||||
background:url('bkgd-border.png') 15px 0 no-repeat;
|
||||
content:'';
|
||||
display:block;
|
||||
@ -64,19 +64,19 @@ ul#simplemenu li.sfHover ul:before{
|
||||
|
||||
|
||||
/* ------ FONT ------ */
|
||||
.simplemenu-block{font:normal normal 100 11px/1em 'Monaco','Lucida Console','Consolas',monospace;color:#fff;}
|
||||
ul#simplemenu a{color:#fff;margin:4px;padding:2px;text-decoration:none;word-spacing:-.35em;
|
||||
.editmenu-block{font:normal normal 100 11px/1em 'Monaco','Lucida Console','Consolas',monospace;color:#fff;}
|
||||
ul#editmenu a{color:#fff;margin:4px;padding:2px;text-decoration:none;word-spacing:-.35em;
|
||||
transition: background-color .5s, color .5s;
|
||||
-moz-transition: background-color .5s, color .5s;
|
||||
-o-transition: background-color .5s, color .5s;
|
||||
-webkit-transition: background-color .5s, color .5s;
|
||||
}
|
||||
ul#simplemenu>li.first a{color:#777;}
|
||||
ul#editmenu>li.first a{color:#777;}
|
||||
|
||||
ul#simplemenu li.sfHover>a,
|
||||
ul#simplemenu a:focus,
|
||||
ul#simplemenu a:hover,
|
||||
ul#simplemenu a:active{
|
||||
ul#editmenu li.sfHover>a,
|
||||
ul#editmenu a:focus,
|
||||
ul#editmenu a:hover,
|
||||
ul#editmenu a:active{
|
||||
color: #000;
|
||||
background-color:#fff;
|
||||
transition-duration:0s;
|
||||
@ -84,9 +84,9 @@ ul#simplemenu a:active{
|
||||
-o-transition-duration:0s;
|
||||
-webkit-transition-duration:0s;
|
||||
}
|
||||
ul#simplemenu>li.first a:focus,
|
||||
ul#simplemenu>li.first a:hover,
|
||||
ul#simplemenu>li.first a:active{
|
||||
ul#editmenu>li.first a:focus,
|
||||
ul#editmenu>li.first a:hover,
|
||||
ul#editmenu>li.first a:active{
|
||||
color: #000;
|
||||
background-color:#cc3733;
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
|
||||
.simplemenu-block {
|
||||
.editmenu-block {
|
||||
height: 21px;
|
||||
}
|
||||
#simplemenu {
|
||||
#editmenu {
|
||||
background: #ddd;
|
||||
color: #333;
|
||||
border-bottom: 1px solid #999;
|
||||
@ -10,7 +10,7 @@
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
#simplemenu a {
|
||||
#editmenu a {
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
background: #ddd;
|
||||
@ -19,32 +19,32 @@
|
||||
padding: 2px 6px 3px 6px;
|
||||
width: auto;
|
||||
}
|
||||
#simplemenu li {
|
||||
#editmenu li {
|
||||
background: #ddd;
|
||||
text-align: left;
|
||||
}
|
||||
#simplemenu li.expanded > a {
|
||||
#editmenu li.expanded > a {
|
||||
background: url(right-green.gif) no-repeat 97%;
|
||||
padding-right: 2em;
|
||||
}
|
||||
#simplemenu li.root > a {
|
||||
#editmenu li.root > a {
|
||||
font-weight: 700;
|
||||
background: url(down-green.gif) no-repeat 97%;
|
||||
}
|
||||
#simplemenu li:hover,
|
||||
#simplemenu li.sfHover,
|
||||
#simplemenu a:focus,
|
||||
#simplemenu a:hover,
|
||||
#simplemenu a:active {
|
||||
#editmenu li:hover,
|
||||
#editmenu li.sfHover,
|
||||
#editmenu a:focus,
|
||||
#editmenu a:hover,
|
||||
#editmenu a:active {
|
||||
background: #3875d7;
|
||||
color: #fff;
|
||||
}
|
||||
#simplemenu li:hover ul,
|
||||
ul#simplemenu li.sfHover ul {
|
||||
#editmenu li:hover ul,
|
||||
ul#editmenu li.sfHover ul {
|
||||
border-top: 1px solid white;
|
||||
border-bottom: 1px solid #999;
|
||||
}
|
||||
#simplemenu li ul a {
|
||||
#editmenu li ul a {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user