Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2021-06-30 03:26:33 +0300
committerGitHub <noreply@github.com>2021-06-30 03:26:33 +0300
commit75568c7ba6b624f983e3362184d33a01339aa001 (patch)
treec47ec62acf4c0de73be7c6add029dc701f127828 /plugins
parent163445befe0fd3317b284bd409a3762b95c352b8 (diff)
Make anchor links on Admin General Settings page work (#17727)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreHome/angularjs/anchorLinkFix.js10
-rw-r--r--plugins/CorePluginsAdmin/angularjs/plugin-settings/plugin-settings.controller.js2
2 files changed, 11 insertions, 1 deletions
diff --git a/plugins/CoreHome/angularjs/anchorLinkFix.js b/plugins/CoreHome/angularjs/anchorLinkFix.js
index 4147cf3b5f..bdc55792a7 100644
--- a/plugins/CoreHome/angularjs/anchorLinkFix.js
+++ b/plugins/CoreHome/angularjs/anchorLinkFix.js
@@ -112,4 +112,12 @@
handleScrollToAnchorAfterPageLoad();
$(handleScrollToAnchorIfPresentOnPageLoad);
-})(); \ No newline at end of file
+ window.anchorLinkFix = {
+ scrollToAnchorInUrl: function () {
+ // may be called when page is only fully loaded after some additional requests
+ // timeout needed to ensure angular rendered fully
+ var $timeout = piwikHelper.getAngularDependency('$timeout');
+ $timeout(handleScrollToAnchorIfPresentOnPageLoad);
+ }
+ };
+})();
diff --git a/plugins/CorePluginsAdmin/angularjs/plugin-settings/plugin-settings.controller.js b/plugins/CorePluginsAdmin/angularjs/plugin-settings/plugin-settings.controller.js
index 5806abe3a3..78bea7d16a 100644
--- a/plugins/CorePluginsAdmin/angularjs/plugin-settings/plugin-settings.controller.js
+++ b/plugins/CorePluginsAdmin/angularjs/plugin-settings/plugin-settings.controller.js
@@ -28,6 +28,8 @@
piwikApi.fetch({method: apiMethod}).then(function (settings) {
self.isLoading = false;
self.settingsPerPlugin = settings;
+
+ window.anchorLinkFix.scrollToAnchorInUrl();
}, function () {
self.isLoading = false;
});