mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
committed by
Géry Debongnie
parent
8fbf2172c5
commit
05a678c039
@@ -144,7 +144,7 @@ App.components = { Message };
|
||||
//------------------------------------------------------------------------------
|
||||
async function start() {
|
||||
const templates = await owl.utils.loadFile("templates.xml");
|
||||
owl.config.env = {
|
||||
App.env = {
|
||||
qweb: new owl.QWeb({ templates })
|
||||
};
|
||||
const app = new App();
|
||||
|
||||
@@ -95,7 +95,7 @@ function makeCodeIframe(js, css, xml, errorHandler) {
|
||||
owl.__info__.mode = 'dev';
|
||||
let templates = \`${sanitizedXML}\`;
|
||||
const qweb = new owl.QWeb({ templates });
|
||||
owl.config.env = { qweb };
|
||||
owl.Component.env = { qweb };
|
||||
}
|
||||
${js}`;
|
||||
script.innerHTML = content;
|
||||
@@ -443,7 +443,7 @@ async function start() {
|
||||
owl.utils.whenReady()
|
||||
]);
|
||||
const qweb = new owl.QWeb({ templates });
|
||||
owl.config.env = { qweb };
|
||||
owl.Component.env = { qweb };
|
||||
const app = new App();
|
||||
app.mount(document.body);
|
||||
}
|
||||
|
||||
@@ -345,7 +345,7 @@ const themeContext = new Context({
|
||||
foreground: '#fff',
|
||||
});
|
||||
// Add the themeContext the environment to make it available to all components
|
||||
owl.config.env.themeContext = themeContext;
|
||||
App.env.themeContext = themeContext;
|
||||
const app = new App();
|
||||
app.mount(document.body);
|
||||
`;
|
||||
@@ -544,7 +544,7 @@ function makeStore() {
|
||||
return store;
|
||||
}
|
||||
|
||||
owl.config.env.store = makeStore();
|
||||
TodoApp.env.store = makeStore();
|
||||
const app = new TodoApp();
|
||||
app.mount(document.body);
|
||||
`;
|
||||
@@ -1032,7 +1032,7 @@ function setupResponsivePlugin(env) {
|
||||
//------------------------------------------------------------------------------
|
||||
// Application Startup
|
||||
//------------------------------------------------------------------------------
|
||||
setupResponsivePlugin(owl.config.env);
|
||||
setupResponsivePlugin(App.env);
|
||||
|
||||
const app = new App();
|
||||
app.mount(document.body);
|
||||
@@ -1543,7 +1543,7 @@ const windows = [
|
||||
}
|
||||
];
|
||||
|
||||
owl.config.env.windows = windows;
|
||||
App.env.windows = windows;
|
||||
const app = new App();
|
||||
app.mount(document.body);
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user