[FIX] mail: various ui improvements/fixes
- display full content of messages in Discuss - no content helpers in inbox and starred improved - mark as read tooltip instead of mark ad done - decrease font size in chat windows - increase chat windows dimensions - display avatars in chat windows - chat window background is now white - notes are displayed with a darker background
This commit is contained in:
committed by
Géry Debongnie
parent
bff2fcde3c
commit
ad14862907
@@ -33,7 +33,6 @@ return Widget.extend({
|
||||
|
||||
this.thread = new ChatThread(this, {
|
||||
channel_id: this.channel_id,
|
||||
display_avatar: false,
|
||||
display_needactions: false,
|
||||
display_stars: this.options.display_stars,
|
||||
});
|
||||
@@ -64,7 +63,7 @@ return Widget.extend({
|
||||
fold: function () {
|
||||
this.update_header();
|
||||
this.$el.animate({
|
||||
height: this.folded ? "28px" : "333px"
|
||||
height: this.folded ? "28px" : "400px"
|
||||
});
|
||||
},
|
||||
toggle_fold: function (fold) {
|
||||
|
||||
@@ -164,7 +164,8 @@ var ChatAction = Widget.extend(ControlPanelMixin, {
|
||||
|
||||
this.composer = new ChatComposer(this);
|
||||
this.thread = new ChatThread(this, {
|
||||
display_help: true
|
||||
display_help: true,
|
||||
shorten_messages: false,
|
||||
});
|
||||
|
||||
this.$buttons = $(QWeb.render("mail.chat.ControlButtons", {}));
|
||||
|
||||
@@ -51,6 +51,7 @@ var Thread = Widget.extend({
|
||||
display_stars: true,
|
||||
display_document_link: true,
|
||||
display_avatar: true,
|
||||
shorten_messages: true,
|
||||
squash_close_messages: true,
|
||||
});
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@ var web_client = require('web.web_client');
|
||||
// chat window management
|
||||
//----------------------------------------------------------------
|
||||
var chat_sessions = [];
|
||||
var CHAT_WINDOW_WIDTH = 260;
|
||||
var CHAT_WINDOW_WIDTH = 300;
|
||||
|
||||
function open_chat (session) {
|
||||
if (!_.findWhere(chat_sessions, {id: session.id})) {
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
@o-chat-window-bg: lighten(lightgray, 13%);
|
||||
@o-chat-window-bg: white;
|
||||
|
||||
.o_chat_window {
|
||||
.o-flex-display();
|
||||
.o-flex-flow(column, nowrap);
|
||||
position: fixed;
|
||||
width: 260px;
|
||||
height: 333px;
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
font-size: 12px;
|
||||
background-color: @o-chat-window-bg;
|
||||
border: 1px solid gray;
|
||||
border-radius: 3px;
|
||||
@@ -44,6 +45,11 @@
|
||||
background-color: @o-chat-window-bg;
|
||||
}
|
||||
}
|
||||
.o_thread_message {
|
||||
.o_thread_message_sidebar {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_chat_input > input {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@mail-thread-avatar-size: 36px;
|
||||
@mail-thread-icon-opacity: 0.6;
|
||||
@mail-thread-side-date-opacity: 0.6;
|
||||
@mail-thread-note: @gray-lighter;
|
||||
|
||||
.o_mail_thread {
|
||||
.o_thread_show_more {
|
||||
@@ -97,6 +98,10 @@
|
||||
.o_thread_message_core {
|
||||
.o-flex(1, 1, auto);
|
||||
|
||||
&.o_mail_note {
|
||||
background-color: @gray-lighter;
|
||||
}
|
||||
|
||||
.o_mail_subject {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
<!-- When a channel is empty-->
|
||||
<div t-name="mail.EmptyChannel">
|
||||
<t t-if="options.channel_id==='channel_inbox'">
|
||||
<div class="o_thread_title">Congratulation, your inbox is empty</div>
|
||||
<div>New messages will appear here.</div>
|
||||
<div class="o_thread_title">Congratulations, your inbox is empty</div>
|
||||
<div>New messages appear here.</div>
|
||||
</t>
|
||||
<t t-if="options.channel_id==='channel_starred'">
|
||||
<div class="o_thread_title">No message starred</div>
|
||||
<div> You can mark any message as 'starred', and it will show up in this channel.</div>
|
||||
<div class="o_thread_title">No starred message</div>
|
||||
<div> You can mark any message as 'starred', and it shows up in this channel.</div>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
t-att-class="'fa o_thread_message_star ' + (message.is_starred ? 'fa-star' : 'fa-star-o')"
|
||||
t-att-data-message-id="message.id" t-att-title="_t('Mark as Todo')"/>
|
||||
</div>
|
||||
<div class="o_thread_message_core">
|
||||
<div t-att-class="'o_thread_message_core' + (message.is_note ? ' o_mail_note' : '')">
|
||||
<p t-if="message.display_author" class="o_mail_info">
|
||||
<t t-if="message.is_note">
|
||||
Note by
|
||||
@@ -102,7 +102,7 @@
|
||||
t-att-data-message-id="message.id" t-att-title="_t('Mark as Todo')"/>
|
||||
<i t-if="message.is_needaction && options.display_needactions"
|
||||
class="fa fa-check o_thread_message_needaction"
|
||||
t-att-data-message-id="message.id" t-att-title="_t('Mark as Done')"/>
|
||||
t-att-data-message-id="message.id" t-att-title="_t('Mark as Read')"/>
|
||||
</span>
|
||||
</p>
|
||||
<t t-if="message.tracking_value_ids && message.tracking_value_ids.length > 0">
|
||||
@@ -113,7 +113,7 @@
|
||||
</t>
|
||||
<p t-if="options.display_subject && message.display_subject" class="o_mail_subject">Subject: <t t-esc="message.subject"/></p>
|
||||
<t t-if="!(message.tracking_value_ids && message.tracking_value_ids.length > 0)">
|
||||
<t t-if="message.body_short">
|
||||
<t t-if="options.shorten_messages && message.body_short">
|
||||
<div class="o_mail_body_short">
|
||||
<t t-raw="message.body_short"/>
|
||||
</div>
|
||||
@@ -121,7 +121,7 @@
|
||||
<t t-raw="message.body"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-if="! message.body_short">
|
||||
<t t-if="!options.shorten_messages || !message.body_short">
|
||||
<t t-raw="message.body"/>
|
||||
</t>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user