mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-11-15 21:00:14 +00:00
[Web][Dovecot] Add retention rules: nightly deletion of mail by folder and age for domains, groups and mailboxes
This commit is contained in:
36 files changed
+3013
-16
No files matched your search
@@ -102,16 +102,18 @@ var mailcowMailPolicy = (function($) {
|
||||
});
|
||||
}
|
||||
|
||||
// add modal: mailboxes and groups of the chosen domain only
|
||||
// add modal: mailboxes and groups of the chosen domain only. The options are rebuilt and bootstrap-select is
|
||||
// built anew: its refresh repeats the list and still shows hidden options
|
||||
function filterDomain($form) {
|
||||
var domain = $form.find('select.mail-policy-domain-select').val();
|
||||
$form.find('select.mail-policy-mailboxes, select.mail-policy-groups').each(function() {
|
||||
$(this).find('option').each(function() {
|
||||
var other = $(this).data('domain') !== domain;
|
||||
$(this).prop('hidden', other);
|
||||
if (other) $(this).prop('selected', false);
|
||||
});
|
||||
$(this).selectpicker('refresh');
|
||||
var $select = $(this);
|
||||
if (!$select.data('all-options')) $select.data('all-options', $select.children('option').clone());
|
||||
$select.selectpicker('destroy');
|
||||
$select.empty().append($select.data('all-options').filter(function() {
|
||||
return $(this).data('domain') === domain;
|
||||
}).clone().prop('selected', false));
|
||||
$select.selectpicker({'styleBase': 'btn btn-xs-lg', 'noneSelectedText': lang_footer.nothing_selected});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user