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:
authordizzy <diosmosis@users.noreply.github.com>2022-07-26 12:35:31 +0300
committerGitHub <noreply@github.com>2022-07-26 12:35:31 +0300
commita1bcde7c42b3ee6164f07992134cd8b623be4823 (patch)
tree9387ba65d0914d59d09094046646e0d5f2c2b271 /plugins/Morpheus
parent66026304679c488e6de9380137064176bf4efeb6 (diff)
[Vue] add isReportingPage() method to replace isAngularRenderingThePage() (#19570)
* add isReportingPage() method to replace isAngularRenderingThePage() * fix ui unit test
Diffstat (limited to 'plugins/Morpheus')
-rw-r--r--plugins/Morpheus/javascripts/piwikHelper.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Morpheus/javascripts/piwikHelper.js b/plugins/Morpheus/javascripts/piwikHelper.js
index 66293bcc69..2cdb69caf0 100644
--- a/plugins/Morpheus/javascripts/piwikHelper.js
+++ b/plugins/Morpheus/javascripts/piwikHelper.js
@@ -373,10 +373,21 @@ window.piwikHelper = {
* via angular as soon as it detects a $locationChange
*
* @returns {number|jQuery}
+ * @deprecated use isReportingPage() instead
*/
isAngularRenderingThePage: function ()
{
- return $('[piwik-reporting-page]').length;
+ return this.isReportingPage();
+ },
+
+ /**
+ * Detects whether the current page is a reporting page or not.
+ *
+ * @returns {number|jQuery|*}
+ */
+ isReportingPage: function ()
+ {
+ return $('.reporting-page').length;
},
/**