Fixed Opening an email with specific content „hangs” RainLoop in the browser (Closes #308)

Code refactoring
This commit is contained in:
RainLoop Team 2014-09-05 19:53:44 +04:00
parent af43329902
commit 7a374ebe03
40 changed files with 1100 additions and 181 deletions

41
dev/Model/Account.js Normal file
View file

@ -0,0 +1,41 @@
(function () {
'use strict';
var
ko = require('ko'),
Utils = require('Common/Utils')
;
/**
* @constructor
*
* @param {string} sEmail
* @param {boolean=} bCanBeDelete = true
*/
function AccountModel(sEmail, bCanBeDelete)
{
this.email = sEmail;
this.deleteAccess = ko.observable(false);
this.canBeDalete = ko.observable(Utils.isUnd(bCanBeDelete) ? true : !!bCanBeDelete);
}
/**
* @type {string}
*/
AccountModel.prototype.email = '';
/**
* @return {string}
*/
AccountModel.prototype.changeAccountLink = function ()
{
return require('Common/LinkBuilder').change(this.email);
};
module.exports = AccountModel;
}());