[IMP] web,*: config: add XXS size to config.device

In Less, the size_class XXS is defined and used in media queries.
This rev. adds it in JS for sake of consistency.

Code in addons comparing the size_class needed to be adapted due
to the new XXS size_class.

Moreover, we now use the helper 'config.device.isMobile' everywhere
we should, instead of manually comparing the size_class.

Finally, we changed the way the config.device has to be specified
in the test environment. From now on, only the size_class should be
set, and the isMobile flag is computed automatically.
This commit is contained in:
Aaron Bohy
2018-01-26 19:26:03 +01:00
parent cb339842d4
commit cf178a2f06
13 changed files with 29 additions and 32 deletions
@@ -1037,7 +1037,7 @@ var FieldPhone = FieldEmail.extend({
* @private
*/
_canCall: function () {
return config.device.size_class <= config.device.SIZES.XS;
return config.device.isMobile;
}
});