From 3f4e760f34b4e961ccc5587d5d1cb6eed1680e2a Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 13 Feb 2019 15:21:03 +0000 Subject: [MOV] web, *: simple moves of JS files to 'public' folder * web_editor, website, survey, im_livechat Part of https://github.com/odoo/odoo/pull/29442 task-1932066 --- .../static/src/js/public/public_root_instance.js | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 addons/web/static/src/js/public/public_root_instance.js (limited to 'addons/web/static/src/js/public/public_root_instance.js') diff --git a/addons/web/static/src/js/public/public_root_instance.js b/addons/web/static/src/js/public/public_root_instance.js new file mode 100644 index 00000000000..ce0cfa61bc6 --- /dev/null +++ b/addons/web/static/src/js/public/public_root_instance.js @@ -0,0 +1,23 @@ +odoo.define('root.widget', function (require) { +"use strict"; + +var ServiceProviderMixin = require('web.ServiceProviderMixin'); +var Widget = require('web.Widget'); + +/** + * This is the root widget in the frontend bundle when website is not installed. + * + * This widget is important, because the tour manager needs a root widget in + * order to work. The root widget must be a service provider with the ajax + * service, so that the tour manager can let the server know when tours have + * been consumed. + */ +var PublicRootWidget = Widget.extend(ServiceProviderMixin, { + init: function () { + this._super.apply(this, arguments); + ServiceProviderMixin.init.call(this); + } +}); + +return new PublicRootWidget(); +}); -- cgit v1.2.3