mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
743de8db40
In odoo/odoo#72675 the registry for navbar widgets was changed to use the new registry class introduced with the wowl webclient, this use site was not adapted, causing a crash on startup. closes odoo/design-themes#55 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
31 lines
792 B
JavaScript
31 lines
792 B
JavaScript
odoo.define('test_themes.website_selector', function (require) {
|
|
'use strict';
|
|
|
|
const websiteNavbarData = require('website.navbar');
|
|
const { registry } = require("@web/core/registry");
|
|
|
|
const TestThemesWebsiteSelector = websiteNavbarData.WebsiteNavbarActionWidget.extend({
|
|
/**
|
|
* @override
|
|
*/
|
|
start: function () {
|
|
this.$('.js_multi_website_switch[data-toggle]').tooltip({
|
|
html: true,
|
|
placement: 'left',
|
|
delay: {show: 100, hide: 0},
|
|
});
|
|
return this._super(...arguments);
|
|
},
|
|
|
|
});
|
|
|
|
registry.category("website_navbar_widgets").add("TestThemesWebsiteSelector", {
|
|
Widget: TestThemesWebsiteSelector,
|
|
selector: '#website_switcher',
|
|
});
|
|
|
|
return {
|
|
TestThemesWebsiteSelector: TestThemesWebsiteSelector,
|
|
};
|
|
});
|