forked from Techsystech/web
[FIX] web_responsive: Fix several issues
* one2many tags now not hidden behind inputs. * Drawer icons now with much better look. * No overflow bug in small views when closing drawer. * Documented it when resizing viewport. (+1 squashed commit) * Whitespace cleanup.10.0
parent
b2353e2671
commit
ac0d077031
|
@ -39,6 +39,8 @@ Known issues / Roadmap
|
||||||
* Provide keyboard navigation to secondary (top) menu
|
* Provide keyboard navigation to secondary (top) menu
|
||||||
* Drag drawer from left to open in mobile
|
* Drag drawer from left to open in mobile
|
||||||
* Figure out how to test focus on hidden elements for keyboard nav tests
|
* Figure out how to test focus on hidden elements for keyboard nav tests
|
||||||
|
* If you resize the window, body gets a wrong ``overflow: auto`` css property
|
||||||
|
and you need to refresh your view or open/close the app drawer to fix that.
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
|
|
@ -172,6 +172,8 @@ odoo.define('web_app_drawer', function(require) {
|
||||||
core.bus.trigger('drawer.closed');
|
core.bus.trigger('drawer.closed');
|
||||||
this.$el.one('drawer.opened', $.proxy(this.onDrawerOpen, this));
|
this.$el.one('drawer.opened', $.proxy(this.onDrawerOpen, this));
|
||||||
this.isOpen = false;
|
this.isOpen = false;
|
||||||
|
// Remove inline style inserted by drawer.js
|
||||||
|
this.$el.css("overflow", "");
|
||||||
},
|
},
|
||||||
|
|
||||||
/* It finds app links and register event handlers
|
/* It finds app links and register event handlers
|
||||||
|
|
|
@ -13,13 +13,11 @@
|
||||||
background-clip: padding-box;
|
background-clip: padding-box;
|
||||||
|
|
||||||
.navbar-left {
|
.navbar-left {
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
li {
|
li {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-drawer-title {
|
.app-drawer-title {
|
||||||
|
@ -31,9 +29,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.app-drawer-icon-app {
|
.app-drawer-icon-app {
|
||||||
height: @app-drawer-icon-size;
|
height: 100%;
|
||||||
width: @app-drawer-icon-size;
|
width: 100%;
|
||||||
margin: @app-drawer-icon-margin;
|
max-width: @app-drawer-icon-size;
|
||||||
|
max-height: @app-drawer-icon-size;
|
||||||
|
object-fit: contain;
|
||||||
|
object-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-body {
|
.panel-body {
|
||||||
|
|
|
@ -4,6 +4,16 @@
|
||||||
body {
|
body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
// Do not fix the search part, it's too big for small screens
|
||||||
|
@media (max-width: @screen-sm-max) {
|
||||||
|
overflow: inherit;
|
||||||
|
.openerp {
|
||||||
|
.oe-view-manager {
|
||||||
|
overflow: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
|
|
|
@ -27,12 +27,7 @@ a.navbar-collapse.collapse {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge {
|
@media (max-width: @screen-xs-max) {
|
||||||
position: absolute;
|
|
||||||
right: @app-drawer-padding-horizontal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: @screen-sm - 1px) {
|
|
||||||
#odooMenuBarNav[aria-expanded="false"] {
|
#odooMenuBarNav[aria-expanded="false"] {
|
||||||
/* Hack to hide the visibly expanded mobile menu on load. */
|
/* Hack to hide the visibly expanded mobile menu on load. */
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -2,14 +2,12 @@
|
||||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||||
|
|
||||||
// App Drawer / Icons
|
// App Drawer / Icons
|
||||||
|
@app-drawer-icon-size: 6em;
|
||||||
@app-drawer-icon-size: 7em;
|
|
||||||
@app-drawer-icon-margin: 1em;
|
@app-drawer-icon-margin: 1em;
|
||||||
@app-drawer-width: 80%;
|
@app-drawer-width: 80%;
|
||||||
@app-drawer-title-height: @navbar-height;
|
@app-drawer-title-height: @navbar-height;
|
||||||
|
|
||||||
// Navbar
|
// Navbar
|
||||||
|
|
||||||
@app-drawer-navbar-height: @navbar-height / 2;
|
@app-drawer-navbar-height: @navbar-height / 2;
|
||||||
@app-drawer-navbar-padding-vertical: @navbar-padding-vertical / 2;
|
@app-drawer-navbar-padding-vertical: @navbar-padding-vertical / 2;
|
||||||
@app-drawer-padding-horizontal: @navbar-padding-horizontal / 2;
|
@app-drawer-padding-horizontal: @navbar-padding-horizontal / 2;
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|
||||||
<a href="#"
|
<a href="#"
|
||||||
class="drawer-toggle pull-left navbar-collapse collapse btn btn-default app-drawer-toggle"
|
class="drawer-toggle navbar-collapse collapse btn btn-default app-drawer-toggle"
|
||||||
accesskey="A"
|
accesskey="A"
|
||||||
>
|
>
|
||||||
<span class="sr-only">Toggle App Drawer</span>
|
<span class="sr-only">Toggle App Drawer</span>
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
class="app-drawer-toggle drawer-toggle pull-left navbar-toggle collapsed"
|
class="app-drawer-toggle drawer-toggle pull-left navbar-toggle collapsed"
|
||||||
>
|
>
|
||||||
<span class="sr-only">Toggle App Drawer</span>
|
<span class="sr-only">Toggle App Drawer</span>
|
||||||
<i class="fa fa-th fa-lg app-drawer-icon-open" />
|
<div class="fa fa-th fa-lg app-drawer-icon-open" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button type="button"
|
<button type="button"
|
||||||
|
@ -214,8 +214,10 @@
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body" id="appDrawerAppPanelBody">
|
<div class="panel-body" id="appDrawerAppPanelBody">
|
||||||
<ul class="nav navbar-nav navbar-left oe_application_menu_placeholder" style="display: none;">
|
<ul class="row list-unstyled oe_application_menu_placeholder"
|
||||||
<li t-foreach="menu_data['children']" t-as="menu" class="col-xs-6 col-sm-4 col-md-3 col-lg-2 text-center">
|
style="display: none;">
|
||||||
|
<li t-foreach="menu_data['children']" t-as="menu"
|
||||||
|
class="col-xs-6 col-sm-4 col-md-3 col-lg-2 text-center mt16">
|
||||||
<t t-call="web.menu_link">
|
<t t-call="web.menu_link">
|
||||||
<t t-set="display_images" t-value="1" />
|
<t t-set="display_images" t-value="1" />
|
||||||
</t>
|
</t>
|
||||||
|
@ -227,10 +229,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
Loading…
Reference in New Issue