Browse Source

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

pull/7561/head
Aleksander Machniak 6 years ago
parent
commit
a3a260b613
  1. 1
      CHANGELOG
  2. 4
      program/js/app.js
  3. 14
      skins/elastic/ui.js

1
CHANGELOG

@ -7,6 +7,7 @@ CHANGELOG Roundcube Webmail
- 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 missing Close button in "more recipients" dialog
- Elastic: Fix non-working folder subscription checkbox for newly added folders (#7174)
- 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 unexpected error message when mail refresh involves folder auto-unsubscribe (#6923)

4
program/js/app.js

@ -7598,6 +7598,10 @@ function rcube_webmail()
if (row.scrollIntoView)
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;
};

14
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
@ -3429,6 +3430,19 @@ function rcube_elastic_ui()
.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
* TODO: searching, optgroup, [multiple], iPhone/iPad

Loading…
Cancel
Save