summaryrefslogtreecommitdiffstats
path: root/extensions/BMO/template/en/default/hook/bug/comments-aftercomments.html.tmpl
diff options
context:
space:
mode:
authorByron Jones <bjones@mozilla.com>2012-05-01 14:21:56 +0200
committerByron Jones <bjones@mozilla.com>2012-05-01 14:21:56 +0200
commit228c7bf9ea03a5faafe22f003e5d56da1b7b2162 (patch)
treed6e510fb195a9a197739e8b6996244bd65b14ea2 /extensions/BMO/template/en/default/hook/bug/comments-aftercomments.html.tmpl
parent136caf50f2569b380879cc68d3dc10142c8e4f84 (diff)
downloadbugzilla-228c7bf9ea03a5faafe22f003e5d56da1b7b2162.tar.gz
bugzilla-228c7bf9ea03a5faafe22f003e5d56da1b7b2162.tar.xz
Bug 748629: collapse tbplbot comments by default
Diffstat (limited to 'extensions/BMO/template/en/default/hook/bug/comments-aftercomments.html.tmpl')
-rw-r--r--extensions/BMO/template/en/default/hook/bug/comments-aftercomments.html.tmpl14
1 files changed, 12 insertions, 2 deletions
diff --git a/extensions/BMO/template/en/default/hook/bug/comments-aftercomments.html.tmpl b/extensions/BMO/template/en/default/hook/bug/comments-aftercomments.html.tmpl
index 3a8913be3..d8dc5bba0 100644
--- a/extensions/BMO/template/en/default/hook/bug/comments-aftercomments.html.tmpl
+++ b/extensions/BMO/template/en/default/hook/bug/comments-aftercomments.html.tmpl
@@ -7,6 +7,8 @@
#%]
[% IF has_tbpl_comment %]
+ [% expand_caption = 'Expand TinderboxPushlog Comments' %]
+ [% collapse_caption = 'Collapse TinderboxPushlog Comments' %]
<script>
YAHOO.util.Event.onDOMReady(function () {
var ul = document.getElementsByClassName('bz_collapse_expand_comments');
@@ -16,14 +18,22 @@
var a = document.createElement('a');
Dom.setAttribute(a, 'href', 'javascript:void(0)');
Dom.setAttribute(a, 'id', 'toggle_tbplbot_comments');
- a.innerHTML = 'Collapse TinderboxPushlog Comments';
+ a.innerHTML = '[% expand_caption FILTER js %]';
YAHOO.util.Event.on(a, 'click', function() {
+ var do_expand = a.innerHTML == '[% expand_caption FILTER js %]';
for (var i = 0, n = tbpl_comment_ids.length; i < n; i++) {
var id = tbpl_comment_ids[i];
var link = document.getElementById('comment_link_' + id);
var text = document.getElementById('comment_text_' + id);
- collapse_comment(link, text);
+ if (do_expand) {
+ expand_comment(link, text);
+ } else {
+ collapse_comment(link, text);
+ }
}
+ a.innerHTML = do_expand
+ ? '[% collapse_caption FILTER js %]'
+ : '[% expand_caption FILTER js %]';
});
li.appendChild(a);
ul[0].appendChild(li);