[IMP] mail, *: Rename component to match model (step 2)

[IMP] mail: rename ActivityBox to ActivityBoxView (component)
Task-3046113

[IMP] mail: rename ActivityMarkDonePopoverContent (component)
Task-3046122

[IMP] mail: rename AttachmentBox to AttachmentBoxView (component)
Task-3046129

[IMP] mail: rename AttachmentDeleteConfirm (component)
Task-3046160

[IMP] mail: rename CallActionList (component)
Task-3046187

[IMP] mail: rename CallParticipantVideo to CallParticipantVideoView (component)
Task-3046193

[IMP] mail: rename ChannelInvitationFormSelectablePartner (component)
Task-3046287

[IMP] mail: rename ChannelInvitationFormSelectedPartner (component)
Task-3046288

[IMP] mail: rename ChannelMember (component)
Task-3046298

[IMP] mail: rename ChannelMemberList (component)
Task-3046306

[IMP] mail: rename ChannelMemberListCategory (component)
Task-3046307

[IMP] mail: *: rename ChatWindowHeader (component)
*: hr, im_livechat, website_livechat
Task-3046330

[IMP] mail: rename ChatWindowHiddenMenu (component)
Task-3046358

[IMP] mail: rename ChatWindowHiddenMenuItem (component)
Task-3046515

[IMP] mail, *: rename Composer (component)
*: hr_recruitment, im_livechat
Task-3046555

[IMP] mail: rename ComposerSuggestedRecipient (component)
Task-3046598

[IMP] mail: rename ComposerSuggestedRecipientList (component)
Task-3046624

[IMP] mail, *: rename ComposerTextInput (component)
*: im_livechat
Task-3046648

[IMP] mail: rename DeleteMessageConfirm (component)
Task-3046661

[IMP] mail, *: rename Discuss (component)
*: im_livechat
Task-3046685

[IMP] mail: rename DiscussMobileMailboxSelection (component)
Task-3046703

[IMP] mail: rename DiscussMobileMailboxSelectionItem (component)
Task-3046709

[IMP] mail, *: rename DiscussSidebar (component)
Task-3046719

[IMP] mail: rename DiscussSidebarMailbox (component)
Task-3046732

[IMP] mail: rename DropZone (component)
Task-3046739

[IMP] mail: rename FollowButton (component)
Task-3047154

[IMP] mail: rename Follower (component)
Task-3047203

[IMP] mail: rename FollowerListMenu (component)
Task-3047236

[IMP] mail: rename FollowerSubtype (component)
Task-3047272

[IMP] mail: rename MailTemplate (component)
Task-3047314

[IMP] mail, *: rename Message (component)
*: im_livechat, sms, snailmail, website_sale
Task-3047352

[IMP] mail: rename MessageAuthorPrefix (component)
Task-3047683

[IMP] mail, *: rename MessageList (component)
*: hr_recruitment, website_livechat
Task-3047718

[IMP] mail, *: rename MessageNotificationPopoverContent (component)
*: sms
Task-3047742

[IMP] mail: rename MessageSeenIndicator (component)
Task-3047765

[IMP] mail, *: rename MessagingMenuTab (component)
*: im_livechat
Task-3047802

[IMP] mail: rename MobileMessagingNavbar (component)
Task-3047806

[IMP] mail, *: rename NotificationGroup (component)
*: sms, snailmail
Task-3047829

[IMP] mail, *: rename NotificationList (component)
*: im_livechat
Task-3047871

[IMP] mail: rename NotificationRequest (component)
Task-3047883

[IMP] mail, *: rename PersonaImStatusIcon (component)
*: hr_holidays
Task-3047969

[IMP] mail, *: rename ThreadIcon (component)
*: hr_holidays, im_livechat
Task-3047980

[IMP] mail, *: rename ThreadNeedactionPreview (component)
*: im_livechat, rating, test_mail_full
Task-3048021

[IMP] mail, *: rename ThreadTextualTypingStatus (component)
*: im_livechat
Task-3048042

[IMP] mail, *: rename ThreadTypingIcon (component)
*: im_livechat
Task-3048043

[IMP] snailmail: rename SnailmailError (component)
Task-3048051

[IMP] website_livechat: rename VisitorBanner (component)
Task-3048069

Task-3047725

closes odoo/odoo#104548

