summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/widgets/notification.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-02-26 14:50:55 +0100
committerAaron Bohy <aab@odoo.com>2018-02-27 14:31:02 +0100
commit462c3956d9988e9477de48788d370be1b1c4f107 (patch)
tree270f9d42fc13b20fd888d64b54e033a889d221d1 /addons/web/static/src/js/widgets/notification.js
parent60974227cf29d74c1f5d1270c47595073bbbee98 (diff)
[FIX] web: NotificationManager: warnings style
Warnings are styled a bit differently than notifications, as their background is red (thanks to classname 'o_error' on the warning root element). This classname isn't correctly added since rev. 920df59, which changed the root element of the 'Notification' template, which is extended by the 'Warning' template, making qweb.js fail to add the 'o_error' classname.
Diffstat (limited to 'addons/web/static/src/js/widgets/notification.js')
-rw-r--r--addons/web/static/src/js/widgets/notification.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/addons/web/static/src/js/widgets/notification.js b/addons/web/static/src/js/widgets/notification.js
index 6e11b4c8647..a162c6bc330 100644
--- a/addons/web/static/src/js/widgets/notification.js
+++ b/addons/web/static/src/js/widgets/notification.js
@@ -1,7 +1,6 @@
odoo.define('web.notification', function (require) {
"use strict";
-var core = require('web.core');
var Widget = require('web.Widget');
var Notification = Widget.extend({
@@ -47,6 +46,13 @@ var Notification = Widget.extend({
var Warning = Notification.extend({
template: 'Warning',
+ /**
+ * @override
+ */
+ start: function () {
+ this.$el.addClass('o_error');
+ return this._super.apply(this, arguments);
+ },
});
var NotificationManager = Widget.extend({