Toggle with jquery + link on the whole line of the menu

This commit is contained in:
flaburgan 2014-02-08 21:34:54 +01:00
parent 70f305958b
commit 725fbbf85e
3 changed files with 8 additions and 18 deletions

View file

@ -33,13 +33,7 @@ $(document).ready(function(){
}); });
var toggleDrawerMenu = function(){ var toggleDrawerMenu = function(){
var app = $("#app"); $("#app").toggleClass('draw');
if (app.hasClass('draw')){
app.removeClass('draw');
} else {
app.addClass('draw');
}
}; };
/* Show / hide aspects in the drawer */ /* Show / hide aspects in the drawer */
@ -49,13 +43,7 @@ $(document).ready(function(){
}); });
var toggleAspectsMenu = function(){ var toggleAspectsMenu = function(){
var aspect_list = $("#all_aspects + li"); $("#all_aspects + li").toggleClass('hide');
if (aspect_list.hasClass('hide')){
aspect_list.removeClass('hide');
} else {
aspect_list.addClass('hide');
}
}; };

View file

@ -120,7 +120,6 @@ h3 {
line-height: 25px; line-height: 25px;
font-weight: bold; font-weight: bold;
color: $light-grey; color: $light-grey;
padding: 12px 25px;
border-bottom: solid rgb(53, 53, 53) 2px; border-bottom: solid rgb(53, 53, 53) 2px;
} }
@ -128,7 +127,7 @@ h3 {
padding: 0px; padding: 0px;
border-bottom: 0px; border-bottom: 0px;
> ul > li { > ul > li > a {
font-size: 14px; font-size: 14px;
padding: 8px 42px; padding: 8px 42px;
} }
@ -146,8 +145,10 @@ h3 {
} }
a { a {
display: block;
color: $light-grey; color: $light-grey;
text-decoration: none; text-decoration: none;
padding: 12px 25px;
} }
ul { ul {

View file

@ -102,7 +102,8 @@
%li %li
= link_to aspect.name, aspects_stream_path(a_ids: [aspect.id]) = link_to aspect.name, aspects_stream_path(a_ids: [aspect.id])
%li %li
= link_to t('layouts.header.profile'), user_profile_path(current_user.username) = link_to user_profile_path(current_user.username) do
= t('layouts.header.profile')
= person_image_tag(current_user) = person_image_tag(current_user)
%li %li
= link_to t('_contacts'), contacts_path = link_to t('_contacts'), contacts_path