mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Contacts tags support (unstable - step 1).
+ Small fixes
This commit is contained in:
parent
74fa12c000
commit
0ca00dec40
34 changed files with 1790 additions and 801 deletions
|
|
@ -8,6 +8,7 @@ function ContactModel()
|
|||
this.idContact = 0;
|
||||
this.display = '';
|
||||
this.properties = [];
|
||||
this.tags = '';
|
||||
this.readOnly = false;
|
||||
|
||||
this.focused = ko.observable(false);
|
||||
|
|
@ -21,11 +22,11 @@ function ContactModel()
|
|||
*/
|
||||
ContactModel.prototype.getNameAndEmailHelper = function ()
|
||||
{
|
||||
var
|
||||
var
|
||||
sName = '',
|
||||
sEmail = ''
|
||||
;
|
||||
|
||||
|
||||
if (Utils.isNonEmptyArray(this.properties))
|
||||
{
|
||||
_.each(this.properties, function (aProperty) {
|
||||
|
|
@ -58,6 +59,7 @@ ContactModel.prototype.parse = function (oItem)
|
|||
this.idContact = Utils.pInt(oItem['IdContact']);
|
||||
this.display = Utils.pString(oItem['Display']);
|
||||
this.readOnly = !!oItem['ReadOnly'];
|
||||
this.tags = '';
|
||||
|
||||
if (Utils.isNonEmptyArray(oItem['Properties']))
|
||||
{
|
||||
|
|
@ -69,6 +71,11 @@ ContactModel.prototype.parse = function (oItem)
|
|||
}, this);
|
||||
}
|
||||
|
||||
if (Utils.isNonEmptyArray(oItem['Tags']))
|
||||
{
|
||||
this.tags = oItem['Tags'].join(';');
|
||||
}
|
||||
|
||||
bResult = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue