summaryrefslogtreecommitdiff
path: root/assets/js/components
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/components')
-rw-r--r--assets/js/components/autocomplete-email.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/assets/js/components/autocomplete-email.js b/assets/js/components/autocomplete-email.js
new file mode 100644
index 00000000..96d3fbd2
--- /dev/null
+++ b/assets/js/components/autocomplete-email.js
@@ -0,0 +1,12 @@
+KB.onClick('.js-autocomplete-email', function (e) {
+ var email = KB.dom(e.target).data('email');
+
+ if (email) {
+ var emailField = KB.find('.js-task-mail-form input[type="email"]');
+
+ if (emailField) {
+ emailField.attr('value', email);
+ _KB.controllers['Dropdown'].close();
+ }
+ }
+});