Fix contexts not being viewable if collapsed

Contexts collapsed on the homepage were also being collapsed on the
context detail page, but without the option to expand them.
This change stops collapsing them on the detail page regardless of the
setting on the homepage.
This commit is contained in:
Dan Rice 2013-03-20 18:49:48 +02:00
parent 7893401c2f
commit e6dceb5058
2 changed files with 5 additions and 1 deletions

View file

@ -365,7 +365,7 @@ var TodoItemsContainer = {
return false;
});
// set to cookied state
$('.container.context, .container.completed').each(function(){
$('.container.collapsible').each(function(){
if($.cookie(TodoItemsContainer.buildCookieName(this))=="true"){
$(this).find('.toggle_target').hide();
$(this).find('.toggle_target').parent().addClass("context_collapsed");

View file

@ -91,6 +91,10 @@ module TodosHelper
:class => "container #{settings[:container_name]}",
})
if settings[:collapsible]
settings[:class] += " collapsible"
end
content_tag(:div,
:class=>settings[:class],
:id=>settings[:id],