mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-26 03:58:49 +01:00
deleting a recurring todo, the next todo was not placed in the ticker. This patch fixes #909
This commit is contained in:
parent
7197618cc8
commit
f5162ed8da
1 changed files with 4 additions and 2 deletions
|
|
@ -11,13 +11,15 @@ if @saved
|
|||
page['tickler-empty-nd'].show if source_view_is(:deferred) && @down_count == 0
|
||||
|
||||
# show new todo if the completed todo was recurring
|
||||
unless @new_recurring_todo.nil?
|
||||
unless @new_recurring_todo.nil? || @new_recurring_todo.deferred?
|
||||
page.call "todoItems.ensureVisibleWithEffectAppear", item_container_id(@new_recurring_todo)
|
||||
page.insert_html :bottom, item_container_id(@new_recurring_todo), :partial => 'todos/todo', :locals => { :todo => @new_recurring_todo, :parent_container_type => parent_container_type }
|
||||
page.visual_effect :highlight, dom_id(@new_recurring_todo, 'line'), {'startcolor' => "'#99ff99'"}
|
||||
page.notify :notice, "Action was deleted. Because this action is recurring, a new action was added", 6.0
|
||||
else
|
||||
page.notify :notice, "There is no next action after the recurring action you just deleted. The recurrence is completed", 6.0 unless @recurring_todo.nil?
|
||||
if @todo.recurring_todo.todos.active.count == 0
|
||||
page.notify :notice, "There is no next action after the recurring action you just deleted. The recurrence is completed", 6.0 unless @recurring_todo.nil?
|
||||
end
|
||||
end
|
||||
else
|
||||
page.notify :error, "There was an error deleting the item #{@todo.description}", 8.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue