blob: 0747d023737f8bfa5ad1b7da414a78da3b9ca4c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
$(document).ready((function ($, require) {
return function () {
var UI = require('piwik/UI');
var $notificationNodes = $('[data-role="notification"]');
$notificationNodes.each(function (index, notificationNode) {
$notificationNode = $(notificationNode);
var attributes = $notificationNode.data();
var message = $notificationNode.html();
if (message) {
var notification = new UI.Notification();
attributes.animate = false;
notification.show(message, attributes);
}
$notificationNodes.remove();
});
}
})(jQuery, require));
|