mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-31 03:52:12 +02:00
removed .button calls for destroy
This commit is contained in:
parent
ce280fffa1
commit
9fe827b537
1 changed files with 1 additions and 3 deletions
|
@ -2,7 +2,6 @@ $(document).on "click", "a[data-action=ab-destroy]", (ev) ->
|
||||||
ev.preventDefault()
|
ev.preventDefault()
|
||||||
if confirm 'Are you sure?'
|
if confirm 'Are you sure?'
|
||||||
btn = $(this)
|
btn = $(this)
|
||||||
btn.button "loading"
|
|
||||||
aid = btn[0].dataset.aId
|
aid = btn[0].dataset.aId
|
||||||
$.ajax
|
$.ajax
|
||||||
url: '/ajax/destroy_answer' # TODO: find a way to use rake routes instead of hardcoding them here
|
url: '/ajax/destroy_answer' # TODO: find a way to use rake routes instead of hardcoding them here
|
||||||
|
@ -16,5 +15,4 @@ $(document).on "click", "a[data-action=ab-destroy]", (ev) ->
|
||||||
error: (jqxhr, status, error) ->
|
error: (jqxhr, status, error) ->
|
||||||
console.log jqxhr, status, error
|
console.log jqxhr, status, error
|
||||||
showNotification "An error occurred, a developer should check the console for details", false
|
showNotification "An error occurred, a developer should check the console for details", false
|
||||||
complete: (jqxhr, status) ->
|
complete: (jqxhr, status) ->
|
||||||
btn.button "reset"
|
|
Loading…
Reference in a new issue