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/CoreHome/javascripts/notification.js')
-rw-r--r--plugins/CoreHome/javascripts/notification.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/CoreHome/javascripts/notification.js b/plugins/CoreHome/javascripts/notification.js
index e6c3f017f2..527c845d87 100644
--- a/plugins/CoreHome/javascripts/notification.js
+++ b/plugins/CoreHome/javascripts/notification.js
@@ -54,6 +54,16 @@
this.$node = placeNotification(template, options);
};
+ /**
+ * Removes a previously shown notification having the given notification id.
+ *
+ *
+ * @param {string} notificationId The id of a notification that was previously registered.
+ */
+ Notification.prototype.remove = function (notificationId) {
+ $('[piwik-notification][notification-id=' + notificationId + ']').remove();
+ };
+
Notification.prototype.scrollToNotification = function () {
if (this.$node) {
piwikHelper.lazyScrollTo(this.$node, 250);