[IMP] pre-commit run after update

Includes some manual fixes to silent ESLint warnings.
This commit is contained in:
Jairo Llopis
2020-01-24 13:45:39 +00:00
committed by David
parent 71b24af712
commit 94462b5c72
5 changed files with 105 additions and 83 deletions

View File

@@ -1,26 +1,26 @@
odoo.define('web_notify.Notification', function (require) {
odoo.define("web_notify.Notification", function(require) {
"use strict";
var Notification = require('web.Notification');
var Notification = require("web.Notification");
Notification.include({
icon_mapping: {
'success': 'fa-thumbs-up',
'danger': 'fa-exclamation-triangle',
'warning': 'fa-exclamation',
'info': 'fa-info',
'default': 'fa-lightbulb-o',
success: "fa-thumbs-up",
danger: "fa-exclamation-triangle",
warning: "fa-exclamation",
info: "fa-info",
default: "fa-lightbulb-o",
},
init: function () {
init: function() {
this._super.apply(this, arguments);
// Delete default classes
this.className = this.className.replace(' o_error', '');
this.className = this.className.replace(" o_error", "");
// Add custom icon and custom class
this.icon = (this.type in this.icon_mapping) ?
this.icon_mapping[this.type] :
this.icon_mapping['default'];
this.className += ' o_' + this.type;
this.icon =
this.type in this.icon_mapping
? this.icon_mapping[this.type]
: this.icon_mapping.default;
this.className += " o_" + this.type;
},
});
});