mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
Improvements for #62
This commit is contained in:
parent
23e15fd161
commit
673bd49095
12 changed files with 45 additions and 59 deletions
12
dev/External/ko.js
vendored
12
dev/External/ko.js
vendored
|
|
@ -1,4 +1,4 @@
|
|||
import { i18n, i18nToNodes, trigger } from 'Common/Translator';
|
||||
import { i18nToNodes } from 'Common/Translator';
|
||||
import { doc, createElement } from 'Common/Globals';
|
||||
import { SaveSettingsStep } from 'Common/Enums';
|
||||
import { isNonEmptyArray, isFunction } from 'Common/Utils';
|
||||
|
|
@ -6,16 +6,6 @@ import { isNonEmptyArray, isFunction } from 'Common/Utils';
|
|||
const
|
||||
koValue = value => !ko.isObservable(value) && isFunction(value) ? value() : ko.unwrap(value);
|
||||
|
||||
ko.bindingHandlers.tooltip = {
|
||||
init: (element, fValueAccessor) => {
|
||||
const sValue = koValue(fValueAccessor());
|
||||
element.title = i18n(sValue);
|
||||
trigger.subscribe(() => element.title = i18n(sValue));
|
||||
},
|
||||
update: (element, fValueAccessor) =>
|
||||
element.title = i18n(koValue(fValueAccessor()))
|
||||
};
|
||||
|
||||
ko.bindingHandlers.tooltipErrorTip = {
|
||||
init: element => {
|
||||
doc.addEventListener('click', () => element.removeAttribute('data-rainloopErrorTip'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue