// menu top

This commit is contained in:
Kevin Granger
2013-09-11 11:32:06 +02:00
parent 486bb58bf6
commit 913ee1007c
4 changed files with 36 additions and 24 deletions
File diff suppressed because one or more lines are too long
+24 -15
View File
@@ -364,7 +364,6 @@ html, body
#nav-topbar
height: 28px
position: fixed
top: 36px
left: 80
width: 100%
@@ -379,13 +378,14 @@ html, body
display: block
list-style: none
> li
border-right: solid 1px black
border-right: solid 1px #aaa
height: 26px
padding: 0
margin: 0
list-style: none
position: relative
float: left
@include box-shadow(#ccc 0 -2px 0 inset)
> a
display: block
line-height: 26px
@@ -403,19 +403,30 @@ html, body
color: white
i
color: white!important
&.active
border-right: solid 1px black
> a
color: contrast-color($main-color, white, #333, 10%)
background-color: $main-color
i
color: white!important
.menu-collapse
display: none
ul.submenu
display: none!important
@include box-shadow(rgba(black,0.2) 0 0 0 1px,rgba(black,0.3) 2px 2px 4px)
> ul > li:hover
ul.submenu
@include box-shadow(rgba(black,0.3) 0 2px 4px)
> ul.menu > li
ul.submenu.expanded
display: block!important
> ul.menu > li
ul.submenu
display: none
position: absolute
margin: 0
padding: 0
left: 0
top: 27px
top: 26px
border-top: solid 1px darken($main-color,10%)
width: 200px!important
li
width: 200px
@@ -425,20 +436,18 @@ html, body
display: block
padding: 4px 5px 4px 10px
font-size: 12px
border: none
border-bottom: solid 1px #eee
background-color: white
border-bottom: solid 1px #eee
&:hover
color: $main-color
background-color: mix(white, $main-color, 90%)
text-decoration: none
&:last-child a
border-bottom: none
&.active
a
color: contrast-color($secondary-color, white, #333, 10%)
background-color: $secondary-color
border-bottom: solid 1px darken($secondary-color,10%)
&:last-child a
border-bottom: none
&.active a
color: contrast-color($main-color, white, #333, 10%)
background-color: $main-color
border-bottom: solid 1px darken($main-color,10%)
.page-topbar
#main
+7 -6
View File
@@ -47,19 +47,20 @@ $( document ).ready(function() {
});
//nav top bar
$(window).on("resize", function() {
var h = $("#nav-topbar").height();
$("#nav-topbar ul.menu").find("li.maintab").each(function(){
if ($(this).position().top > 0) {
$(this).addClass("tab-elipsed").addClass("hide");
$(this).addClass("hide");
}
});
});
$("#nav-topbar li.maintab.has_submenu").hover(function(){
$(this).find("ul.submenu").fadeIn("fast").addClass("expanded");
}, function(){
//$(this).removeClass("expanded");
$(this).find("ul.submenu").fadeOut("fast").removeClass("expanded");
});
//tooltip
$('.label-tooltip').tooltip();
@@ -1,8 +1,10 @@
<nav id="nav-topbar" role="navigation">
<nav id="nav-topbar" data-spy="affix" data-offset-top="34px" role="navigation">
{if !$tab}
<div class="mainsubtablist" style="display:none"></div>
{/if}
<span class="menu-collapse">
<i class="icon-align-justify"></i>
</span>
{if $controller_name != 'AdminLogin'}
<ul class="menu">
<li class="maintab {if $smarty.get.controller == 'AdminDashboard'}active{/if}">