mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
eslint (additional rules)
This commit is contained in:
parent
77a1d3f3df
commit
8e8a041032
150 changed files with 21911 additions and 23106 deletions
|
|
@ -1,43 +1,35 @@
|
|||
|
||||
(function () {
|
||||
var
|
||||
window = require('window'),
|
||||
ko = require('ko');
|
||||
|
||||
'use strict';
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function QuotaUserStore()
|
||||
{
|
||||
this.quota = ko.observable(0);
|
||||
this.usage = ko.observable(0);
|
||||
|
||||
var
|
||||
window = require('window'),
|
||||
ko = require('ko')
|
||||
;
|
||||
this.percentage = ko.computed(function() {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function QuotaUserStore()
|
||||
{
|
||||
this.quota = ko.observable(0);
|
||||
this.usage = ko.observable(0);
|
||||
var
|
||||
iQuota = this.quota(),
|
||||
iUsed = this.usage();
|
||||
|
||||
this.percentage = ko.computed(function () {
|
||||
return 0 < iQuota ? window.Math.ceil((iUsed / iQuota) * 100) : 0;
|
||||
|
||||
var
|
||||
iQuota = this.quota(),
|
||||
iUsed = this.usage()
|
||||
;
|
||||
}, this);
|
||||
}
|
||||
|
||||
return 0 < iQuota ? window.Math.ceil((iUsed / iQuota) * 100) : 0;
|
||||
/**
|
||||
* @param {number} iQuota
|
||||
* @param {number} iUsage
|
||||
*/
|
||||
QuotaUserStore.prototype.populateData = function(iQuota, iUsage)
|
||||
{
|
||||
this.quota(iQuota * 1024);
|
||||
this.usage(iUsage * 1024);
|
||||
};
|
||||
|
||||
}, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} iQuota
|
||||
* @param {number} iUsage
|
||||
*/
|
||||
QuotaUserStore.prototype.populateData = function(iQuota, iUsage)
|
||||
{
|
||||
this.quota(iQuota * 1024);
|
||||
this.usage(iUsage * 1024);
|
||||
};
|
||||
|
||||
module.exports = new QuotaUserStore();
|
||||
|
||||
}());
|
||||
module.exports = new QuotaUserStore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue