diff --git a/app/assets/javascripts/tracks.js b/app/assets/javascripts/tracks.js index 5d867ff0..87361fb8 100644 --- a/app/assets/javascripts/tracks.js +++ b/app/assets/javascripts/tracks.js @@ -329,12 +329,6 @@ var TracksPages = { refresh_page(); }); - $("a#show_empty_containers").click(function () { - var show = ($(this).attr("x_show_empty_containers") == "true"); - $.cookie('show_empty_containers', !show); - refresh_page(); - }); - /* fade flashes and alerts in automatically */ $(".alert").fadeOut(8000); } diff --git a/app/controllers/todos_controller.rb b/app/controllers/todos_controller.rb index 24ec64f2..db0239f2 100644 --- a/app/controllers/todos_controller.rb +++ b/app/controllers/todos_controller.rb @@ -9,7 +9,6 @@ class TodosController < ApplicationController def index @source_view = params['_source_view'] || 'todo' @group_view_by = cookies['group_view_by'] || 'context' - @show_empty_containers = (cookies['show_empty_containers']=="true") || false init_data_for_sidebar unless mobile? @@ -934,7 +933,6 @@ class TodosController < ApplicationController @tag_title = @single_tag ? @tag_name : tag_title(@tag_expr) @group_view_by = cookies['group_view_by'] || 'context' - @show_empty_containers = (cookies['show_empty_containers']=="true") || false end def get_ids_from_tag_expr(tag_expr) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e4397553..1b63eeb0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -17,17 +17,6 @@ module ApplicationHelper end end - def show_empty_containers_menu_entry - @show_empty_containers ||= false - @group_view_by ||= 'context' - content_tag(:li) do - link_to( - t("layouts.navigation.show_empty_containers_#{@group_view_by}"), - '#', - {:id => "show_empty_containers", :accesskey => "s", :title => t('layouts.navigation.show_empty_containers_title'), :x_show_empty_containers => @show_empty_containers} ) - end - end - def container_toggle(id) link_to( image_tag("blank.png", :alt => t('common.collapse_expand')), diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 87926aba..6c0179c7 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -66,7 +66,8 @@ module TodosHelper :object => todos_without_project, :locals => {:settings => { :collapsible => true, - :container_name => "without_project" + :container_name => "without_project", + :parent_container_type => "home" } } end @@ -457,13 +458,13 @@ module TodosHelper end def item_container_id (todo) - return "hiddenitems" if source_view_is(:tag) && todo.hidden? - return "c#{todo.context_id}items" if source_view_is :deferred - return @new_due_id if source_view_is :calendar - return "tickleritems" if !source_view_is(:todo) && (todo.deferred? || todo.pending?) - return "completed_containeritems" if todo.completed? - return "p#{todo.project_id}items" if source_view_is :project - return "c#{todo.context_id}items" + return "hidden_items" if source_view_is(:tag) && todo.hidden? + return "c#{todo.context_id}_items" if source_view_is :deferred + return @new_due_id if source_view_is :calendar + return "tickler_items" if !source_view_is(:todo) && (todo.deferred? || todo.pending?) + return "completed_container_items" if todo.completed? + return "p#{todo.project_id}_items" if source_view_is :project + return "c#{todo.context_id}_items" end def empty_container_msg_div_id(todo = @todo || @successor) @@ -472,12 +473,12 @@ module TodosHelper source_view do |page| page.project { return "tickler-empty-nd" if empty_criteria_met - return "p#{todo.project_id}empty-nd" + return "p#{todo.project_id}-empty-d" } page.tag { return "tickler-empty-nd" if empty_criteria_met return "hidden-empty-nd" if @todo.hidden? - return "c#{todo.context_id}empty-nd" + return "c#{todo.context_id}-empty-d" } page.calendar { return "tickler-empty-nd" if empty_criteria_met @@ -485,11 +486,11 @@ module TodosHelper } page.context { return "tickler-empty-nd" if empty_criteria_met - return "c#{todo.context_id}empty-nd" + return "c#{todo.context_id}-empty-d" } end - return "c#{todo.context_id}empty-nd" + return "c#{todo.context_id}-empty-d" end def empty_criteria_met diff --git a/app/views/contexts/_context.html.erb b/app/views/contexts/_context.html.erb index 096625a7..101fd33c 100644 --- a/app/views/contexts/_context.html.erb +++ b/app/views/contexts/_context.html.erb @@ -13,7 +13,7 @@ cache [context, @source_view, current_user.date.strftime("%Y%m%d"), @tag_name] d :collapsible => settings[:collapsible], :container_name => 'context', :title => show_context_name(context), - :show_empty_containers => @show_empty_containers + :show_empty_containers => settings[:show_empty_containers] }} %> diff --git a/app/views/contexts/show.html.erb b/app/views/contexts/show.html.erb index 7aca31c7..b800c1ab 100644 --- a/app/views/contexts/show.html.erb +++ b/app/views/contexts/show.html.erb @@ -4,7 +4,7 @@ done_todo_options = {:append_descriptor => suffix_completed, :suppress_context => true, :parent_container_type => 'context'} -%>