ability to set new themes now
This commit is contained in:
parent
3d8955fb48
commit
ebb1ab6ce1
@ -36,3 +36,4 @@ jQuery Superfish: http://users.tpg.com.au/j_birch/plugins/superfish/
|
|||||||
- #156256 upgrade to SuperFish 1.3
|
- #156256 upgrade to SuperFish 1.3
|
||||||
- upgrade to bgIframe 2.1.1 (for IE6 compatibility with forms)
|
- upgrade to bgIframe 2.1.1 (for IE6 compatibility with forms)
|
||||||
- remove RTL option; this conflicts with other changes and is properly implemented in Drupal 6
|
- 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
|
BIN
down-green.gif
BIN
down-green.gif
Binary file not shown.
Before Width: | Height: | Size: 179 B |
BIN
left-green.gif
BIN
left-green.gif
Binary file not shown.
Before Width: | Height: | Size: 895 B |
BIN
right-green.gif
BIN
right-green.gif
Binary file not shown.
Before Width: | Height: | Size: 893 B |
118
simplemenu.css
118
simplemenu.css
@ -1,102 +1,50 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
#simplemenu
|
|
||||||
{
|
/* There is a version of this file commented in great detail for educational purposes here:
|
||||||
background:#ddd;
|
* http://users.tpg.com.au/j_birch/plugins/superfish/superfish.commented.css
|
||||||
color:#333;
|
*/
|
||||||
|
|
||||||
|
/*** ESSENTIAL STYLES ***/
|
||||||
|
#simplemenu, #simplemenu * {
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
border-bottom:1px solid #999;
|
|
||||||
font:11px Verdana, Helvetica, sans-serif;
|
|
||||||
left:0;
|
|
||||||
position:absolute;
|
|
||||||
top:0;
|
|
||||||
width:100%;
|
|
||||||
height:20px;
|
|
||||||
z-index:9999;
|
|
||||||
}
|
|
||||||
|
|
||||||
#simplemenu li
|
|
||||||
{
|
|
||||||
background:#ddd;
|
|
||||||
border-right:1px solid #999;
|
|
||||||
border-left:1px solid #eee;
|
|
||||||
float:left;
|
|
||||||
list-style:none;
|
list-style:none;
|
||||||
position:relative;
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
z-index:9999;
|
|
||||||
text-align: left;
|
|
||||||
}
|
}
|
||||||
|
#simplemenu {
|
||||||
#simplemenu a
|
line-height:1.0;
|
||||||
{
|
|
||||||
color:#333;
|
|
||||||
display:block;
|
|
||||||
float:left;
|
|
||||||
padding:.3em 2em .3em .6em;
|
|
||||||
text-decoration:none;
|
|
||||||
background:#ddd;
|
|
||||||
}
|
}
|
||||||
|
#simplemenu ul {
|
||||||
#simplemenu li.expanded > a
|
|
||||||
{
|
|
||||||
background:url(right-green.gif) no-repeat 97%;
|
|
||||||
padding-right:2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
#simplemenu li.root > a
|
|
||||||
{
|
|
||||||
font-weight:700;
|
|
||||||
background:url(down-green.gif) no-repeat 97%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#simplemenu li ul
|
|
||||||
{
|
|
||||||
float:none;
|
|
||||||
top:-999em;
|
|
||||||
position:absolute;
|
position:absolute;
|
||||||
margin:0;
|
top:-999em;
|
||||||
padding:0;
|
|
||||||
z-index:9999;
|
|
||||||
width:14em;
|
width:14em;
|
||||||
background:#ddd;
|
|
||||||
border:1px solid #999;
|
|
||||||
}
|
}
|
||||||
|
#simplemenu ul li,
|
||||||
#simplemenu li:hover,#simplemenu li.sfHover,#simplemenu a:focus,#simplemenu a:hover,#simplemenu a:active
|
#simplemenu a {
|
||||||
{
|
width: 100%;
|
||||||
background:#3875d7;
|
|
||||||
color:#fff;
|
|
||||||
}
|
}
|
||||||
|
#simplemenu li {
|
||||||
#simplemenu li:hover ul,#simplemenu li.sfHover ul
|
float:left;
|
||||||
{
|
position:relative;
|
||||||
left:-1px;
|
z-index:99;
|
||||||
top:20px;
|
|
||||||
}
|
}
|
||||||
|
#simplemenu a {
|
||||||
#simplemenu li:hover li ul,#simplemenu li.sfHover li ul
|
display:block;
|
||||||
{
|
}
|
||||||
|
#simplemenu li:hover ul,
|
||||||
|
ul#simplemenu li.sfHover ul {
|
||||||
|
left:0px;
|
||||||
|
top:21px;
|
||||||
|
}
|
||||||
|
#simplemenu li:hover li ul,
|
||||||
|
#simplemenu li.sfHover li ul {
|
||||||
top:-999em;
|
top:-999em;
|
||||||
}
|
}
|
||||||
|
#simplemenu li li:hover ul,
|
||||||
#simplemenu li li:hover ul,#simplemenu li li.sfHover ul
|
ul#simplemenu li li.sfHover ul {
|
||||||
{
|
|
||||||
left:14em;
|
left:14em;
|
||||||
top:-1px;
|
top:-1px;
|
||||||
width:14em;
|
|
||||||
}
|
}
|
||||||
|
.superfish li:hover ul,
|
||||||
#simplemenu li li
|
.superfish li li:hover ul {
|
||||||
{
|
top: -999em;
|
||||||
background:#ddd;
|
|
||||||
float:none;
|
|
||||||
border:none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#simplemenu li li a
|
|
||||||
{
|
|
||||||
float:none;
|
|
||||||
padding-right:0;
|
|
||||||
}
|
}
|
@ -24,14 +24,14 @@ $(document).ready(function() {
|
|||||||
// Build menu
|
// Build menu
|
||||||
$('#simplemenu')
|
$('#simplemenu')
|
||||||
.append(simplemenu)
|
.append(simplemenu)
|
||||||
.superfish()
|
.superfish( { speed: 'fast' } )
|
||||||
.find(">li[ul]")
|
.find(">li:has(ul)")
|
||||||
.mouseover(function(){
|
.mouseover(function(){
|
||||||
$("ul", this).bgiframe({opacity:false});
|
$("ul", this).bgIframe({opacity:false});
|
||||||
})
|
})
|
||||||
.find("a")
|
.find("a")
|
||||||
.focus(function(){
|
.focus(function(){
|
||||||
$("ul", $("#simplemenu>li[ul]")).bgiframe({opacity:false});
|
$("ul", $(".nav>li:has(ul)")).bgIframe({opacity:false});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#simplemenu').children('li.expanded').addClass('root');
|
$('#simplemenu').children('li.expanded').addClass('root');
|
||||||
|
@ -35,8 +35,13 @@ function simplemenu_footer() {
|
|||||||
if (user_access('view simplemenu') && !$exclusions[$theme]) {
|
if (user_access('view simplemenu') && !$exclusions[$theme]) {
|
||||||
global $theme, $custom_theme;
|
global $theme, $custom_theme;
|
||||||
$path = drupal_get_path('module', 'simplemenu');
|
$path = drupal_get_path('module', 'simplemenu');
|
||||||
|
$simplemenu_theme = variable_get('simplemenu_theme', 'original');
|
||||||
drupal_add_css($path .'/simplemenu.css');
|
drupal_add_css($path .'/simplemenu.css');
|
||||||
|
|
||||||
|
if ($theme != 'custom') {
|
||||||
|
drupal_add_css($path .'/themes/'. $simplemenu_theme .'/'. $simplemenu_theme .'.css');
|
||||||
|
}
|
||||||
|
|
||||||
$settings = array(
|
$settings = array(
|
||||||
// pass in base path to the JS file
|
// pass in base path to the JS file
|
||||||
// url() handles appending ?q= but in this case, we need to pass in the variable so the menus work when mod_rewrite is off
|
// url() handles appending ?q= but in this case, we need to pass in the variable so the menus work when mod_rewrite is off
|
||||||
@ -77,6 +82,14 @@ function simplemenu_admin_settings() {
|
|||||||
'#description' => t('Add devel module links for those users that can access the devel module.')
|
'#description' => t('Add devel module links for those users that can access the devel module.')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$form['default_menu']['simplemenu_theme'] = array(
|
||||||
|
'#type' => 'select',
|
||||||
|
'#title' => t('Theme'),
|
||||||
|
'#options' => drupal_map_assoc(array('original', 'custom')),
|
||||||
|
'#default_value' => variable_get('simplemenu_theme', 'original'),
|
||||||
|
'#description' => t('Select which theme to use. If you specify custom, you need to define CSS in your theme.')
|
||||||
|
);
|
||||||
|
|
||||||
$form['default_menu']['advanced'] = array(
|
$form['default_menu']['advanced'] = array(
|
||||||
'#type' => 'fieldset',
|
'#type' => 'fieldset',
|
||||||
'#title' => t('Advanced settings'),
|
'#title' => t('Advanced settings'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user