Merge pull request #20 from skiprope/ans-delete-ux
Rename 'delete answer' to 'return to inbox' for clarity
This commit is contained in:
commit
e4118c0013
|
@ -3,12 +3,13 @@ $(document).on "click", "a[data-action=ab-destroy]", (ev) ->
|
||||||
btn = $(this)
|
btn = $(this)
|
||||||
aid = btn[0].dataset.aId
|
aid = btn[0].dataset.aId
|
||||||
swal
|
swal
|
||||||
title: "Really delete?"
|
title: "Are you sure?"
|
||||||
text: "The question will be moved back to your inbox."
|
text: "The question will be moved back to your inbox, but it won't delete any posts to social media."
|
||||||
type: "warning"
|
type: "warning"
|
||||||
showCancelButton: true
|
showCancelButton: true
|
||||||
confirmButtonColor: "#DD6B55"
|
confirmButtonColor: "#DD6B55"
|
||||||
confirmButtonText: "Delete"
|
confirmButtonText: "Yes"
|
||||||
|
cancelButtonText: "No"
|
||||||
closeOnConfirm: true
|
closeOnConfirm: true
|
||||||
, ->
|
, ->
|
||||||
$.ajax
|
$.ajax
|
||||||
|
@ -23,4 +24,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) ->
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
%li.text-danger
|
%li.text-danger
|
||||||
%a{href: '#', data: { a_id: a.id, action: 'ab-destroy' }}
|
%a{href: '#', data: { a_id: a.id, action: 'ab-destroy' }}
|
||||||
%i.fa.fa-trash-o
|
%i.fa.fa-trash-o
|
||||||
Delete
|
Return to Inbox
|
||||||
- unless a.user == current_user
|
- unless a.user == current_user
|
||||||
%li
|
%li
|
||||||
%a{href: '#', data: { a_id: a.id, action: 'ab-report' }}
|
%a{href: '#', data: { a_id: a.id, action: 'ab-report' }}
|
||||||
|
|
Loading…
Reference in New Issue