Add link on aspects and allow to show / hide them in the drawer

This commit is contained in:
flaburgan 2014-01-07 00:20:59 +01:00
parent b8bb7ae857
commit 8c6342170b
3 changed files with 43 additions and 23 deletions

View file

@ -37,11 +37,27 @@ $(document).ready(function(){
if (app.hasClass('draw')){
app.removeClass('draw');
}
else {
} else {
app.addClass('draw');
}
};
/* Show / hide aspects in the drawer */
$('#all_aspects').bind("tap click", function(evt){
evt.preventDefault();
toggleAspectsMenu();
});
var toggleAspectsMenu = function(){
var aspect_list = $("#all_aspects + li");
if (aspect_list.hasClass('hide')){
aspect_list.removeClass('hide');
} else {
aspect_list.addClass('hide');
}
};
/* Heart toggle */
$(".like_action", ".stream").bind("tap click", function(evt){

View file

@ -114,24 +114,28 @@ h3 {
bottom: 0px;
overflow: auto;
width: 100%;
}
li {
font-size: 25px;
line-height: 25px;
font-weight: bold;
color: $light-grey;
padding: 12px 25px;
border-bottom: solid rgb(53, 53, 53) 2px;
}
li {
font-size: 25px;
line-height: 25px;
font-weight: bold;
color: $light-grey;
padding: 12px 25px;
border-bottom: solid rgb(53, 53, 53) 2px;
}
.no_border {
padding: 0px;
border-bottom: 0px;
.no_border {
padding: 0px;
border-bottom: 0px;
> ul > li {
font-size: 14px;
padding: 8px 42px;
}
}
> ul > li {
font-size: 14px;
padding: 8px 42px;
.hide {
display: none;
}
}

View file

@ -97,17 +97,17 @@
= link_to t("streams.activity.title"), activity_stream_path
%li
= link_to t("streams.mentions.title"), mentioned_stream_path
%li
= t('streams.aspects.title')
%li.no_border
%li#all_aspects
= link_to t('streams.aspects.title'), "#"
%li.no_border.hide
%ul
- for aspect in current_user.aspects
%li
= aspect.name
= link_to aspect.name, aspects_stream_path(a_ids: [aspect.id])
%li
= link_to(t('layouts.header.profile'), user_profile_path(current_user.username))
= link_to t('layouts.header.profile'), user_profile_path(current_user.username)
%li
= link_to(t('_contacts'), contacts_path)
= link_to t('_contacts'), contacts_path
%li
= link_to t('layouts.header.settings'), users_edit_path
%li