eslint (additional rules)

This commit is contained in:
RainLoop Team 2016-06-30 03:02:45 +03:00
parent 77a1d3f3df
commit 8e8a041032
150 changed files with 21911 additions and 23106 deletions

View file

@ -1,28 +1,25 @@
import {$} from 'common';
let
cachedUrl = null,
getUtl = () => {
if (!cachedUrl)
{
const version = $('#rlAppVersion').attr('content') || '0.0.0';
cachedUrl = `rainloop/v/${version}/static/css/svg/icons.svg`;
}
return cachedUrl;
let cachedUrl = null;
const getUrl = () => {
if (!cachedUrl)
{
const version = $('#rlAppVersion').attr('content') || '0.0.0';
cachedUrl = `rainloop/v/${version}/static/css/svg/icons.svg`;
}
;
return cachedUrl;
};
module.exports = {
template: '<b></b>',
viewModel: {
createViewModel: (params, componentInfo) => {
createViewModel: ({icon = 'null'}, componentInfo) => {
if (componentInfo && componentInfo.element)
{
const icon = params.icon || 'null';
$(componentInfo.element).replaceWith(
`<svg class="svg-icon svg-icon-${icon}"><use xlink:href="${getUtl()}#svg-icon-${icon}"></use></svg>`
`<svg class="svg-icon svg-icon-${icon}"><use xlink:href="${getUrl()}#svg-icon-${icon}"></use></svg>`
);
}
}