[FIX] web: backport mobile OS detection support

This commit backports the mobile OS detection support, and specifically
Android & iOS one to allow more specific targeting of edge cases (i.e.
disabling native date picker in the mobile iOS app only).

opw-2613810

closes odoo/odoo#75577

X-original-commit: 7015dcd56566e93418f51e8e3562f384d10b4ffa
Related: odoo/enterprise#20446
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
This commit is contained in:
Pierre Paridans
2021-08-25 11:37:41 +00:00
parent 78e2546006
commit 055b1eed65
@@ -42,6 +42,20 @@ var config = {
* @type Number
*/
size_class: null,
/**
* Mobile OS (Android) device detection using userAgent.
* This flag doesn't depend on the size/resolution of the screen.
*
* @return Boolean
*/
isAndroid: isAndroid,
/**
* Mobile OS (iOS) device detection using userAgent.
* This flag doesn't depend on the size/resolution of the screen.
*
* @return Boolean
*/
isIOS: isIOS,
/**
* A frequent use case is to have a different render in 'mobile' mode,
* meaning when the screen is small. This flag (boolean) is true when