mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-24 06:47:05 +08:00
eslint fixes
This commit is contained in:
parent
41c164add7
commit
afef42ba5d
1 changed files with 4 additions and 4 deletions
8
dev/External/ko.js
vendored
8
dev/External/ko.js
vendored
|
@ -158,6 +158,7 @@ ko.bindingHandlers.tooltip = {
|
||||||
$el = $(element),
|
$el = $(element),
|
||||||
fValue = fValueAccessor(),
|
fValue = fValueAccessor(),
|
||||||
isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
|
isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
|
||||||
|
isI18N = 'on' === ($el.data('tooltip-i18n') || 'on'),
|
||||||
Globals = require('Common/Globals');
|
Globals = require('Common/Globals');
|
||||||
|
|
||||||
if (!Globals.bMobileDevice || isMobile)
|
if (!Globals.bMobileDevice || isMobile)
|
||||||
|
@ -187,7 +188,7 @@ ko.bindingHandlers.tooltip = {
|
||||||
element.__opentip.activate();
|
element.__opentip.activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('on' === ($el.data('tooltip-i18n') || 'on'))
|
if (isI18N)
|
||||||
{
|
{
|
||||||
const Translator = require('Common/Translator');
|
const Translator = require('Common/Translator');
|
||||||
|
|
||||||
|
@ -225,6 +226,7 @@ ko.bindingHandlers.tooltip = {
|
||||||
$el = $(element),
|
$el = $(element),
|
||||||
fValue = fValueAccessor(),
|
fValue = fValueAccessor(),
|
||||||
isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
|
isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
|
||||||
|
isI18N = 'on' === ($el.data('tooltip-i18n') || 'on'),
|
||||||
Globals = require('Common/Globals');
|
Globals = require('Common/Globals');
|
||||||
|
|
||||||
if ((!Globals.bMobileDevice || isMobile) && element.__opentip)
|
if ((!Globals.bMobileDevice || isMobile) && element.__opentip)
|
||||||
|
@ -232,9 +234,7 @@ ko.bindingHandlers.tooltip = {
|
||||||
const sValue = !ko.isObservable(fValue) && _.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
|
const sValue = !ko.isObservable(fValue) && _.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
|
||||||
if (sValue)
|
if (sValue)
|
||||||
{
|
{
|
||||||
element.__opentip.setContent('on' === ($el.data('tooltip-i18n') || 'on') ?
|
element.__opentip.setContent(isI18N ? require('Common/Translator').i18n(sValue) : sValue);
|
||||||
require('Common/Translator').i18n(sValue) : sValue);
|
|
||||||
|
|
||||||
element.__opentip.activate();
|
element.__opentip.activate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue