feat(tooltips): added translatable tooltip
This commit is contained in:
parent
61c773f51c
commit
e74b61065a
@ -1,7 +1,6 @@
|
||||
export class FrontendTooltips {
|
||||
|
||||
static addToolTip(element, text) {
|
||||
console.log('adding Tooltip');
|
||||
let tooltipWrap = document.createElement('span');
|
||||
tooltipWrap.className = 'tooltip';
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Utility } from '../../core/utility';
|
||||
import { TableIndices } from '../../lib/table/table';
|
||||
import { FrontendTooltips } from '../../lib/tooltips/frontend-tooltips';
|
||||
import { Translations } from '../../messages';
|
||||
|
||||
|
||||
const CHECKRANGE_INITIALIZED_CLASS = 'checkrange--initialized';
|
||||
@ -39,7 +40,9 @@ export class CheckRange {
|
||||
|
||||
_setUpShiftClickOnColumn(columnId) {
|
||||
let column = this._columns[columnId];
|
||||
FrontendTooltips.addToolTip(column[0], 'Shift Click to mark multiple cells');
|
||||
let language = document.documentElement.lang;
|
||||
let toolTipMessage = Translations.getTranslation('checkrangeTooltip', language);
|
||||
FrontendTooltips.addToolTip(column[0], toolTipMessage);
|
||||
column.forEach(el => el.addEventListener('click', (ev) => {
|
||||
|
||||
if(ev.shiftKey && this.lastCheckedCell !== null) {
|
||||
|
||||
Reference in New Issue
Block a user