diff options
author | Albert Ting <altlist@gmail.com> | 2015-01-21 17:39:19 +0100 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2015-01-21 17:39:19 +0100 |
commit | 495b9da4ff3f3dc0293bd72f45645e6569159234 (patch) | |
tree | 6abd07d2e135cba4f9133e8ac1978a55f3e50bfa /js | |
parent | ac3f8d97ba41718c676054d9df4d9796cb715d9a (diff) | |
download | bugzilla-495b9da4ff3f3dc0293bd72f45645e6569159234.tar.gz bugzilla-495b9da4ff3f3dc0293bd72f45645e6569159234.tar.xz |
Bug 1116666: Auto add comment class based on the tag
r=dkl,a=glob
Diffstat (limited to 'js')
-rw-r--r-- | js/comment-tagging.js | 4 |
1 files changed, 4 insertions, 0 deletions
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 ]); |