updated delete button

This commit is contained in:
nilsding 2014-12-27 14:59:48 +01:00
parent b625144993
commit 260d5cddd7
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
$(document).on "click", "button[name=ab-destroy]", ->
$(document).on "click", "a[data-action=ab-destroy]", (ev) ->
ev.preventDefault()
if confirm 'Are you sure?'
btn = $(this)
btn.button "loading"

View File

@ -23,7 +23,7 @@
%ul.dropdown-menu.dropdown-menu-right{role: :menu}
- if privileged? a.user
%li.text-danger
%a{href: '#', name: 'ab-destroy', data: { a_id: a.id }}
%a{href: '#', data: { a_id: a.id, action: 'ab-destroy' }}
%i.fa.fa-trash-o
Delete
%li