From 885082f7a78dc103f5aa4f2eab8834649d311e9f Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Tue, 10 Jan 2023 11:21:29 +0200 Subject: [PATCH] Don't display stop watch top bar icon when disabled and hidden when click other place (#22374) (#22387) Backport #22374 Fix #22286 When timetracking is disabled, the stop watch top bar icon should be hidden. When the stop watch recording popup, it should be allowed to hide with some operation. Now click any place on this page will hide the popup window. --- templates/base/head_navbar.tmpl | 2 ++ web_src/js/features/stopwatch.js | 1 + 2 files changed, 3 insertions(+) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index 12837ebefedf..c84e30ab2d80 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -77,6 +77,7 @@ {{else if .IsSigned}} + {{end}} diff --git a/web_src/js/features/stopwatch.js b/web_src/js/features/stopwatch.js index b9042fae4cc9..33915a1d8371 100644 --- a/web_src/js/features/stopwatch.js +++ b/web_src/js/features/stopwatch.js @@ -24,6 +24,7 @@ export function initStopwatch() { trigger: 'click', maxWidth: 'none', interactive: true, + hideOnClick: true, }); // global stop watch (in the head_navbar), it should always work in any case either the EventSource or the PeriodicPoller is used.