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