diff --git a/web_responsive/README.rst b/web_responsive/README.rst index a179c40c..db529968 100644 --- a/web_responsive/README.rst +++ b/web_responsive/README.rst @@ -83,6 +83,10 @@ Features for computers: .. image:: https://user-images.githubusercontent.com/973709/48417428-ac5a5f00-e74a-11e8-8839-5bc538c54c1d.png +* Sticky chatter topbar + + .. image:: https://raw.githubusercontent.com/OCA/web/12.0/web_responsive/static/img/chatter_topbar.gif + **Table of contents** .. contents:: diff --git a/web_responsive/__manifest__.py b/web_responsive/__manifest__.py index 200118aa..0d5d1564 100644 --- a/web_responsive/__manifest__.py +++ b/web_responsive/__manifest__.py @@ -14,6 +14,7 @@ "installable": True, "depends": [ 'web', + 'mail', ], "data": [ 'views/assets.xml', diff --git a/web_responsive/readme/DESCRIPTION.rst b/web_responsive/readme/DESCRIPTION.rst index a8d55a80..cf439143 100644 --- a/web_responsive/readme/DESCRIPTION.rst +++ b/web_responsive/readme/DESCRIPTION.rst @@ -55,3 +55,7 @@ Features for computers: * Full width form sheets .. image:: https://user-images.githubusercontent.com/973709/48417428-ac5a5f00-e74a-11e8-8839-5bc538c54c1d.png + +* Sticky chatter topbar + + .. image:: ./static/img/chatter_topbar.gif diff --git a/web_responsive/static/description/index.html b/web_responsive/static/description/index.html index bb707b6d..d38086ea 100644 --- a/web_responsive/static/description/index.html +++ b/web_responsive/static/description/index.html @@ -415,6 +415,9 @@ See Full width form sheets

https://user-images.githubusercontent.com/973709/48417428-ac5a5f00-e74a-11e8-8839-5bc538c54c1d.png +
  • Sticky chatter topbar

    +https://raw.githubusercontent.com/OCA/web/12.0/web_responsive/static/img/chatter_topbar.gif +
  • Table of contents

    diff --git a/web_responsive/static/img/chatter_topbar.gif b/web_responsive/static/img/chatter_topbar.gif new file mode 100644 index 00000000..e0522c5a Binary files /dev/null and b/web_responsive/static/img/chatter_topbar.gif differ diff --git a/web_responsive/static/src/css/web_responsive.scss b/web_responsive/static/src/css/web_responsive.scss index cb278c11..565d146e 100644 --- a/web_responsive/static/src/css/web_responsive.scss +++ b/web_responsive/static/src/css/web_responsive.scss @@ -412,6 +412,10 @@ html .o_web_client .o_main .o_main_content { .o_form_sheet_bg { flex: 1 1 60%; overflow: auto; + + > .o_form_sheet { + min-width: unset; + } } .o_chatter { @@ -421,20 +425,21 @@ html .o_web_client .o_main .o_main_content { min-width: 30%; overflow: auto; - .o_chatter_topbar, - .o_thread_composer { - position: sticky; - } - - .o_chatter_topbar { + .o_chatter_header_container { + padding-top: $grid-gutter-width * 0.5; top: 0; - z-index: 2; + position: sticky; background-color: $o-view-background-color; - } - - .o_thread_composer { - top: $o-statusbar-height; z-index: 1; + + .o_chatter_topbar { + margin-top: 0; + } + + .o_attachments_previews { + overflow: auto; + max-height: $o-mail-attachment-image-size * 6; + } } } } diff --git a/web_responsive/static/src/js/web_responsive.js b/web_responsive/static/src/js/web_responsive.js index cca88b59..be455a88 100644 --- a/web_responsive/static/src/js/web_responsive.js +++ b/web_responsive/static/src/js/web_responsive.js @@ -11,6 +11,7 @@ odoo.define('web_responsive', function (require) { var FormRenderer = require('web.FormRenderer'); var Menu = require("web.Menu"); var RelationalFields = require('web.relational_fields'); + var Chatter = require('mail.Chatter'); /** * Reduce menu data to a searchable format understandable by fuzzy.js @@ -352,6 +353,19 @@ odoo.define('web_responsive', function (require) { }, }); + // Chatter Hide Composer + Chatter.include({ + _openComposer: function (options) { + if (this._composer && + options.isLog === this._composer.options.isLog && + this._composer.$el.is(':visible')) { + this._closeComposer(false); + } else { + this._super.apply(this, arguments); + } + } + }); + /** * Use ALT+SHIFT instead of ALT as hotkey triggerer. * diff --git a/web_responsive/static/src/xml/form_view.xml b/web_responsive/static/src/xml/form_view.xml index 4a0ec6f5..33af95ae 100644 --- a/web_responsive/static/src/xml/form_view.xml +++ b/web_responsive/static/src/xml/form_view.xml @@ -138,4 +138,14 @@ + + +
    +
    +
    +
    +
    + + +