mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
babeljs: step 2
This commit is contained in:
parent
007a03b8d4
commit
53cf543795
74 changed files with 2551 additions and 2963 deletions
|
|
@ -6,9 +6,9 @@ import {AbstractComponent} from 'Component/Abstract';
|
|||
class AbstracCheckbox extends AbstractComponent
|
||||
{
|
||||
/**
|
||||
* @param {Object} params
|
||||
* @param {Object} params = {}
|
||||
*/
|
||||
constructor(params) {
|
||||
constructor(params = {}) {
|
||||
|
||||
super();
|
||||
|
||||
|
|
|
|||
|
|
@ -27,10 +27,7 @@ class AbstracRadio extends AbstractComponent
|
|||
if (params.values)
|
||||
{
|
||||
this.values(_.map(params.values, (label, value) => {
|
||||
return {
|
||||
'label': label,
|
||||
'value': value
|
||||
};
|
||||
return {'label': label, 'value': value};
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
|
||||
import {_} from 'common';
|
||||
import {$} from 'common';
|
||||
import ko from 'ko';
|
||||
import Utils from 'Common/Utils';
|
||||
|
||||
class AbstractComponent
|
||||
{
|
||||
constructor() {
|
||||
this.disposable = [];
|
||||
}
|
||||
disposable = [];
|
||||
|
||||
constructor() {}
|
||||
|
||||
dispose() {
|
||||
_.each(this.disposable, (funcToDispose) => {
|
||||
this.disposable.forEach((funcToDispose) => {
|
||||
if (funcToDispose && funcToDispose.dispose)
|
||||
{
|
||||
funcToDispose.dispose();
|
||||
|
|
@ -21,10 +21,10 @@ class AbstractComponent
|
|||
|
||||
/**
|
||||
* @param {*} ClassObject
|
||||
* @param {string} templateID
|
||||
* @param {string} templateID = ''
|
||||
* @return {Object}
|
||||
*/
|
||||
const componentExportHelper = (ClassObject, templateID) => {
|
||||
const componentExportHelper = (ClassObject, templateID = '') => {
|
||||
return {
|
||||
template: templateID ? {element: templateID} : '<b></b>',
|
||||
viewModel: {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ class ScriptComponent extends AbstractComponent
|
|||
params.element[0] && params.element[0].outerHTML)
|
||||
{
|
||||
let script = params.element[0].outerHTML;
|
||||
script = script
|
||||
script = !script ? '' : script
|
||||
.replace(/<x-script/i, '<script')
|
||||
.replace(/<b><\/b><\/x-script>/i, '</script>')
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue