[IMP] mail: various ui improvements

- display hash before text in create channel input
- increase limit for message fetching from 20 to 100
- 'Show more messages' renamed ino 'Show older messages'
- remove border top and bottom on selected messages
This commit is contained in:
Géry Debongnie
2015-11-03 16:19:35 +01:00
committed by Aaron Bohy
parent 0a0df28fd9
commit f99231a8f4
6 changed files with 17 additions and 8 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ var session = require('web.session');
var web_client = require('web.web_client');
var _t = core._t;
var LIMIT = 20;
var LIMIT = 100;
var preview_msg_max_size = 50;
var MessageModel = new Model('mail.message', session.context);
+1 -1
View File
@@ -219,7 +219,7 @@ var ChatAction = Widget.extend(ControlPanelMixin, {
self.last_search_val = _.escape(request.term);
self.do_search_channel(self.last_search_val).done(function(result){
result.push({
'label': _.str.sprintf('<strong>'+_t("Create %s")+'</strong>', '<em>"'+self.last_search_val+'"</em>'),
'label': _.str.sprintf('<strong>'+_t("Create %s")+'</strong>', '<em>"#'+self.last_search_val+'"</em>'),
'value': '_create',
});
response(result);
@@ -51,8 +51,16 @@
width: 100%;
.o-webclient-padding(@top: 5px, @bottom: 5px);
padding-left: 1.5*@odoo-horizontal-padding; // larger padding than titles
position: relative;
> input {
padding: 2px 5px;
padding-left: 12px;
}
> span {
position: absolute;
top: 7px;
left: 27px;
}
}
}
@@ -150,6 +158,9 @@
> input {
color: black;
}
> span {
color: gray;
}
}
.o_mail_sidebar_title {
-5
View File
@@ -97,12 +97,7 @@
}
}
border-bottom: 1px solid transparent;
border-top: 1px solid transparent;
&.o_thread_selected_message {
border-bottom: 1px solid @gray-lighter;
border-top: 1px solid @gray-lighter;
.o_thread_message_side_date {
opacity: @mail-thread-side-date-opacity;
}
@@ -23,6 +23,7 @@
<t t-set="channel_title">Channels</t>
</t>
<t t-call="mail.chat.SidebarItems">
<t t-set="display_hash">true</t>
<t t-set="input_placeholder">Add a channel</t>
</t>
@@ -41,6 +42,7 @@
</t>
<t t-call="mail.chat.SidebarItems">
<t t-set="input_placeholder">Add a channel</t>
<t t-set="display_hash">true</t>
</t>
</div>
</t>
@@ -76,6 +78,7 @@
</div>
</t>
<div t-if="!disable_add_channel" class="o_mail_add_channel" t-attf-data-type="#{channel_type}">
<span t-if="display_hash">#</span>
<input type="text" t-attf-placeholder="#{input_placeholder}"/>
</div>
</t>
+1 -1
View File
@@ -144,7 +144,7 @@
<t t-name="mail.ChatThread.LoadMore">
<div t-if="!all_messages_loaded" class="o_thread_show_more">
<button class="btn btn-sm btn-link">-------- Show more messages --------</button>
<button class="btn btn-sm btn-link">-------- Show older messages --------</button>
</div>
</t>