snappymail/dev/Models/ContactPropertyModel.js
RainLoop Team 975947a948 Minor contacts interface improvements.
Move intervals to pub/sub system
2013-12-15 15:02:50 +04:00

15 lines
512 B
JavaScript

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