From 64c0d770c619b407ccb7a5584e51e326fc75f718 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Sat, 16 Nov 2013 21:42:11 +0100 Subject: [PATCH] remove edit and remove buttons when comment is marked as deleted --- isso/js/app/isso.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js index fd660de..405b54f 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -244,6 +244,8 @@ define(["app/text/html", "app/dom", "app/utils", "app/api", "app/markup", "app/i } else { $("span.note", header).textContent = msgs["comment-deleted"]; text.innerHTML = "

 

"; + $("a.edit", footer).remove() + $("a.delete", footer).remove() } 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 var clear = function(button) { if (! utils.cookie("isso-" + comment.id)) { - $(button, footer).remove(); + if ($(button, footer) !== null) { + $(button, footer).remove(); + } } else { setTimeout(function() { clear(button); }, 15*1000); }