|
|
|
@ -75,6 +75,20 @@ export function initGlobalButtonClickOnEnter() { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function initPopup(target) { |
|
|
|
|
const $el = $(target); |
|
|
|
|
const attr = $el.attr('data-variation'); |
|
|
|
|
const attrs = attr ? attr.split(' ') : []; |
|
|
|
|
const variations = new Set([...attrs, 'inverted', 'tiny']); |
|
|
|
|
$el.attr('data-variation', [...variations].join(' ')).popup(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function initGlobalPopups() { |
|
|
|
|
$('.tooltip').each((_, el) => { |
|
|
|
|
initPopup(el); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function initGlobalCommon() { |
|
|
|
|
// Show exact time
|
|
|
|
|
$('.time-since').each(function () { |
|
|
|
@ -121,15 +135,6 @@ export function initGlobalCommon() { |
|
|
|
|
|
|
|
|
|
$('.ui.checkbox').checkbox(); |
|
|
|
|
|
|
|
|
|
// init popups
|
|
|
|
|
$('.tooltip').each((_, el) => { |
|
|
|
|
const $el = $(el); |
|
|
|
|
const attr = $el.attr('data-variation'); |
|
|
|
|
const attrs = attr ? attr.split(' ') : []; |
|
|
|
|
const variations = new Set([...attrs, 'inverted', 'tiny']); |
|
|
|
|
$el.attr('data-variation', [...variations].join(' ')).popup(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('.top.menu .tooltip').popup({ |
|
|
|
|
onShow() { |
|
|
|
|
if ($('.top.menu .menu.transition').hasClass('visible')) { |
|
|
|
|