[IMP] web,*: removes jQuery.browser

This commit removes the $.browser as not used anymore and already
removed in jQuery itself in v1.9, and reintroduced in our codebase to
support jquery.ba-bbq (in odoo/odoo@4d07900cf7)
which was also removed.

Reference:
https://api.jquery.com/jquery.browser/

task-3439226

closes odoo/odoo#133916

Related: odoo/enterprise#46736
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit is contained in:
Pierre Paridans
2023-09-05 19:58:08 +00:00
parent 0b8c9afb08
commit bb18aace54
7 changed files with 0 additions and 44 deletions
@@ -73,7 +73,6 @@
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery.ui/jquery-ui.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js',
'web/static/lib/popper/popper.js',
'web/static/lib/bootstrap/js/dist/dom/data.js',
-1
View File
@@ -156,7 +156,6 @@
'web/static/tests/patch_translations.js',
'web/static/src/libs/owl.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/src/legacy/js/**/*',
('remove', 'web/static/src/legacy/js/libs/**/*'),
('remove', 'web/static/src/legacy/js/public/**/*'),
-1
View File
@@ -124,7 +124,6 @@
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery.ui/jquery-ui.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js',
'web/static/lib/popper/popper.js',
'web/static/lib/bootstrap/js/dist/dom/data.js',
-2
View File
@@ -73,7 +73,6 @@ This module provides the core of the Odoo Web Client.
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery.ui/jquery-ui.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js',
'web/static/lib/popper/popper.js',
'web/static/lib/bootstrap/js/dist/dom/data.js',
@@ -212,7 +211,6 @@ This module provides the core of the Odoo Web Client.
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery.ui/jquery-ui.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js',
'web/static/lib/popper/popper.js',
'web/static/lib/bootstrap/js/dist/dom/data.js',
@@ -1,37 +0,0 @@
(function() {
/** reimport deprecated $.browser, remove me when jquery.ba-bqq is dropped */
$.uaMatch = function( ua ) {
var ua = ua.toLowerCase();
var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
/(webkit)[ \/]([\w.]+)/.exec( ua ) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
/(msie) ([\w.]+)/.exec( ua ) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
[];
return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
// Don't clobber any existing jQuery.browser in case it's different
if ( !$.browser ) {
var matched = $.uaMatch( navigator.userAgent );
var browser = {};
if ( matched.browser ) {
browser[ matched.browser ] = true;
browser.version = matched.version;
}
// Chrome is Webkit, but Webkit is also Safari.
if ( browser.chrome ) {
browser.webkit = true;
} else if ( browser.webkit ) {
browser.safari = true;
}
$.browser = browser;
}
})();
-1
View File
@@ -62,7 +62,6 @@ Odoo Web Editor widget.
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery.ui/jquery-ui.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js',
'web/static/lib/popper/popper.js',
'web/static/lib/bootstrap/js/dist/dom/data.js',
-1
View File
@@ -162,7 +162,6 @@ Featuring
'web/static/src/legacy/legacy_component.js',
'web/static/lib/jquery/jquery.js',
'web/static/lib/jquery.ui/jquery-ui.js',
'web/static/lib/jquery/jquery.browser.js',
'web/static/lib/jquery.mjs.nestedSortable/jquery.mjs.nestedSortable.js',
'web/static/lib/popper/popper.js',
'web/static/lib/bootstrap/js/dist/dom/data.js',