Commit 60b2423c by Rocky Duan

prompt window for deleting

parent 9d3c9e33
......@@ -232,8 +232,13 @@ initializeFollowThread = (thread) ->
handleDelete = (elem) ->
if $content.hasClass("thread")
url = Discussion.urlFor('delete_thread', id)
confirmValue = confirm("Are you sure? This will delete the thread and all comments associated with it and cannot be recovered.")
else
url = Discussion.urlFor('delete_comment', id)
confirmValue = confirm("Are you sure? This will delete the comment and all replies associated with it and cannot be recovered.")
if not confirmValue
return
Discussion.safeAjax
$elem: $(elem)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment