mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-02-23 22:36:01 +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),
|
||||
fValue = fValueAccessor(),
|
||||
isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
|
||||
isI18N = 'on' === ($el.data('tooltip-i18n') || 'on'),
|
||||
Globals = require('Common/Globals');
|
||||
|
||||
if (!Globals.bMobileDevice || isMobile)
|
||||
|
@ -187,7 +188,7 @@ ko.bindingHandlers.tooltip = {
|
|||
element.__opentip.activate();
|
||||
}
|
||||
|
||||
if ('on' === ($el.data('tooltip-i18n') || 'on'))
|
||||
if (isI18N)
|
||||
{
|
||||
const Translator = require('Common/Translator');
|
||||
|
||||
|
@ -225,6 +226,7 @@ ko.bindingHandlers.tooltip = {
|
|||
$el = $(element),
|
||||
fValue = fValueAccessor(),
|
||||
isMobile = 'on' === ($el.data('tooltip-mobile') || 'off'),
|
||||
isI18N = 'on' === ($el.data('tooltip-i18n') || 'on'),
|
||||
Globals = require('Common/Globals');
|
||||
|
||||
if ((!Globals.bMobileDevice || isMobile) && element.__opentip)
|
||||
|
@ -232,9 +234,7 @@ ko.bindingHandlers.tooltip = {
|
|||
const sValue = !ko.isObservable(fValue) && _.isFunction(fValue) ? fValue() : ko.unwrap(fValue);
|
||||
if (sValue)
|
||||
{
|
||||
element.__opentip.setContent('on' === ($el.data('tooltip-i18n') || 'on') ?
|
||||
require('Common/Translator').i18n(sValue) : sValue);
|
||||
|
||||
element.__opentip.setContent(isI18N ? require('Common/Translator').i18n(sValue) : sValue);
|
||||
element.__opentip.activate();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue