From 164cee695cab8a4199f44abf3d1fa01e0d828942 Mon Sep 17 00:00:00 2001 From: Carsten Otto Date: Thu, 16 Apr 2015 22:15:30 +0200 Subject: [PATCH] sort after deleting recurring action --- app/views/todos/destroy.js.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/todos/destroy.js.erb b/app/views/todos/destroy.js.erb index e9f006c4..add321c2 100644 --- a/app/views/todos/destroy.js.erb +++ b/app/views/todos/destroy.js.erb @@ -54,7 +54,9 @@ function show_new_todo_if_todo_was_recurring() { <% if @todo.from_recurring_todo? -%> <% unless @new_recurring_todo.nil? || @new_recurring_todo.deferred? -%> TodoItemsContainer.ensureVisibleWithEffectAppear("<%=item_container_id(@new_recurring_todo)%>"); - $('#<%=item_container_id(@new_recurring_todo)%>_items').append(html_for_new_recurring_todo()); + var container = $('#<%=item_container_id(@new_recurring_todo)%>_items'); + container.append(html_for_new_recurring_todo()); + TracksPages.sort_container(container); $('#<%= dom_id(@new_recurring_todo, 'line')%>').effect('highlight', {}, 2000 ); TracksPages.page_inform("<%=t('todos.recurring_action_deleted')%>"); <% else -%>