]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1116666: Auto add comment class based on the tag
authorAlbert Ting <altlist@gmail.com>
Wed, 21 Jan 2015 16:39:19 +0000 (16:39 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Wed, 21 Jan 2015 16:39:19 +0000 (16:39 +0000)
r=dkl,a=glob

js/comment-tagging.js

index b6f02f00efd0f22af83293d48223e7a05b01e0a0..ff0f1333663d5596105d4037e8e39b0361dde2ba 100644 (file)
@@ -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 ]);