diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-01-27 12:23:09 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-01-27 12:23:09 +0100 |
| commit | 7e44ddcda3f21c7e6401173539dc0fe93f9a7dd2 (patch) | |
| tree | 322d7f2ce86ce328c27197c5c1b31c9f4a2b2c5c /addons/mail/static/src/less | |
| parent | 3c7b08c030daf84323279b3d87361214e4f1b729 (diff) | |
| parent | 6f923cbdcdc9a78d1999999b3bbd917eb8b4e921 (diff) | |
[MERGE] forward port of branch saas-7 up to 6f923cb
Diffstat (limited to 'addons/mail/static/src/less')
| -rw-r--r-- | addons/mail/static/src/less/chat_window.less | 86 | ||||
| -rw-r--r-- | addons/mail/static/src/less/client_action.less | 140 | ||||
| -rw-r--r-- | addons/mail/static/src/less/composer.less | 2 | ||||
| -rw-r--r-- | addons/mail/static/src/less/thread.less | 13 |
4 files changed, 233 insertions, 8 deletions
diff --git a/addons/mail/static/src/less/chat_window.less b/addons/mail/static/src/less/chat_window.less index ca2e8ca74f1..a4024c93dc1 100644 --- a/addons/mail/static/src/less/chat_window.less +++ b/addons/mail/static/src/less/chat_window.less @@ -1,10 +1,11 @@ @o-chat-window-bg: white; +@o-chat-window-width: 300px; .o_chat_window { .o-flex-display(); .o-flex-flow(column, nowrap); position: fixed; - width: 300px; + width: @o-chat-window-width; max-width: 100%; height: 400px; max-height: 100%; @@ -15,7 +16,11 @@ z-index: 2; @media (max-width: @screen-xs-max) { - display:none; + width: 100%; + height: 100%!important; + &.o_folded { + display: none; + } } .o_chat_header { @@ -25,26 +30,35 @@ background-color: @odoo-brand-primary; padding: 5px; + @media (max-width: @screen-xs-max) { + height: @navbar-height; + .o_chat_title, .o_chat_window_close { + font-size: 22px; + } + } + .o_chat_title { cursor: pointer; .o-flex(1, 1, auto); + .o-text-overflow(); } .o_chat_window_close { color: white; padding: 3px; + margin-left: 5px; &:hover { background-color: darken(@odoo-brand-primary, 10%); } } } - .o_chat_content { + .o_mail_thread { .o-flex(1, 1, auto); overflow: auto; padding: 5px; - .o_mail_thread .o_thread_date_separator { + .o_thread_date_separator { margin-top: 0px; margin-bottom: 15px; border-color: lightgray; @@ -67,3 +81,67 @@ } } } + +.o_chat_window_dropdown { + width: auto; + height: 28px; + color: white; + background-color: @odoo-brand-primary; + cursor: pointer; + + @media (max-width: @screen-xs-max) { + display: none; + } + + .o_chat_window_dropdown_toggler { + padding: 5px; + + .o_total_unread_counter { + .o-position-absolute(-10px, 0, auto, auto); + background-color: @odoo-brand-optional; + padding: 0 2px; + font-size: smaller; + } + } + &.open .o_chat_window_dropdown_toggler .o_total_unread_counter { + display: none; + } + + > ul { + max-width: @o-chat-window-width; + padding: 0; + + > li.o_chat_header { + font-size: 12px; + padding: 3px 5px; + &~li.o_chat_header { + border-top: 1px solid white; + } + &:hover { + background-color: darken(@odoo-brand-primary, 10%); + color: white; + } + } + } +} + +// FIXME: move this to its own file in master +.o_chat_window.o_thread_less { + .o_chat_search_input { + .o-flex-display(); + padding: 5px; + > span { + .o-flex(0, 0, auto); + } + > input { + margin-left: 5px; + .o-flex(1, 1, 100%); + } + } + .o_mail_thread { + background-color: lightgray; + } + .o_chat_input { + display: none; + } +} diff --git a/addons/mail/static/src/less/client_action.less b/addons/mail/static/src/less/client_action.less index 6ad0c80a785..aa469649f2a 100644 --- a/addons/mail/static/src/less/client_action.less +++ b/addons/mail/static/src/less/client_action.less @@ -131,9 +131,11 @@ .o_composer_input { .o-flex(1, 1, auto); - padding: 5px; margin-right: 5px; - border: none; + > textarea { + padding: 5px; + border: none; + } } &.o_extended_composer .o_composer_input { margin-right: 0; @@ -265,3 +267,137 @@ color: orange; } } + +// Navbar icon and dropdown (FIXME: move to systray.less) +.o_mail_navbar_item { + > a { + opacity: 1; + > i { + font-size: larger; + } + } + &.o_no_notification > a { + opacity: 0.5; + .o_notification_counter { + display: none; + } + } + + &.open .o_mail_navbar_dropdown { + .o-flex-display(); + .o-flex-flow(column, nowrap); + } + .o_mail_navbar_dropdown { + width: 350px; + padding: 0; + @media (max-width: @screen-xs-max) { + background-color: white!important; + max-height: none!important; + position: fixed!important; + top: @navbar-height; + right: 0; + bottom: 0; + left: 0; + } + + .o_spinner { + .o-flex-display(); + .o-align-items(center); + .o-justify-content(center); + height: 50px; + } + + .o_filter_button, + .o_new_message, + .o_redirect_to_discuss { + .btn-link; + padding: 5px; + } + + .o_mail_navbar_dropdown_top { + .o-flex-display(); + .o-flex(0, 0, auto); + justify-content: space-between; + border-bottom: 1px solid lightgray; + + .o_filter_button { + color: @odoo-main-color-muted; + &:hover, &.o_selected { + color: @odoo-brand-optional; + } + &.o_selected { + cursor: default; + font-weight: bold; + } + } + } + .o_mail_navbar_dropdown_bottom { + .o-flex(0, 0, auto); + border-top: 1px solid lightgray; + height: 35px; + .o_redirect_to_discuss { + height: 100%; + width: 100%; + } + } + + .o_mail_navbar_dropdown_channels { + .o-flex(0, 1, auto); + max-height: 400px; + min-height: 50px; + overflow-y: auto; + + @media (max-width: @screen-xs-max) { + max-height: none; + } + + .o_mail_channel_preview { + .o-flex-display(); + height: 50px; + align-items: center; + padding: 5px; + cursor: pointer; + font-size: 12px; + overflow: hidden; + &~.o_mail_channel_preview { + border-top: 1px solid lightgray; + } + &.o_channel_unread { + background-color: lighten(lightgray, 10%); + } + &:hover { + background-color: lighten(lightgray, 5%); + } + + .o_channel_image { + .o-flex(0, 0, 36px); + max-height: 36px; + } + .o_channel_info { + .o-flex(1, 1, 100%); + margin-left: 5px; + overflow: hidden; + + .o_channel_title { + .o-flex-display(); + .o_channel_name { + .o-flex(1, 1, auto); + .o-text-overflow(); + } + .o_last_message_date { + .o-flex(0, 0, auto); + padding-top: 3px; + font-size: xx-small; + color: @odoo-main-color-muted; + } + } + .o_last_message_preview { + width: 100%; + color: @odoo-main-color-muted; + .o-text-overflow(); + } + } + } + } + } +} diff --git a/addons/mail/static/src/less/composer.less b/addons/mail/static/src/less/composer.less index 6dad1dac3d2..88b44fec311 100644 --- a/addons/mail/static/src/less/composer.less +++ b/addons/mail/static/src/less/composer.less @@ -10,7 +10,7 @@ } .o_composer { - .o_composer_input { + .o_composer_input > textarea { resize: none; } } diff --git a/addons/mail/static/src/less/thread.less b/addons/mail/static/src/less/thread.less index f2971dcf17e..be86e577b08 100644 --- a/addons/mail/static/src/less/thread.less +++ b/addons/mail/static/src/less/thread.less @@ -97,6 +97,9 @@ .o_thread_message_core { .o-flex(1, 1, auto); + min-width: 0; + max-width: 100%; + word-wrap: break-word; &.o_mail_note { background-color: @gray-lighter; @@ -111,12 +114,20 @@ color: gray; } - > p { + [summary~=o_mail_notification] { // name conflicts with channel notifications, but is odoo notification buttons to hide in chatter if present + display: none; + } + + p { margin: 0 0 9px; // Required by the old design to override a general rule on p's &:last-child { margin-bottom: 0; } } + a { + display: inline-block; + word-break: break-all; + } .o_mail_body_long { display: none; |
