[REF] utils: rename loadTemplates into loadFile

closes #351
This commit is contained in:
Géry Debongnie
2019-10-17 12:20:22 +02:00
committed by aab-odoo
parent 4bc49e7241
commit 0aeebd7b6e
8 changed files with 32 additions and 25 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ class App extends owl.Component {
// Application initialization
//------------------------------------------------------------------------------
async function start() {
const templates = await owl.utils.loadTemplates("templates.xml");
const templates = await owl.utils.loadFile("templates.xml");
const env = {
qweb: new owl.QWeb(templates)
};
+2 -2
View File
@@ -127,7 +127,7 @@ async function makeApp(js, css, xml) {
const JS = `
async function loadTemplates() {
try {
return owl.utils.loadTemplates('app.xml');
return owl.utils.loadFile('app.xml');
} catch(e) {
console.error(\`This app requires a static server. If you have python installed, try 'python app.py'\`);
}
@@ -430,7 +430,7 @@ App.components = { TabbedEditor };
async function start() {
document.title = `${document.title} (v${owl.__info__.version})`;
const [templates] = await Promise.all([
owl.utils.loadTemplates("templates.xml"),
owl.utils.loadFile("templates.xml"),
owl.utils.whenReady()
]);
const qweb = new owl.QWeb(templates);