diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2022-07-26 12:35:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 12:35:31 +0300 |
commit | a1bcde7c42b3ee6164f07992134cd8b623be4823 (patch) | |
tree | 9387ba65d0914d59d09094046646e0d5f2c2b271 /plugins/Morpheus | |
parent | 66026304679c488e6de9380137064176bf4efeb6 (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.js | 13 |
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; }, /** |