Fix support for SOGoSieveFolderEncoding defaults

Fixed the following bugs in the mail filter editor:

1. Sieve folder encoding not respecting the SOGoSieveFolderEncoding
system defaults;
2. Conditions are still displayed when rule affects all messages;
3. Missing custom mail labels to "flag with" action.
This commit is contained in:
Francis Lachapelle
2016-11-17 09:41:15 -05:00
parent 5f70555975
commit baf1d44548
7 changed files with 36 additions and 9 deletions
@@ -12,7 +12,8 @@
var vm = this,
sieveCapabilities = $window.sieveCapabilities,
forwardEnabled = $window.forwardEnabled,
vacationEnabled = $window.vacationEnabled;
vacationEnabled = $window.vacationEnabled,
sieveFolderPathAttribute = ($window.sieveFolderEncoding == "UTF-8") ? "name" : "path";
vm.filter = filter;
vm.mailboxes = mailboxes;
@@ -50,6 +51,12 @@
//if (vacationEnabled)
// vm.methodLabels.vacation = l("Send a vacation message");
vm.mailboxes = _.map(mailboxes, function(mailbox) {
return { level: mailbox.level,
name: mailbox.name,
path: mailbox[sieveFolderPathAttribute] };
});
if (sieveCapabilities.indexOf("reject") > -1)
vm.methodLabels.reject = l("Send a reject message");