[IMP] qweb: add global Component registry to qweb

Closes #112
This commit is contained in:
Aaron Bohy
2019-05-23 16:14:52 +02:00
committed by Géry Debongnie
parent 24c569e6d5
commit 7cdd1aa9a1
6 changed files with 73 additions and 9 deletions
+4 -2
View File
@@ -4,6 +4,7 @@ exports[`animations t-transition combined with t-widget 1`] = `
"function anonymous(context,extra
) {
let utils = this.utils;
let QWeb = this.constructor;
let owner = context;
var h = this.utils.h;
let c1 = [], p1 = {key:1};
@@ -19,7 +20,7 @@ exports[`animations t-transition combined with t-widget 1`] = `
w4 = false
}
if (!w4) {
let W4 = context.widgets['Child'];
let W4 = context.widgets && context.widgets['Child'] || QWeb.widgets['Child'];
if (!W4) {throw new Error(\`Cannot find the definition of widget \\"Child\\"\`)}
w4 = new W4(owner, props4);
context.__owl__.cmap[4] = w4.__owl__.id;
@@ -41,6 +42,7 @@ exports[`animations t-transition combined with t-widget and t-if 1`] = `
"function anonymous(context,extra
) {
let utils = this.utils;
let QWeb = this.constructor;
let owner = context;
var h = this.utils.h;
let c1 = [], p1 = {key:1};
@@ -57,7 +59,7 @@ exports[`animations t-transition combined with t-widget and t-if 1`] = `
w4 = false
}
if (!w4) {
let W4 = context.widgets['Child'];
let W4 = context.widgets && context.widgets['Child'] || QWeb.widgets['Child'];
if (!W4) {throw new Error(\`Cannot find the definition of widget \\"Child\\"\`)}
w4 = new W4(owner, props4);
context.__owl__.cmap[4] = w4.__owl__.id;