mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Fixed Opening an email with specific content „hangs” RainLoop in the browser (Closes #308)
Code refactoring
This commit is contained in:
parent
af43329902
commit
7a374ebe03
40 changed files with 1100 additions and 181 deletions
41
dev/Model/Account.js
Normal file
41
dev/Model/Account.js
Normal 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;
|
||||
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue