|
|
@ -1,11 +1,14 @@ |
|
|
|
import prettyMilliseconds from 'pretty-ms'; |
|
|
|
import prettyMilliseconds from 'pretty-ms'; |
|
|
|
const {AppSubUrl, csrf, NotificationSettings} = window.config; |
|
|
|
const {AppSubUrl, csrf, NotificationSettings, EnableTimetracking} = window.config; |
|
|
|
|
|
|
|
|
|
|
|
let updateTimeInterval = null; // holds setInterval id when active
|
|
|
|
let updateTimeInterval = null; // holds setInterval id when active
|
|
|
|
|
|
|
|
|
|
|
|
export async function initStopwatch() { |
|
|
|
export async function initStopwatch() { |
|
|
|
const stopwatchEl = $('.active-stopwatch-trigger'); |
|
|
|
if (!EnableTimetracking) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const stopwatchEl = $('.active-stopwatch-trigger'); |
|
|
|
stopwatchEl.removeAttr('href'); // intended for noscript mode only
|
|
|
|
stopwatchEl.removeAttr('href'); // intended for noscript mode only
|
|
|
|
stopwatchEl.popup({ |
|
|
|
stopwatchEl.popup({ |
|
|
|
position: 'bottom right', |
|
|
|
position: 'bottom right', |
|
|
|