Related: odoo/enterprise#33411
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Alexandre Kühn
2022-10-28 20:39:58 +02:00
parent f8004d479a
commit cc6546677d
230 changed files with 2234 additions and 2234 deletions
@@ -111,7 +111,7 @@ QUnit.module('hr', {}, function () {
assert.containsN(
document.body,
'.o_ChatWindowHeader_name',
'.o_ChatWindowHeaderView_name',
2,
"should have 2 chat windows"
);
@@ -176,7 +176,7 @@ QUnit.module('hr', {}, function () {
`read hr.employee.public ${hrEmployeePublicId2}`
]);
assert.containsOnce(document.body, '.o_ChatWindowHeader_name',
assert.containsOnce(document.body, '.o_ChatWindowHeaderView_name',
"should have 1 chat window");
});
});
@@ -69,11 +69,11 @@ QUnit.module('hr', {}, function () {
);
assert.containsOnce(
document.body,
'.o_ChatWindowHeader_name',
'.o_ChatWindowHeaderView_name',
'should have opened chat window'
);
assert.strictEqual(
document.querySelector('.o_ChatWindowHeader_name').textContent,
document.querySelector('.o_ChatWindowHeaderView_name').textContent,
"Mario",
'chat window should be with clicked employee'
);
@@ -88,12 +88,12 @@ QUnit.module('hr', {}, function () {
);
assert.containsN(
document.body,
'.o_ChatWindowHeader_name',
'.o_ChatWindowHeaderView_name',
2,
'should have opened second chat window'
);
assert.strictEqual(
document.querySelectorAll('.o_ChatWindowHeader_name')[1].textContent,
document.querySelectorAll('.o_ChatWindowHeaderView_name')[1].textContent,
"Luigi",
'chat window should be with clicked employee'
);
@@ -108,7 +108,7 @@ QUnit.module('hr', {}, function () {
);
assert.containsN(
document.body,
'.o_ChatWindowHeader_name',
'.o_ChatWindowHeaderView_name',
2,
"should still have only 2 chat windows because third is the same partner as first"
);
@@ -241,7 +241,7 @@ QUnit.module('hr', {}, function () {
assert.containsN(
document.body,
'.o_ChatWindowHeader_name',
'.o_ChatWindowHeaderView_name',
2,
"should have 2 chat windows"
);
@@ -292,11 +292,11 @@ QUnit.module('hr', {}, function () {
);
assert.containsOnce(
document.body,
'.o_ChatWindowHeader_name',
'.o_ChatWindowHeaderView_name',
'should have opened chat window'
);
assert.strictEqual(
document.querySelector('.o_ChatWindowHeader_name').textContent,
document.querySelector('.o_ChatWindowHeaderView_name').textContent,
"Mario",
'chat window should be with clicked employee'
);
@@ -311,12 +311,12 @@ QUnit.module('hr', {}, function () {
);
assert.containsN(
document.body,
'.o_ChatWindowHeader_name',
'.o_ChatWindowHeaderView_name',
2,
'should have opened second chat window'
);
assert.strictEqual(
document.querySelectorAll('.o_ChatWindowHeader_name')[1].textContent,
document.querySelectorAll('.o_ChatWindowHeaderView_name')[1].textContent,
"Yoshi",
'chat window should be with clicked employee'
);
@@ -444,7 +444,7 @@ QUnit.module('hr', {}, function () {
`read hr.employee.public ${hrEmployeePublicId2}`
]);
assert.containsOnce(document.body, '.o_ChatWindowHeader_name',
assert.containsOnce(document.body, '.o_ChatWindowHeaderView_name',
"should have 1 chat window");
});
});
@@ -44,7 +44,7 @@ var KioskMode = AbstractAction.extend({
on_attach_callback: function () {
// Stop the bus_service to avoid notifications in kiosk mode
this.call('bus_service', 'stop');
$('body').find('.o_ChatWindowHeader_commandClose').click();
$('body').find('.o_ChatWindowHeaderView_commandClose').click();
},
_onBarcodeScanned: function(barcode) {
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-inherit="mail.PersonaImStatusIcon" t-inherit-mode="extension">
<t t-inherit="mail.PersonaImStatusIconView" t-inherit-mode="extension">
<xpath expr="//*[@name='root']" position="inside">
<t t-if="personaImStatusIconView.persona.im_status === 'leave_online'">
<i class="o_PersonaImStatusIcon_icon o-online fa fa-plane fa-stack-1x" title="Online" role="img" aria-label="User is online"/>
<i class="o_PersonaImStatusIconView_icon o-online fa fa-plane fa-stack-1x" title="Online" role="img" aria-label="User is online"/>
</t>
<t t-if="personaImStatusIconView.persona.im_status === 'leave_away'">
<i class="o_PersonaImStatusIcon_icon o-away fa fa-plane fa-stack-1x text-warning" title="Away" role="img" aria-label="User is away"/>
<i class="o_PersonaImStatusIconView_icon o-away fa fa-plane fa-stack-1x text-warning" title="Away" role="img" aria-label="User is away"/>
</t>
<t t-if="personaImStatusIconView.persona.im_status === 'leave_offline'">
<i class="o_PersonaImStatusIcon_icon o-offline fa fa-plane fa-stack-1x text-700" title="Out of office" role="img" aria-label="User is out of office"/>
<i class="o_PersonaImStatusIconView_icon o-offline fa fa-plane fa-stack-1x text-700" title="Out of office" role="img" aria-label="User is out of office"/>
</t>
</xpath>
</t>
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-inherit="mail.ThreadIcon" t-inherit-mode="extension">
<t t-inherit="mail.ThreadIconView" t-inherit-mode="extension">
<xpath expr="//*[@name='noImStatusCondition']" position="before">
<t t-elif="threadIconView.thread.channel.correspondent.im_status === 'leave_online'">
<div class="o_ThreadIcon_online fa fa-fw fa-plane" title="Online"/>
<div class="o_ThreadIconView_online fa fa-fw fa-plane" title="Online"/>
</t>
<t t-elif="threadIconView.thread.channel.correspondent.im_status === 'leave_away'">
<div class="o_ThreadIcon_away fa fa-fw fa-plane text-warning" title="Away"/>
<div class="o_ThreadIconView_away fa fa-fw fa-plane text-warning" title="Away"/>
</t>
<t t-elif="threadIconView.thread.channel.correspondent.im_status === 'leave_offline'">
<div class="o_ThreadIcon_offline fa fa-fw fa-plane" title="Out of office"/>
<div class="o_ThreadIconView_offline fa fa-fw fa-plane" title="Out of office"/>
</t>
</xpath>
</t>
@@ -31,12 +31,12 @@ QUnit.test('on leave & online', async function (assert) {
await openDiscuss();
await afterNextRender(() => advanceTime(UPDATE_BUS_PRESENCE_DELAY));
assert.hasClass(
document.querySelector('.o_PersonaImStatusIcon_icon'),
document.querySelector('.o_PersonaImStatusIconView_icon'),
'o-online',
"persona IM status icon should have online status rendering"
);
assert.hasClass(
document.querySelector('.o_PersonaImStatusIcon_icon'),
document.querySelector('.o_PersonaImStatusIconView_icon'),
'fa-plane',
"persona IM status icon should have leave status rendering"
);
@@ -65,12 +65,12 @@ QUnit.test('on leave & away', async function (assert) {
await openDiscuss();
await afterNextRender(() => advanceTime(UPDATE_BUS_PRESENCE_DELAY));
assert.hasClass(
document.querySelector('.o_PersonaImStatusIcon_icon'),
document.querySelector('.o_PersonaImStatusIconView_icon'),
'o-away',
"persona IM status icon should have away status rendering"
);
assert.hasClass(
document.querySelector('.o_PersonaImStatusIcon_icon'),
document.querySelector('.o_PersonaImStatusIconView_icon'),
'fa-plane',
"persona IM status icon should have leave status rendering"
);
@@ -99,12 +99,12 @@ QUnit.test('on leave & offline', async function (assert) {
await openDiscuss();
await afterNextRender(() => advanceTime(UPDATE_BUS_PRESENCE_DELAY));
assert.hasClass(
document.querySelector('.o_PersonaImStatusIcon_icon'),
document.querySelector('.o_PersonaImStatusIconView_icon'),
'o-offline',
"persona IM status icon should have offline status rendering"
);
assert.hasClass(
document.querySelector('.o_PersonaImStatusIcon_icon'),
document.querySelector('.o_PersonaImStatusIconView_icon'),
'fa-plane',
"persona IM status icon should have leave status rendering"
);
@@ -29,11 +29,11 @@ QUnit.test('thread icon of a chat when correspondent is on leave & online', asyn
assert.containsOnce(
document.body,
'.o_ThreadIcon_online',
'.o_ThreadIconView_online',
"thread icon should have online status rendering"
);
assert.hasClass(
document.querySelector('.o_ThreadIcon_online'),
document.querySelector('.o_ThreadIconView_online'),
'fa-plane',
"thread icon should have leave status rendering"
);
@@ -59,11 +59,11 @@ QUnit.test('thread icon of a chat when correspondent is on leave & away', async
assert.containsOnce(
document.body,
'.o_ThreadIcon_away',
'.o_ThreadIconView_away',
"thread icon should have away status rendering"
);
assert.hasClass(
document.querySelector('.o_ThreadIcon_away'),
document.querySelector('.o_ThreadIconView_away'),
'fa-plane',
"thread icon should have leave status rendering"
);
@@ -89,11 +89,11 @@ QUnit.test('thread icon of a chat when correspondent is on leave & offline', asy
assert.containsOnce(
document.body,
'.o_ThreadIcon_offline',
'.o_ThreadIconView_offline',
"thread icon should have offline status rendering"
);
assert.hasClass(
document.querySelector('.o_ThreadIcon_offline'),
document.querySelector('.o_ThreadIconView_offline'),
'fa-plane',
"thread icon should have leave status rendering"
);
@@ -83,7 +83,7 @@ tour.register('hr_recruitment_tour',{
content: Markup(_t("<div><b>Try to send an email</b> to the applicant.</div><div><i>Tips: All emails sent or received are saved in the history here</i>")),
position: "bottom"
}, {
trigger: ".o_Chatter .o_Composer_buttonSend",
trigger: ".o_Chatter .o_ComposerView_buttonSend",
extra_trigger: '.o_applicant_form',
content: _t("Send your email. Followers will get a copy of the communication."),
position: "bottom"
@@ -1,7 +1,7 @@
.o_applicant_interviewer_form {
.o_ChatterTopbar_buttonSendMessage,
.o_ChatterTopbar_buttonLogNote,
.o_MessageList_empty {
.o_MessageListView_empty {
display: none;
}
}
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-inherit="mail.Composer" t-inherit-mode="extension">
<xpath expr="//*[hasclass('o_Composer_buttonAttachment')]" position="replace">
<t t-inherit="mail.ComposerView" t-inherit-mode="extension">
<xpath expr="//*[hasclass('o_ComposerView_buttonAttachment')]" position="replace">
<t t-if="!composerView.composer.activeThread or !composerView.composer.activeThread.channel or composerView.composer.activeThread.channel.channel_type !== 'livechat'">$0</t>
</xpath>
</t>
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-inherit="mail.DiscussSidebar" t-inherit-mode="extension">
<t t-inherit="mail.DiscussSidebarView" t-inherit-mode="extension">
<xpath expr="//*[@name='beforeCategoryChat']" position="before">
<t t-set="categoryLivechat" t-value="discussSidebarView.owner.discuss.categoryLivechat"/>
<t t-if="categoryLivechat and categoryLivechat.categoryItems.length">
<DiscussSidebarCategory
className="'o_DiscussSidebar_category o_DiscussSidebar_categoryLivechat'"
className="'o_DiscussSidebarView_category o_DiscussSidebarView_categoryLivechat'"
record="categoryLivechat"
/>
</t>
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-inherit="mail.ThreadIcon" t-inherit-mode="extension">
<t t-inherit="mail.ThreadIconView" t-inherit-mode="extension">
<xpath expr="//*[@name='root']" position="inside">
<t t-elif="threadIconView.thread.channel and threadIconView.thread.channel.channel_type === 'livechat'">
<t t-if="threadIconView.threadTypingIconView">
<ThreadTypingIcon
className="'o_ThreadIcon_typing'"
<ThreadTypingIconView
className="'o_ThreadIconView_typing'"
record="threadIconView.threadTypingIconView"
/>
</t>
@@ -1,12 +1,12 @@
/** @odoo-module **/
import { ThreadNeedactionPreview } from '@mail/components/thread_needaction_preview/thread_needaction_preview';
import { ThreadNeedactionPreviewView } from '@mail/components/thread_needaction_preview/thread_needaction_preview';
import { patch } from 'web.utils';
const components = { ThreadNeedactionPreview };
const components = { ThreadNeedactionPreviewView };
patch(components.ThreadNeedactionPreview.prototype, 'thread_needaction_preview', {
patch(components.ThreadNeedactionPreviewView.prototype, 'thread_needaction_preview', {
//--------------------------------------------------------------------------
// Public
@@ -33,8 +33,8 @@ QUnit.test('closing a chat window with no message from admin side unpins it', as
const { messaging } = await start();
await afterNextRender(() => document.querySelector(`.o_MessagingMenu_toggler`).click());
await afterNextRender(() => document.querySelector(`.o_NotificationList_preview`).click());
await afterNextRender(() => document.querySelector(`.o_ChatWindowHeader_commandClose`).click());
await afterNextRender(() => document.querySelector(`.o_NotificationListView_preview`).click());
await afterNextRender(() => document.querySelector(`.o_ChatWindowHeaderView_commandClose`).click());
const channels = await messaging.rpc({
model: 'mail.channel',
method: 'channel_info',
@@ -19,10 +19,10 @@ QUnit.test('livechat: no add attachment button', async function (assert) {
},
});
await openDiscuss();
assert.containsOnce(document.body, '.o_Composer', "should have a composer");
assert.containsOnce(document.body, '.o_ComposerView', "should have a composer");
assert.containsNone(
document.body,
'.o_Composer_buttonAttachment',
'.o_ComposerView_buttonAttachment',
"composer linked to livechat should not have a 'Add attachment' button"
);
});
@@ -38,10 +38,10 @@ QUnit.test('livechat: disable attachment upload via drag and drop', async functi
},
});
await openDiscuss();
assert.containsOnce(document.body, '.o_Composer', "should have a composer");
assert.containsOnce(document.body, '.o_ComposerView', "should have a composer");
assert.containsNone(
document.body,
'.o_Composer_dropZone',
'.o_ComposerView_dropZone',
"composer linked to livechat should not have a dropzone"
);
});
@@ -27,7 +27,7 @@ QUnit.test('livechat - counter: should not have a counter if the category is unf
await openDiscuss();
assert.containsNone(
document.body,
`.o_DiscussSidebar_categoryLivechat .o_DiscussSidebarCategory_counter`,
`.o_DiscussSidebarView_categoryLivechat .o_DiscussSidebarCategory_counter`,
"should not have a counter if the category is unfolded and without unread messages",
);
});
@@ -52,7 +52,7 @@ QUnit.test('livechat - counter: should not have a counter if the category is unf
await openDiscuss();
assert.containsNone(
document.body,
`.o_DiscussSidebar_categoryLivechat .o_DiscussSidebarCategory_counter`,
`.o_DiscussSidebarView_categoryLivechat .o_DiscussSidebarCategory_counter`,
"should not have a counter if the category is unfolded and with unread messages",
);
});
@@ -79,7 +79,7 @@ QUnit.test('livechat - counter: should not have a counter if category is folded
assert.containsNone(
document.body,
`.o_DiscussSidebar_categoryLivechat .o_DiscussSidebarCategory_counter`,
`.o_DiscussSidebarView_categoryLivechat .o_DiscussSidebarCategory_counter`,
"should not have a counter if the category is folded and without unread messages"
);
});
@@ -108,7 +108,7 @@ QUnit.test('livechat - counter: should have correct value of unread threads if c
await openDiscuss();
assert.strictEqual(
document.querySelector(`.o_DiscussSidebar_categoryLivechat .o_DiscussSidebarCategory_counter`).textContent,
document.querySelector(`.o_DiscussSidebarView_categoryLivechat .o_DiscussSidebarCategory_counter`).textContent,
"1",
"should have correct value of unread threads if category is folded and with unread messages"
);
@@ -29,10 +29,10 @@ QUnit.test('livechat in the sidebar: basic rendering', async function (assert) {
const { openDiscuss } = await start();
await openDiscuss();
assert.containsOnce(document.body, '.o_Discuss_sidebar',
assert.containsOnce(document.body, '.o_DiscussView_sidebar',
"should have a sidebar section"
);
const groupLivechat = document.querySelector('.o_DiscussSidebar_categoryLivechat');
const groupLivechat = document.querySelector('.o_DiscussSidebarView_categoryLivechat');
assert.ok(groupLivechat,
"should have a channel group livechat"
);
@@ -81,10 +81,10 @@ QUnit.test('livechat in the sidebar: existing user with country', async function
assert.containsOnce(
document.body,
'.o_DiscussSidebar_categoryLivechat',
'.o_DiscussSidebarView_categoryLivechat',
"should have a channel group livechat in the side bar"
);
const livechat = document.querySelector('.o_DiscussSidebar_categoryLivechat .o_DiscussSidebarCategoryItem');
const livechat = document.querySelector('.o_DiscussSidebarView_categoryLivechat .o_DiscussSidebarCategoryItem');
assert.ok(
livechat,
"should have a livechat in sidebar"
@@ -109,7 +109,7 @@ QUnit.test('do not add livechat in the sidebar on visitor opening his chat', asy
assert.containsNone(
document.body,
'.o_DiscussSidebar_categoryLivechat',
'.o_DiscussSidebarView_categoryLivechat',
"should not have any livechat in the sidebar initially"
);
@@ -126,7 +126,7 @@ QUnit.test('do not add livechat in the sidebar on visitor opening his chat', asy
await nextAnimationFrame();
assert.containsNone(
document.body,
'.o_DiscussSidebar_categoryLivechat',
'.o_DiscussSidebarView_categoryLivechat',
"should still not have any livechat in the sidebar after visitor opened his chat"
);
});
@@ -156,7 +156,7 @@ QUnit.test('do not add livechat in the sidebar on visitor typing', async functio
assert.containsNone(
document.body,
'.o_DiscussSidebar_categoryLivechat',
'.o_DiscussSidebarView_categoryLivechat',
"should not have any livechat in the sidebar initially"
);
@@ -175,7 +175,7 @@ QUnit.test('do not add livechat in the sidebar on visitor typing', async functio
await nextAnimationFrame();
assert.containsNone(
document.body,
'.o_DiscussSidebar_categoryLivechat',
'.o_DiscussSidebarView_categoryLivechat',
"should still not have any livechat in the sidebar after visitor started typing"
);
});
@@ -210,7 +210,7 @@ QUnit.test('add livechat in the sidebar on visitor sending first message', async
await openDiscuss();
assert.containsNone(
document.body,
'.o_DiscussSidebar_categoryLivechat',
'.o_DiscussSidebarView_categoryLivechat',
"should not have any livechat in the sidebar initially"
);
@@ -228,16 +228,16 @@ QUnit.test('add livechat in the sidebar on visitor sending first message', async
}));
assert.containsOnce(
document.body,
'.o_DiscussSidebar_categoryLivechat',
'.o_DiscussSidebarView_categoryLivechat',
"should have a channel group livechat in the side bar after receiving first message"
);
assert.containsOnce(
document.body,
'.o_DiscussSidebar_categoryLivechat .o_DiscussSidebarCategoryItem',
'.o_DiscussSidebarView_categoryLivechat .o_DiscussSidebarCategoryItem',
"should have a livechat in the sidebar after receiving first message"
);
assert.strictEqual(
document.querySelector('.o_DiscussSidebar_categoryLivechat .o_DiscussSidebarCategoryItem .o_DiscussSidebarCategoryItem_name').textContent,
document.querySelector('.o_DiscussSidebarView_categoryLivechat .o_DiscussSidebarCategoryItem .o_DiscussSidebarCategoryItem_name').textContent,
"Visitor (Belgium)",
"should have visitor name and country as livechat name"
);
@@ -275,7 +275,7 @@ QUnit.test('livechats are sorted by last activity time in the sidebar: most rece
]);
const { openDiscuss } = await start();
await openDiscuss();
const initialLivechats = document.querySelectorAll('.o_DiscussSidebar_categoryLivechat .o_DiscussSidebarCategory_item');
const initialLivechats = document.querySelectorAll('.o_DiscussSidebarView_categoryLivechat .o_DiscussSidebarCategory_item');
assert.strictEqual(
initialLivechats.length,
2,
@@ -295,9 +295,9 @@ QUnit.test('livechats are sorted by last activity time in the sidebar: most rece
// post a new message on the last channel
await afterNextRender(() => initialLivechats[1].click());
await afterNextRender(() => document.execCommand('insertText', false, "Blabla"));
await afterNextRender(() => document.querySelector('.o_Composer_buttonSend').click());
await afterNextRender(() => document.querySelector('.o_ComposerView_buttonSend').click());
const newLivechats = document.querySelectorAll('.o_DiscussSidebar_categoryLivechat .o_DiscussSidebarCategory_item');
const newLivechats = document.querySelectorAll('.o_DiscussSidebarView_categoryLivechat .o_DiscussSidebarCategory_item');
assert.strictEqual(
newLivechats.length,
2,
@@ -393,9 +393,9 @@ QUnit.test('reaction button should not be present on livechat', async function (
},
});
await openDiscuss();
await insertText('.o_ComposerTextInput_textarea', "Test");
await click('.o_Composer_buttonSend');
await click('.o_Message');
await insertText('.o_ComposerTextInputView_textarea', "Test");
await click('.o_ComposerView_buttonSend');
await click('.o_MessageView');
assert.containsNone(
document.body,
'.o_MessageActionView_actionReaction',
@@ -421,9 +421,9 @@ QUnit.test('reply button should not be present on livechat', async function (ass
},
});
await openDiscuss();
await insertText('.o_ComposerTextInput_textarea', "Test");
await click('.o_Composer_buttonSend');
await click('.o_Message');
await insertText('.o_ComposerTextInputView_textarea', "Test");
await click('.o_ComposerView_buttonSend');
await click('.o_MessageView');
assert.containsNone(
document.body,
'.o_MessageActionView_actionReplyTo',
@@ -33,16 +33,16 @@ QUnit.test('livechats should be in "chat" filter', async function (assert) {
await afterNextRender(() => document.querySelector('.o_MessagingMenu_toggler').click());
assert.containsOnce(
document.body,
'.o_MessagingMenuTab[data-tab-id="all"]',
'.o_MessagingMenuTabView[data-tab-id="all"]',
"should have a tab/filter 'all' in messaging menu"
);
assert.containsOnce(
document.body,
'.o_MessagingMenuTab[data-tab-id="chat"]',
'.o_MessagingMenuTabView[data-tab-id="chat"]',
"should have a tab/filter 'chat' in messaging menu"
);
assert.hasClass(
document.querySelector('.o_MessagingMenuTab[data-tab-id="all"]'),
document.querySelector('.o_MessagingMenuTabView[data-tab-id="all"]'),
'o-active',
"tab/filter 'all' of messaging menu should be active initially"
);
@@ -53,10 +53,10 @@ QUnit.test('livechats should be in "chat" filter', async function (assert) {
);
await afterNextRender(() =>
document.querySelector('.o_MessagingMenuTab[data-tab-id="chat"]').click()
document.querySelector('.o_MessagingMenuTabView[data-tab-id="chat"]').click()
);
assert.hasClass(
document.querySelector('.o_MessagingMenuTab[data-tab-id="chat"]'),
document.querySelector('.o_MessagingMenuTabView[data-tab-id="chat"]'),
'o-active',
"tab/filter 'chat' of messaging menu should become active after click"
);
@@ -31,12 +31,12 @@ QUnit.test('livechat: public website visitor is typing', async function (assert)
await openDiscuss();
assert.containsOnce(
document.body,
'.o_ThreadViewTopbar .o_ThreadIcon',
'.o_ThreadViewTopbar .o_ThreadIconView',
"should have thread icon"
);
assert.containsOnce(
document.body,
'.o_ThreadIcon .fa.fa-comments',
'.o_ThreadIconView .fa.fa-comments',
"should have default livechat icon"
);
@@ -54,11 +54,11 @@ QUnit.test('livechat: public website visitor is typing', async function (assert)
}));
assert.containsOnce(
document.body,
'.o_ThreadIcon_typing',
'.o_ThreadIconView_typing',
"should have thread icon with visitor currently typing"
);
assert.strictEqual(
document.querySelector('.o_ThreadIcon_typing').title,
document.querySelector('.o_ThreadIconView_typing').title,
"Visitor 20 is typing...",
"title of icon should tell visitor is currently typing"
);
@@ -31,7 +31,7 @@ QUnit.test('receive visitor typing status "is typing"', async function (assert)
await openDiscuss();
assert.strictEqual(
document.querySelector('.o_ThreadTextualTypingStatus').textContent,
document.querySelector('.o_ThreadTextualTypingStatusView').textContent,
"",
"Should display no one is currently typing"
);
@@ -49,7 +49,7 @@ QUnit.test('receive visitor typing status "is typing"', async function (assert)
},
}));
assert.strictEqual(
document.querySelector('.o_ThreadTextualTypingStatus').textContent,
document.querySelector('.o_ThreadTextualTypingStatusView').textContent,
"Visitor 20 is typing...",
"Should display that visitor is typing"
);
@@ -26,9 +26,9 @@
</t>
<small t-att-title="activityListViewItem.activity.dateDeadline" t-esc="activityListViewItem.delayLabel"/>
</div>
<ActivityMarkDonePopoverContent t-if="activityListViewItem.markDoneView" record="activityListViewItem.markDoneView"/>
<ActivityMarkDonePopoverContentView t-if="activityListViewItem.markDoneView" record="activityListViewItem.markDoneView"/>
<div t-if="activityListViewItem.mailTemplateViews.length > 0" class="mx-3 mt-2">
<MailTemplate
<MailTemplateView
t-foreach="activityListViewItem.mailTemplateViews" t-as="mailTemplateView" t-key="mailTemplateView"
record="mailTemplateView"
/>
@@ -111,7 +111,7 @@
<t t-if="activityView.mailTemplateViews.length > 0">
<div class="o_ActivityView_mailTemplates">
<t t-foreach="activityView.mailTemplateViews" t-as="mailTemplateView" t-key="mailTemplateView.localId">
<MailTemplate
<MailTemplateView
className="'o_ActivityView_mailTemplate'"
record="mailTemplateView"
/>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ActivityBox extends Component {
export class ActivityBoxView extends Component {
/**
* @returns {ActivityBoxView}
@@ -15,9 +15,9 @@ export class ActivityBox extends Component {
}
Object.assign(ActivityBox, {
Object.assign(ActivityBoxView, {
props: { record: Object },
template: 'mail.ActivityBox',
template: 'mail.ActivityBoxView',
});
registerMessagingComponent(ActivityBox);
registerMessagingComponent(ActivityBoxView);
@@ -2,7 +2,7 @@
// Layout
// ------------------------------------------------------------------
.o_ActivityBox_activityList {
.o_ActivityBoxView_activityList {
max-width: var(--Chatter-max-width, none);
}
@@ -10,6 +10,6 @@
// Style
// ------------------------------------------------------------------
.o_ActivityBox_titleLine {
.o_ActivityBoxView_titleLine {
border-top: $border-width $border-color dashed;
}
@@ -1,40 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ActivityBox" owl="1">
<t t-name="mail.ActivityBoxView" owl="1">
<t t-if="activityBoxView">
<div class="o_ActivityBox" t-attf-class="{{ className }}" t-ref="root">
<a href="#" role="button" class="o_ActivityBox_title btn d-flex align-items-center mt-4 p-0 w-100 fw-bold" t-att-aria-expanded="activityBoxView.isActivityListVisible ? 'true' : 'false'" t-on-click="activityBoxView.onClickActivityBoxTitle">
<hr class="o_ActivityBox_titleLine w-auto flex-grow-1 me-3" />
<span class="o_ActivityBox_titleText">
<div class="o_ActivityBoxView" t-attf-class="{{ className }}" t-ref="root">
<a href="#" role="button" class="o_ActivityBoxView_title btn d-flex align-items-center mt-4 p-0 w-100 fw-bold" t-att-aria-expanded="activityBoxView.isActivityListVisible ? 'true' : 'false'" t-on-click="activityBoxView.onClickActivityBoxTitle">
<hr class="o_ActivityBoxView_titleLine w-auto flex-grow-1 me-3" />
<span class="o_ActivityBoxView_titleText">
<i class="fa fa-fw" t-att-class="activityBoxView.isActivityListVisible ? 'fa-caret-down' : 'fa-caret-right'"/>
Planned activities
</span>
<t t-if="!activityBoxView.isActivityListVisible">
<span class="o_ActivityBox_titleBadges ms-2">
<span class="o_ActivityBoxView_titleBadges ms-2">
<t t-if="activityBoxView.chatter.thread.overdueActivities.length > 0">
<span class="o_ActivityBox_titleBadge me-1 badge text-bg-danger">
<span class="o_ActivityBoxView_titleBadge me-1 badge text-bg-danger">
<t t-esc="activityBoxView.chatter.thread.overdueActivities.length"/>
</span>
</t>
<t t-if="activityBoxView.chatter.thread.todayActivities.length > 0">
<span class="o_ActivityBox_titleBadge me-1 badge text-bg-warning">
<span class="o_ActivityBoxView_titleBadge me-1 badge text-bg-warning">
<t t-esc="activityBoxView.chatter.thread.todayActivities.length"/>
</span>
</t>
<t t-if="activityBoxView.chatter.thread.futureActivities.length > 0">
<span class="o_ActivityBox_titleBadge me-1 badge text-bg-success">
<span class="o_ActivityBoxView_titleBadge me-1 badge text-bg-success">
<t t-esc="activityBoxView.chatter.thread.futureActivities.length"/>
</span>
</t>
</span>
</t>
<hr class="o_ActivityBox_titleLine w-auto flex-grow-1 ms-3"/>
<hr class="o_ActivityBoxView_titleLine w-auto flex-grow-1 ms-3"/>
</a>
<t t-if="activityBoxView.isActivityListVisible">
<div class="o_ActivityBox_activityList">
<div class="o_ActivityBoxView_activityList">
<t t-foreach="activityBoxView.activityViews" t-as="activityView" t-key="activityView.localId">
<ActivityView className="'o_ActivityBox_activity'" record="activityView"/>
<ActivityView className="'o_ActivityBoxView_activity'" record="activityView"/>
</t>
</div>
</t>
@@ -5,7 +5,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component, onMounted } from '@odoo/owl';
export class ActivityMarkDonePopoverContent extends Component {
export class ActivityMarkDonePopoverContentView extends Component {
/**
* @override
@@ -25,9 +25,9 @@ export class ActivityMarkDonePopoverContent extends Component {
}
Object.assign(ActivityMarkDonePopoverContent, {
Object.assign(ActivityMarkDonePopoverContentView, {
props: { record: Object },
template: 'mail.ActivityMarkDonePopoverContent',
template: 'mail.ActivityMarkDonePopoverContentView',
});
registerMessagingComponent(ActivityMarkDonePopoverContent);
registerMessagingComponent(ActivityMarkDonePopoverContentView);
@@ -2,6 +2,6 @@
// Layout
// ------------------------------------------------------------------
.o_ActivityMarkDonePopoverContent_feedback {
.o_ActivityMarkDonePopoverContentView_feedback {
min-height: 70px;
}
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ActivityMarkDonePopoverContent" owl="1">
<t t-name="mail.ActivityMarkDonePopoverContentView" owl="1">
<t t-if="activityMarkDonePopoverContentView">
<div class="o_ActivityMarkDonePopoverContent" t-attf-class="{{ className }}" t-on-keydown="activityMarkDonePopoverContentView.onKeydown" t-ref="root">
<h6 t-if="activityMarkDonePopoverContentView.hasHeader" class="o_ActivityMarkDonePopoverContent_header p-2 fw-bolder bg-200 border-bottom" t-esc="activityMarkDonePopoverContentView.headerText"/>
<div class="o_ActivityMarkDonePopoverContent_content py-2 px-3">
<textarea class="form-control o_ActivityMarkDonePopoverContent_feedback" rows="3" placeholder="Write Feedback" t-on-blur="activityMarkDonePopoverContentView.onBlur" t-ref="feedbackTextarea"/>
<div class="o_ActivityMarkDonePopoverContent_buttons mt-2">
<button type="button" class="o_ActivityMarkDonePopoverContent_doneScheduleNextButton btn btn-sm btn-primary" t-on-click="activityMarkDonePopoverContentView.onClickDoneAndScheduleNext">
<div class="o_ActivityMarkDonePopoverContentView" t-attf-class="{{ className }}" t-on-keydown="activityMarkDonePopoverContentView.onKeydown" t-ref="root">
<h6 t-if="activityMarkDonePopoverContentView.hasHeader" class="o_ActivityMarkDonePopoverContentView_header p-2 fw-bolder bg-200 border-bottom" t-esc="activityMarkDonePopoverContentView.headerText"/>
<div class="o_ActivityMarkDonePopoverContentView_content py-2 px-3">
<textarea class="form-control o_ActivityMarkDonePopoverContentView_feedback" rows="3" placeholder="Write Feedback" t-on-blur="activityMarkDonePopoverContentView.onBlur" t-ref="feedbackTextarea"/>
<div class="o_ActivityMarkDonePopoverContentView_buttons mt-2">
<button type="button" class="o_ActivityMarkDonePopoverContentView_doneScheduleNextButton btn btn-sm btn-primary" t-on-click="activityMarkDonePopoverContentView.onClickDoneAndScheduleNext">
Done &amp; Schedule Next
</button>
<t t-if="activityMarkDonePopoverContentView.activity.chaining_type === 'suggest'">
<button type="button" class="o_ActivityMarkDonePopoverContent_doneButton btn btn-sm btn-primary mx-2" t-on-click="activityMarkDonePopoverContentView.onClickDone">
<button type="button" class="o_ActivityMarkDonePopoverContentView_doneButton btn btn-sm btn-primary mx-2" t-on-click="activityMarkDonePopoverContentView.onClickDone">
Done
</button>
</t>
<button type="button" class="o_ActivityMarkDonePopoverContent_discardButton btn btn-sm btn-link" t-on-click="activityMarkDonePopoverContentView.onClickDiscard">
<button type="button" class="o_ActivityMarkDonePopoverContentView_discardButton btn btn-sm btn-link" t-on-click="activityMarkDonePopoverContentView.onClickDiscard">
Discard
</button>
</div>
@@ -5,7 +5,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class AttachmentBox extends Component {
export class AttachmentBoxView extends Component {
/**
* @override
@@ -28,9 +28,9 @@ export class AttachmentBox extends Component {
}
Object.assign(AttachmentBox, {
Object.assign(AttachmentBoxView, {
props: { record: Object },
template: 'mail.AttachmentBox',
template: 'mail.AttachmentBoxView',
});
registerMessagingComponent(AttachmentBox);
registerMessagingComponent(AttachmentBoxView);
@@ -2,6 +2,6 @@
// Style
// ------------------------------------------------------------------
.o_AttachmentBox_dashedLine {
.o_AttachmentBoxView_dashedLine {
border-top: $border-width dashed $border-color;
}
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.AttachmentBox" owl="1">
<t t-name="mail.AttachmentBoxView" owl="1">
<t t-if="attachmentBoxView">
<div class="o_AttachmentBox position-relative" t-attf-class="{{ className }}" t-ref="root">
<div class="o_AttachmentBox_title d-flex align-items-center">
<hr class="o_AttachmentBox_dashedLine flex-grow-1"/>
<span class="o_AttachmentBox_titleText p-3 fw-bold">
<div class="o_AttachmentBoxView position-relative" t-attf-class="{{ className }}" t-ref="root">
<div class="o_AttachmentBoxView_title d-flex align-items-center">
<hr class="o_AttachmentBoxView_dashedLine flex-grow-1"/>
<span class="o_AttachmentBoxView_titleText p-3 fw-bold">
Files
</span>
<hr class="o_AttachmentBox_dashedLine flex-grow-1"/>
<hr class="o_AttachmentBoxView_dashedLine flex-grow-1"/>
</div>
<div class="o_AttachmentBox_content d-flex flex-column">
<div class="o_AttachmentBoxView_content d-flex flex-column">
<t t-if="attachmentBoxView.attachmentList">
<AttachmentList
className="'o_attachmentBox_attachmentList'"
record="attachmentBoxView.attachmentList"
/>
</t>
<button class="o_AttachmentBox_buttonAdd btn btn-link" type="button" t-on-click="attachmentBoxView.onClickAddAttachment" t-att-disabled="!attachmentBoxView.chatter.hasWriteAccess">
<button class="o_AttachmentBoxView_buttonAdd btn btn-link" type="button" t-on-click="attachmentBoxView.onClickAddAttachment" t-att-disabled="!attachmentBoxView.chatter.hasWriteAccess">
<i class="fa fa-plus-square"/>
Attach files
</button>
@@ -5,7 +5,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class AttachmentDeleteConfirm extends Component {
export class AttachmentDeleteConfirmView extends Component {
/**
* @override
@@ -23,9 +23,9 @@ export class AttachmentDeleteConfirm extends Component {
}
Object.assign(AttachmentDeleteConfirm, {
Object.assign(AttachmentDeleteConfirmView, {
props: { record: Object },
template: 'mail.AttachmentDeleteConfirm',
template: 'mail.AttachmentDeleteConfirmView',
});
registerMessagingComponent(AttachmentDeleteConfirm);
registerMessagingComponent(AttachmentDeleteConfirmView);
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.AttachmentDeleteConfirm" owl="1">
<t t-name="mail.AttachmentDeleteConfirmView" owl="1">
<t t-if="attachmentDeleteConfirmView">
<div class="o_AttachmentDeleteConfirm card bg-view" t-attf-class="{{ className }}" t-ref="root">
<div class="o_AttachmentDeleteConfirmView card bg-view" t-attf-class="{{ className }}" t-ref="root">
<h4 class="m-3">Confirmation</h4>
<hr class="mt-0 mb-3"/>
<p class="o_AttachmentDeleteConfirm_mainText mx-3 mb-3" t-esc="attachmentDeleteConfirmView.body"/>
<p class="o_AttachmentDeleteConfirmView_mainText mx-3 mb-3" t-esc="attachmentDeleteConfirmView.body"/>
<hr class="mt-0 mb-3"/>
<div class="o_AttachmentDeleteConfirm_buttons mx-3 mb-3">
<button class="o_AttachmentDeleteConfirm_confirmButton btn btn-primary me-2" t-on-click="attachmentDeleteConfirmView.onClickOk">Ok</button>
<button class="o_AttachmentDeleteConfirm_cancelButton btn btn-secondary me-2" t-on-click="attachmentDeleteConfirmView.onClickCancel">Cancel</button>
<div class="o_AttachmentDeleteConfirmView_buttons mx-3 mb-3">
<button class="o_AttachmentDeleteConfirmView_confirmButton btn btn-primary me-2" t-on-click="attachmentDeleteConfirmView.onClickOk">Ok</button>
<button class="o_AttachmentDeleteConfirmView_cancelButton btn btn-secondary me-2" t-on-click="attachmentDeleteConfirmView.onClickCancel">Cancel</button>
</div>
</div>
</t>
@@ -2,6 +2,6 @@
// ============================================================================
// No CSS hacks, variables overrides only
.o_CallActionList_button:not(.btn-danger) {
--CallActionList_button-background-color: #{$o-gray-200};
.o_CallActionListView_button:not(.btn-danger) {
--CallActionListView_button-background-color: #{$o-gray-200};
}
@@ -5,7 +5,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class CallActionList extends Component {
export class CallActionListView extends Component {
/**
* @override
@@ -24,9 +24,9 @@ export class CallActionList extends Component {
}
Object.assign(CallActionList, {
Object.assign(CallActionListView, {
props: { record: Object },
template: 'mail.CallActionList',
template: 'mail.CallActionListView',
});
registerMessagingComponent(CallActionList);
registerMessagingComponent(CallActionListView);
@@ -1,4 +1,4 @@
.o_CallActionList_button:not(.btn-danger) {
background-color: var(--CallActionList_button-background-color, #{$o-gray-800});
.o_CallActionListView_button:not(.btn-danger) {
background-color: var(--CallActionListView_button-background-color, #{$o-gray-800});
color: #FFFFFF;
}
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.CallActionList" owl="1">
<t t-name="mail.CallActionListView" owl="1">
<t t-if="callActionListView">
<div class="o_CallActionList d-flex justify-content-between" t-attf-class="{{ className }}" t-ref="root">
<div class="o_CallActionList_buttons d-flex align-items-center flex-wrap">
<div class="o_CallActionListView d-flex justify-content-between" t-attf-class="{{ className }}" t-ref="root">
<div class="o_CallActionListView_buttons d-flex align-items-center flex-wrap">
<t t-if="callActionListView.thread.rtc and messaging.rtc.currentRtcSession">
<button class="o_CallActionList_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
<button class="o_CallActionListView_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
t-att-class="{ 'o-isActive': !messaging.rtc.currentRtcSession.isMute, 'o-isSmall p-2': callActionListView.isSmall, 'p-3': !callActionListView.isSmall }"
t-att-aria-label="callActionListView.microphoneButtonTitle"
t-att-title="callActionListView.microphoneButtonTitle"
t-on-click="callActionListView.onClickMicrophone">
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-stack-1x" t-att-class="{
'fa-lg': !callActionListView.isSmall,
'fa-microphone': !messaging.rtc.currentRtcSession.isMute,
@@ -20,12 +20,12 @@
}"/>
</div>
</button>
<button class="o_CallActionList_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
<button class="o_CallActionListView_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
t-att-class="{ 'o-isActive': !messaging.rtc.currentRtcSession.isDeaf, 'o-isSmall p-2': callActionListView.isSmall, 'p-3': !callActionListView.isSmall }"
t-att-aria-label="callActionListView.headphoneButtonTitle"
t-att-title="callActionListView.headphoneButtonTitle"
t-on-click="callActionListView.onClickDeafen">
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-stack-1x" t-att-class="{
'fa-lg': !callActionListView.isSmall,
'fa-headphones': !messaging.rtc.currentRtcSession.isDeaf,
@@ -34,7 +34,7 @@
}"/>
</div>
</button>
<button class="o_CallActionList_button o_CallActionList_videoButton btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
<button class="o_CallActionListView_button o_CallActionListView_videoButton btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
t-att-class="{
'o-isActive': messaging.rtc.sendUserVideo,
'o-isSmall p-2': callActionListView.isSmall,
@@ -43,12 +43,12 @@
t-att-aria-label="callActionListView.cameraButtonTitle"
t-att-title="callActionListView.cameraButtonTitle"
t-on-click="callActionListView.onClickCamera">
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-video-camera fa-stack-1x" t-att-class="{ 'fa-lg': !callActionListView.isSmall, 'text-success': messaging.rtc.sendUserVideo }"/>
</div>
</button>
<t t-if="!messaging.device.isMobileDevice">
<button class="o_CallActionList_button o_CallActionList_videoButton btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
<button class="o_CallActionListView_button o_CallActionListView_videoButton btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
t-att-class="{
'o-isActive': messaging.rtc.sendDisplay,
'o-isSmall p-2': callActionListView.isSmall,
@@ -57,81 +57,81 @@
t-att-aria-label="callActionListView.screenSharingButtonTitle"
t-att-title="callActionListView.screenSharingButtonTitle"
t-on-click="callActionListView.onClickScreen">
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-desktop fa-stack-1x" t-att-class="{ 'fa-lg': !callActionListView.isSmall, 'text-success': messaging.rtc.sendDisplay }"/>
</div>
</button>
</t>
<t t-if="!callActionListView.callView.isFullScreen">
<button class="o_CallActionList_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
<button class="o_CallActionListView_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
aria-label="Activate Full Screen"
title="Activate Full Screen"
t-att-class="{ 'o-isSmall p-2': callActionListView.isSmall, 'p-3': !callActionListView.isSmall }"
t-on-click="callActionListView.callView.activateFullScreen"
>
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-arrows-alt fa-stack-1x" t-att-class="{ 'fa-lg': !callActionListView.isSmall }"/>
</div>
</button>
</t>
<t t-if="callActionListView.callView.isFullScreen">
<button class="o_CallActionList_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
<button class="o_CallActionListView_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
aria-label="Deactivate Full Screen"
title="Deactivate Full Screen"
t-att-class="{ 'o-isSmall p-2': callActionListView.isSmall, 'p-3': !callActionListView.isSmall }"
t-on-click="callActionListView.callView.deactivateFullScreen"
>
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-compress fa-stack-1x" t-att-class="{ 'fa-lg': !callActionListView.isSmall }"/>
</div>
</button>
</t>
<t t-if="messaging.modelManager.isDebug">
<button class="o_CallActionList_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
<button class="o_CallActionListView_button btn d-flex m-1 border-0 rounded-circle shadow-none opacity-100 opacity-75-hover"
aria-label="More"
title="More"
t-att-class="{ 'o-isSmall p-2': callActionListView.isSmall, 'p-3': !callActionListView.isSmall }"
t-on-click="callActionListView.onClickMore"
t-ref="moreButton"
>
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-ellipsis-h fa-stack-1x" t-att-class="{ 'fa-lg': !callActionListView.isSmall }"/>
</div>
</button>
</t>
</t>
<t t-if="!callActionListView.thread">
<button class="o_CallActionList_button o_CallActionList_callToggle btn btn-success d-flex m-1 border-0 rounded-circle shadow-none"
<button class="o_CallActionListView_button o_CallActionListView_callToggle btn btn-success d-flex m-1 border-0 rounded-circle shadow-none"
t-att-class="{ 'o-isSmall p-2': callActionListView.isSmall, 'p-3': !callActionListView.isSmall }"
aria-label="Join Video Call"
title="Join Video Call"
t-att-disabled="callActionListView.thread.hasPendingRtcRequest"
t-on-click="callActionListView.onClickToggleVideoCall">
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-video-camera fa-stack-1x" t-att-class="{ 'fa-lg': !callActionListView.isSmall }"/>
</div>
</button>
</t>
<t t-if="callActionListView.thread">
<t t-if="callActionListView.thread.rtcInvitingSession and !callActionListView.thread.rtc">
<button class="o_CallActionList_button o_CallActionList_callToggle o-isActive btn btn-danger d-flex m-1 border-0 rounded-circle shadow-none"
<button class="o_CallActionListView_button o_CallActionListView_callToggle o-isActive btn btn-danger d-flex m-1 border-0 rounded-circle shadow-none"
t-att-class="{ 'o-isSmall p-2': callActionListView.isSmall, 'p-3': !callActionListView.isSmall }"
aria-label="Reject"
title="Reject"
t-att-disabled="callActionListView.thread.hasPendingRtcRequest"
t-on-click="callActionListView.onClickRejectCall">
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-phone fa-stack-1x" t-att-class="{ 'fa-lg': !callActionListView.isSmall }"/>
</div>
</button>
</t>
<button class="o_CallActionList_button o_CallActionList_callToggle btn d-flex m-1 border-0 rounded-circle shadow-none"
<button class="o_CallActionListView_button o_CallActionListView_callToggle btn d-flex m-1 border-0 rounded-circle shadow-none"
t-att-aria-label="callActionListView.callButtonTitle"
t-att-class="{ 'o-isActive btn-danger': !!callActionListView.thread.rtc, 'o-isSmall p-2': callActionListView.isSmall, 'p-3': !callActionListView.isSmall, 'btn-success': !callActionListView.thread.rtc }"
t-att-disabled="callActionListView.thread.hasPendingRtcRequest"
t-att-title="callActionListView.callButtonTitle"
t-on-click="callActionListView.onClickToggleAudioCall">
<div class="o_CallActionList_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<div class="o_CallActionListView_buttonIconWrapper fa-stack" t-att-class="{ 'o-isSmall': callActionListView.isSmall }">
<i class="fa fa-phone fa-stack-1x" t-att-class="{ 'fa-lg': !callActionListView.isSmall }"/>
</div>
</button>
@@ -27,7 +27,7 @@
<t t-if="callMainView.showOverlay or !callMainView.isControllerFloating">
<div class="o_CallMainView_controls d-flex justify-content-center w-100 pb-1" t-att-class="{ 'o-isFloating position-absolute bottom-0 pb-3': callMainView.isControllerFloating }">
<div class="o_CallMainView_controlsOverlayContainer" t-on-mousemove="callMainView.onMouseMoveOverlay">
<CallActionList record="callMainView.callActionListView"/>
<CallActionListView record="callMainView.callActionListView"/>
</div>
</div>
</t>
@@ -17,7 +17,7 @@
>
<!-- card -->
<t t-if="callParticipantCard.callParticipantVideoView">
<CallParticipantVideo record="callParticipantCard.callParticipantVideoView"/>
<CallParticipantVideoView record="callParticipantCard.callParticipantVideoView"/>
</t>
<t t-else="">
<div class="o_CallParticipantCard_avatarFrame d-flex align-items-center justify-content-center h-100 w-100 rounded-1" t-att-class="{ 'o-isMinimized': callParticipantCard.isMinimized }" draggable="false">
@@ -6,7 +6,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class CallParticipantVideo extends Component {
export class CallParticipantVideoView extends Component {
/**
* @override
@@ -30,9 +30,9 @@ export class CallParticipantVideo extends Component {
}
Object.assign(CallParticipantVideo, {
Object.assign(CallParticipantVideoView, {
props: { record: Object },
template: 'mail.CallParticipantVideo',
template: 'mail.CallParticipantVideoView',
});
registerMessagingComponent(CallParticipantVideo);
registerMessagingComponent(CallParticipantVideoView);
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.CallParticipantVideo" owl="1">
<t t-name="mail.CallParticipantVideoView" owl="1">
<t t-if="callParticipantVideoView">
<video class="o_CallParticipantVideo w-100 h-100 rounded-1 cursor-pointer"
<video class="o_CallParticipantVideoView w-100 h-100 rounded-1 cursor-pointer"
t-attf-class="{{ className }}"
playsinline="true"
autoplay="true"
@@ -11,7 +11,7 @@
</div>
<div class="d-flex flex-column flex-grow-1 mx-0 py-2 overflow-auto">
<t t-foreach="channelInvitationForm.selectablePartnerViews" t-as="selectablePartnerView" t-key="selectablePartnerView.localId">
<ChannelInvitationFormSelectablePartner record="selectablePartnerView"/>
<ChannelInvitationFormSelectablePartnerView record="selectablePartnerView"/>
</t>
<t t-if="channelInvitationForm.selectablePartners.length === 0">
<div class="mx-3">No user found that is not already a member of this channel.</div>
@@ -27,7 +27,7 @@
<h4>Selected users:</h4>
<div class="o_ChannelInvitationForm_selectedPartners overflow-auto">
<t t-foreach="channelInvitationForm.selectedPartnerViews" t-as="selectedPartnerView" t-key="selectedPartnerView.localId">
<ChannelInvitationFormSelectedPartner record="selectedPartnerView"/>
<ChannelInvitationFormSelectedPartnerView record="selectedPartnerView"/>
</t>
</div>
</div>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ChannelInvitationFormSelectablePartner extends Component {
export class ChannelInvitationFormSelectablePartnerView extends Component {
/**
* @returns {ChannelInvitationFormSelectablePartnerView}
@@ -15,9 +15,9 @@ export class ChannelInvitationFormSelectablePartner extends Component {
}
Object.assign(ChannelInvitationFormSelectablePartner, {
Object.assign(ChannelInvitationFormSelectablePartnerView, {
props: { record: Object },
template: 'mail.ChannelInvitationFormSelectablePartner',
template: 'mail.ChannelInvitationFormSelectablePartnerView',
});
registerMessagingComponent(ChannelInvitationFormSelectablePartner);
registerMessagingComponent(ChannelInvitationFormSelectablePartnerView);
@@ -1,9 +1,9 @@
.o_ChannelInvitationFormSelectablePartner_avatar {
.o_ChannelInvitationFormSelectablePartnerView_avatar {
object-fit: cover;
}
.o_ChannelInvitationFormSelectablePartner_avatarContainer {
.o_ChannelInvitationFormSelectablePartnerView_avatarContainer {
width: 32px;
height: 32px;
}
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ChannelInvitationFormSelectablePartner" owl="1">
<div class="o_ChannelInvitationFormSelectablePartner d-flex align-items-center px-3 py-1 btn-light" t-on-click="() => channelInvitationFormSelectablePartnerView.channelInvitationFormOwner.onClickSelectablePartner(channelInvitationFormSelectablePartnerView.partner)" t-att-data-partner-id="channelInvitationFormSelectablePartnerView.partner.id" t-attf-class="{{ className }}" t-ref="root">
<div class="o_ChannelInvitationFormSelectablePartner_avatarContainer position-relative flex-shrink-0">
<img class="o_ChannelInvitationFormSelectablePartner_avatar w-100 h-100 rounded-circle" t-att-src="channelInvitationFormSelectablePartnerView.partner.avatarUrl" alt="Avatar"/>
<t t-name="mail.ChannelInvitationFormSelectablePartnerView" owl="1">
<div class="o_ChannelInvitationFormSelectablePartnerView d-flex align-items-center px-3 py-1 btn-light" t-on-click="() => channelInvitationFormSelectablePartnerView.channelInvitationFormOwner.onClickSelectablePartner(channelInvitationFormSelectablePartnerView.partner)" t-att-data-partner-id="channelInvitationFormSelectablePartnerView.partner.id" t-attf-class="{{ className }}" t-ref="root">
<div class="o_ChannelInvitationFormSelectablePartnerView_avatarContainer position-relative flex-shrink-0">
<img class="o_ChannelInvitationFormSelectablePartnerView_avatar w-100 h-100 rounded-circle" t-att-src="channelInvitationFormSelectablePartnerView.partner.avatarUrl" alt="Avatar"/>
<t t-if="channelInvitationFormSelectablePartnerView.personaImStatusIconView">
<PersonaImStatusIcon
className="'o_ChannelInvitationFormSelectablePartner_imStatusIcon position-absolute bottom-0 end-0 d-flex align-items-center justify-content-center text-white'"
<PersonaImStatusIconView
className="'o_ChannelInvitationFormSelectablePartnerView_imStatusIcon position-absolute bottom-0 end-0 d-flex align-items-center justify-content-center text-white'"
classNameObj="{
'o_ChannelInvitationFormSelectablePartner_imStatusIcon-mobile': messaging.device.isSmall,
'o_ChannelInvitationFormSelectablePartnerView_imStatusIcon-mobile': messaging.device.isSmall,
'small' : !messaging.device.isSmall,
}"
record="channelInvitationFormSelectablePartnerView.personaImStatusIconView"
/>
</t>
</div>
<span class="o_ChannelInvitationFormSelectablePartner_name flex-grow-1 mx-2 text-truncate">
<span class="o_ChannelInvitationFormSelectablePartnerView_name flex-grow-1 mx-2 text-truncate">
<t t-esc="channelInvitationFormSelectablePartnerView.partner.nameOrDisplayName"/>
</span>
<input class="o_ChannelInvitationFormSelectablePartner_checkbox form-check-input flex-shrink-0" type="checkbox" t-att-checked="channelInvitationFormSelectablePartnerView.channelInvitationFormOwner.selectedPartners.includes(channelInvitationFormSelectablePartnerView.partner) ? 'checked' : undefined" t-on-input="ev => channelInvitationFormSelectablePartnerView.channelInvitationFormOwner.onInputPartnerCheckbox(channelInvitationFormSelectablePartnerView.partner, ev)" t-ref="selection-status"/>
<input class="o_ChannelInvitationFormSelectablePartnerView_checkbox form-check-input flex-shrink-0" type="checkbox" t-att-checked="channelInvitationFormSelectablePartnerView.channelInvitationFormOwner.selectedPartners.includes(channelInvitationFormSelectablePartnerView.partner) ? 'checked' : undefined" t-on-input="ev => channelInvitationFormSelectablePartnerView.channelInvitationFormOwner.onInputPartnerCheckbox(channelInvitationFormSelectablePartnerView.partner, ev)" t-ref="selection-status"/>
</div>
</t>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ChannelInvitationFormSelectedPartner extends Component {
export class ChannelInvitationFormSelectedPartnerView extends Component {
/**
* @returns {ChannelInvitationFormSelectedPartnerView}
@@ -15,9 +15,9 @@ export class ChannelInvitationFormSelectedPartner extends Component {
}
Object.assign(ChannelInvitationFormSelectedPartner, {
Object.assign(ChannelInvitationFormSelectedPartnerView, {
props: { record: Object },
template: 'mail.ChannelInvitationFormSelectedPartner',
template: 'mail.ChannelInvitationFormSelectedPartnerView',
});
registerMessagingComponent(ChannelInvitationFormSelectedPartner);
registerMessagingComponent(ChannelInvitationFormSelectedPartnerView);
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ChannelInvitationFormSelectedPartner" owl="1">
<t t-name="mail.ChannelInvitationFormSelectedPartnerView" owl="1">
<button class="btn btn-secondary" t-on-click="() => channelInvitationFormSelectedPartnerView.channelInvitationFormOwner.onClickSelectedPartner(channelInvitationFormSelectedPartnerView.partner)">
<t t-esc="channelInvitationFormSelectedPartnerView.partner.nameOrDisplayName"/> <i class="fa fa-times"/>
</button>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ChannelMember extends Component {
export class ChannelMemberView extends Component {
/**
* @returns {ChannelMemberView}
@@ -15,11 +15,11 @@ export class ChannelMember extends Component {
}
Object.assign(ChannelMember, {
Object.assign(ChannelMemberView, {
props: {
record: Object,
},
template: 'mail.ChannelMember',
template: 'mail.ChannelMemberView',
});
registerMessagingComponent(ChannelMember);
registerMessagingComponent(ChannelMemberView);
@@ -1,16 +1,16 @@
.o_ChannelMember:hover {
.o_ChannelMemberView:hover {
background-color: map-get($grays, '300');
}
.o_ChannelMember_avatar {
.o_ChannelMemberView_avatar {
object-fit: cover;
}
.o_ChannelMember_avatarContainer {
.o_ChannelMemberView_avatarContainer {
width: 32px;
height: 32px;
}
.o_ChannelMember_name {
.o_ChannelMemberView_name {
min-width: 0;
}
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ChannelMember" owl="1">
<div class="o_ChannelMember d-flex align-items-center mx-2 p-2" t-att-class="{'cursor-pointer': channelMemberView.hasOpenChat}" t-attf-class="{{ className }}" t-att-data-partner-id="channelMemberView.channelMember.persona.partner and channelMemberView.channelMember.persona.partner.id" t-att-title="channelMemberView.memberTitleText" t-on-click="channelMemberView.onClickMember" t-ref="root">
<div class="o_ChannelMember_avatarContainer position-relative flex-shrink-0">
<img class="o_ChannelMember_avatar rounded-circle w-100 h-100" t-att-src="channelMemberView.channelMember.avatarUrl" alt="Avatar"/>
<t t-name="mail.ChannelMemberView" owl="1">
<div class="o_ChannelMemberView d-flex align-items-center mx-2 p-2" t-att-class="{'cursor-pointer': channelMemberView.hasOpenChat}" t-attf-class="{{ className }}" t-att-data-partner-id="channelMemberView.channelMember.persona.partner and channelMemberView.channelMember.persona.partner.id" t-att-title="channelMemberView.memberTitleText" t-on-click="channelMemberView.onClickMember" t-ref="root">
<div class="o_ChannelMemberView_avatarContainer position-relative flex-shrink-0">
<img class="o_ChannelMemberView_avatar rounded-circle w-100 h-100" t-att-src="channelMemberView.channelMember.avatarUrl" alt="Avatar"/>
<t t-if="channelMemberView.personaImStatusIconView">
<PersonaImStatusIcon
className="'o_ChannelMember_personaImStatusIcon position-absolute bottom-0 end-0 d-flex align-items-center justify-content-center text-light'"
<PersonaImStatusIconView
className="'o_ChannelMemberView_personaImStatusIcon position-absolute bottom-0 end-0 d-flex align-items-center justify-content-center text-light'"
classNameObj="{
'o-isDeviceSmall': messaging.device.isSmall,
'small': !messaging.device.isSmall,
@@ -17,7 +17,7 @@
/>
</t>
</div>
<span class="o_ChannelMember_name ms-2 flex-column-1 text-truncate">
<span class="o_ChannelMemberView_name ms-2 flex-column-1 text-truncate">
<t t-esc="channelMemberView.channelMember.channel.thread.getMemberName(channelMemberView.channelMember.persona)"/>
</span>
</div>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ChannelMemberList extends Component {
export class ChannelMemberListView extends Component {
/**
* @returns {ChannelMemberListView}
@@ -15,9 +15,9 @@ export class ChannelMemberList extends Component {
}
Object.assign(ChannelMemberList, {
Object.assign(ChannelMemberListView, {
props: { record: Object },
template: 'mail.ChannelMemberList',
template: 'mail.ChannelMemberListView',
});
registerMessagingComponent(ChannelMemberList);
registerMessagingComponent(ChannelMemberListView);
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ChannelMemberList" owl="1">
<t t-name="mail.ChannelMemberListView" owl="1">
<t t-if="channelMemberListView">
<div class="o_ChannelMemberList d-flex flex-column overflow-auto bg-light" t-attf-class="{{ className }}" t-ref="root">
<div class="o_ChannelMemberListView d-flex flex-column overflow-auto bg-light" t-attf-class="{{ className }}" t-ref="root">
<t t-if="channelMemberListView.onlineCategoryView">
<ChannelMemberListCategory record="channelMemberListView.onlineCategoryView"/>
<ChannelMemberListCategoryView record="channelMemberListView.onlineCategoryView"/>
</t>
<t t-if="channelMemberListView.offlineCategoryView">
<ChannelMemberListCategory record="channelMemberListView.offlineCategoryView"/>
<ChannelMemberListCategoryView record="channelMemberListView.offlineCategoryView"/>
</t>
<t t-if="channelMemberListView.channel.unknownMemberCount === 1">
<span class="mx-2 mt-2">And 1 other member.</span>
@@ -18,7 +18,7 @@
</t>
<t t-if="!channelMemberListView.channel.areAllMembersLoaded">
<div class="mx-2 my-1">
<button class="o_ChannelMemberList_loadMoreButton btn btn-secondary" t-on-click="channelMemberListView.onClickLoadMoreMembers">Load more</button>
<button class="o_ChannelMemberListView_loadMoreButton btn btn-secondary" t-on-click="channelMemberListView.onClickLoadMoreMembers">Load more</button>
</div>
</t>
</div>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ChannelMemberListCategory extends Component {
export class ChannelMemberListCategoryView extends Component {
/**
* @returns {ChannelMemberListCategoryView}
@@ -15,9 +15,9 @@ export class ChannelMemberListCategory extends Component {
}
Object.assign(ChannelMemberListCategory, {
Object.assign(ChannelMemberListCategoryView, {
props: { record: Object },
template: 'mail.ChannelMemberListCategory',
template: 'mail.ChannelMemberListCategoryView',
});
registerMessagingComponent(ChannelMemberListCategory);
registerMessagingComponent(ChannelMemberListCategoryView);
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ChannelMemberListCategory" owl="1">
<t t-name="mail.ChannelMemberListCategoryView" owl="1">
<h6 class="m-2" t-esc="record.title"/>
<t t-foreach="record.channelMemberViews" t-as="channelMemberView" t-key="channelMemberView.localId">
<ChannelMember record="channelMemberView"/>
<ChannelMemberView record="channelMemberView"/>
</t>
</t>
@@ -18,7 +18,7 @@
<div class="o_NotificationListItem_imageContainer o_ChannelPreviewView_imageContainer o_ChannelPreviewView_sidebarItem position-relative">
<img class="o_NotificationListItem_image o_ChannelPreviewView_image w-100 h-100 rounded-circle" t-att-src="channelPreviewView.imageUrl" alt="Thread Image"/>
<t t-if="channelPreviewView.personaImStatusIconView">
<PersonaImStatusIcon
<PersonaImStatusIconView
className="'o_NotificationListItem_personaImStatusIcon o_ChannelPreviewView_personaImStatusIcon position-absolute bottom-0 end-0 d-flex align-items-center justify-content-center'"
classNameObj="{
'o-isDeviceSmall': messaging.device.isSmall,
@@ -57,7 +57,7 @@
</t>
<t t-else="">
<t t-if="channelPreviewView.messageAuthorPrefixView">
<MessageAuthorPrefix record="channelPreviewView.messageAuthorPrefixView"/>
<MessageAuthorPrefixView record="channelPreviewView.messageAuthorPrefixView"/>
</t>
<span class="o_ChannelPreviewView_messageBody" t-esc="channelPreviewView.inlineLastMessageBody"/>
</t>
@@ -37,7 +37,7 @@
box-shadow: -5px -5px 10px rgba(#000000, 0.18);
}
.o_Composer {
.o_ComposerView {
border: 0;
}
}
@@ -14,12 +14,12 @@
}" t-att-style="chatWindow.componentStyle" t-on-keydown="chatWindow.onKeydown" t-on-focusout="chatWindow.onFocusout" t-att-data-chat-window-local-id="chatWindow.localId" t-att-data-thread-id="chatWindow.thread ? chatWindow.thread.id : ''" t-ref="root"
t-att-data-thread-model="chatWindow.thread ? chatWindow.thread.model : ''"
>
<ChatWindowHeader
<ChatWindowHeaderView
className="'o_ChatWindow_header flex-grow-0 flex-shrink-0'"
record="chatWindow.chatWindowHeaderView"
/>
<t t-if="chatWindow.channelMemberListView">
<ChannelMemberList record="chatWindow.channelMemberListView" className="'bg-view'"/>
<ChannelMemberListView record="chatWindow.channelMemberListView" className="'bg-view'"/>
</t>
<t t-if="chatWindow.callSettingsMenu">
<CallSettingsMenu record="chatWindow.callSettingsMenu" className="'bg-view'"/>
@@ -2,6 +2,6 @@
// ============================================================================
// No CSS hacks, variables overrides only
.o_ChatWindowHeader {
--ChatWindowHeader-background-color: #{$o-gray-100};
.o_ChatWindowHeaderView {
--ChatWindowHeaderView-background-color: #{$o-gray-100};
}
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ChatWindowHeader extends Component {
export class ChatWindowHeaderView extends Component {
/**
* @returns {ChatWindowHeaderView}
@@ -15,9 +15,9 @@ export class ChatWindowHeader extends Component {
}
Object.assign(ChatWindowHeader, {
Object.assign(ChatWindowHeaderView, {
props: { record: Object },
template: 'mail.ChatWindowHeader',
template: 'mail.ChatWindowHeaderView',
});
registerMessagingComponent(ChatWindowHeader);
registerMessagingComponent(ChatWindowHeaderView);
@@ -2,7 +2,7 @@
// Layout
// ------------------------------------------------------------------
.o_ChatWindowHeader {
.o_ChatWindowHeaderView {
height: $o-mail-chat-window-header-height;
&.o-isDeviceSmall {
@@ -10,7 +10,7 @@
}
}
.o_ChatWindowHeader_command {
.o_ChatWindowHeaderView_command {
&:hover {
background-color: rgba($black, 0.1);
}
@@ -20,15 +20,15 @@
// Style
// ------------------------------------------------------------------
.o_ChatWindowHeader {
background-color: var(--ChatWindowHeader-background-color, #{$o-brand-odoo});
.o_ChatWindowHeaderView {
background-color: var(--ChatWindowHeaderView-background-color, #{$o-brand-odoo});
color: #FFFFFF;
}
.o_ChatWindowHeader_command.o-isDeviceSmall {
.o_ChatWindowHeaderView_command.o-isDeviceSmall {
font-size: 1.3rem;
}
.o_ChatWindowHeader_name {
.o_ChatWindowHeaderView_name {
user-select: none;
}
@@ -1,77 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ChatWindowHeader" owl="1">
<t t-name="mail.ChatWindowHeaderView" owl="1">
<t t-if="chatWindowHeaderView">
<div class="o_ChatWindowHeader d-flex align-items-center" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'cursor-pointer': !messaging.device.isSmall }" t-attf-class="{{ className }}" t-on-click="chatWindowHeaderView.onClick" t-ref="root">
<div class="o_ChatWindowHeaderView d-flex align-items-center" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'cursor-pointer': !messaging.device.isSmall }" t-attf-class="{{ className }}" t-on-click="chatWindowHeaderView.onClick" t-ref="root">
<t t-if="chatWindowHeaderView.chatWindowOwner.hasCloseAsBackButton">
<div class="o_ChatWindowHeader_command o_ChatWindowHeader_commandBack o_ChatWindowHeader_commandClose cursor-pointer d-flex align-items-center h-100 px-3 py-0 me-2" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall }" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickClose" title="Close conversation">
<div class="o_ChatWindowHeaderView_command o_ChatWindowHeaderView_commandBack o_ChatWindowHeaderView_commandClose cursor-pointer d-flex align-items-center h-100 px-3 py-0 me-2" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall }" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickClose" title="Close conversation">
<i class="fa fa-arrow-left"/>
</div>
</t>
<t t-if="chatWindowHeaderView.threadIconView">
<ThreadIcon
className="'o_ChatWindowHeader_icon o_ChatWindowHeader_item ms-3 me-1 my-0'"
<ThreadIconView
className="'o_ChatWindowHeaderView_icon o_ChatWindowHeaderView_item ms-3 me-1 my-0'"
record="chatWindowHeaderView.threadIconView"
/>
</t>
<div class="o_ChatWindowHeader_item o_ChatWindowHeader_name mh-100 mx-1 my-0 text-truncate" t-att-class="{'ms-3':!chatWindowHeaderView.chatWindowOwner.thread or !chatWindowHeaderView.chatWindowOwner.thread.channel}" t-att-title="chatWindowHeaderView.chatWindowOwner.name">
<div class="o_ChatWindowHeaderView_item o_ChatWindowHeaderView_name mh-100 mx-1 my-0 text-truncate" t-att-class="{'ms-3':!chatWindowHeaderView.chatWindowOwner.thread or !chatWindowHeaderView.chatWindowOwner.thread.channel}" t-att-title="chatWindowHeaderView.chatWindowOwner.name">
<t t-esc="chatWindowHeaderView.chatWindowOwner.name"/>
</div>
<t t-if="chatWindowHeaderView.chatWindowOwner.thread and chatWindowHeaderView.chatWindowOwner.thread.channel and chatWindowHeaderView.chatWindowOwner.thread.channel.localMessageUnreadCounter > 0">
<div class="o_ChatWindowHeader_counter o_ChatWindowHeader_item mx-1 my-0">
<div class="o_ChatWindowHeaderView_counter o_ChatWindowHeaderView_item mx-1 my-0">
(<t t-esc="chatWindowHeaderView.chatWindowOwner.thread.channel.localMessageUnreadCounter"/>)
</div>
</t>
<div class="flex-grow-1"/>
<div class="o_ChatWindowHeader_item o_ChatWindowHeader_rightArea d-flex align-items-center h-100 ms-1 me-0 my-0" t-att-class="{'opacity-75 opacity-100-hover': !messaging.device.isSmall }">
<div class="o_ChatWindowHeaderView_item o_ChatWindowHeaderView_rightArea d-flex align-items-center h-100 ms-1 me-0 my-0" t-att-class="{'opacity-75 opacity-100-hover': !messaging.device.isSmall }">
<t t-if="chatWindowHeaderView.chatWindowOwner.hasCallButtons">
<div class="o_ChatWindowHeader_command o_ChatWindowHeader_commandCamera cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" t-att-disabled="chatWindowHeaderView.chatWindowOwner.thread.hasPendingRtcRequest" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickCamera" title="Start a Video Call">
<div class="o_ChatWindowHeaderView_command o_ChatWindowHeaderView_commandCamera cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" t-att-disabled="chatWindowHeaderView.chatWindowOwner.thread.hasPendingRtcRequest" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickCamera" title="Start a Video Call">
<i class="fa fa-video-camera"/>
</div>
<div class="o_ChatWindowHeader_command o_ChatWindowHeader_commandPhone cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" t-att-disabled="chatWindowHeaderView.chatWindowOwner.thread.hasPendingRtcRequest" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickPhone" title="Start a Call">
<div class="o_ChatWindowHeaderView_command o_ChatWindowHeaderView_commandPhone cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" t-att-disabled="chatWindowHeaderView.chatWindowOwner.thread.hasPendingRtcRequest" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickPhone" title="Start a Call">
<i class="fa fa-phone"/>
</div>
</t>
<t t-if="chatWindowHeaderView.chatWindowOwner.hasInviteFeature">
<t t-if="!chatWindowHeaderView.chatWindowOwner.channelInvitationForm">
<div class="o_ChatWindowHeader_command cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" title="Add users" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickShowInviteForm">
<div class="o_ChatWindowHeaderView_command cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" title="Add users" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickShowInviteForm">
<i class="fa fa-lg fa-user-plus"/>
</div>
</t>
<t t-if="chatWindowHeaderView.chatWindowOwner.channelInvitationForm">
<div class="o_ChatWindowHeader_command cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" title="Stop adding users" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickHideInviteForm">
<div class="o_ChatWindowHeaderView_command cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" title="Stop adding users" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickHideInviteForm">
<i class="fa fa-lg fa-user-plus"/>
</div>
</t>
</t>
<t t-if="chatWindowHeaderView.chatWindowOwner.thread and chatWindowHeaderView.chatWindowOwner.thread.hasMemberListFeature and !chatWindowHeaderView.chatWindowOwner.isMemberListOpened">
<div class="o_ChatWindowHeader_command o_ChatWindowHeader_commandShowMemberList cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall}" title="Show Member List" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickShowMemberList">
<div class="o_ChatWindowHeaderView_command o_ChatWindowHeaderView_commandShowMemberList cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall}" title="Show Member List" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickShowMemberList">
<i class="fa fa-users"/>
</div>
</t>
<t t-if="chatWindowHeaderView.chatWindowOwner.thread and chatWindowHeaderView.chatWindowOwner.thread.hasMemberListFeature and chatWindowHeaderView.chatWindowOwner.isMemberListOpened">
<div class="o_ChatWindowHeader_command o_ChatWindowHeader_commandHideMemberList cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" title="Hide Member List" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickHideMemberList">
<div class="o_ChatWindowHeaderView_command o_ChatWindowHeaderView_commandHideMemberList cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" title="Hide Member List" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickHideMemberList">
<i class="fa fa-users"/>
</div>
</t>
<t t-if="chatWindowHeaderView.chatWindowOwner.thread and chatWindowHeaderView.chatWindowOwner.thread.hasCallFeature and !chatWindowHeaderView.chatWindowOwner.isCallSettingsMenuOpen">
<div class="o_ChatWindowHeader_command o_ChatWindowHeader_commandShowCallSettingsMenu cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall}" title="Show Member List" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickShowCallSettingsMenu">
<div class="o_ChatWindowHeaderView_command o_ChatWindowHeaderView_commandShowCallSettingsMenu cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall}" title="Show Member List" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickShowCallSettingsMenu">
<i class="fa fa-gear"/>
</div>
</t>
<t t-if="chatWindowHeaderView.chatWindowOwner.thread and chatWindowHeaderView.chatWindowOwner.thread.hasCallFeature and chatWindowHeaderView.chatWindowOwner.isCallSettingsMenuOpen">
<div class="o_ChatWindowHeader_command cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" title="Hide Member List" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickHideCallSettingsMenu">
<div class="o_ChatWindowHeaderView_command cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" title="Hide Member List" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickHideCallSettingsMenu">
<i class="fa fa-gear"/>
</div>
</t>
<t t-if="chatWindowHeaderView.chatWindowOwner.isExpandable">
<div class="o_ChatWindowHeader_command o_ChatWindowHeader_commandExpand cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickExpand" title="Open in Discuss">
<div class="o_ChatWindowHeaderView_command o_ChatWindowHeaderView_commandExpand cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickExpand" title="Open in Discuss">
<i class="fa fa-expand"/>
</div>
</t>
<t t-if="!chatWindowHeaderView.chatWindowOwner.hasCloseAsBackButton">
<div class="o_ChatWindowHeader_command o_ChatWindowHeader_commandClose cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickClose" title="Close chat window">
<div class="o_ChatWindowHeaderView_command o_ChatWindowHeaderView_commandClose cursor-pointer d-flex align-items-center h-100 px-3 py-0 m-0" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall, 'opacity-50 opacity-100-hover': !messaging.device.isSmall }" t-on-click="chatWindowHeaderView.chatWindowOwner.onClickClose" title="Close chat window">
<i class="fa fa-close"/>
</div>
</t>
@@ -7,7 +7,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ChatWindowHiddenMenu extends Component {
export class ChatWindowHiddenMenuView extends Component {
/**
* @override
@@ -28,9 +28,9 @@ export class ChatWindowHiddenMenu extends Component {
}
Object.assign(ChatWindowHiddenMenu, {
Object.assign(ChatWindowHiddenMenuView, {
props: { record: Object },
template: 'mail.ChatWindowHiddenMenu',
template: 'mail.ChatWindowHiddenMenuView',
});
registerMessagingComponent(ChatWindowHiddenMenu);
registerMessagingComponent(ChatWindowHiddenMenuView);
@@ -2,11 +2,11 @@
// Layout
// ------------------------------------------------------------------
.o_ChatWindowHiddenMenu {
.o_ChatWindowHiddenMenuView {
z-index: $zindex-dropdown;
}
.o_ChatWindowHiddenMenu_unreadCounter {
.o_ChatWindowHiddenMenuView_unreadCounter {
transform: translate(50%, -50%);
z-index: $zindex-tooltip; // on top of bootstrap dropup menu
}
@@ -15,6 +15,6 @@
// Style
// ------------------------------------------------------------------
.o_ChatWindowHiddenMenu_windowCounter {
.o_ChatWindowHiddenMenuView_windowCounter {
user-select: none;
}
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ChatWindowHiddenMenu" owl="1">
<div class="o_ChatWindowHiddenMenu dropup position-fixed bottom-0 align-items-stretch d-flex px-2 py-1 rounded-top-3 bg-900 cursor-pointer" t-attf-class="{{ className }}" t-ref="root">
<div class="o_ChatWindowHiddenMenu_dropdownToggle dropdown-toggle justify-content-center align-items-center flex-grow-1 d-flex mw-100" t-att-class="{ 'show opacity-50': chatWindowHiddenMenuView.isOpen }" data-bs-toggle="dropdown" t-on-click="messaging.chatWindowManager.onClickHiddenMenuToggler">
<div class="o_ChatWindowHiddenMenu_dropdownToggleIcon o_ChatWindowHiddenMenu_dropdownToggleItem me-1 fa fa-comments-o"/>
<div class="o_ChatWindowHiddenMenu_dropdownToggleItem o_ChatWindowHiddenMenu_windowCounter mx-1 text-truncate">
<t t-name="mail.ChatWindowHiddenMenuView" owl="1">
<div class="o_ChatWindowHiddenMenuView dropup position-fixed bottom-0 align-items-stretch d-flex px-2 py-1 rounded-top-3 bg-900 cursor-pointer" t-attf-class="{{ className }}" t-ref="root">
<div class="o_ChatWindowHiddenMenuView_dropdownToggle dropdown-toggle justify-content-center align-items-center flex-grow-1 d-flex mw-100" t-att-class="{ 'show opacity-50': chatWindowHiddenMenuView.isOpen }" data-bs-toggle="dropdown" t-on-click="messaging.chatWindowManager.onClickHiddenMenuToggler">
<div class="o_ChatWindowHiddenMenuView_dropdownToggleIcon o_ChatWindowHiddenMenuView_dropdownToggleItem me-1 fa fa-comments-o"/>
<div class="o_ChatWindowHiddenMenuView_dropdownToggleItem o_ChatWindowHiddenMenuView_windowCounter mx-1 text-truncate">
<t t-esc="messaging.chatWindowManager.allOrderedHidden.length"/>
</div>
</div>
<ul class="o_ChatWindowHiddenMenu_list dropdown-menu dropdown-menu-end m-0 p-0 overflow-auto" t-att-class="{ show: chatWindowHiddenMenuView.isOpen }" role="menu" t-ref="list">
<ul class="o_ChatWindowHiddenMenuView_list dropdown-menu dropdown-menu-end m-0 p-0 overflow-auto" t-att-class="{ show: chatWindowHiddenMenuView.isOpen }" role="menu" t-ref="list">
<t t-foreach="chatWindowHiddenMenuView.items" t-as="item" t-key="item.localId">
<ChatWindowHiddenMenuItem record="item"/>
<ChatWindowHiddenMenuItemView record="item"/>
</t>
</ul>
<t t-if="messaging.chatWindowManager.unreadHiddenConversationAmount > 0">
<div class="o_ChatWindowHiddenMenu_unreadCounter position-absolute end-0 top-0 badge rounded-pill text-bg-primary">
<div class="o_ChatWindowHiddenMenuView_unreadCounter position-absolute end-0 top-0 badge rounded-pill text-bg-primary">
<t t-esc="messaging.chatWindowManager.unreadHiddenConversationAmount"/>
</div>
</t>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ChatWindowHiddenMenuItem extends Component {
export class ChatWindowHiddenMenuItemView extends Component {
/**
* @returns {ChatWindowHiddenMenuItemView}
@@ -15,9 +15,9 @@ export class ChatWindowHiddenMenuItem extends Component {
}
Object.assign(ChatWindowHiddenMenuItem, {
Object.assign(ChatWindowHiddenMenuItemView, {
props: { record: Object },
template: 'mail.ChatWindowHiddenMenuItem',
template: 'mail.ChatWindowHiddenMenuItemView',
});
registerMessagingComponent(ChatWindowHiddenMenuItem);
registerMessagingComponent(ChatWindowHiddenMenuItemView);
@@ -2,7 +2,7 @@
// Layout
// ------------------------------------------------------------------
.o_ChatWindowHiddenMenu_chatWindowHeader {
.o_ChatWindowHiddenMenuView_chatWindowHeader {
max-width: 200px;
}
@@ -10,6 +10,6 @@
// Style
// ------------------------------------------------------------------
.o_ChatWindowHiddenMenu_chatWindowHeader {
.o_ChatWindowHiddenMenuView_chatWindowHeader {
opacity: 0.95;
}
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ChatWindowHiddenMenuItem" owl="1">
<li class="o_ChatWindowHiddenMenuItem" t-att-class="{ 'border-bottom' : !chatWindowHiddenMenuItemView.isLast }" role="menuitem" t-attf-class="{{ className }}" t-ref="root">
<ChatWindowHeader
className="'o_ChatWindowHiddenMenuItem_chatWindowHeader opacity-100-hover'"
<t t-name="mail.ChatWindowHiddenMenuItemView" owl="1">
<li class="o_ChatWindowHiddenMenuItemView" t-att-class="{ 'border-bottom' : !chatWindowHiddenMenuItemView.isLast }" role="menuitem" t-attf-class="{{ className }}" t-ref="root">
<ChatWindowHeaderView
className="'o_ChatWindowHiddenMenuItemView_chatWindowHeader opacity-100-hover'"
record="chatWindowHiddenMenuItemView.chatWindowHeaderView"
/>
</li>
@@ -4,7 +4,7 @@
<t t-name="mail.ChatWindowManager" owl="1">
<div class="o_ChatWindowManager flex-row-reverse d-flex" t-attf-class="{{ className }}" t-ref="root">
<!-- Note: DOM elements are ordered from left to right -->
<ChatWindowHiddenMenu t-if="messaging.chatWindowManager.hiddenMenuView" className="'o_ChatWindowManager_hiddenMenu'" record="messaging.chatWindowManager.hiddenMenuView"/>
<ChatWindowHiddenMenuView t-if="messaging.chatWindowManager.hiddenMenuView" className="'o_ChatWindowManager_hiddenMenu'" record="messaging.chatWindowManager.hiddenMenuView"/>
<t t-foreach="messaging.chatWindowManager.allOrderedVisible" t-as="chatWindow" t-key="chatWindow.localId">
<ChatWindow record="chatWindow"/>
</t>
@@ -5,7 +5,7 @@
<t t-if="chatter">
<div class="o_Chatter position-relative flex-grow-1 flex-column d-flex w-100 bg-view" t-attf-class="{{ className }}" t-ref="root">
<t t-if="chatter.dropZoneView">
<DropZone
<DropZoneView
className="'o_Chatter_dropZone'"
record="chatter.dropZoneView"
/>
@@ -17,7 +17,7 @@
record="chatter.topbar"
/>
<t t-if="chatter.composerView">
<Composer
<ComposerView
className="'o_Chatter_composer border-bottom'"
classNameObj="{ 'o-bordered': chatter.hasExternalBorder }"
record="chatter.composerView"
@@ -26,13 +26,13 @@
</div>
<div class="o_Chatter_scrollPanel overflow-auto" t-on-scroll="chatter.onScrollScrollPanel" t-ref="scrollPanel">
<t t-if="chatter.attachmentBoxView">
<AttachmentBox
<AttachmentBoxView
className="'o_Chatter_attachmentBox'"
record="chatter.attachmentBoxView"
/>
</t>
<t t-if="chatter.activityBoxView">
<ActivityBox
<ActivityBoxView
className="'o_Chatter_activityBox'"
record="chatter.activityBoxView"
/>
@@ -65,12 +65,12 @@
</t>
</button>
<t t-if="chatterTopbar.chatter.hasFollowers and chatterTopbar.chatter.thread">
<FollowerListMenu
<FollowerListMenuView
className="'o_ChatterTopbar_followerListMenu'"
record="chatterTopbar.chatter.followerListMenuView"
/>
<t t-if="chatterTopbar.chatter.followButtonView">
<FollowButton
<FollowButtonView
className="'o_ChatterTopbar_followButton'"
record="chatterTopbar.chatter.followButtonView"
/>
@@ -6,7 +6,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class Composer extends Component {
export class ComposerView extends Component {
/**
* @override
@@ -30,9 +30,9 @@ export class Composer extends Component {
}
Object.assign(Composer, {
Object.assign(ComposerView, {
props: { record: Object },
template: 'mail.Composer',
template: 'mail.ComposerView',
});
registerMessagingComponent(Composer);
registerMessagingComponent(ComposerView);
@@ -2,7 +2,7 @@
// Layout
// ------------------------------------------------------------------
.o_Composer {
.o_ComposerView {
// Could be replaced by .d-grid after the migration to BS5.
display: grid;
grid-template-areas:
@@ -17,7 +17,7 @@
}
}
.o_Composer_attachmentList {
.o_ComposerView_attachmentList {
max-height: 300px;
&.o-composer-is-compact {
@@ -25,43 +25,43 @@
}
}
.o_Composer_buttons {
.o_ComposerView_buttons {
min-height: $o-mail-composer-text-input-height + $border-width; // match minimal-height of input, including border width
}
.o_Composer_buttonEmojis:focus {
.o_ComposerView_buttonEmojis:focus {
outline: none;
box-shadow: none;
}
.o_Composer_coreFooter {
.o_ComposerView_coreFooter {
grid-area: core-footer;
}
.o_Composer_coreHeader {
.o_ComposerView_coreHeader {
grid-area: core-header;
}
.o_Composer_coreMain {
.o_ComposerView_coreMain {
grid-area: core-main;
min-width: 0;
}
.o_Composer_currentPartnerAvatar {
.o_ComposerView_currentPartnerAvatar {
width: $o-mail-thread-avatar-size;
height: $o-mail-thread-avatar-size;
}
.o_Composer_sidebarMain {
.o_ComposerView_sidebarMain {
grid-area: sidebar-main;
justify-self: center;
}
.o_Composer_textInput:not(.o-composer-is-compact) {
.o_ComposerView_textInput:not(.o-composer-is-compact) {
min-height: $o-mail-composer-text-input-height;
}
.o_Composer_threadTextualTypingStatus:before {
.o_ComposerView_threadTextualTypingStatus:before {
// invisible character so that typing status bar has constant height, regardless of text content.
content: "\200b"; /* unicode zero width space character */
}
@@ -70,6 +70,6 @@
// Style
// ------------------------------------------------------------------
.o_Composer_buttonDiscard {
.o_ComposerView_buttonDiscard {
border: $border-width solid lighten($gray-400, 5%);
}
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.Composer" owl="1">
<t t-name="mail.ComposerView" owl="1">
<t t-if="composerView">
<div class="o_Composer"
<div class="o_ComposerView"
t-att-class="{
'o-focused': composerView.isFocused,
'o-has-current-partner-avatar pe-3 ps-1': composerView.hasCurrentPartnerAvatar,
@@ -21,27 +21,27 @@
t-ref="root"
>
<t t-if="composerView.dropZoneView">
<DropZone
className="'o_Composer_dropZone'"
<DropZoneView
className="'o_ComposerView_dropZone'"
record="composerView.dropZoneView"
/>
</t>
<t t-if="composerView.hasHeader">
<div class="o_Composer_coreHeader text-truncate" t-att-class="{ 'small p-2': composerView.isInChatWindow or composerView.isInDiscuss }">
<div class="o_ComposerView_coreHeader text-truncate" t-att-class="{ 'small p-2': composerView.isInChatWindow or composerView.isInDiscuss }">
<t t-if="composerView.threadView and composerView.threadView.replyingToMessageView">
<span class="cursor-pointer" t-on-click="composerView.onClickReplyingToMessage">
Replying to <b t-esc="composerView.threadView.replyingToMessageView.message.authorName"/>
</span>
<i t-if="composerView.threadView.thread !== messaging.inbox.thread" class="o_Composer_cancelReply fa fa-lg fa-times-circle rounded-circle p-0 ms-1 cursor-pointer" title="Stop replying" t-on-click="composerView.onClickStopReplying"/>
<i t-if="composerView.threadView.thread !== messaging.inbox.thread" class="o_ComposerView_cancelReply fa fa-lg fa-times-circle rounded-circle p-0 ms-1 cursor-pointer" title="Stop replying" t-on-click="composerView.onClickStopReplying"/>
</t>
<t t-if="composerView.hasThreadName">
<span class="o_Composer_threadName">
<span class="o_ComposerView_threadName">
on: <b><t t-esc="composerView.composer.activeThread.displayName"/></b>
</span>
</t>
<t t-if="composerView.hasFollowers and !composerView.composer.isLog">
<!-- Text for followers -->
<small class="o_Composer_followers flex-shrink-0">
<small class="o_ComposerView_followers flex-shrink-0">
<b class="text-muted">To: </b>
<em class="text-muted">Followers of </em>
<b>
@@ -53,48 +53,48 @@
</t>
</b>
</small>
<ComposerSuggestedRecipientList record="composerView.composerSuggestedRecipientListView"/>
<ComposerSuggestedRecipientListView record="composerView.composerSuggestedRecipientListView"/>
</t>
</div>
</t>
<t t-if="composerView.hasCurrentPartnerAvatar">
<div class="o_Composer_sidebarMain">
<div class="o_ComposerView_sidebarMain">
<t t-if="!messaging.currentGuest or composerView.composer.activeThread.model !== 'mail.channel'">
<img class="o_Composer_currentPartnerAvatar mt-1 rounded-circle o_object_fit_cover" t-att-src="composerView.currentPartnerAvatar" alt="Avatar of user"/>
<img class="o_ComposerView_currentPartnerAvatar mt-1 rounded-circle o_object_fit_cover" t-att-src="composerView.currentPartnerAvatar" alt="Avatar of user"/>
</t>
<t t-if="messaging.currentGuest and composerView.composer.activeThread.model === 'mail.channel'">
<img class="o_Composer_currentPartnerAvatar mt-1 rounded-circle o_object_fit_cover" t-attf-src="/mail/channel/{{ composerView.composer.activeThread.id }}/guest/{{ messaging.currentGuest.id }}/avatar_128?unique={{ messaging.currentGuest.name }}" alt="Avatar of guest"/>
<img class="o_ComposerView_currentPartnerAvatar mt-1 rounded-circle o_object_fit_cover" t-attf-src="/mail/channel/{{ composerView.composer.activeThread.id }}/guest/{{ messaging.currentGuest.id }}/avatar_128?unique={{ messaging.currentGuest.name }}" alt="Avatar of guest"/>
</t>
</div>
</t>
<div
class="o_Composer_coreMain d-flex flex-nowrap align-items-start flex-grow-1"
class="o_ComposerView_coreMain d-flex flex-nowrap align-items-start flex-grow-1"
t-att-class="{
'o-composer-is-compact': composerView.isCompact,
'flex-column border rounded-3 bg-view': !composerView.isCompact,
}"
>
<ComposerTextInput
className="'o_Composer_textInput flex-grow-1 align-self-stretch'"
<ComposerTextInputView
className="'o_ComposerView_textInput flex-grow-1 align-self-stretch'"
classNameObj="{
'o-composer-is-compact': composerView.isCompact,
'rounded-3': !composerView.isCompact,
'o_Composer_textInput-mobile': messaging.device.isSmall,
'o_ComposerView_textInput-mobile': messaging.device.isSmall,
'o-has-current-partner-avatar': composerView.hasCurrentPartnerAvatar,
'rounded-start-3': composerView.isCompact and composerView.hasCurrentPartnerAvatar,
}"
record="composerView.textInput"
t-key="composerView.localId"
/>
<div class="o_Composer_buttons d-flex align-items-stretch align-self-stretch flex-shrink-0" t-att-class="{ 'o-composer-is-compact': composerView.isCompact, 'h-auto w-100 px-3': !composerView.isCompact, 'o-isDeviceSmall': messaging.device.isSmall, 'o-messaging-in-editing': composerView and composerView.messageViewInEditing, 'border-end': composerView.messageViewInEditing and !composerView.hasCurrentPartnerAvatar }">
<div class="o_Composer_toolButtons d-flex py-1 border-top bg-view"
<div class="o_ComposerView_buttons d-flex align-items-stretch align-self-stretch flex-shrink-0" t-att-class="{ 'o-composer-is-compact': composerView.isCompact, 'h-auto w-100 px-3': !composerView.isCompact, 'o-isDeviceSmall': messaging.device.isSmall, 'o-messaging-in-editing': composerView and composerView.messageViewInEditing, 'border-end': composerView.messageViewInEditing and !composerView.hasCurrentPartnerAvatar }">
<div class="o_ComposerView_toolButtons d-flex py-1 border-top bg-view"
t-att-class="{
'o-composer-has-current-partner-avatar': composerView.hasCurrentPartnerAvatar,
'o-composer-is-compact border-bottom': composerView.isCompact,
'flex-row flex-grow-1 justify-content-between': !composerView.isCompact,
}">
<div class="o_Composer_primaryToolButtons d-flex align-items-center" t-att-class="{ 'o-composer-is-compact px-2': composerView.isCompact, 'flex-column': composerView.messageViewInEditing and composerView.messageViewInEditing.isInChatWindow }">
<button class="o_Composer_button o_Composer_buttonEmojis o_Composer_toolButton btn btn-light border-0 rounded-pill bg-view"
<div class="o_ComposerView_primaryToolButtons d-flex align-items-center" t-att-class="{ 'o-composer-is-compact px-2': composerView.isCompact, 'flex-column': composerView.messageViewInEditing and composerView.messageViewInEditing.isInChatWindow }">
<button class="o_ComposerView_button o_ComposerView_buttonEmojis o_ComposerView_toolButton btn btn-light border-0 rounded-pill bg-view"
t-att-class="{
'o-open bg-200': composerView.emojisPopoverView,
'o-isDeviceSmall': messaging.device.isSmall,
@@ -107,32 +107,32 @@
>
<i class="fa fa-smile-o" role="img" aria-label="Emojis"/>
</button>
<button class="o_Composer_button o_Composer_buttonAttachment o_Composer_toolButton btn btn-light fa fa-paperclip border-0 rounded-pill bg-view" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall }" t-attf-class="{{ composerView.messageViewInEditing ? 'my-1' : 'mx-1' }}" title="Add attachment" aria-label="Add attachment" type="button" t-on-click="composerView.onClickAddAttachment"/>
<button class="o_ComposerView_button o_ComposerView_buttonAttachment o_ComposerView_toolButton btn btn-light fa fa-paperclip border-0 rounded-pill bg-view" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall }" t-attf-class="{{ composerView.messageViewInEditing ? 'my-1' : 'mx-1' }}" title="Add attachment" aria-label="Add attachment" type="button" t-on-click="composerView.onClickAddAttachment"/>
</div>
<t t-if="composerView.isExpandable">
<div class="o_Composer_secondaryToolButtons">
<button class="o_Composer_button o_Composer_buttonFullComposer o_Composer_toolButton btn btn-light fa fa-expand mx-1 border-0 rounded-pill bg-view" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall }" title="Full composer" aria-label="Full composer" type="button" t-on-click="composerView.onClickFullComposer"/>
<div class="o_ComposerView_secondaryToolButtons">
<button class="o_ComposerView_button o_ComposerView_buttonFullComposer o_ComposerView_toolButton btn btn-light fa fa-expand mx-1 border-0 rounded-pill bg-view" t-att-class="{ 'o-isDeviceSmall': messaging.device.isSmall }" title="Full composer" aria-label="Full composer" type="button" t-on-click="composerView.onClickFullComposer"/>
</div>
</t>
</div>
<t t-if="composerView.isCompact">
<t t-call="mail.Composer.actionButtons"/>
<t t-call="mail.ComposerView.actionButtons"/>
</t>
</div>
</div>
<t t-if="composerView.hasFooter">
<div class="o_Composer_coreFooter overflow-auto" t-att-class="{ 'o-composer-is-compact': composerView.isCompact, 'ms-0': !composerView.isCompact }">
<div class="o_ComposerView_coreFooter overflow-auto" t-att-class="{ 'o-composer-is-compact': composerView.isCompact, 'ms-0': !composerView.isCompact }">
<t t-if="composerView.threadTextualTypingStatusView">
<ThreadTextualTypingStatus className="'o_Composer_threadTextualTypingStatus small'" record="composerView.threadTextualTypingStatusView"/>
<ThreadTextualTypingStatusView className="'o_ComposerView_threadTextualTypingStatus small'" record="composerView.threadTextualTypingStatusView"/>
</t>
<AttachmentList
t-if="composerView.attachmentList"
className="'o_Composer_attachmentList flex-grow-1'"
className="'o_ComposerView_attachmentList flex-grow-1'"
classNameObj="{ 'o-composer-is-compact': composerView.isCompact, 'overflow-auto': !composerView.isCompact }"
record="composerView.attachmentList"
/>
<t t-if="!composerView.isCompact">
<t t-call="mail.Composer.actionButtons"/>
<t t-call="mail.ComposerView.actionButtons"/>
</t>
<t t-if="composerView.messageViewInEditing">
<span class="text-muted">escape to <a href="#" t-on-click="composerView.onClickCancelLink">cancel</a>, enter to <a href="#" t-on-click="composerView.onClickSaveLink">save</a></span>
@@ -143,10 +143,10 @@
</t>
</t>
<t t-name="mail.Composer.actionButtons" owl="1">
<div class="o_Composer_actionButtons" t-att-class="{ 'o-composer-is-compact d-flex': composerView.isCompact, 'mt-2': !composerView.isCompact }">
<t t-name="mail.ComposerView.actionButtons" owl="1">
<div class="o_ComposerView_actionButtons" t-att-class="{ 'o-composer-is-compact d-flex': composerView.isCompact, 'mt-2': !composerView.isCompact }">
<t t-if="composerView.hasSendButton">
<button class="o_Composer_actionButton o_Composer_button o_Composer_buttonSend btn btn-primary"
<button class="o_ComposerView_actionButton o_ComposerView_button o_ComposerView_buttonSend btn btn-primary"
t-att-class="{
'o-last': !composerView.hasDiscardButton,
'o-composer-is-compact border-start-0': composerView.isCompact,
@@ -162,7 +162,7 @@
</button>
</t>
<t t-if="composerView.hasDiscardButton">
<button class="o_Composer_actionButton o-last o_Composer_button o_Composer_buttonDiscard btn btn-secondary" t-att-class="{ 'o-composer-is-compact border-start-0': composerView.isCompact, 'o-has-current-partner-avatar': composerView.hasCurrentPartnerAvatar, 'rounded-0 rounded-end-3': composerView.hasCurrentPartnerAvatar and composerView.isCompact }" type="button" t-on-click="composerView.onClickDiscard">
<button class="o_ComposerView_actionButton o-last o_ComposerView_button o_ComposerView_buttonDiscard btn btn-secondary" t-att-class="{ 'o-composer-is-compact border-start-0': composerView.isCompact, 'o-has-current-partner-avatar': composerView.hasCurrentPartnerAvatar, 'rounded-0 rounded-end-3': composerView.hasCurrentPartnerAvatar and composerView.isCompact }" type="button" t-on-click="composerView.onClickDiscard">
Discard
</button>
</t>
@@ -8,14 +8,14 @@ import { FormViewDialog } from '@web/views/view_dialogs/form_view_dialog';
import { Component, useRef } from '@odoo/owl';
export class ComposerSuggestedRecipient extends Component {
export class ComposerSuggestedRecipientView extends Component {
/**
* @override
*/
setup() {
super.setup();
this.id = _.uniqueId('o_ComposerSuggestedRecipient_');
this.id = _.uniqueId('o_ComposerSuggestedRecipientView_');
useUpdate({ func: () => this._update() });
/**
* Reference of the checkbox. Useful to know whether it was checked or
@@ -117,9 +117,9 @@ export class ComposerSuggestedRecipient extends Component {
}
}
Object.assign(ComposerSuggestedRecipient, {
Object.assign(ComposerSuggestedRecipientView, {
props: { record: Object },
template: 'mail.ComposerSuggestedRecipient',
template: 'mail.ComposerSuggestedRecipientView',
});
registerMessagingComponent(ComposerSuggestedRecipient);
registerMessagingComponent(ComposerSuggestedRecipientView);
@@ -1,5 +1,5 @@
// Dirty fix: clear modal-body padding, otherwise it create space inside the
// suggested_recipient list.
.o_ComposerSuggestedRecipient .modal-body {
.o_ComposerSuggestedRecipientView .modal-body {
padding: map-get($spacers, 0);
}
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ComposerSuggestedRecipient" owl="1">
<t t-name="mail.ComposerSuggestedRecipientView" owl="1">
<t t-if="composerSuggestedRecipientView">
<div class="o_ComposerSuggestedRecipient" t-attf-class="{{ className }}" t-att-data-partner-id="composerSuggestedRecipientView.suggestedRecipientInfo.partner and composerSuggestedRecipientView.suggestedRecipientInfo.partner.id ? composerSuggestedRecipientView.suggestedRecipientInfo.partner.id : false" t-att-title="composerSuggestedRecipientView.suggestedRecipientInfo.titleText" t-ref="root">
<div class="o_ComposerSuggestedRecipientView" t-attf-class="{{ className }}" t-att-data-partner-id="composerSuggestedRecipientView.suggestedRecipientInfo.partner and composerSuggestedRecipientView.suggestedRecipientInfo.partner.id ? composerSuggestedRecipientView.suggestedRecipientInfo.partner.id : false" t-att-title="composerSuggestedRecipientView.suggestedRecipientInfo.titleText" t-ref="root">
<div class="form-check">
<input t-attf-id="{{ id }}_checkbox" class="form-check-input" type="checkbox" t-att-checked="composerSuggestedRecipientView.suggestedRecipientInfo.isSelected ? 'checked' : undefined" t-on-change="_onChangeCheckbox" t-ref="checkbox" />
<label class="form-check-label" t-attf-for="{{ id }}_checkbox">
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ComposerSuggestedRecipientList extends Component {
export class ComposerSuggestedRecipientListView extends Component {
//--------------------------------------------------------------------------
// Public
@@ -19,9 +19,9 @@ export class ComposerSuggestedRecipientList extends Component {
}
Object.assign(ComposerSuggestedRecipientList, {
Object.assign(ComposerSuggestedRecipientListView, {
props: { record: Object },
template: 'mail.ComposerSuggestedRecipientList',
template: 'mail.ComposerSuggestedRecipientListView',
});
registerMessagingComponent(ComposerSuggestedRecipientList);
registerMessagingComponent(ComposerSuggestedRecipientListView);
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ComposerSuggestedRecipientList" owl="1">
<t t-name="mail.ComposerSuggestedRecipientListView" owl="1">
<t t-if="composerSuggestedRecipientListView">
<div class="o_ComposerSuggestedRecipientList mb-2" t-attf-class="{{ className }}" t-ref="root">
<div class="o_ComposerSuggestedRecipientListView mb-2" t-attf-class="{{ className }}" t-ref="root">
<t t-foreach="composerSuggestedRecipientListView.composerSuggestedRecipientViews" t-as="composerSuggestedRecipientView" t-key="composerSuggestedRecipientView.localId">
<ComposerSuggestedRecipient record="composerSuggestedRecipientView"/>
<ComposerSuggestedRecipientView record="composerSuggestedRecipientView"/>
</t>
<t t-if="composerSuggestedRecipientListView.thread.suggestedRecipientInfoList.length > 3">
<t t-if="!composerSuggestedRecipientListView.hasShowMoreButton" >
<button class="o_ComposerSuggestedRecipientList_showMore btn btn-sm btn-link" t-on-click="composerSuggestedRecipientListView.onClickShowMore">
<button class="o_ComposerSuggestedRecipientListView_showMore btn btn-sm btn-link" t-on-click="composerSuggestedRecipientListView.onClickShowMore">
Show more
</button>
</t>
<t t-else="">
<button class="o_ComposerSuggestedRecipientList_showLess btn btn-sm btn-link" t-on-click="composerSuggestedRecipientListView.onClickShowLess">
<button class="o_ComposerSuggestedRecipientListView_showLess btn btn-sm btn-link" t-on-click="composerSuggestedRecipientListView.onClickShowLess">
Show less
</button>
</t>
@@ -17,7 +17,7 @@
</t>
<t t-if="composerSuggestionView.suggestable.partner">
<t t-if="composerSuggestionView.personaImStatusIconView">
<PersonaImStatusIcon
<PersonaImStatusIconView
className="'o_ComposerSuggestionView_personaImStatusIcon flex-shrink-0 me-1'"
record="composerSuggestionView.personaImStatusIconView"
/>
@@ -7,7 +7,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class ComposerTextInput extends Component {
export class ComposerTextInputView extends Component {
/**
* @override
@@ -33,9 +33,9 @@ export class ComposerTextInput extends Component {
}
Object.assign(ComposerTextInput, {
Object.assign(ComposerTextInputView, {
props: { record: Object },
template: 'mail.ComposerTextInput',
template: 'mail.ComposerTextInputView',
});
registerMessagingComponent(ComposerTextInput);
registerMessagingComponent(ComposerTextInputView);
@@ -2,16 +2,16 @@
// Layout
// ------------------------------------------------------------------
.o_ComposerTextInput {
.o_ComposerTextInputView {
min-width: 0;
}
.o_ComposerTextInput_mirroredTextarea {
.o_ComposerTextInputView_mirroredTextarea {
height: 0;
top: -10000px;
}
.o_ComposerTextInput_textareaStyle {
.o_ComposerTextInputView_textareaStyle {
padding-top: 10px; // carefully crafted to have the text in the middle in chat window
padding-bottom: 10px;
min-height: $o-mail-composer-text-input-height;
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.ComposerTextInput" owl="1">
<t t-name="mail.ComposerTextInputView" owl="1">
<t t-if="composerTextInputView">
<div class="o_ComposerTextInput position-relative bg-view" t-attf-class="{{ className }} {{ composerTextInputView.owner.isCompact ? 'border border-end-0' : 'border-0' }}" t-att-class="{ 'border-start-0': composerTextInputView.owner.isInChatWindow }" t-on-paste="composerTextInputView.owner.onPasteTextInput" t-ref="root">
<div class="o_ComposerTextInputView position-relative bg-view" t-attf-class="{{ className }} {{ composerTextInputView.owner.isCompact ? 'border border-end-0' : 'border-0' }}" t-att-class="{ 'border-start-0': composerTextInputView.owner.isInChatWindow }" t-on-paste="composerTextInputView.owner.onPasteTextInput" t-ref="root">
<t t-if="composerTextInputView.owner.composerSuggestionListView">
<ComposerSuggestionListView record="composerTextInputView.owner.composerSuggestionListView"/>
</t>
<textarea class="o_ComposerTextInput_textarea o_ComposerTextInput_textareaStyle form-control px-3 border-0 shadow-none overflow-auto" t-att-class="{ 'o-composer-is-compact rounded-0 rounded-start-3': composerTextInputView.owner.isCompact, 'rounded-3': !composerTextInputView.owner.isCompact }" t-esc="composerTextInputView.owner.composer.textInputContent" t-att-placeholder="composerTextInputView.owner.composer.placeholder" t-on-click="composerTextInputView.owner.onClickTextarea" t-on-focusin="composerTextInputView.owner.onFocusinTextarea" t-on-focusout="composerTextInputView.owner.onFocusoutTextarea" t-on-keydown="composerTextInputView.owner.onKeydownTextarea" t-on-keyup="composerTextInputView.owner.onKeyupTextarea" t-on-input="composerTextInputView.owner.onInputTextarea" t-ref="textarea"/>
<textarea class="o_ComposerTextInputView_textarea o_ComposerTextInputView_textareaStyle form-control px-3 border-0 shadow-none overflow-auto" t-att-class="{ 'o-composer-is-compact rounded-0 rounded-start-3': composerTextInputView.owner.isCompact, 'rounded-3': !composerTextInputView.owner.isCompact }" t-esc="composerTextInputView.owner.composer.textInputContent" t-att-placeholder="composerTextInputView.owner.composer.placeholder" t-on-click="composerTextInputView.owner.onClickTextarea" t-on-focusin="composerTextInputView.owner.onFocusinTextarea" t-on-focusout="composerTextInputView.owner.onFocusoutTextarea" t-on-keydown="composerTextInputView.owner.onKeydownTextarea" t-on-keyup="composerTextInputView.owner.onKeyupTextarea" t-on-input="composerTextInputView.owner.onInputTextarea" t-ref="textarea"/>
<!--
This is an invisible textarea used to compute the composer
height based on the text content. We need it to downsize
the textarea properly without flicker.
-->
<textarea class="o_ComposerTextInput_mirroredTextarea o_ComposerTextInput_textareaStyle position-absolute px-3 border-0 overflow-hidden opacity-0" t-att-class="{ 'o-composer-is-compact rounded-0 rounded-start-3': composerTextInputView.owner.isCompact, 'rounded-3': !composerTextInputView.owner.isCompact }" t-esc="composerTextInputView.owner.composer.textInputContent" t-ref="mirroredTextarea" disabled="1"/>
<textarea class="o_ComposerTextInputView_mirroredTextarea o_ComposerTextInputView_textareaStyle position-absolute px-3 border-0 overflow-hidden opacity-0" t-att-class="{ 'o-composer-is-compact rounded-0 rounded-start-3': composerTextInputView.owner.isCompact, 'rounded-3': !composerTextInputView.owner.isCompact }" t-esc="composerTextInputView.owner.composer.textInputContent" t-ref="mirroredTextarea" disabled="1"/>
</div>
</t>
</t>
@@ -5,7 +5,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class DeleteMessageConfirm extends Component {
export class DeleteMessageConfirmView extends Component {
/**
* @override
@@ -24,9 +24,9 @@ export class DeleteMessageConfirm extends Component {
}
Object.assign(DeleteMessageConfirm, {
Object.assign(DeleteMessageConfirmView, {
props: { record: Object },
template: 'mail.DeleteMessageConfirm',
template: 'mail.DeleteMessageConfirmView',
});
registerMessagingComponent(DeleteMessageConfirm);
registerMessagingComponent(DeleteMessageConfirmView);
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.DeleteMessageConfirm" owl="1">
<t t-name="mail.DeleteMessageConfirmView" owl="1">
<t t-if="deleteMessageConfirmView">
<div class="o_DeleteMessageConfirm card bg-view" t-attf-class="{{ className }}" t-ref="root">
<div class="o_DeleteMessageConfirmView card bg-view" t-attf-class="{{ className }}" t-ref="root">
<h4 class="m-3">Confirmation</h4>
<hr class="mt-0 mb-3"/>
<p class="mx-3 mb-3">Are you sure you want to delete this message?</p>
<blockquote class="o_DeleteMessageConfirm_blockquote mx-3 mb-3 fst-normal">
<Message record="deleteMessageConfirmView.messageView"/>
<blockquote class="o_DeleteMessageConfirmView_blockquote mx-3 mb-3 fst-normal">
<MessageView record="deleteMessageConfirmView.messageView"/>
</blockquote>
<small t-if="!deleteMessageConfirmView.message.originThread or deleteMessageConfirmView.message.originThread.model !== 'mail.channel'" class="mx-3 mb-3">Pay attention: The followers of this document who were notified by email will still be able to read the content of this message and reply to it.</small>
<hr class="mt-0 mb-3"/>
<div class="o_DeleteMessageConfirm_buttons mx-3 mb-3">
<div class="o_DeleteMessageConfirmView_buttons mx-3 mb-3">
<button class="btn btn-primary me-2" t-on-click="deleteMessageConfirmView.onClickDelete">Delete</button>
<button class="btn btn-secondary me-2" t-on-click="deleteMessageConfirmView.onClickCancel">Cancel</button>
</div>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class Discuss extends Component {
export class DiscussView extends Component {
//--------------------------------------------------------------------------
// Public
@@ -18,9 +18,9 @@ export class Discuss extends Component {
}
}
Object.assign(Discuss, {
Object.assign(DiscussView, {
props: { record: Object },
template: 'mail.Discuss',
template: 'mail.DiscussView',
});
registerMessagingComponent(Discuss);
registerMessagingComponent(DiscussView);
@@ -1,8 +1,8 @@
.o_Discuss {
.o_DiscussView {
min-height: 0;
}
.o_Discuss_thread {
.o_DiscussView_thread {
flex: 1 1 0;
min-width: 0;
}
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.Discuss" owl="1">
<t t-name="mail.DiscussView" owl="1">
<t t-if="discussView">
<div class="o_Discuss d-flex h-100" t-attf-class="{{ className }}"
<div class="o_DiscussView d-flex h-100" t-attf-class="{{ className }}"
t-att-class="{ 'o-isDeviceSmall flex-column align-items-center bg-view': messaging.device.isSmall }"
t-ref="root"
>
<t t-if="discussView.sidebar">
<DiscussSidebar className="'o_Discuss_sidebar flex-shrink-0 h-100 pt-3 border-end bg-light'" record="discussView.sidebar"/>
<DiscussSidebarView className="'o_DiscussView_sidebar flex-shrink-0 h-100 pt-3 border-end bg-light'" record="discussView.sidebar"/>
</t>
<t t-if="messaging.device.isSmall" t-call="mail.Discuss.content"/>
<t t-if="messaging.device.isSmall" t-call="mail.DiscussView.content"/>
<t t-else="">
<div class="o_Discuss_content d-flex flex-column flex-grow-1 h-100 overflow-auto">
<t t-call="mail.Discuss.content"/>
<div class="o_DiscussView_content d-flex flex-column flex-grow-1 h-100 overflow-auto">
<t t-call="mail.DiscussView.content"/>
</div>
</t>
</div>
</t>
</t>
<t t-name="mail.Discuss.content" owl="1">
<t t-name="mail.DiscussView.content" owl="1">
<t t-if="discussView.mobileMailboxSelectionView">
<DiscussMobileMailboxSelection className="'o_Discuss_mobileMailboxSelection w-100 border-bottom'" record="discussView.mobileMailboxSelectionView"/>
<DiscussMobileMailboxSelectionView className="'o_DiscussView_mobileMailboxSelection w-100 border-bottom'" record="discussView.mobileMailboxSelectionView"/>
</t>
<t t-if="discussView.mobileAddItemHeaderAutocompleteInputView">
<div class="o_Discuss_mobileAddItemHeader d-flex justify-content-center w-100 p-3 border-bottom bg-light">
<div class="o_DiscussView_mobileAddItemHeader d-flex justify-content-center w-100 p-3 border-bottom bg-light">
<AutocompleteInputView
className="'o_Discuss_mobileAddItemHeaderInput flex-grow-1 mb-3 p-2 rounded border'"
className="'o_DiscussView_mobileAddItemHeaderInput flex-grow-1 mb-3 p-2 rounded border'"
record="discussView.mobileAddItemHeaderAutocompleteInputView"
/>
</div>
@@ -35,34 +35,34 @@
<t t-if="discussView.discuss.threadView">
<t name="beforeThread"/>
<ThreadView
className="'o_Discuss_thread'"
className="'o_DiscussView_thread'"
classNameObj="{ 'o-isDeviceSmall w-100': messaging.device.isSmall }"
record="discussView.discuss.threadView"
/>
</t>
<t t-if="!discussView.discuss.activeThread and (!messaging.device.isSmall or discussView.discuss.activeMobileNavbarTabId === 'mailbox')">
<div class="o_Discuss_noThread d-flex flex-grow-1 align-items-center justify-content-center w-100 bg-view">
<div class="o_DiscussView_noThread d-flex flex-grow-1 align-items-center justify-content-center w-100 bg-view">
<h4 class="text-muted"><b><i>No conversation selected.</i></b></h4>
</div>
</t>
<t t-if="messaging.device.isSmall and discussView.discuss.activeMobileNavbarTabId !== 'mailbox'">
<t t-if="discussView.discuss.activeMobileNavbarTabId === 'chat'">
<button class="o_Discuss_mobileNewChatButton w-100 p-2 btn btn-secondary border-bottom bg-light" t-on-click="discussView.onClickMobileNewChatButton">
<button class="o_DiscussView_mobileNewChatButton w-100 p-2 btn btn-secondary border-bottom bg-light" t-on-click="discussView.onClickMobileNewChatButton">
Start a conversation
</button>
</t>
<t t-if="discussView.discuss.activeMobileNavbarTabId === 'channel'">
<button class="o_Discuss_mobileNewChannelButton w-100 p-2 btn btn-secondary border-bottom bg-light" t-on-click="discussView.onClickMobileNewChannelButton">
<button class="o_DiscussView_mobileNewChannelButton w-100 p-2 btn btn-secondary border-bottom bg-light" t-on-click="discussView.onClickMobileNewChannelButton">
New Channel
</button>
</t>
</t>
<t t-if="discussView.discuss.notificationListView">
<NotificationList className="'o_Discuss_notificationList flex-grow-1 w-100'" record="discussView.discuss.notificationListView"/>
<NotificationListView className="'o_DiscussView_notificationList flex-grow-1 w-100'" record="discussView.discuss.notificationListView"/>
</t>
<t t-if="discussView.discuss.mobileMessagingNavbarView">
<MobileMessagingNavbar
className="'o_Discuss_mobileNavbar w-100'"
<MobileMessagingNavbarView
className="'o_DiscussView_mobileNavbar w-100'"
record="discussView.discuss.mobileMessagingNavbarView"
/>
</t>
@@ -71,6 +71,6 @@ Object.assign(DiscussContainer, {
className: String,
globalState: { type: Object, optional: 1 },
},
components: { Discuss: getMessagingComponent('Discuss') },
components: { DiscussView: getMessagingComponent('DiscussView') },
template: 'mail.DiscussContainer',
});
@@ -3,7 +3,7 @@
<t t-name="mail.DiscussContainer" owl="1">
<div class="o_DiscussContainer h-100 d-flex flex-column">
<Discuss t-if="messaging and messaging.discuss and messaging.discuss.discussView and messaging.isInitialized" className="'flex-grow-1'" record="messaging.discuss.discussView"/>
<DiscussView t-if="messaging and messaging.discuss and messaging.discuss.discussView and messaging.isInitialized" className="'flex-grow-1'" record="messaging.discuss.discussView"/>
<div t-else="" class="o_DiscussContainer_spinner d-flex flex-grow-1 align-items-center justify-content-center">
<i class="o_DiscussContainer_spinnerIcon fa fa-circle-o-notch fa-spin me-2"/>Please wait...
</div>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class DiscussMobileMailboxSelection extends Component {
export class DiscussMobileMailboxSelectionView extends Component {
/**
* @returns {DiscussMobileMailboxSelectionView}
@@ -15,9 +15,9 @@ export class DiscussMobileMailboxSelection extends Component {
}
Object.assign(DiscussMobileMailboxSelection, {
Object.assign(DiscussMobileMailboxSelectionView, {
props: { record: Object },
template: 'mail.DiscussMobileMailboxSelection',
template: 'mail.DiscussMobileMailboxSelectionView',
});
registerMessagingComponent(DiscussMobileMailboxSelection);
registerMessagingComponent(DiscussMobileMailboxSelectionView);
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.DiscussMobileMailboxSelection" owl="1">
<div class="o_DiscussMobileMailboxSelection d-flex" t-attf-class="{{ className }}" t-ref="root">
<t t-name="mail.DiscussMobileMailboxSelectionView" owl="1">
<div class="o_DiscussMobileMailboxSelectionView d-flex" t-attf-class="{{ className }}" t-ref="root">
<t t-foreach="discussMobileMailboxSelectionView.items" t-as="item" t-key="item.localId">
<DiscussMobileMailboxSelectionItem record="item"/>
<DiscussMobileMailboxSelectionItemView record="item"/>
</t>
</div>
</t>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class DiscussMobileMailboxSelectionItem extends Component {
export class DiscussMobileMailboxSelectionItemView extends Component {
/**
* @returns {DiscussMobileMailboxSelectionItemView}
@@ -15,9 +15,9 @@ export class DiscussMobileMailboxSelectionItem extends Component {
}
Object.assign(DiscussMobileMailboxSelectionItem, {
Object.assign(DiscussMobileMailboxSelectionItemView, {
props: { record: Object },
template: 'mail.DiscussMobileMailboxSelectionItem',
template: 'mail.DiscussMobileMailboxSelectionItemView',
});
registerMessagingComponent(DiscussMobileMailboxSelectionItem);
registerMessagingComponent(DiscussMobileMailboxSelectionItemView);
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.DiscussMobileMailboxSelectionItem" owl="1">
<button class="o_DiscussMobileMailboxSelectionItem btn btn-secondary flex-grow-1 p-2"
<t t-name="mail.DiscussMobileMailboxSelectionItemView" owl="1">
<button class="o_DiscussMobileMailboxSelectionItemView btn btn-secondary flex-grow-1 p-2"
t-att-class="{
'active o-active shadow-none': discussMobileMailboxSelectionItemView.owner.owner.discuss.activeThread === discussMobileMailboxSelectionItemView.mailbox.thread,
}" t-attf-class="{{ className }}" t-on-click="discussMobileMailboxSelectionItemView.onClick" t-att-data-mailbox-local-id="discussMobileMailboxSelectionItemView.mailbox.localId" type="button" t-ref="root"
@@ -6,7 +6,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class DiscussSidebar extends Component {
export class DiscussSidebarView extends Component {
/**
* @override
@@ -26,9 +26,9 @@ export class DiscussSidebar extends Component {
}
Object.assign(DiscussSidebar, {
Object.assign(DiscussSidebarView, {
props: { record: Object },
template: 'mail.DiscussSidebar',
template: 'mail.DiscussSidebarView',
});
registerMessagingComponent(DiscussSidebar);
registerMessagingComponent(DiscussSidebarView);
@@ -1,4 +1,4 @@
.o_DiscussSidebar {
.o_DiscussSidebarView {
width: $o-mail-chat-sidebar-width;
@include media-breakpoint-up(xl) {
@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.DiscussSidebar" owl="1">
<t t-name="mail.DiscussSidebarView" owl="1">
<t t-if="discussSidebarView">
<div name="root" class="o_DiscussSidebar d-flex flex-column overflow-auto" t-attf-class="{{ className }}" t-ref="root">
<div name="root" class="o_DiscussSidebarView d-flex flex-column overflow-auto" t-attf-class="{{ className }}" t-ref="root">
<div class="d-flex justify-content-center">
<button class="o_DiscussSidebar_startAMeetingButton btn btn-primary rounded" title="Start a meeting" t-on-click="discussSidebarView.owner.onClickStartAMeetingButton">
<button class="o_DiscussSidebarView_startAMeetingButton btn btn-primary rounded" title="Start a meeting" t-on-click="discussSidebarView.owner.onClickStartAMeetingButton">
Start a meeting
</button>
</div>
<hr class="o_DiscussSidebar_separator w-100 border-top"/>
<div class="o_DiscussSidebar_category o_DiscussSidebar_categoryMailbox d-flex flex-column flex-grow-0">
<DiscussSidebarMailbox record="discussSidebarView.owner.inboxView"/>
<DiscussSidebarMailbox record="discussSidebarView.owner.starredView"/>
<DiscussSidebarMailbox record="discussSidebarView.owner.historyView"/>
<hr class="o_DiscussSidebarView_separator w-100 border-top"/>
<div class="o_DiscussSidebarView_category o_DiscussSidebarView_categoryMailbox d-flex flex-column flex-grow-0">
<DiscussSidebarMailboxView record="discussSidebarView.owner.inboxView"/>
<DiscussSidebarMailboxView record="discussSidebarView.owner.starredView"/>
<DiscussSidebarMailboxView record="discussSidebarView.owner.historyView"/>
</div>
<hr class="o_DiscussSidebar_separator w-100 border-top"/>
<hr class="o_DiscussSidebarView_separator w-100 border-top"/>
<t t-if="messaging.models['Thread'].all(thread => thread.isPinned and thread.model === 'mail.channel').length > 19">
<input class="o_DiscussSidebar_quickSearch form-control mx-4 mb-2 rounded-3 w-auto" t-on-input="discussSidebarView.owner.onInputQuickSearch" placeholder="Quick search..." t-ref="quickSearchInput" t-esc="discussSidebarView.owner.discuss.sidebarQuickSearchValue"/>
<input class="o_DiscussSidebarView_quickSearch form-control mx-4 mb-2 rounded-3 w-auto" t-on-input="discussSidebarView.owner.onInputQuickSearch" placeholder="Quick search..." t-ref="quickSearchInput" t-esc="discussSidebarView.owner.discuss.sidebarQuickSearchValue"/>
</t>
<DiscussSidebarCategory
t-if="discussSidebarView.owner.discuss.categoryChannel"
className="'o_DiscussSidebar_category o_DiscussSidebar_categoryChannel'"
className="'o_DiscussSidebarView_category o_DiscussSidebarView_categoryChannel'"
record="discussSidebarView.owner.discuss.categoryChannel"
/>
<t name="beforeCategoryChat"/>
<DiscussSidebarCategory
t-if="discussSidebarView.owner.discuss.categoryChat"
className="'o_DiscussSidebar_category o_DiscussSidebar_categoryChat'"
className="'o_DiscussSidebarView_category o_DiscussSidebarView_categoryChat'"
record="discussSidebarView.owner.discuss.categoryChat"
/>
</div>
@@ -15,7 +15,7 @@
<div class="o_DiscussSidebarCategoryItem_imageContainer position-relative d-flex">
<img class="o_DiscussSidebarCategoryItem_image w-100 h-100 rounded-circle" t-att-src="categoryItem.avatarUrl" alt="Thread Image"/>
<t t-if="categoryItem.threadIconView">
<ThreadIcon className="'o_DiscussSidebarCategoryItem_threadIcon position-absolute bottom-0 end-0 d-flex align-items-center justify-content-center rounded-circle bg-100'" record="categoryItem.threadIconView"/>
<ThreadIconView className="'o_DiscussSidebarCategoryItem_threadIcon position-absolute bottom-0 end-0 d-flex align-items-center justify-content-center rounded-circle bg-100'" record="categoryItem.threadIconView"/>
</t>
</div>
</div>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class DiscussSidebarMailbox extends Component {
export class DiscussSidebarMailboxView extends Component {
/**
* @returns {DiscussSidebarMailboxView}
@@ -15,9 +15,9 @@ export class DiscussSidebarMailbox extends Component {
}
Object.assign(DiscussSidebarMailbox, {
Object.assign(DiscussSidebarMailboxView, {
props: { record: Object },
template: 'mail.DiscussSidebarMailbox',
template: 'mail.DiscussSidebarMailboxView',
});
registerMessagingComponent(DiscussSidebarMailbox);
registerMessagingComponent(DiscussSidebarMailboxView);
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-name="mail.DiscussSidebarMailbox" owl="1">
<button class="o_DiscussSidebarMailbox btn d-flex align-items-center py-1 px-0 border-0 rounded-0 fw-normal text-dark"
<t t-name="mail.DiscussSidebarMailboxView" owl="1">
<button class="o_DiscussSidebarMailboxView btn d-flex align-items-center py-1 px-0 border-0 rounded-0 fw-normal text-dark"
t-att-class="{
'bg-100': discussSidebarMailboxView.mailbox.thread !== messaging.discuss.activeThread,
'o-active bg-200': discussSidebarMailboxView.mailbox.thread === messaging.discuss.activeThread,
@@ -9,13 +9,13 @@
}" t-attf-class="{{ className }}" t-on-click="discussSidebarMailboxView.mailbox.thread.onClick" t-att-data-mailbox-local-id="discussSidebarMailboxView.mailbox.localId" t-att-data-mailbox-name="discussSidebarMailboxView.mailbox.name"
t-ref="root"
>
<ThreadIcon className="'o_DiscussSidebarMailbox_item ms-4 me-2'" record="discussSidebarMailboxView.threadIconView"/>
<div class="o_DiscussSidebarMailbox_item o_DiscussSidebarMailbox_name me-2 text-truncate">
<ThreadIconView className="'o_DiscussSidebarMailboxView_item ms-4 me-2'" record="discussSidebarMailboxView.threadIconView"/>
<div class="o_DiscussSidebarMailboxView_item o_DiscussSidebarMailboxView_name me-2 text-truncate">
<t t-esc="discussSidebarMailboxView.mailbox.name"/>
</div>
<div t-attf-class="o_DiscussSidebarMailbox_item flex-grow-1 {{ discussSidebarMailboxView.mailbox.counter === 0 ? 'me-3': '' }}"/>
<div t-attf-class="o_DiscussSidebarMailboxView_item flex-grow-1 {{ discussSidebarMailboxView.mailbox.counter === 0 ? 'me-3': '' }}"/>
<t t-if="discussSidebarMailboxView.mailbox.counter > 0">
<div t-attf-class="o_DiscussSidebarMailbox_counter o_DiscussSidebarMailbox_item badge rounded-pill {{ discussSidebarMailboxView.mailbox === messaging.starred ? 'bg-400 text-light' : 'text-bg-primary' }} ms-1 me-3">
<div t-attf-class="o_DiscussSidebarMailboxView_counter o_DiscussSidebarMailboxView_item badge rounded-pill {{ discussSidebarMailboxView.mailbox === messaging.starred ? 'bg-400 text-light' : 'text-bg-primary' }} ms-1 me-3">
<t t-esc="discussSidebarMailboxView.mailbox.counter"/>
</div>
</t>
@@ -4,7 +4,7 @@ import { registerMessagingComponent } from '@mail/utils/messaging_component';
import { Component } from '@odoo/owl';
export class DropZone extends Component {
export class DropZoneView extends Component {
//--------------------------------------------------------------------------
// Public
@@ -19,9 +19,9 @@ export class DropZone extends Component {
}
Object.assign(DropZone, {
Object.assign(DropZoneView, {
props: { record: Object },
template: 'mail.DropZone',
template: 'mail.DropZoneView',
});
registerMessagingComponent(DropZone);
registerMessagingComponent(DropZoneView);

Some files were not shown because too many files have changed in this diff Show More