changes
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { browser } from "@web/core/browser/browser";
|
||||
|
||||
import { Chatter } from "@mail/chatter/web_portal/chatter";
|
||||
|
||||
patch(Chatter.prototype, {
|
||||
setup() {
|
||||
super.setup();
|
||||
const showNotificationMessages = browser.localStorage.getItem(
|
||||
'fusion_backend_theme.notifications'
|
||||
);
|
||||
this.state.showNotificationMessages = (
|
||||
showNotificationMessages != null ?
|
||||
JSON.parse(showNotificationMessages) : true
|
||||
);
|
||||
},
|
||||
onClickNotificationsToggle() {
|
||||
const showNotificationMessages = !this.state.showNotificationMessages;
|
||||
browser.localStorage.setItem(
|
||||
'fusion_backend_theme.notifications', showNotificationMessages
|
||||
);
|
||||
this.state.showNotificationMessages = showNotificationMessages;
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,25 @@
|
||||
// = Chatter Variables
|
||||
// ============================================================================
|
||||
|
||||
$o-form-renderer-max-width: 3840px;
|
||||
$o-form-view-sheet-max-width: 2560px;
|
||||
|
||||
// = Chatter
|
||||
// ============================================================================
|
||||
|
||||
.o-mail-Chatter-top:has(.o-mail-Chatter-sendMessage.active) .o-mail-Composer-send {
|
||||
@extend .btn-danger
|
||||
}
|
||||
|
||||
.o-mail-Form-chatter.o-aside {
|
||||
.o_fusion_chatter_handle {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 5px;
|
||||
height: 100%;
|
||||
cursor: col-resize;
|
||||
position: absolute;
|
||||
z-index: $o-mail-NavigableList-zIndex + 1;
|
||||
border-left: var(--ControlPanel-border-bottom, 1px solid $o-gray-300);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<templates xml:space="preserve">
|
||||
<t
|
||||
t-name="fusion_backend_theme.Chatter"
|
||||
t-inherit="mail.Chatter"
|
||||
t-inherit-mode="extension"
|
||||
>
|
||||
<xpath expr="//button[hasclass('o-mail-Chatter-sendMessage')]" position="replace">
|
||||
<button
|
||||
class="o-mail-Chatter-sendMessage btn text-nowrap me-1"
|
||||
t-att-class="{
|
||||
'btn-danger': !state.composerType,
|
||||
'btn-primary': state.composerType === 'message',
|
||||
'btn-secondary': state.composerType !== 'message',
|
||||
'active': state.composerType === 'message',
|
||||
'my-2': !props.compactHeight
|
||||
}"
|
||||
t-att-disabled="!state.thread.hasWriteAccess and !(state.thread.hasReadAccess and state.thread.canPostOnReadonly) and props.threadId"
|
||||
data-hotkey="m"
|
||||
t-on-click="() => this.toggleComposer('message')"
|
||||
>
|
||||
<i t-if="env.isSmall" class="fa fa-envelope me-sm-1" />
|
||||
<span class="d-none d-sm-inline">Message</span>
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//button[hasclass('o-mail-Chatter-logNote')]" position="replace">
|
||||
<button
|
||||
class="o-mail-Chatter-logNote btn text-nowrap me-1"
|
||||
t-att-class="{
|
||||
'btn-primary': state.composerType === 'note',
|
||||
'btn-secondary': state.composerType !== 'note',
|
||||
'active': state.composerType === 'note',
|
||||
'my-2': !props.compactHeight
|
||||
}"
|
||||
t-att-disabled="!state.thread.hasWriteAccess and !(state.thread.hasReadAccess and state.thread.canPostOnReadonly) and props.threadId"
|
||||
data-hotkey="shift+m"
|
||||
t-on-click="() => this.toggleComposer('note')"
|
||||
>
|
||||
<i t-if="env.isSmall" class="fa fa-sticky-note me-sm-1" />
|
||||
<span class="d-none d-sm-inline">Note</span>
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//button[hasclass('o-mail-Chatter-activity')]/span" position="before">
|
||||
<i t-if="env.isSmall" class="fa fa-clock-o me-sm-1"/>
|
||||
</xpath>
|
||||
<xpath expr="//button[hasclass('o-mail-Chatter-activity')]/span" position="attributes">
|
||||
<attribute name="class" add="d-none d-sm-inline" separator=" " />
|
||||
</xpath>
|
||||
<xpath expr="//button[@t-if='props.hasAttachmentPreview and state.thread.attachmentsInWebClientView.length']" position="attributes">
|
||||
<attribute name="t-if">props.isChatterAside and props.hasAttachmentPreview and state.thread.attachmentsInWebClientView.length</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@t-on-click='onClickSearch']" position="after">
|
||||
<button
|
||||
class="btn btn-link text-action px-1"
|
||||
aria-label="Show/Hide Notifications"
|
||||
title="Show/Hide Notifications"
|
||||
t-on-click="onClickNotificationsToggle"
|
||||
t-att-disabled="state.isSearchOpen"
|
||||
>
|
||||
<i
|
||||
class="fa fa-lg"
|
||||
t-att-class="{
|
||||
'fa-eye': state.showNotificationMessages,
|
||||
'fa-eye-slash': !state.showNotificationMessages,
|
||||
}"
|
||||
/>
|
||||
</button>
|
||||
</xpath>
|
||||
<xpath expr="//Thread" position="attributes">
|
||||
<attribute name="showNotificationMessages">state.showNotificationMessages</attribute>
|
||||
</xpath>
|
||||
</t>
|
||||
</templates>
|
||||
Reference in New Issue
Block a user