2013-12-07 05:50:19 +08:00
|
|
|
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {number=} iType = Enums.ContactPropertyType.Unknown
|
|
|
|
* @param {string=} sValue = ''
|
2013-12-15 19:02:50 +08:00
|
|
|
* @param {boolean=} bFocused = false
|
2013-12-07 05:50:19 +08:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
*/
|
2013-12-15 19:02:50 +08:00
|
|
|
function ContactPropertyModel(iType, sValue, bFocused)
|
2013-12-07 05:50:19 +08:00
|
|
|
{
|
|
|
|
this.type = ko.observable(Utils.isUnd(iType) ? Enums.ContactPropertyType.Unknown : iType);
|
2013-12-15 19:02:50 +08:00
|
|
|
this.focused = ko.observable(Utils.isUnd(bFocused) ? false : !!bFocused);
|
2013-12-07 05:50:19 +08:00
|
|
|
this.value = ko.observable(Utils.pString(sValue));
|
|
|
|
}
|