tracks/app/views/contexts/destroy.js.erb

13 lines
522 B
Text
Raw Permalink Normal View History

2010-10-23 17:52:50 +02:00
remove_deleted_context();
ContextListPage.update_all_states_count(<%=@active_contexts_count%>, <%=@hidden_contexts_count%>, <%=@closed_contexts_count%>)
2010-10-23 17:52:50 +02:00
TracksPages.set_page_badge(<%=@down_count%>);
TracksPages.page_inform("<%= t('contexts.context_deleted', :name=>@context.name)%>");
2010-10-23 17:52:50 +02:00
/* TODO: refactor and move function to application.js */
2010-10-23 17:52:50 +02:00
function remove_deleted_context() {
$('div#<%=dom_id(@context, "container")%>').slideUp(1000, function() {
2010-10-23 17:52:50 +02:00
$('div#<%=dom_id(@context, "container")%>').remove();
});
2010-10-23 17:52:50 +02:00
}