Append aliases to mail vacation addresses insted of replacing them with existing one

This commit is contained in:
Hadi Nategh 2014-08-01 13:40:45 +00:00
parent 3021b6a3c9
commit a105ac7e1d

View File

@ -3018,12 +3018,23 @@ app.classes.mail = AppJS.extend(
sieve_vac_all_aliases: function()
{
var aliases = [];
var tmp = [];
var addr = this.et2.getWidgetById('addresses');
var addresses = this.et2.getArrayMgr('sel_options').data.addresses;
for(var id in addresses) aliases.push(id);
addr.set_value(aliases);
if (addr)
{
tmp = aliases.concat(addr.get_value());
// returns de-duplicate items of an array
var deDuplicator = function (item,pos){
return tmp.indexOf(item) == pos
};
aliases = tmp.filter(deDuplicator);
addr.set_value(aliases);
}
},
/**