diff options
author | BonfaceKilz | 2021-11-08 09:12:31 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-11-11 09:32:26 +0300 |
commit | a70b6421221db391a1774ae1133a0a244f00f248 (patch) | |
tree | 930da5f51992ee4e137ae40b2346c970921d4e45 /wqflask | |
parent | 8766b3104be9cdbe00f594c936442b76f3b9a83e (diff) | |
download | genenetwork2-a70b6421221db391a1774ae1133a0a244f00f248.tar.gz |
Replace "var" with "let"
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/group_manager.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/wqflask/wqflask/static/new/javascript/group_manager.js b/wqflask/wqflask/static/new/javascript/group_manager.js index 4c172cbf..cd56133a 100644 --- a/wqflask/wqflask/static/new/javascript/group_manager.js +++ b/wqflask/wqflask/static/new/javascript/group_manager.js @@ -16,23 +16,22 @@ $('#clear_members').click(function(){ function add_emails(user_type){ - var email_address = $('input[name=user_email]').val(); - var email_list_string = $('input[name=' + user_type + '_emails_to_add]').val().trim() - console.log(email_list_string) + let email_address = $('input[name=user_email]').val(); + let email_list_string = $('input[name=' + user_type + '_emails_to_add]').val().trim() if (email_list_string == ""){ - var email_set = new Set(); + let email_set = new Set(); } else { - var email_set = new Set(email_list_string.split(",")) + let email_set = new Set(email_list_string.split(",")) } email_set.add(email_address) $('input[name=' + user_type + '_emails_to_add]').val(Array.from(email_set).join(',')) - var emails_display_string = Array.from(email_set).join('\n') + let emails_display_string = Array.from(email_set).join('\n') $('.added_' + user_type + 's').val(emails_display_string) } function clear_emails(user_type){ $('input[name=' + user_type + '_emails_to_add]').val("") $('.added_' + user_type + 's').val("") -}
\ No newline at end of file +} |