es5 -> es2015 (last stage)

Signature plugin fixes
Add view decorator
A large number of fixes
This commit is contained in:
RainLoop Team 2016-08-17 01:01:20 +03:00
parent e88c193334
commit 17669b7be0
153 changed files with 21193 additions and 21115 deletions

View file

@ -1,32 +1,26 @@
var
ko = require('ko'),
import ko from 'ko';
import {isArray} from 'Common/Utils';
import * as Settings from 'Storage/Settings';
Utils = require('Common/Utils'),
Settings = require('Storage/Settings');
/**
* @constructor
*/
function ThemeStore()
class ThemeStore
{
this.themes = ko.observableArray([]);
this.themeBackgroundName = ko.observable('');
this.themeBackgroundHash = ko.observable('');
constructor() {
this.themes = ko.observableArray([]);
this.themeBackgroundName = ko.observable('');
this.themeBackgroundHash = ko.observable('');
this.theme = ko.observable('')
.extend({'limitedList': this.themes});
this.theme = ko.observable('').extend({limitedList: this.themes});
}
populate() {
const themes = Settings.appSettingsGet('themes');
this.themes(isArray(themes) ? themes : []);
this.theme(Settings.settingsGet('Theme'));
this.themeBackgroundName(Settings.settingsGet('UserBackgroundName'));
this.themeBackgroundHash(Settings.settingsGet('UserBackgroundHash'));
}
}
ThemeStore.prototype.populate = function()
{
var aThemes = Settings.appSettingsGet('themes');
this.themes(Utils.isArray(aThemes) ? aThemes : []);
this.theme(Settings.settingsGet('Theme'));
this.themeBackgroundName(Settings.settingsGet('UserBackgroundName'));
this.themeBackgroundHash(Settings.settingsGet('UserBackgroundHash'));
};
module.exports = new ThemeStore();