diff options
Diffstat (limited to 'assets/js/components')
-rw-r--r-- | assets/js/components/autocomplete-email.js | 13 |
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(); + } + } +}); |