mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Improved new AddressBook system
This commit is contained in:
parent
497193750b
commit
c9ad0ef170
53 changed files with 589 additions and 459 deletions
|
|
@ -79,12 +79,12 @@ export class JCard {
|
|||
* @param arg the field, or a VCardProperty object
|
||||
* @param value the value for the VCardProperty object
|
||||
* @param params the parameters for the VCardProperty object
|
||||
* @param group the group for the VCardProperty object
|
||||
* @param type the type for the VCardProperty object
|
||||
*/
|
||||
set(arg, value, params, group)
|
||||
set(arg, value, params, type)
|
||||
{
|
||||
if (typeof arg === 'string') {
|
||||
arg = new VCardProperty(String(arg), value, params, group);
|
||||
arg = new VCardProperty(String(arg), value, params, type);
|
||||
}
|
||||
if (!(arg instanceof VCardProperty)) {
|
||||
throw new Error('invalid argument of VCard.set(), expects string arguments or a VCardProperty');
|
||||
|
|
@ -94,11 +94,11 @@ export class JCard {
|
|||
return arg;
|
||||
}
|
||||
|
||||
add(arg, value, params, group)
|
||||
add(arg, value, params, type)
|
||||
{
|
||||
// string arguments
|
||||
if (typeof arg === 'string') {
|
||||
arg = new VCardProperty(String(arg), value, params, group);
|
||||
arg = new VCardProperty(String(arg), value, params, type);
|
||||
}
|
||||
if (!(arg instanceof VCardProperty)) {
|
||||
throw new Error('invalid argument of VCard.add(), expects string arguments or a VCardProperty');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue