mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 12:41:10 +01:00
Append aliases to mail vacation addresses insted of replacing them with existing one
This commit is contained in:
parent
d0411750fc
commit
8399373f35
@ -3071,12 +3071,23 @@ app.classes.mail = AppJS.extend(
|
|||||||
sieve_vac_all_aliases: function()
|
sieve_vac_all_aliases: function()
|
||||||
{
|
{
|
||||||
var aliases = [];
|
var aliases = [];
|
||||||
|
var tmp = [];
|
||||||
var addr = this.et2.getWidgetById('addresses');
|
var addr = this.et2.getWidgetById('addresses');
|
||||||
var addresses = this.et2.getArrayMgr('sel_options').data.addresses;
|
var addresses = this.et2.getArrayMgr('sel_options').data.addresses;
|
||||||
|
|
||||||
for(var id in addresses) aliases.push(id);
|
for(var id in addresses) aliases.push(id);
|
||||||
|
if (addr)
|
||||||
addr.set_value(aliases);
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user