diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-06-03 16:53:40 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-06-03 16:53:40 -0400 |
commit | 9668723af4f9ad633d9c9131fbdceb47fa326d9e (patch) | |
tree | 86b019a77fa0ec05e77d10c5de16ee8fae697ade /assets/js/components | |
parent | e27148dfd8192ed3052adb8397a0f8c4ed47916d (diff) |
Add dropdown menu to autocomplete email field from project members
Diffstat (limited to 'assets/js/components')
-rw-r--r-- | assets/js/components/autocomplete-email.js | 12 |
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(); + } + } +}); |