0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Merge pull request #214 from matthojo/Menu-Fixes

Fixed menus not hiding when clicking away.
This commit is contained in:
Hannah Wolfe 2013-06-25 06:45:30 -07:00
commit afde1f7390
4 changed files with 8 additions and 12 deletions

View file

@ -13,9 +13,10 @@
$el.find('[data-toggle]').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
$(this).toggleClass('active');
var toggle = $(this).data('toggle');
$(this).parent().children(toggle).fadeToggle(100).toggleClass('open');
$(this).parent().children(toggle).fadeToggle(200).toggleClass('open');
});
};

View file

@ -643,12 +643,6 @@ nav {
@include transition(left 0.3s ease 0s);
}
> a {
@include icon-after($i-chevron-down, 12px) {
position:absolute;
right: 20px;
top: 15px;
}
&:hover { background: inherit; }
&.active { background: darken($grey, 3%); }
}
@ -694,7 +688,8 @@ nav {
};
&.active {
@include icon-after($i-chevron-down, 8px, $darkgrey);
color: $darkgrey;
@include icon-after($i-chevron-down, 8px);
}
}

View file

@ -9,7 +9,7 @@
<section class="post-controls">
<a class="post-edit" href="#"><span class="hidden">Edit Post</span></a>
<a class="post-settings" href="#" data-toggle=".menu-drop-right"><span class="hidden">Post Settings</span></a>
<ul class="menu-drop-right">
<ul class="menu-drop-right overlay">
<li><a href="#" class="url">URL</a></li>
<li><a href="#" class="something">Something</a></li>
<li><a href="#" class="delete">Delete</a></li>

View file

@ -8,11 +8,11 @@
{{/each}}
<li id="usermenu" class="subnav">
<a href="#" data-toggle="ul">
<a href="#" data-toggle="ul" class="dropdown">
<img class="avatar" src="/core/admin/assets/img/user.jpg" alt="Avatar" />
<span class="name">User Menu</span>
</a>
<ul>
<ul class="overlay">
<li class="usermenu-profile"><a href="#">Your Profile</a></li>
<li class="divider"></li>
<li class="usermenu-help"><a href="#">Help / Support</a></li>