From 495b9da4ff3f3dc0293bd72f45645e6569159234 Mon Sep 17 00:00:00 2001 From: Albert Ting Date: Wed, 21 Jan 2015 16:39:19 +0000 Subject: Bug 1116666: Auto add comment class based on the tag r=dkl,a=glob --- js/comment-tagging.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js') diff --git a/js/comment-tagging.js b/js/comment-tagging.js index b6f02f00e..ff0f13336 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 ]); -- cgit v1.2.3-24-g4f1b