mirror of
https://github.com/rystaf/mlmym.git
synced 2024-11-21 13:17:13 +00:00
delete post confirm() #83
This commit is contained in:
parent
aaf0234e5b
commit
0f48251fc0
|
@ -56,7 +56,7 @@ function commentClick(e) {
|
|||
} else { return }
|
||||
e.target.disabled = "disabled"
|
||||
if (data.get("op") == "delete_comment") {
|
||||
if (!confirm("Are you sure you want to delete?")) {
|
||||
if (!confirm("Are you sure?")) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
@ -242,6 +242,11 @@ function formSubmit(e) {
|
|||
targ.remove()
|
||||
return
|
||||
}
|
||||
if (data.get("op") == "delete_post") {
|
||||
if (!confirm("Are you sure?")) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
e.submitter.disabled = "disabled"
|
||||
request(targ.target, data,
|
||||
function(res){
|
||||
|
@ -267,6 +272,10 @@ function formSubmit(e) {
|
|||
targ.remove()
|
||||
return
|
||||
}
|
||||
if (data.get("op") == "delete_post") {
|
||||
window.location.reload()
|
||||
return false
|
||||
}
|
||||
targ.outerHTML = res
|
||||
setup()
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue