diff --git a/front/js/common.js b/front/js/common.js index 7c0762d3..c0df14b3 100755 --- a/front/js/common.js +++ b/front/js/common.js @@ -954,6 +954,21 @@ function getGuid() { let spinnerTimeout = null; let animationTime = 300 +// show spinner on all clicks +$(document).on('click', 'a', function (e) { + const href = this.href; + + if ( + href && + this.target !== '_blank' && + !this.hasAttribute('download') && + this.origin === location.origin && + this.pathname + this.search !== location.pathname + location.search + ) { + showSpinner(); + } +}); + function showSpinner(stringKey = 'Loading') { let text = isEmpty(stringKey) ? "Loading..." : getString(stringKey || "Loading"); diff --git a/front/php/templates/header.php b/front/php/templates/header.php index 4faff4c8..38f1f742 100755 --- a/front/php/templates/header.php +++ b/front/php/templates/header.php @@ -288,7 +288,7 @@