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,49 +1,42 @@
|
|||
|
||||
(function () {
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko');
|
||||
|
||||
'use strict';
|
||||
// Remote = require('Remote/User/Ajax');
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko')
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function TemplateUserStore()
|
||||
{
|
||||
this.templates = ko.observableArray([]);
|
||||
this.templates.loading = ko.observable(false).extend({'throttle': 100});
|
||||
|
||||
// Remote = require('Remote/User/Ajax')
|
||||
;
|
||||
this.templatesNames = ko.observableArray([]).extend({'throttle': 1000});
|
||||
this.templatesNames.skipFirst = true;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function TemplateUserStore()
|
||||
{
|
||||
this.templates = ko.observableArray([]);
|
||||
this.templates.loading = ko.observable(false).extend({'throttle': 100});
|
||||
this.subscribers();
|
||||
}
|
||||
|
||||
this.templatesNames = ko.observableArray([]).extend({'throttle': 1000});
|
||||
this.templatesNames.skipFirst = true;
|
||||
TemplateUserStore.prototype.subscribers = function()
|
||||
{
|
||||
this.templates.subscribe(function(aList) {
|
||||
this.templatesNames(_.compact(_.map(aList, function(oItem) {
|
||||
return oItem ? oItem.name : null;
|
||||
})));
|
||||
}, this);
|
||||
|
||||
this.subscribers();
|
||||
}
|
||||
// this.templatesNames.subscribe(function(aList) {
|
||||
// if (this.templatesNames.skipFirst)
|
||||
// {
|
||||
// this.templatesNames.skipFirst = false;
|
||||
// }
|
||||
// else if (aList && 1 < aList.length)
|
||||
// {
|
||||
// Remote.templatesSortOrder(null, aList);
|
||||
// }
|
||||
// }, this);
|
||||
};
|
||||
|
||||
TemplateUserStore.prototype.subscribers = function ()
|
||||
{
|
||||
this.templates.subscribe(function (aList) {
|
||||
this.templatesNames(_.compact(_.map(aList, function (oItem) {
|
||||
return oItem ? oItem.name : null;
|
||||
})));
|
||||
}, this);
|
||||
|
||||
// this.templatesNames.subscribe(function (aList) {
|
||||
// if (this.templatesNames.skipFirst)
|
||||
// {
|
||||
// this.templatesNames.skipFirst = false;
|
||||
// }
|
||||
// else if (aList && 1 < aList.length)
|
||||
// {
|
||||
// Remote.templatesSortOrder(null, aList);
|
||||
// }
|
||||
// }, this);
|
||||
};
|
||||
|
||||
module.exports = new TemplateUserStore();
|
||||
|
||||
}());
|
||||
module.exports = new TemplateUserStore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue