summaryrefslogtreecommitdiff
path: root/assets/js/components
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-06-03 17:31:32 -0400
committerFrederic Guillot <fred@kanboard.net>2017-06-03 17:31:32 -0400
commitdd8d7ef49d522a15dbf0d04f033f676580f30ad7 (patch)
treee82070f0831338f712a9312b72dc5edbd0c2a780 /assets/js/components
parent9668723af4f9ad633d9c9131fbdceb47fa326d9e (diff)
Add configurable list of predefined subjects when sending a task by email
Diffstat (limited to 'assets/js/components')
-rw-r--r--assets/js/components/autocomplete-email.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/assets/js/components/autocomplete-email.js b/assets/js/components/autocomplete-email.js
index 96d3fbd2..1babd516 100644
--- a/assets/js/components/autocomplete-email.js
+++ b/assets/js/components/autocomplete-email.js
@@ -10,3 +10,16 @@ KB.onClick('.js-autocomplete-email', function (e) {
}
}
});
+
+KB.onClick('.js-autocomplete-subject', function (e) {
+ var subject = KB.dom(e.target).data('subject');
+
+ if (subject) {
+ var subjectField = KB.find('.js-task-mail-form input[name="subject"]');
+
+ if (subjectField) {
+ subjectField.attr('value', subject);
+ _KB.controllers['Dropdown'].close();
+ }
+ }
+});