summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/web
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-06-15 06:49:59 +0200
committerByron Jones <glob@mozilla.com>2015-06-15 06:49:59 +0200
commitc290f3ecabec75b741d375e6130af9060255c274 (patch)
tree7f52627f41229c6d52a7b2115429c2ac408f438e /extensions/BugModal/web
parentac09f71cfd3e84a01a157a8cba21aec5513a0b14 (diff)
downloadbugzilla-c290f3ecabec75b741d375e6130af9060255c274.tar.gz
bugzilla-c290f3ecabec75b741d375e6130af9060255c274.tar.xz
Bug 1146774: treeherder/tbpl comments are not automatically collapsed
Diffstat (limited to 'extensions/BugModal/web')
-rw-r--r--extensions/BugModal/web/comments.js28
1 files changed, 23 insertions, 5 deletions
diff --git a/extensions/BugModal/web/comments.js b/extensions/BugModal/web/comments.js
index f9852cd0e..b18f7d3d1 100644
--- a/extensions/BugModal/web/comments.js
+++ b/extensions/BugModal/web/comments.js
@@ -72,7 +72,7 @@ $(function() {
$('#c' + id).find('.comment-tags').hide();
$('#c' + id).find('.gravatar').css('width', '16px').css('height', '16px');
$('#cr-' + id).hide();
- spinner.text('+');
+ realSpinner.text('+');
}
else if (forced == 'show') {
if (defaultCollapsed) {
@@ -87,14 +87,14 @@ $(function() {
$('#c' + id).find('.comment-tags').show();
$('#c' + id).find('.gravatar').css('width', '32px').css('height', '32px');
$('#cr-' + id).show();
- spinner.text('-');
+ realSpinner.text('-');
}
else {
$('#ct-' + id).slideToggle('fast', function() {
$('#c' + id).find(activitySelector).toggle();
- $('#c' + id).find('.comment-tags').toggle();
if ($('#ct-' + id + ':visible').length) {
- spinner.text('-');
+ $('#c' + id).find('.comment-tags').show();
+ realSpinner.text('-');
$('#cr-' + id).show();
if (BUGZILLA.user.id !== 0)
$('#ctag-' + id).show();
@@ -105,7 +105,8 @@ $(function() {
}
}
else {
- spinner.text('+');
+ $('#c' + id).find('.comment-tags').hide();
+ realSpinner.text('+');
$('#cr-' + id).hide();
if (BUGZILLA.user.id !== 0)
$('#ctag-' + id).hide();
@@ -171,6 +172,23 @@ $(function() {
}
});
+ $('#view-toggle-treeherder')
+ .click(function() {
+ var that = $(this);
+ console.log(that.data('userid'));
+ var item = $('.context-menu-item.hover');
+ if (that.data('hidden') === '1') {
+ that.data('hidden', '0');
+ item.text('Hide Treeherder Comments');
+ $('.ca-' + that.data('userid')).show();
+ }
+ else {
+ that.data('hidden', '1');
+ item.text('Show Treeherder Comments');
+ $('.ca-' + that.data('userid')).hide();
+ }
+ });
+
$.contextMenu({
selector: '#view-menu-btn',
trigger: 'left',