Elastic: Fix non-working folder subscription checkbox for newly added folders (#7174)

pull/7181/head
Aleksander Machniak 5 years ago
parent 62fb938260
commit 700031b3b7

@ -13,6 +13,7 @@ CHANGELOG Roundcube Webmail
- Elastic: Fix bug where it was possible to switch editor mode when 'htmleditor' was in 'dont_override' (#7143) - Elastic: Fix bug where it was possible to switch editor mode when 'htmleditor' was in 'dont_override' (#7143)
- Elastic: Fix text selection in recipient inputs (#7129) - Elastic: Fix text selection in recipient inputs (#7129)
- Elastic: Fix missing Close button in "more recipients" dialog - Elastic: Fix missing Close button in "more recipients" dialog
- Elastic: Fix non-working folder subscription checkbox for newly added folders (#7174)
- Fix so messages in threads with no root aren't displayed separately (#4999) - Fix so messages in threads with no root aren't displayed separately (#4999)
- Fix regression where "Open in new window" action didn't work (#7155) - Fix regression where "Open in new window" action didn't work (#7155)
- Fix PHP Warning: array_filter() expects parameter 1 to be array, null given in subscriptions_option plugin (#7165) - Fix PHP Warning: array_filter() expects parameter 1 to be array, null given in subscriptions_option plugin (#7165)

@ -7598,6 +7598,10 @@ function rcube_webmail()
if (row.scrollIntoView) if (row.scrollIntoView)
row.scrollIntoView(false); row.scrollIntoView(false);
// Let skins to do their magic, e.g. Elastic will fix pretty checkbox
if (!refrow)
this.triggerEvent('clonerow', {row: row, id: id});
return row; return row;
}; };

@ -476,6 +476,7 @@ function rcube_elastic_ui()
.addEventListener('googiespell_create', rcmail_popup_init) .addEventListener('googiespell_create', rcmail_popup_init)
.addEventListener('setquota', update_quota) .addEventListener('setquota', update_quota)
.addEventListener('enable-command', enable_command_handler) .addEventListener('enable-command', enable_command_handler)
.addEventListener('clonerow', pretty_checkbox_fix)
.addEventListener('init', init); .addEventListener('init', init);
// Add styling for TinyMCE editor popups // Add styling for TinyMCE editor popups
@ -3429,6 +3430,19 @@ function rcube_elastic_ui()
.parent().append(label); .parent().append(label);
}; };
/**
* 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 * Make select dropdowns pretty
* TODO: searching, optgroup, [multiple], iPhone/iPad * TODO: searching, optgroup, [multiple], iPhone/iPad

Loading…
Cancel
Save