mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
ES2015 first look / babeljs
This commit is contained in:
parent
5dcceaaca5
commit
445cd155e5
123 changed files with 3214 additions and 3680 deletions
|
|
@ -1,54 +0,0 @@
|
|||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
window = require('window'),
|
||||
|
||||
Utils = require('Common/Utils')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsStorage()
|
||||
{
|
||||
this.oSettings = window['rainloopAppData'] || {};
|
||||
this.oSettings = Utils.isNormal(this.oSettings) ? this.oSettings : {};
|
||||
}
|
||||
|
||||
SettingsStorage.prototype.oSettings = null;
|
||||
|
||||
/**
|
||||
* @param {string} sName
|
||||
* @return {?}
|
||||
*/
|
||||
SettingsStorage.prototype.settingsGet = function (sName)
|
||||
{
|
||||
return Utils.isUnd(this.oSettings[sName]) ? null : this.oSettings[sName];
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sName
|
||||
* @param {?} mValue
|
||||
*/
|
||||
SettingsStorage.prototype.settingsSet = function (sName, mValue)
|
||||
{
|
||||
this.oSettings[sName] = mValue;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sName
|
||||
* @return {boolean}
|
||||
*/
|
||||
SettingsStorage.prototype.capa = function (sName)
|
||||
{
|
||||
var mCapa = this.settingsGet('Capa');
|
||||
return Utils.isArray(mCapa) && Utils.isNormal(sName) && -1 < Utils.inArray(sName, mCapa);
|
||||
};
|
||||
|
||||
|
||||
module.exports = new SettingsStorage();
|
||||
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue