From: David Lawrence Date: Thu, 1 Sep 2011 18:30:51 +0000 (-0400) Subject: Bug 653634 - Change the comment reply header to include the name of the person who... X-Git-Tag: bugzilla-4.3.1~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4055a481342339a5665df5b2ddb2f6843c66c368;p=thirdparty%2Fbugzilla.git Bug 653634 - Change the comment reply header to include the name of the person who has commented r/a=LpSolit --- diff --git a/js/comments.js b/js/comments.js index f46499b62f..28ef54397b 100644 --- a/js/comments.js +++ b/js/comments.js @@ -145,3 +145,30 @@ function goto_add_comments( anchor ){ },10); return false; } + +if (typeof Node == 'undefined') { + /* MSIE doesn't define Node, so provide a compatibility object */ + window.Node = { + TEXT_NODE: 3, + ENTITY_REFERENCE_NODE: 5 + }; +} + +/* Concatenates all text from element's childNodes. This is used + * instead of innerHTML because we want the actual text (and + * innerText is non-standard). + */ +function getText(element) { + var child, text = ""; + for (var i=0; i < element.childNodes.length; i++) { + child = element.childNodes[i]; + var type = child.nodeType; + if (type == Node.TEXT_NODE || type == Node.ENTITY_REFERENCE_NODE) { + text += child.nodeValue; + } else { + /* recurse into nodes of other types */ + text += getText(child); + } + } + return text; +} diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index cbd1d0b836..7b383daf5a 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -25,6 +25,37 @@ + + [% DEFAULT start_at = 0 mode = "show" %] [% sort_order = user.settings.comment_sort_order.value %] @@ -120,8 +151,12 @@ [% IF mode == "edit" %] + [reply] diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index c2f8894d7d..6a7f76c876 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -32,72 +32,6 @@