diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-06-03 17:31:32 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-06-03 17:31:32 -0400 |
commit | dd8d7ef49d522a15dbf0d04f033f676580f30ad7 (patch) | |
tree | e82070f0831338f712a9312b72dc5edbd0c2a780 /assets/js/components | |
parent | 9668723af4f9ad633d9c9131fbdceb47fa326d9e (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.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(); + } + } +}); |