From 34b5049dee5383c189532f098a54528a77b1f1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Fri, 31 May 2019 12:39:40 +0200 Subject: [PATCH] [DOC] doc: small misc fixes --- doc/qweb.md | 4 ++-- src/qweb_extensions.ts | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/qweb.md b/doc/qweb.md index 1cfed1ad..2e5f78ab 100644 --- a/doc/qweb.md +++ b/doc/qweb.md @@ -600,8 +600,8 @@ The `t-transition` directive can be combined with `t-widget`. Notes: - more information on animations are available [here](animations.md). -- the value for `t-transition` must be a single class name. Owl does not support - more than one transition on a single node. +- Owl does not support more than one transition on a single node, so the + `t-transition` expression must be a single value (i.e. no space allowed) ### `t-mounted` directive diff --git a/src/qweb_extensions.ts b/src/qweb_extensions.ts index 58e79f40..0e682fc9 100644 --- a/src/qweb_extensions.ts +++ b/src/qweb_extensions.ts @@ -213,7 +213,7 @@ QWeb.addDirective({ * let _2_index = c1.length; * c1.push(null); * - * // def3 is the deferred that will contain later either the new widget + * // def3 is the promise that will contain later either the new widget * // creation, or the props update... * let def3; * @@ -249,14 +249,13 @@ QWeb.addDirective({ * // in this situation, we need to create a new widget. First step is * // to get a reference to the class, then create an instance with * // current context as parent, and the props. - * let W4 = context.widgets["child"]; + * let W4 = context.widgets && context.widgets[widgetKey4] || QWeb.widgets[widgetKey4]; + * if (!W4) { * throw new Error("Cannot find the definition of widget 'child'"); * } * w4 = new W4(owner, props4); * - * let utils = this.utils; - * * // Whenever we rerender the parent widget, we need to be sure that we * // are able to find the widget instance. To do that, we register it to * // the parent cmap (children map). Note that the 'template' key is