summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/web/bug_modal.js
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-05-31 23:39:13 +0200
committerDavid Lawrence <dkl@mozilla.com>2016-05-31 23:39:19 +0200
commita092e46153b5bf826fcc88f4908122f7f3e96370 (patch)
tree9c9c78043e15f4abae4326ff43157da8215f5dc1 /extensions/BugModal/web/bug_modal.js
parente31c0e9c22197ba938c6f4a853347edf54931700 (diff)
downloadbugzilla-a092e46153b5bf826fcc88f4908122f7f3e96370.tar.gz
bugzilla-a092e46153b5bf826fcc88f4908122f7f3e96370.tar.xz
Bug 1272546 - unauthenticated users cannot expand the cc list
Diffstat (limited to 'extensions/BugModal/web/bug_modal.js')
-rw-r--r--extensions/BugModal/web/bug_modal.js35
1 files changed, 19 insertions, 16 deletions
diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js
index b3b378d26..46a000482 100644
--- a/extensions/BugModal/web/bug_modal.js
+++ b/extensions/BugModal/web/bug_modal.js
@@ -226,24 +226,27 @@ $(function() {
);
}
- $('#cc-latch, #cc-summary')
- .click(function(event) {
- event.preventDefault();
- var latch = $('#cc-latch');
+ if (BUGZILLA.user.id) {
+ $('#cc-summary').addClass('cc-loadable');
+ $('#cc-latch, #cc-summary')
+ .click(function(event) {
+ event.preventDefault();
+ var latch = $('#cc-latch');
- if (latch.data('expanded')) {
- latch.data('expanded', false).html('&#9656;');
- $('#cc-list').hide();
- }
- else {
- latch.data('expanded', true).html('&#9662;');
- $('#cc-list').show();
- if (!latch.data('fetched')) {
- ccListLoading();
- ccListUpdate();
+ if (latch.data('expanded')) {
+ latch.data('expanded', false).html('&#9656;');
+ $('#cc-list').hide();
}
- }
- });
+ else {
+ latch.data('expanded', true).html('&#9662;');
+ $('#cc-list').show();
+ if (!latch.data('fetched')) {
+ ccListLoading();
+ ccListUpdate();
+ }
+ }
+ });
+ }
// copy summary to clipboard