From 4a12a5efccf102b8a839b72ab3874532c3e65a59 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 20 Feb 2017 13:41:51 +0100 Subject: [PATCH] [FIX][web_responsive] Fit view to screen. This patch makes the `.oe_web_client` element to fit exactly inside the viewport, instead of overflowing it as before. --- web_responsive/README.rst | 9 ++++----- web_responsive/static/src/less/main.less | 22 ++++++++++++---------- web_responsive/views/web.xml | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/web_responsive/README.rst b/web_responsive/README.rst index 916abf82..07589055 100755 --- a/web_responsive/README.rst +++ b/web_responsive/README.rst @@ -10,11 +10,10 @@ This module provides a mobile compliant interface for Odoo Community web. Features: - * New navigation with an App drawer - * Keyboard shortcuts for easier navigation - * Display kanban views for small screens format if an action or field One2x - has a kanban view - +* New navigation with an App drawer +* Keyboard shortcuts for easier navigation +* Display kanban views for small screens format if an action or field One2x + has a kanban view Installation ============ diff --git a/web_responsive/static/src/less/main.less b/web_responsive/static/src/less/main.less index a03ea4a1..65e80eaf 100755 --- a/web_responsive/static/src/less/main.less +++ b/web_responsive/static/src/less/main.less @@ -4,6 +4,8 @@ body { width: 100%; height: 100%; + display: flex; + flex-direction: column; // Do not fix the search part, it's too big for small screens @media (max-width: @screen-sm-max) { @@ -14,6 +16,11 @@ body { } } } + + > header { + flex-grow: 0; + flex-shrink: 0; + } } main { @@ -45,16 +52,11 @@ main { z-index: 1051; } -.o_web_client { - >.o_main { - overflow: auto; - > .o_main_content { - overflow: initial; - > .o_content { - overflow: initial; - } - } - } +.oe_web_client { + flex-shrink: 0; + flex-grow: 1; + display: flex; + flex-direction: column; } // Remove z-index from CP buttons so it doesn't overlap the menu diff --git a/web_responsive/views/web.xml b/web_responsive/views/web.xml index acd0ac68..7f39ae59 100644 --- a/web_responsive/views/web.xml +++ b/web_responsive/views/web.xml @@ -20,7 +20,7 @@ - +