mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Added export contacts (vCard)
This commit is contained in:
parent
c25b5bfef7
commit
c248292f07
37 changed files with 489 additions and 237 deletions
|
|
@ -227,6 +227,22 @@ LinkBuilder.prototype.getUserPicUrlFromHash = function (sHash)
|
|||
return this.sServer + '/Raw/' + this.sSpecSuffix + '/UserPic/' + sHash + '/' + this.sVersion + '/';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.exportContactsVcf = function ()
|
||||
{
|
||||
return this.sServer + '/Raw/' + this.sSpecSuffix + '/ContactsVcf/';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
LinkBuilder.prototype.exportContactsCsv = function ()
|
||||
{
|
||||
return this.sServer + '/Raw/' + this.sSpecSuffix + '/ContactsCsv/';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -87,6 +87,9 @@ function WebMailDataStorage()
|
|||
this.contacts.loading = ko.observable(false).extend({'throttle': 200});
|
||||
this.contacts.importing = ko.observable(false).extend({'throttle': 200});
|
||||
this.contacts.syncing = ko.observable(false).extend({'throttle': 200});
|
||||
this.contacts.exportingVcf = ko.observable(false).extend({'throttle': 200});
|
||||
this.contacts.exportingCsv = ko.observable(false).extend({'throttle': 200});
|
||||
|
||||
this.contacts.skipNextSync = false;
|
||||
|
||||
this.allowContactsSync = ko.observable(false);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ function PopupsContactsViewModel()
|
|||
|
||||
this.allowContactsSync = RL.data().allowContactsSync;
|
||||
this.enableContactsSync = RL.data().enableContactsSync;
|
||||
this.allowExport = !Globals.bMobileDevice;
|
||||
|
||||
this.search = ko.observable('');
|
||||
this.contactsCount = ko.observable(0);
|
||||
|
|
@ -317,6 +318,16 @@ PopupsContactsViewModel.prototype.addNewPhone = function ()
|
|||
this.addNewProperty(Enums.ContactPropertyType.Phone, 'Mobile');
|
||||
};
|
||||
|
||||
PopupsContactsViewModel.prototype.exportVcf = function ()
|
||||
{
|
||||
RL.download(RL.link().exportContactsVcf());
|
||||
};
|
||||
|
||||
PopupsContactsViewModel.prototype.exportCsv = function ()
|
||||
{
|
||||
RL.download(RL.link().exportContactsCsv());
|
||||
};
|
||||
|
||||
PopupsContactsViewModel.prototype.initUploader = function ()
|
||||
{
|
||||
if (this.importUploaderButton())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue