mirror of
https://github.com/odoo/documentation.git
synced 2026-01-04 10:46:04 +07:00
[IMP] developer/javascript: unify the styling of API references
Now that a new styling for API references was added with commit934f45c, we can remove the extra CSS that was crafted specifically for JavaScript API references with commit05a0a49a. While we're at it, this commit also applies the new styling to definition lists that were missing it, like it was done for the page on views with commit120ae785. closes odoo/documentation#2378 X-original-commit:31a9d4a340Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
@@ -329,6 +329,8 @@ manifest counterparts.
|
||||
|
||||
.. autoclass:: odoo.addons.base.models.ir_asset.IrAsset
|
||||
|
||||
.. rst-class:: o-definition-list
|
||||
|
||||
`name`
|
||||
Name of the asset record (for identification purpose).
|
||||
|
||||
|
||||
@@ -142,6 +142,8 @@ variables for various data points:
|
||||
|
||||
.. warning:: ``$as`` will be replaced by the name passed to ``t-as``
|
||||
|
||||
.. rst-class:: o-definition-list
|
||||
|
||||
:samp:`{$as}_all` (deprecated)
|
||||
the object being iterated over
|
||||
|
||||
@@ -198,6 +200,8 @@ QWeb can compute attributes on-the-fly and set the result of the computation
|
||||
on the output node. This is done via the ``t-att`` (attribute) directive which
|
||||
exists in 3 different forms:
|
||||
|
||||
.. rst-class:: o-definition-list
|
||||
|
||||
:samp:`t-att-{$name}`
|
||||
an attribute called ``$name`` is created, the attribute value is evaluated
|
||||
and the result is set as the attribute's value::
|
||||
@@ -442,6 +446,8 @@ to a normal string to "strip" the safety flag e.g. `str(content)` in Python and
|
||||
Deprecated output directives
|
||||
----------------------------
|
||||
|
||||
.. rst-class:: o-definition-list
|
||||
|
||||
``esc``
|
||||
An alias for ``out``, would originally HTML-escape its input. Not yet
|
||||
formally deprecated as the only difference between ``out`` and ``esc`` is
|
||||
@@ -483,6 +489,8 @@ is ``widget``, other options are field- or widget-dependent.
|
||||
Debugging
|
||||
---------
|
||||
|
||||
.. rst-class:: o-definition-list
|
||||
|
||||
``t-debug``
|
||||
invokes a debugger using PDB's ``set_trace`` API. The parameter should
|
||||
be the name of a module, on which a ``set_trace`` method is called::
|
||||
@@ -751,6 +759,8 @@ At a deeper level than the previous helper is the ``_render`` method on
|
||||
You can use ``minimal_qcontext=False`` option to avoid this default
|
||||
value like the public method ``render``:
|
||||
|
||||
.. rst-class:: o-definition-list
|
||||
|
||||
``request``
|
||||
the current :class:`~odoo.http.Request` object, if any
|
||||
``debug``
|
||||
@@ -875,6 +885,8 @@ The ``t-jquery`` directives takes a `CSS selector`_. This selector is used
|
||||
on the extended template to select *context nodes* to which the specified
|
||||
``t-operation`` is applied:
|
||||
|
||||
.. rst-class:: o-definition-list
|
||||
|
||||
``append``
|
||||
the node's body is appended at the end of the context node (after the
|
||||
context node's last child)
|
||||
@@ -907,6 +919,8 @@ debugging
|
||||
|
||||
The javascript QWeb implementation provides a few debugging hooks:
|
||||
|
||||
.. rst-class:: o-definition-list
|
||||
|
||||
``t-log``
|
||||
takes an expression parameter, evaluates the expression during rendering
|
||||
and logs its result with ``console.log``::
|
||||
|
||||
Reference in New Issue
Block a user