Commit d3e67be7 by Brian Talbot

studio: nav - clicking anywhere but nav's dropdowns will close them, fixed link…

studio: nav - clicking anywhere but nav's dropdowns will close them, fixed link outline and is-selected styling
parent 3088e60d
...@@ -39,15 +39,20 @@ $(document).ready(function() { ...@@ -39,15 +39,20 @@ $(document).ready(function() {
$('.unit .item-actions .delete-button').bind('click', deleteUnit); $('.unit .item-actions .delete-button').bind('click', deleteUnit);
$('.new-unit-item').bind('click', createNewUnit); $('.new-unit-item').bind('click', createNewUnit);
// nav-related
$('body').addClass('js'); $('body').addClass('js');
// nav - dropdown related
$body.click(function(e){
$('.nav-dropdown .nav-item .wrapper-nav-sub').removeClass('is-shown');
$('.nav-dropdown .nav-item .title').removeClass('is-selected');
});
$('.nav-dropdown .nav-item .title').click(function(e){ $('.nav-dropdown .nav-item .title').click(function(e){
$subnav = $(this).parent().find('.wrapper-nav-sub'); $subnav = $(this).parent().find('.wrapper-nav-sub');
$title = $(this).parent().find('.title'); $title = $(this).parent().find('.title');
e.preventDefault(); e.preventDefault();
e.stopPropagation();
if ($subnav.hasClass('is-shown')) { if ($subnav.hasClass('is-shown')) {
$subnav.removeClass('is-shown'); $subnav.removeClass('is-shown');
......
...@@ -151,8 +151,12 @@ ...@@ -151,8 +151,12 @@
font-weight: 600; font-weight: 600;
color: $gray-d3; color: $gray-d3;
&:hover, &:active { &:hover, &:active, &.is-selected {
color: $blue; color: $blue;
.icon-expand {
color: $blue;
}
} }
.label-prefix { .label-prefix {
...@@ -160,14 +164,6 @@ ...@@ -160,14 +164,6 @@
@include font-size(11); @include font-size(11);
font-weight: 400; font-weight: 400;
} }
&.is-selected {
color: $blue-d1;
.icon-expand {
color: $blue-d1;
}
}
} }
// specific nav items // specific nav items
...@@ -548,6 +544,7 @@ body.signin .nav-not-signedin-signup { ...@@ -548,6 +544,7 @@ body.signin .nav-not-signedin-signup {
.nav-dropdown { .nav-dropdown {
.nav-item .title { .nav-item .title {
outline: 0;
cursor: pointer; cursor: pointer;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment