mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-15 04:04:50 +08:00
7a374ebe03
Code refactoring
41 lines
No EOL
664 B
JavaScript
41 lines
No EOL
664 B
JavaScript
|
|
(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;
|
|
|
|
}()); |