diff options
author | Aleksander Machniak <alec@alec.pl> | 2020-01-16 17:01:03 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2020-01-16 17:01:59 +0300 |
commit | a3a260b613045d08828ba715e6902b3c7e76c932 (patch) | |
tree | e8a0b80bb227e4701df97cb9dd04b07bc46d26ec /skins | |
parent | 229b9f5f2cf6f41db1065a33229e21ba9a366d6c (diff) |
Elastic: Fix non-working folder subscription checkbox for newly added folders (#7174)
Diffstat (limited to 'skins')
-rw-r--r-- | skins/elastic/ui.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index da780a190..997a2af88 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -476,6 +476,7 @@ function rcube_elastic_ui() .addEventListener('googiespell_create', rcmail_popup_init) .addEventListener('setquota', update_quota) .addEventListener('enable-command', enable_command_handler) + .addEventListener('clonerow', pretty_checkbox_fix) .addEventListener('init', init); // Add styling for TinyMCE editor popups @@ -3430,6 +3431,19 @@ function rcube_elastic_ui() }; /** + * Fix pretty checkbox input in a cloned element + */ + function pretty_checkbox_fix(params) + { + var id, input = $(params.row).find('input[id^=icochk]'); + + if (input.length) { + id = 'icochk' + (++env.checkboxes); + input.attr('id', id).next('label').attr('for', id); + } + }; + + /** * Make select dropdowns pretty * TODO: searching, optgroup, [multiple], iPhone/iPad */ |