mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 05:29:20 +03:00
Code refactoring (es5 -> es2015)
This commit is contained in:
parent
fb2e492ce8
commit
38a1041a73
42 changed files with 3081 additions and 3690 deletions
|
|
@ -1,45 +0,0 @@
|
|||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
AbstractModel = require('Knoin/AbstractModel');
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
* @param {string} sEmail
|
||||
* @param {boolean=} bCanBeDelete = true
|
||||
* @param {number=} iCount = 0
|
||||
*/
|
||||
function AccountModel(sEmail, bCanBeDelete, iCount)
|
||||
{
|
||||
AbstractModel.call(this, 'AccountModel');
|
||||
|
||||
this.email = sEmail;
|
||||
|
||||
this.count = ko.observable(iCount || 0);
|
||||
|
||||
this.deleteAccess = ko.observable(false);
|
||||
this.canBeDeleted = ko.observable(Utils.isUnd(bCanBeDelete) ? true : !!bCanBeDelete);
|
||||
this.canBeEdit = this.canBeDeleted;
|
||||
}
|
||||
|
||||
_.extend(AccountModel.prototype, AbstractModel.prototype);
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
AccountModel.prototype.email = '';
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
AccountModel.prototype.changeAccountLink = function()
|
||||
{
|
||||
return require('Common/Links').change(this.email);
|
||||
};
|
||||
|
||||
module.exports = AccountModel;
|
||||
Loading…
Add table
Add a link
Reference in a new issue