Merge branch 'master' into rails4

Conflicts:
	Gemfile.lock
	config/routes.rb
This commit is contained in:
Reinier Balt 2013-06-17 09:25:02 +02:00
commit 4a485558e2
51 changed files with 5475 additions and 5015 deletions

View file

@ -34,8 +34,9 @@ var TracksForm = {
$('#default_project_name_id').val(name);
$('#project_name').html(name);
},
set_tag_list: function (name) {
set_tag_list_and_default_tag_list: function (name) {
$('input#tag_list').val(name);
$('input#initial_tag_list').val(name);
},
set_tag_list_for_multi_add: function (name) {
$('#multi_tag_list').val(name);

View file

@ -21,6 +21,7 @@ class ApplicationController < ActionController::Base
before_filter :set_time_zone
before_filter :set_zindex_counter
before_filter :set_locale
append_before_filter :set_group_view_by
prepend_before_filter :login_required
prepend_before_filter :enable_mobile_content_negotiation
after_filter :set_charset
@ -291,4 +292,8 @@ class ApplicationController < ActionController::Base
render :template => 'todos/done'
end
def set_group_view_by
@group_view_by = params['_group_view_by'] || cookies['group_view_by'] || 'context'
end
end

View file

@ -42,6 +42,7 @@ class ContextsController < ApplicationController
@max_completed = current_user.prefs.show_number_completed
@done = @context.todos.completed.limit(@max_completed).reorder("todos.completed_at DESC, todos.created_at DESC").includes(Todo::DEFAULT_INCLUDES)
@not_done_todos = @context.todos.active.reorder("todos.due IS NULL, todos.due ASC, todos.created_at ASC").includes(Todo::DEFAULT_INCLUDES)
@todos_without_project = @not_done_todos.select{|t| t.project.nil?}
@deferred_todos = @context.todos.deferred.includes(Todo::DEFAULT_INCLUDES)
@pending_todos = @context.todos.pending.includes(Todo::DEFAULT_INCLUDES)
@ -49,6 +50,9 @@ class ContextsController < ApplicationController
@projects = current_user.projects
@contexts = current_user.contexts
@projects_to_show = @projects.active
@contexts_to_show = [@context]
@count = @not_done_todos.count + @deferred_todos.count + @pending_todos.count
@page_title = "TRACKS::Context: #{@context.name}"
respond_to do |format|

View file

@ -47,29 +47,6 @@ class LoginController < ApplicationController
logout_user
end
def expire_session
# this is a hack to enable cucumber to expire a session by calling this
# method. The method will be unavailable for production environment
@user.forget_me if logged_in?
cookies.delete :auth_token
session['user_id'] = nil
reset_session
unless Rails.env.production?
session['expiry_time'] = Time.now
respond_to do |format|
format.html { render :text => "Session expired for test purposes"}
format.js { render :text => "" }
end
else
respond_to do |format|
format.html { render :text => "Not available for production use"}
format.js { render :text => "" }
end
end
end
def check_expiry
# Gets called by periodically_call_remote to check whether
# the session has timed out yet

View file

@ -131,12 +131,14 @@ class ProjectsController < ApplicationController
@not_done_todos = @project.todos.active_or_hidden.includes(Todo::DEFAULT_INCLUDES)
@deferred_todos = @project.todos.deferred.includes(Todo::DEFAULT_INCLUDES)
@pending_todos = @project.todos.pending.includes(Todo::DEFAULT_INCLUDES)
@contexts_to_show = current_user.contexts.active
@projects_to_show = [@project]
@done = {}
@done = @project.todos.completed.
reorder("todos.completed_at DESC").
limit(current_user.prefs.show_number_completed).
includes(Todo::DEFAULT_INCLUDES) unless current_user.prefs.show_number_completed == 0
includes(Todo::DEFAULT_INCLUDES) unless @max_completed == 0
@count = @not_done_todos.size
@down_count = @count + @deferred_todos.size + @pending_todos.size

View file

@ -3,7 +3,6 @@ class TodosController < ApplicationController
skip_before_filter :login_required, :only => [:index, :tag]
prepend_before_filter :login_or_feed_token_required, :only => [:index, :tag]
append_before_filter :find_and_activate_ready, :only => [:index, :list_deferred]
append_before_filter :set_group_view_by, :only => [:index, :tag, :create, :list_deferred, :destroy, :defer, :update, :toggle_check]
protect_from_forgery :except => :check_deferred
@ -594,13 +593,8 @@ class TodosController < ApplicationController
get_params_for_tag_view
@page_title = t('todos.tagged_page_title', :tag_name => @tag_title)
@source_view = params['_source_view'] || 'tag'
if mobile?
# mobile tags are routed with :name ending on .m. So we need to chomp it
@tag_name = @tag_name.chomp('.m')
else
init_data_for_sidebar
end
init_data_for_sidebar unless mobile?
todos_with_tag_ids = find_todos_with_tag_expr(@tag_expr)
@ -833,8 +827,9 @@ class TodosController < ApplicationController
end
def get_params_for_tag_view
# use sanitize to prevent XSS attacks
filter_format_for_tag_view
# use sanitize to prevent XSS attacks
@tag_expr = []
@tag_expr << sanitize(params[:name]).split(',')
@tag_expr << sanitize(params[:and]).split(',') if params[:and]
@ -850,6 +845,27 @@ class TodosController < ApplicationController
@tag_title = @single_tag ? @tag_name : tag_title(@tag_expr)
end
def filter_format_for_tag_view
# routes for tag view do not set :format
if params[:name] =~ /.*\.m$/
set_format_for_tag_view(:m)
elsif params[:name] =~ /.*\.txt$/
set_format_for_tag_view(:txt)
# set content-type to text/plain or it remains text/html
response.headers["Content-Type"] = 'text/plain'
elsif params[:format].nil?
# if no format is given, default to html
# note that if url has ?format=m, we should not overwrite it here
request.format, params[:format] = :html, :html
end
end
def set_format_for_tag_view(format)
# tag name ends with .m, set format to :m en remove .m from name
request.format, params[:format] = format, format
params[:name] = params[:name].chomp(".#{format.to_s}")
end
def get_ids_from_tag_expr(tag_expr)
ids = []
tag_expr.each do |tag_list|

View file

@ -21,13 +21,13 @@ module TodosHelper
end
end
def show_grouped_todos
def show_grouped_todos(settings = {})
collection = (@group_view_by == 'context') ? @contexts_to_show : @projects_to_show
render(:partial => collection, :locals => { :settings => {
render(:partial => collection, :locals => { :settings => settings.reverse_merge!({
:collapsible => true,
:show_empty_containers => @show_empty_containers,
:parent_container_type => @group_view_by
}})
})})
end
def default_collection_settings
@ -80,14 +80,14 @@ module TodosHelper
:locals => {:settings => settings.reverse_merge!(default_collection_settings)}
end
def show_todos_without_project(todos_without_project)
def show_todos_without_project(todos_without_project, settings = {})
render :partial => 'todos/collection',
:object => todos_without_project,
:locals => {:settings => {
:locals => {:settings => settings.reverse_merge!({
:collapsible => true,
:container_name => "without_project",
:parent_container_type => "home"
}
})
}
end
@ -480,7 +480,7 @@ module TodosHelper
def should_show_new_item(todo = @todo)
return false if todo.nil?
source_view do |page|
page.todo { return !todo.hidden? }
page.todo { return !todo.hidden? && !todo.deferred? }
page.deferred { return todo.deferred? || todo.pending? }
page.context { return show_todo_on_current_context_page && todo_should_not_be_hidden_on_context_page }
page.tag { return todo.has_tag?(@tag_name) }
@ -512,18 +512,18 @@ module TodosHelper
end
def update_needs_to_hide_container
if source_view_is(:tag)
if source_view_is_one_of(:tag, :context, :project)
return @remaining_in_context == 0 && (
todo_moved_out_of_container ||
(@todo_hidden_state_changed && @todo.hidden?) ||
@todo_was_deferred_from_active_state ||
@tag_was_removed ||
@todo_was_destroyed ||
(@todo.completed? && !(@original_item_was_deferred || @original_item_was_hidden))
(@todo.completed? && !(@original_item_was_deferred || @original_item_was_hidden || @original_item_was_pending))
)
end
return false if source_view_is_one_of(:project, :calendar, :done, :context)
return false if source_view_is_one_of(:calendar, :done)
return @remaining_in_context == 0
end
@ -599,7 +599,7 @@ module TodosHelper
end
def todo_container_empty_id(todo)
raise Exception.new, "no todo set in TodosHelper::todo_container_empty_id. You probably not assign @original_item" if !todo
raise Exception.new, "no todo set in TodosHelper::todo_container_empty_id. You probably did not assign @original_item" if !todo
@group_view_by == "project" ? project_container_empty_id(todo) : context_container_empty_id(todo)
end
@ -609,8 +609,7 @@ module TodosHelper
return "#{@new_due_id}_container" if source_view_is :calendar
return "deferred_pending_container" if !source_view_is(:todo) && (todo.deferred? || todo.pending?)
return "completed_container" if todo.completed?
return "p#{todo.project_id}" if source_view_is :project
return project_container_id(todo) if source_view_is_one_of(:todo, :tag) && @group_view_by == 'project'
return project_container_id(todo) if source_view_is_one_of(:todo, :tag, :project, :context) && @group_view_by == 'project'
return context_container_id(todo)
end
@ -620,7 +619,7 @@ module TodosHelper
source_view do |page|
page.project {
return "deferred_pending_container-empty-d" if empty_criteria_met
return project_container_empty_id(todo)
return todo_container_empty_id(todo)
}
page.tag {
return "deferred_pending_container-empty-d" if empty_criteria_met
@ -633,7 +632,7 @@ module TodosHelper
}
page.context {
return "deferred_pending_container-empty-d" if empty_criteria_met
return context_container_empty_id(todo)
return todo_container_empty_id(todo)
}
page.todo {
return todo_container_empty_id(todo)

View file

@ -539,14 +539,13 @@ class RecurringTodo < ActiveRecord::Base
end
def get_monthly_date(previous)
start = determine_start(previous)
day = self.every_other1
n = self.every_other2
case self.recurrence_selector
when 0 # specific day of the month
if start.mday >= day
if start.mday > day
# there is no next day n in this month, search in next month
#
# start += n.months

View file

@ -99,7 +99,7 @@ class Todo < ActiveRecord::Base
end
event :block do
transitions :to => :pending, :from => [:active, :deferred]
transitions :to => :pending, :from => [:active, :deferred, :project_hidden]
end
end
@ -152,6 +152,14 @@ class Todo < ActiveRecord::Base
return !( uncompleted_predecessors.empty? || state == 'project_hidden' )
end
def guard_for_transition_from_deferred_to_pending
no_uncompleted_predecessors? && not_part_of_hidden_container?
end
def not_part_of_hidden_container?
!( (self.project && self.project.hidden?) || self.context.hidden? )
end
# Returns a string with description <context, project>
def specification
project_name = self.project.is_a?(NullProject) ? "(none)" : self.project.name
@ -195,7 +203,7 @@ class Todo < ActiveRecord::Base
def remove_predecessor(predecessor)
self.predecessors.delete(predecessor)
if self.predecessors.empty?
self.activate!
self.not_part_of_hidden_container? ? self.activate! : self.hide!
else
save!
end

View file

@ -3,7 +3,7 @@
# invalidate the cache every day because of staleness or
# rendering of "due in x days" that change without touching updated at of the todo
cache [context, @source_view, current_user.date.strftime("%Y%m%d"), @tag_name] do
%>
-%>
<%=
render :partial => 'todos/collection',
:object => @not_done,

View file

@ -1,7 +1,7 @@
<div class="list-stategroup-contexts-container" id="list-<%= state %>-contexts-container">
<h2>
<span id="<%= state %>-contexts-count" class="badge"><%= context_state_group.length %></span>
<%= t("states."+ state +"_plural")%> <%= t('common.contexts') %>
<%= t("states.contexts."+ state) %>
</h2>
<div id="<%= state%>-contexts-empty-nd" style="<%= no_contexts ? 'display:block' : 'display:none'%>">

View file

@ -2,9 +2,17 @@
suffix_completed = t('contexts.last_completed_in_context', :number=>prefs.show_number_completed)
deferred_pending_options = {:append_descriptor => nil, :parent_container_type => 'context'}
done_todo_options = {:append_descriptor => suffix_completed, :suppress_context => true, :parent_container_type => 'context'}
show_empty_containers = (@group_view_by == 'context')
-%>
<div id="display_box">
<%= render :partial => @context, :locals => { :settings => {:collapsible => false, :show_empty_containers => true, :parent_container_type => 'context' }} %>
<%= empty_message_holder("not_done_project", @not_done_todos.empty?) %>
<%= show_grouped_todos({:collapsible => false, :show_empty_containers => show_empty_containers, :parent_container_type => 'context'}) %>
<% if @group_view_by == 'project' -%>
<%= show_todos_without_project(@todos_without_project, {:collapsible => false, :parent_container_type => 'context', :title_param => @context.name}) -%>
<% end -%>
<%= show_deferred_pending_todos(@deferred_todos, @pending_todos, deferred_pending_options) %>

View file

@ -46,10 +46,6 @@
</h1>
</div>
<div id="minilinks">
<%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %>
&nbsp;|&nbsp;
<%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %>
&nbsp;|&nbsp;
<%= link_to("#{t('common.logout')} (#{current_user.display_name}) &raquo;".html_safe, logout_path) %>
</div>
<div id="navcontainer">
@ -66,13 +62,15 @@
<li><%= navigation_link( t('layouts.navigation.recurring_todos'), {:controller => "recurring_todos", :action => "index"}, :title => t('layouts.navigation.recurring_todos_title')) %></li>
</ul>
</li>
<li><a href="#"><%= t('layouts.navigation.view') %></a>
<li id="menu_view"><a href="#" id="menu_view_link"><%= t('layouts.navigation.view') %></a>
<ul>
<li><%= navigation_link( t('layouts.navigation.calendar'), calendar_path, :title => t('layouts.navigation.calendar_title')) %></li>
<li><%= navigation_link( t('layouts.navigation.completed_tasks'), done_overview_path, {:accesskey=>"d", :title=>t('layouts.navigation.completed_tasks_title')} ) %></li>
<li><%= navigation_link( t('layouts.navigation.feeds'), feeds_path, :title => t('layouts.navigation.feeds_title')) %></li>
<li><%= navigation_link( t('layouts.navigation.stats'), stats_path, :title => t('layouts.navigation.stats_title')) %></li>
<li><hr/></li>
<li id="menu_view_toggle_contexts"><%= link_to(t('layouts.toggle_contexts'), "#", {:title => t('layouts.toggle_contexts_title'), :id => "toggle-contexts-nav"}) %></li>
<li><%= link_to(t('layouts.toggle_notes'), "#", {:accesskey => "S", :title => t('layouts.toggle_notes_title'), :id => "toggle-notes-nav"}) %></li>
<%= group_view_by_menu_entry %>
</ul>
</li>

View file

@ -2,11 +2,8 @@
@not_done = @not_done_todos.select {|t| t.project_id == project.id }
# invalidate the cache every day because of staleness or
# rendering of "due in x days" that change without touching updated at of the todo
cache [project, @source_view, current_user.date.strftime("%Y%m%d")] do
cache [project, @source_view, current_user.date.strftime("%Y%m%d"), @tag_name] do
-%>
<% if source_view_is :project -%>
<%= render :partial => "project_settings_container", :locals => {:project => project} %>
<% end -%>
<%=
title = source_view_is(:project) ? t('projects.actions_in_project_title') : show_project_name(project)

View file

@ -8,14 +8,9 @@
<h2>
<span id="<%= state %>-projects-count" class="badge"><%= project_state_group.length%><%= total_count_string%></span>
<%= t('common.last' ) unless ( ['review','stalled','blocked','current'].include?(state) )%>
<% if (I18n.locale == :fr) %>
<%= t('common.projects').downcase %>
<%= t('states.'+state+'_plural' ).downcase %><%= total_count==-1 ? "" : " (#{link_to(t('common.show_all'), done_projects_path)})".html_safe%>
<% else %>
<%= t('states.'+state+'_plural' )%>
<%= t('common.projects') %><%= total_count==-1 ? "" : " (#{link_to(t('common.show_all'), done_projects_path)})".html_safe%>
<% end %>
<%= t('common.last' ) if state == 'completed' %>
<%= t('states.projects.'+state) %>
<%= total_count==-1 ? "" : " (#{link_to(t('common.show_all'), done_projects_path)})".html_safe%>
</h2>
<% unless suppress_sort_menu %>

View file

@ -5,11 +5,19 @@
:suppress_project => true,
:parent_container_type => 'project'
}
if @not_done_todos.count == 0
# force project view so one empty container will be shown with an empty message
@group_view_by = 'project'
end
-%>
<div id="display_box">
<%= project_next_prev %>
<%= render :partial => @project, :locals => {:settings => {:collapsible => false, :show_empty_containers => true, :parent_container_type => 'project' }} %>
<%= render :partial => "project_settings_container", :locals => {:project => @project} %>
<%= empty_message_holder("not_done_context", @not_done_todos.empty?) %>
<%= show_grouped_todos({:collapsible => false, :show_empty_containers => false, :parent_container_type => 'project' }) %>
<%= show_deferred_pending_todos(@deferred_todos, @pending_todos, deferred_pending_options) %>

View file

@ -36,7 +36,7 @@ function update_project_page() {
TracksForm.set_context_name_and_default_context_name("<%= escape_javascript(@project.default_context.name)%>");
<% end %>
<% if @project.default_tags %>
TracksForm.set_tag_list("<%= escape_javascript(@project.default_tags)%>");
TracksForm.set_tag_list_and_default_tag_list("<%= escape_javascript(@project.default_tags)%>");
<% end %>
TracksPages.update_sidebar(html_for_sidebar());
}

View file

@ -84,12 +84,12 @@
:month => select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, @recurring_todo.yearly_month_of_year2))) %><br/>
</div>
<div id="recurring_target">
<label><%= t('todos.recurrence.recurrence_on_options') %></label><br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', @recurring_todo.target == 'due_date')%> <%= t('todos.recurrence.recurrence_on_due_date') %>. <%= t('todos.recurrence.show_options') %>:
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', @recurring_todo.show_always?)%> <%= t('todos.recurrence.show_option_always') %>
<label><%= t('todos.recurrence.recurrence_on.options') %></label><br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', @recurring_todo.target == 'due_date')%> <%= t('todos.recurrence.recurrence_on.due_date') %>. <%= t('todos.recurrence.recurrence_on.show_options') %>:
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', @recurring_todo.show_always?)%> <%= t('todos.recurrence.recurrence_on.show_always') %>
<%= radio_button_tag('recurring_todo[recurring_show_always]', '0', !@recurring_todo.show_always?)%>
<%= raw t('todos.recurrence.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', @recurring_todo.show_from_delta, {"size" => 3})) %><br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', @recurring_todo.target == 'show_from_date')%> <%= t('todos.recurrence.from_tickler') %><br/>
<%= raw t('todos.recurrence.recurrence_on.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', @recurring_todo.show_from_delta, {"size" => 3})) %><br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', @recurring_todo.target == 'show_from_date')%> <%= t('todos.recurrence.recurrence_on.from_tickler') %><br/>
<br/>
</div>
<% end %>

View file

@ -76,13 +76,13 @@
:month => select_tag('recurring_todo[yearly_month_of_year2]', options_for_select(@months_of_year, Time.zone.now.month))) %><br/>
</div>
<div id="recurring_target">
<label><%= t('todos.recurrence.recurrence_on_options') %></label><br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', true)%> <%= t('todos.recurrence.recurrence_on_due_date') %>. <%= t('todos.recurrence.show_options') %>:
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', true)%> <%= t('todos.recurrence.show_option_always') %>
<label><%= t('todos.recurrence.recurrence_on.options') %></label><br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'due_date', true)%> <%= t('todos.recurrence.recurrence_on.due_date') %>. <%= t('todos.recurrence.recurrence_on.show_options') %>:
<%= radio_button_tag('recurring_todo[recurring_show_always]', '1', true)%> <%= t('todos.recurrence.recurrence_on.show_always') %>
<%= radio_button_tag('recurring_todo[recurring_show_always]', '0', false)%>
<%= raw t('todos.recurrence.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', "0", {"size" => 3})) %>
<%= raw t('todos.recurrence.recurrence_on.show_days_before', :days => text_field_tag( 'recurring_todo[recurring_show_days_before]', "0", {"size" => 3})) %>
<br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', false)%> <%= t('todos.recurrence.from_tickler') %><br/>
<%= radio_button_tag('recurring_todo[recurring_target]', 'show_from_date', false)%> <%= t('todos.recurrence.recurrence_on.from_tickler') %><br/>
<br/>
</div>

View file

@ -31,7 +31,7 @@
$('#todo-form-new-action').clearDeps();
TracksForm.set_context_name('<%=escape_javascript @initial_context_name%>');
TracksForm.set_project_name('<%=escape_javascript @initial_project_name%>');
TracksForm.set_tag_list('<%=escape_javascript @initial_tags%>');
TracksForm.set_tag_list_and_default_tag_list('<%=escape_javascript @initial_tags%>');
$('#todo-form-new-action input:text:first').focus();
$('#new_todo_starred_link .todo_star').removeClass('starred');
$('#new_todo_starred').val('false');
@ -86,4 +86,4 @@
return "<%= @saved ? escape_javascript(render(:partial => @todo, :locals => { :parent_container_type => parent_container_type, :source_view => @source_view })) : "" %>";
}
<% end -%>
<% end -%>

View file

@ -15,7 +15,7 @@
animation << "add_todo_to_container" unless source_view_is(:done)
animation << "block_predecessors"
end
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo, :deferred)
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo, :deferred, :project, :context)
animation << "regenerate_predecessor_family"
else
animation << "replace_todo"
@ -63,15 +63,14 @@ function replace_todo(next_steps) {
}
function add_todo_to_container(next_steps) {
// <%= @group_view_by %>
$('#<%= item_container_id(@todo) %>_items').append(html_for_todo());
<% if should_make_context_visible -%>
$('#<%= item_container_id(@todo) %>').slideDown(500, function() {
$("#<%= empty_container_msg_div_id %>").slideUp(100);
$("#<%= empty_container_msg_div_id %>").slideUp(100);
highlight_updated_todo(next_steps);
});
<% else -%>
$("#<%= empty_container_msg_div_id(@todo) %>").slideUp(100);
$("#<%= empty_container_msg_div_id(@todo) %>").slideUp(100);
highlight_updated_todo(next_steps);
<% end -%>
<% if @completed_count == 0 -%>
@ -120,7 +119,7 @@ function highlight_updated_todo(next_steps) {
function activate_pending_todos(next_steps) {
<% # Activate pending todos that are successors of the completed
if @saved && @pending_to_activate
if @pending_to_activate
# do not render the js in case of an error or if no todos to activate
@pending_to_activate.each do |t|
html = escape_javascript(render(:partial => t, :locals => { :parent_container_type => parent_container_type }))
@ -173,7 +172,7 @@ end
function html_for_recurring_todo() {
<%-
js = @saved && @new_recurring_todo ? escape_javascript(render(:partial => @new_recurring_todo, :locals => { :parent_container_type => parent_container_type })) : ""
js = @new_recurring_todo ? escape_javascript(render(:partial => @new_recurring_todo, :locals => { :parent_container_type => parent_container_type })) : ""
-%>
return "<%= js %>";
}
@ -181,7 +180,7 @@ function html_for_recurring_todo() {
function html_for_todo() {
<%-
js = ""
if @saved && !source_view_is(:done)
if !source_view_is(:done)
js = escape_javascript(render(
:partial => @todo,
:locals => {

View file

@ -20,7 +20,7 @@
end
animation << "hide_container" if update_needs_to_hide_container
animation << "highlight_updated_todo"
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo, :deferred)
animation << "update_empty_container" if source_view_is_one_of(:tag, :todo, :deferred, :project, :context)
animation << "update_predecessors"
%>
TracksPages.page_notify('notice', '<%=escape_javascript @status_message%>', 5);