summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2014-02-19 17:03:35 +0100
committerByron Jones <bjones@mozilla.com>2014-02-19 17:03:35 +0100
commit10e2151e445a607566a325bcce0f9478c83adfb3 (patch)
tree82e74e7165a6a5b7e65e245dd9eba7bffa480f7e /js
parentd6992688ba11ad45aa2a892e020b1f3a9a39b9ea (diff)
downloadbugzilla-10e2151e445a607566a325bcce0f9478c83adfb3.tar.gz
bugzilla-10e2151e445a607566a325bcce0f9478c83adfb3.tar.xz
Bug 974393: comment tag link is collapsing all comments including those with the tag
Diffstat (limited to 'js')
-rw-r--r--js/comments.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/js/comments.js b/js/comments.js
index 2264375eb..63bf5c887 100644
--- a/js/comments.js
+++ b/js/comments.js
@@ -55,13 +55,16 @@ function toggle_all_comments(action) {
var comment = comments[i];
if (!comment)
continue;
-
- var id = comments[i].id.match(/\d*$/);
+ var id = comment.id.match(/^comment_text_(\d*)$/);
+ if (!id)
+ continue;
+ id = id[1];
var link = document.getElementById('comment_link_' + id);
- if (action == 'collapse')
+ if (action == 'collapse') {
collapse_comment(link, comment, id);
- else
+ } else {
expand_comment(link, comment, id);
+ }
}
}