From 9668723af4f9ad633d9c9131fbdceb47fa326d9e Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 3 Jun 2017 16:53:40 -0400 Subject: Add dropdown menu to autocomplete email field from project members --- assets/js/components/autocomplete-email.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 assets/js/components/autocomplete-email.js (limited to 'assets/js/components') 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(); + } + } +}); -- cgit v1.2.3