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:
Diffstat (limited to 'plugins/Dashboard/javascripts/dashboardObject.js')
-rw-r--r--plugins/Dashboard/javascripts/dashboardObject.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/Dashboard/javascripts/dashboardObject.js b/plugins/Dashboard/javascripts/dashboardObject.js
index 1308d1a7a3..de9455c372 100644
--- a/plugins/Dashboard/javascripts/dashboardObject.js
+++ b/plugins/Dashboard/javascripts/dashboardObject.js
@@ -4,6 +4,7 @@
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+
(function ($) {
var layoutColumnSelector = '#dashboardWidgetsArea > .col';
@@ -61,6 +62,8 @@
generateLayout(options.layout);
}
+ window.CoreHome.Matomo.postEvent('Dashboard.Dashboard.mounted', { element: this });
+
return this;
},
@@ -70,6 +73,10 @@
* @return void
*/
destroy: function () {
+ if (dashboardElement && dashboardElement.length) {
+ window.CoreHome.Matomo.postEvent('Dashboard.Dashboard.unmounted', {element: dashboardElement[0]});
+ }
+
$(dashboardElement).remove();
dashboardElement = null;
destroyWidgets();