diff options
| author | David Monjoie <dmo@odoo.com> | 2019-03-01 15:55:43 +0100 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2019-03-06 20:07:17 +0100 |
| commit | 7cb64b5e93279b9c654d2cb035f895e59adbddda (patch) | |
| tree | 847727fb6c94823dcd41e0a47d2c280b2f1c41ce /doc/reference/javascript_reference.rst | |
| parent | 4721de57df25eab1ebf590268f85c0c8cb5b2d2a (diff) | |
[REF] doc: promisify doc examples
Also remove a file on async stuff as its content is outdated, and
actually not used.
Diffstat (limited to 'doc/reference/javascript_reference.rst')
| -rw-r--r-- | doc/reference/javascript_reference.rst | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/reference/javascript_reference.rst b/doc/reference/javascript_reference.rst index 059b5796041..02c477905d5 100644 --- a/doc/reference/javascript_reference.rst +++ b/doc/reference/javascript_reference.rst @@ -879,7 +879,7 @@ Here is an example on how this event system could be used: this.counter = new Counter(this); this.counter.on('valuechange', this, this._onValueChange); var def = this.counter.appendTo(this.$el); - return $.when(def, this._super.apply(this, arguments); + return Promise.all([def, this._super.apply(this, arguments)]); }, _onValueChange: function (val) { // do something with val @@ -1500,15 +1500,15 @@ order. - type: setting the input type (*text* by default, can be set on *number*) - On edit mode, the field is rendered as an input with the HTML attribute type - setted on *number* (so user can benefit the native support, especially on + On edit mode, the field is rendered as an input with the HTML attribute type + setted on *number* (so user can benefit the native support, especially on mobile). In this case, the default formatting is disabled to avoid incompability. .. code-block:: xml <field name="int_value" options='{"type": "number"}'/> - - step: set the step to the value up and down when the user click on buttons + - step: set the step to the value up and down when the user click on buttons (only for input of type number, 1 by default) .. code-block:: xml @@ -1532,15 +1532,15 @@ order. - type: setting the input type (*text* by default, can be set on *number*) - On edit mode, the field is rendered as an input with the HTML attribute type - setted on *number* (so user can benefit the native support, especially on + On edit mode, the field is rendered as an input with the HTML attribute type + setted on *number* (so user can benefit the native support, especially on mobile). In this case, the default formatting is disabled to avoid incompability. .. code-block:: xml <field name="int_value" options='{"type": "number"}'/> - - step: set the step to the value up and down when the user click on buttons + - step: set the step to the value up and down when the user click on buttons (only for input of type number, 1 by default) .. code-block:: xml |
