remove edit and remove buttons when comment is marked as deleted

This commit is contained in:
Martin Zimmermann 2013-11-16 21:42:11 +01:00
parent 519112a8fc
commit 64c0d770c6

View File

@ -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>&nbsp;</p>"; text.innerHTML = "<p>&nbsp;</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);
} }