remove edit and remove buttons when comment is marked as deleted
This commit is contained in:
parent
519112a8fc
commit
64c0d770c6
@ -244,6 +244,8 @@ define(["app/text/html", "app/dom", "app/utils", "app/api", "app/markup", "app/i
|
|||||||
} else {
|
} else {
|
||||||
$("span.note", header).textContent = msgs["comment-deleted"];
|
$("span.note", header).textContent = msgs["comment-deleted"];
|
||||||
text.innerHTML = "<p> </p>";
|
text.innerHTML = "<p> </p>";
|
||||||
|
$("a.edit", footer).remove()
|
||||||
|
$("a.delete", footer).remove()
|
||||||
}
|
}
|
||||||
del.textContent = msgs["comment-delete"];
|
del.textContent = msgs["comment-delete"];
|
||||||
});
|
});
|
||||||
@ -253,7 +255,9 @@ define(["app/text/html", "app/dom", "app/utils", "app/api", "app/markup", "app/i
|
|||||||
// remove edit and delete buttons when cookie is gone
|
// remove edit and delete buttons when cookie is gone
|
||||||
var clear = function(button) {
|
var clear = function(button) {
|
||||||
if (! utils.cookie("isso-" + comment.id)) {
|
if (! utils.cookie("isso-" + comment.id)) {
|
||||||
|
if ($(button, footer) !== null) {
|
||||||
$(button, footer).remove();
|
$(button, footer).remove();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function() { clear(button); }, 15*1000);
|
setTimeout(function() { clear(button); }, 15*1000);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user