summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BugModal')
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl6
-rw-r--r--extensions/BugModal/web/bug_modal.css14
-rw-r--r--extensions/BugModal/web/bug_modal.js35
3 files changed, 32 insertions, 23 deletions
diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
index e1a57a1f6..fd1359b32 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -653,8 +653,10 @@
[% END %]
[% IF bug.cc && bug.cc.size %]
- <input type="hidden" name="removecc" id="removecc">
- <span id="cc-latch">&#9656;</span>
+ [% IF user.id %]
+ <input type="hidden" name="removecc" id="removecc">
+ <span id="cc-latch">&#9656;</span>
+ [% END %]
<span id="cc-summary" data-count="[% bug.cc.size FILTER none %]">
[%
IF bug.cc.size == 1;
diff --git a/extensions/BugModal/web/bug_modal.css b/extensions/BugModal/web/bug_modal.css
index 88ffadc9e..b5e3c1a37 100644
--- a/extensions/BugModal/web/bug_modal.css
+++ b/extensions/BugModal/web/bug_modal.css
@@ -326,14 +326,10 @@ input[type="number"] {
color: #999;
}
-#cc-latch, #cc-summary {
+#cc-latch {
cursor: pointer;
}
-#cc-summary:hover {
- text-decoration: underline;
-}
-
#cc-list {
max-height: 150px;
overflow-y: auto;
@@ -365,6 +361,14 @@ input[type="number"] {
width: 100%;
}
+.cc-loadable {
+ cursor: pointer;
+}
+
+.cc-loadable:hover {
+ text-decoration: underline;
+}
+
/* actions */
#top-actions {
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