From: Albert Ting Date: Wed, 21 Jan 2015 16:39:19 +0000 (+0000) Subject: Bug 1116666: Auto add comment class based on the tag X-Git-Tag: release-5.1.1~389 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=495b9da4ff3f3dc0293bd72f45645e6569159234;p=thirdparty%2Fbugzilla.git Bug 1116666: Auto add comment class based on the tag r=dkl,a=glob --- diff --git a/js/comment-tagging.js b/js/comment-tagging.js index b6f02f00ef..ff0f133366 100644 --- a/js/comment-tagging.js +++ b/js/comment-tagging.js @@ -233,8 +233,10 @@ YAHOO.bugzilla.commentTagging = { buildTagHtml : function(comment_id, comment_no, tag) { var el = document.createElement('span'); + var c_el =Dom.get('c' + comment_no); Dom.setAttribute(el, 'id', 'ct_' + comment_no + '_' + tag); Dom.addClass(el, 'bz_comment_tag'); + Dom.addClass(c_el, 'bz_comment_tag_' + tag); if (this.can_edit) { var a = document.createElement('a'); Dom.setAttribute(a, 'href', '#'); @@ -282,6 +284,8 @@ YAHOO.bugzilla.commentTagging = { remove : function(comment_id, comment_no, tag) { var el = Dom.get('ct_' + comment_no + '_' + tag); + var c_el =Dom.get('c' + comment_no); + Dom.removeClass(c_el, 'bz_comment_tag_' + tag); if (el) { el.parentNode.removeChild(el); this.rpcUpdate(comment_id, comment_no, undefined, [ tag ]);