mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] web_responsive: Possibility of putting the chatter in the right (#951)
This commit is contained in:
committed by
Sergey Shebanin
parent
e9f87d9ce4
commit
e00d61569f
@@ -9,8 +9,8 @@ odoo.define('web_responsive', function(require) {
|
||||
var SearchView = require('web.SearchView');
|
||||
var core = require('web.core');
|
||||
var config = require('web.config');
|
||||
var FieldOne2Many = core.form_widget_registry.get('one2many');
|
||||
var ViewManager = require('web.ViewManager');
|
||||
var Session = require('web.session');
|
||||
|
||||
Menu.include({
|
||||
|
||||
@@ -26,7 +26,7 @@ odoo.define('web_responsive', function(require) {
|
||||
this._super(id);
|
||||
if (allowOpen) {
|
||||
return;
|
||||
};
|
||||
}
|
||||
var $clicked_menu = this.$secondary_menus.find('a[data-menu=' + id + ']');
|
||||
$clicked_menu.parents('.oe_secondary_submenu').css('display', '');
|
||||
}
|
||||
@@ -291,18 +291,18 @@ odoo.define('web_responsive', function(require) {
|
||||
|
||||
// It inits a new AppDrawer when the web client is ready
|
||||
core.bus.on('web_client_ready', null, function() {
|
||||
new AppDrawer();
|
||||
return new AppDrawer();
|
||||
});
|
||||
|
||||
// if we are in small screen change default view to kanban if exists
|
||||
ViewManager.include({
|
||||
get_default_view: function() {
|
||||
var default_view = this._super()
|
||||
var default_view = this._super();
|
||||
if (config.device.size_class <= config.device.SIZES.XS &&
|
||||
default_view.type !== 'kanban' &&
|
||||
this.views.kanban) {
|
||||
default_view.type = 'kanban';
|
||||
};
|
||||
}
|
||||
return default_view;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,14 +1,65 @@
|
||||
/* Copyright 2016 Ponto Suprimentos Ltda.
|
||||
Copyright 2018 Alexandre Díaz
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
@sheet-margin: @sheet-padding;
|
||||
@chatter-side-width: 30%;
|
||||
|
||||
// Sided Chatter
|
||||
@media (min-width: @screen-md) {
|
||||
.o_chatter_position_sided {
|
||||
.o_form_view {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
|
||||
.o_form_sheet_bg {
|
||||
border-right: 1px solid @table-border-color;
|
||||
overflow: auto;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.oe_chatter {
|
||||
overflow: auto;
|
||||
flex: 0 0 @chatter-side-width;
|
||||
|
||||
.o_chatter_topbar {
|
||||
height: auto;
|
||||
flex-wrap: wrap;
|
||||
|
||||
button:last-of-type {
|
||||
flex: 1 0 auto;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.o_followers {
|
||||
order: -10;
|
||||
flex: 0 1 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Normal Chatter
|
||||
.o_chatter_position_normal {
|
||||
.oe_chatter {
|
||||
max-width: initial;
|
||||
}
|
||||
}
|
||||
|
||||
.o_form_view {
|
||||
// Form must fill 100% width in any size
|
||||
.o_form_sheet_bg {
|
||||
padding: @sheet-padding;
|
||||
|
||||
.o_form_sheet {
|
||||
min-width: auto;
|
||||
max-width: 100%;
|
||||
margin: @sheet-margin;
|
||||
}
|
||||
|
||||
@media (max-width: @screen-sm-max) {
|
||||
|
||||
Reference in New Issue
Block a user