mirror of
https://github.com/TracksApp/tracks.git
synced 2026-04-18 01:59:02 +02:00
migrate deleting a note from notes page to jqeury
This commit is contained in:
parent
7b3c07a754
commit
145c9105dd
13 changed files with 145 additions and 84 deletions
10
app/views/notes/destroy.js.erb
Normal file
10
app/views/notes/destroy.js.erb
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
remove_deleted_note();
|
||||
set_page_badge(<%=@down_count%>);
|
||||
page_notify('notice', "<%= t('notes.deleted_note', :id => @note.id)%>", 5);
|
||||
|
||||
function remove_deleted_note() {
|
||||
$('div#note-<%=@note.id%>-wrapper').slideUp(1000,
|
||||
function() {
|
||||
$('div#note-<%=@note.id%>-wrapper').remove();
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue