ko cleaning up

This commit is contained in:
RainLoop Team 2014-10-04 15:58:01 +04:00
parent fcac46f60e
commit d8321a522e
25 changed files with 396 additions and 131 deletions

View file

@ -4,9 +4,12 @@
'use strict';
var
_ = require('_'),
ko = require('ko'),
Utils = require('Common/Utils')
Utils = require('Common/Utils'),
AbstractModel = require('Knoin/AbstractModel')
;
/**
@ -17,6 +20,8 @@
*/
function IdentityModel(sId, sEmail, bCanBeDelete)
{
AbstractModel.call(this, 'IdentityModel');
this.id = sId;
this.email = ko.observable(sEmail);
this.name = ko.observable('');
@ -27,6 +32,8 @@
this.canBeDalete = ko.observable(bCanBeDelete);
}
_.extend(IdentityModel.prototype, AbstractModel.prototype);
IdentityModel.prototype.formattedName = function ()
{
var sName = this.name();