Code refactoring (es5 -> es2015)

This commit is contained in:
RainLoop Team 2016-07-07 00:03:30 +03:00
parent fb2e492ce8
commit 38a1041a73
42 changed files with 3081 additions and 3690 deletions

View file

@ -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;