mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-08 05:32:37 +01:00
migrate deleting of contexts
This commit is contained in:
parent
15fdb1e572
commit
e52a8609c7
10 changed files with 124 additions and 31 deletions
15
app/views/contexts/destroy.js.erb
Normal file
15
app/views/contexts/destroy.js.erb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
remove_deleted_context();
|
||||
|
||||
ContextListPage.update_all_states_count(<%=@active_contexts_count%>, <%=@hidden_contexts_count%>)
|
||||
ContextListPage.show_or_hide_all_state_containers(<%= @show_active_contexts %>, <%= @show_hidden_contexts %>);
|
||||
|
||||
set_page_badge(<%=@down_count%>);
|
||||
page_notify('notice', "<%= t('contexts.context_deleted', :name=>@context.name)%>", 5);
|
||||
|
||||
|
||||
function remove_deleted_context() {
|
||||
$('div#<%=dom_id(@context, "container")%>').slideUp(1000,
|
||||
function() {
|
||||
$('div#<%=dom_id(@context, "container")%>').remove();
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue