[FIX] web: define XL size in config.device

In Less, the size_class XL is now defined and can be used in media-queries.
It is also added in JS for the sake of consistency.

This new size is needed for a fix in enterprise.
This commit is contained in:
Martin Geubelle
2018-04-12 16:41:13 +02:00
parent 1440c8be03
commit 96f82f65e2
2 changed files with 8 additions and 4 deletions
+5 -4
View File
@@ -47,9 +47,9 @@ var config = {
*/
isMobile: null,
/**
* Mapping between the numbers 0,1,2,3,4 and some descriptions
* Mapping between the numbers 0,1,2,3,4,5 and some descriptions
*/
SIZES: { XXS: 0, XS: 1, SM: 2, MD: 3, LG: 4 },
SIZES: { XXS: 0, XS: 1, SM: 2, MD: 3, LG: 4, XL: 5 },
},
};
@@ -59,13 +59,14 @@ var medias = [
window.matchMedia('(min-width: 475px) and (max-width: 767px)'),
window.matchMedia('(min-width: 768px) and (max-width: 991px)'),
window.matchMedia('(min-width: 992px) and (max-width: 1199px)'),
window.matchMedia('(min-width: 1200px)')
window.matchMedia('(min-width: 1200px) and (max-width: 1533px)'),
window.matchMedia('(min-width: 1534px)'),
];
/**
* Return the current size class
*
* @returns {integer} a number between 0 and 3, included
* @returns {integer} a number between 0 and 5, included
*/
function _getSizeClass() {
for(var i = 0 ; i < medias.length ; i++) {
@@ -62,6 +62,9 @@
@screen-xs-min: 475px;
@screen-xxs-max: (@screen-xs-min - 1);
@screen-xl-min: 1534px;
@screen-lg-max: (@screen-xl-min - 1);
@odoo-form-group-cols: 12;
@odoo-form-spacing-unit: 5px;
@odoo-horizontal-padding: 16px;