Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
11911 Представления

I'm working on customizing web_notify oca module which sends a pop-up notification to screen, it contains of some varients of notification each one has a font awesome icons that appear on the notification 
it defines the icons in js file in this class 

odoo.define('web_notify.Notification', function (require) {
"use strict";

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',
},
init:
function () {
this._super.apply(this, arguments);
// Delete default classes
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;
},
});

});

i'm searching on awesome website and i need to to add an icon that i found it decleration
<i class="fas fa-mosque"></i>
say if i need to replace fa-thumbs-up with the new one how can i do that  
Аватар
Отменить
Лучший ответ

Hi Fouad,
You can try this one <i class="fa-mosque"></i>. you don't need to use 'fas' inside class.
Regards


Аватар
Отменить

And a sidenote: the font awesome on Odoo is behind quite a bit so a part of the icons are not available too.

Автор

actually fa-mosque it's not declared in odoo web base module

Related Posts Ответы Просмотры Активность
0
июл. 17
2856
0
мар. 15
6425
1
авг. 25
2127
0
нояб. 23
1850
0
авг. 19
4183