콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
12174 화면

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

관련 게시물 답글 화면 활동
0
7월 17
3063
0
3월 15
6664
1
8월 25
2385
0
11월 23
2028
0
8월 19
4341