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,71 +1,64 @@
|
|||
|
||||
(function () {
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
'use strict';
|
||||
Settings = require('Storage/Settings');
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
|
||||
Settings = require('Storage/Settings')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AccountUserStore()
|
||||
{
|
||||
this.email = ko.observable('');
|
||||
this.parentEmail = ko.observable('');
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AccountUserStore()
|
||||
{
|
||||
this.email = ko.observable('');
|
||||
this.parentEmail = ko.observable('');
|
||||
// this.incLogin = ko.observable('');
|
||||
// this.outLogin = ko.observable('');
|
||||
|
||||
this.signature = ko.observable('');
|
||||
this.signature = ko.observable('');
|
||||
|
||||
this.accounts = ko.observableArray([]);
|
||||
this.accounts.loading = ko.observable(false).extend({'throttle': 100});
|
||||
this.accounts = ko.observableArray([]);
|
||||
this.accounts.loading = ko.observable(false).extend({'throttle': 100});
|
||||
|
||||
this.computers();
|
||||
}
|
||||
this.computers();
|
||||
}
|
||||
|
||||
AccountUserStore.prototype.computers = function ()
|
||||
{
|
||||
this.accountsEmails = ko.computed(function () {
|
||||
return _.compact(_.map(this.accounts(), function (oItem) {
|
||||
return oItem ? oItem.email : null;
|
||||
}));
|
||||
}, this);
|
||||
AccountUserStore.prototype.computers = function()
|
||||
{
|
||||
this.accountsEmails = ko.computed(function() {
|
||||
return _.compact(_.map(this.accounts(), function(oItem) {
|
||||
return oItem ? oItem.email : null;
|
||||
}));
|
||||
}, this);
|
||||
|
||||
this.accountsUnreadCount = ko.computed(function () {
|
||||
this.accountsUnreadCount = ko.computed(function() {
|
||||
|
||||
var iResult = 0;
|
||||
var iResult = 0;
|
||||
|
||||
// _.each(this.accounts(), function (oItem) {
|
||||
// _.each(this.accounts(), function(oItem) {
|
||||
// if (oItem)
|
||||
// {
|
||||
// iResult += oItem.count();
|
||||
// }
|
||||
// });
|
||||
|
||||
return iResult;
|
||||
return iResult;
|
||||
|
||||
}, this);
|
||||
};
|
||||
}, this);
|
||||
};
|
||||
|
||||
AccountUserStore.prototype.populate = function ()
|
||||
{
|
||||
this.email(Settings.settingsGet('Email'));
|
||||
this.parentEmail(Settings.settingsGet('ParentEmail'));
|
||||
};
|
||||
AccountUserStore.prototype.populate = function()
|
||||
{
|
||||
this.email(Settings.settingsGet('Email'));
|
||||
this.parentEmail(Settings.settingsGet('ParentEmail'));
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {boolean}
|
||||
*/
|
||||
AccountUserStore.prototype.isRootAccount = function ()
|
||||
{
|
||||
return '' === this.parentEmail();
|
||||
};
|
||||
/**
|
||||
* @returns {boolean}
|
||||
*/
|
||||
AccountUserStore.prototype.isRootAccount = function()
|
||||
{
|
||||
return '' === this.parentEmail();
|
||||
};
|
||||
|
||||
module.exports = new AccountUserStore();
|
||||
|
||||
}());
|
||||
module.exports = new AccountUserStore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue