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.tmpl14
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/field.html.tmpl2
-rw-r--r--extensions/BugModal/web/bug_modal.css7
-rw-r--r--extensions/BugModal/web/bug_modal.js12
4 files changed, 32 insertions, 3 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 29b2a1e40..75aab63d3 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -518,6 +518,20 @@
label = "CC"
hide_on_view = bug.cc.size == 0
%]
+
+ [% IF user.id %]
+ <button type="button" id="add-cc-btn" class="minor">Add</button>
+ <div id="add-cc-container" style="display:none">
+ [% INCLUDE global/userselect.html.tmpl
+ id = "add-cc"
+ name = "newcc"
+ value = ""
+ classes = [ "bz_userfield" ]
+ multiple = 5
+ %]
+ </div>
+ [% END %]
+
[% IF bug.cc && bug.cc.size %]
<span id="cc-latch">&#9656;</span>
<span id="cc-summary">
diff --git a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
index 787b8d9f1..d89c22868 100644
--- a/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/field.html.tmpl
@@ -280,7 +280,7 @@ END;
[% END %]
[% IF edit %]
- <button id="[% name FILTER html %]-btn" class="bug-urls-btn minor">Add</button>
+ <button type="button" id="[% name FILTER html %]-btn" class="bug-urls-btn minor">Add</button>
<input id="[% name FILTER html %]" name="[% name FILTER html %]" style="display:none">
[% END %]
[% END %]
diff --git a/extensions/BugModal/web/bug_modal.css b/extensions/BugModal/web/bug_modal.css
index 19c2854bb..694a726a5 100644
--- a/extensions/BugModal/web/bug_modal.css
+++ b/extensions/BugModal/web/bug_modal.css
@@ -285,7 +285,12 @@ input[type="number"] {
#cc-list {
max-height: 150px;
- overflow-y: scroll;
+ overflow-y: auto;
+ clear: both;
+}
+
+#add-cc-btn {
+ float: right;
}
/* actions */
diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js
index 7d8658f9b..37f01f479 100644
--- a/extensions/BugModal/web/bug_modal.js
+++ b/extensions/BugModal/web/bug_modal.js
@@ -331,7 +331,7 @@ $(function() {
});
$('#mode-btn').prop('disabled', false);
- // cc add/remove
+ // cc toggle (follow/stop following)
$('#cc-btn')
.click(function(event) {
event.preventDefault();
@@ -725,6 +725,16 @@ $(function() {
$('#cancel-btn').click();
}
} );
+
+ // add cc button
+ $('#add-cc-btn')
+ .click(function(event) {
+ event.preventDefault();
+ $('#add-cc-btn').hide();
+ $('#add-cc-container').show();
+ $('#top-save-btn').show();
+ $('#add-cc').focus();
+ });
});
function confirmUnsafeURL(url) {