diff --git a/web_tree_dynamic_colored_field/README.rst b/web_tree_dynamic_colored_field/README.rst index 90abc69ed..18eecc0c9 100644 --- a/web_tree_dynamic_colored_field/README.rst +++ b/web_tree_dynamic_colored_field/README.rst @@ -114,7 +114,19 @@ Example: overrides the rest of `colors` attributes, and that you need the tree to load your field in the first place by adding it as invisible field. -**Note that you should always use single quotes for fields' ``options`` and wrap nested values in double quotes since ``options`` is a JSON object.** +* Can use strings too... In the tree view declaration, put ``options="{'fg_color': 'green:customer_state == \'success\''}"`` attribute in the ``field`` tag:: + + ... + + + ... + + ... + + + ... + +**Note that you can use single or normal quotes. If the declaration of the options doesn't follow the JSON format, the options string will be evaluated using py.eval()** Known issues / Roadmap ====================== diff --git a/web_tree_dynamic_colored_field/readme/USAGE.rst b/web_tree_dynamic_colored_field/readme/USAGE.rst index 251009474..92754f145 100644 --- a/web_tree_dynamic_colored_field/readme/USAGE.rst +++ b/web_tree_dynamic_colored_field/readme/USAGE.rst @@ -67,4 +67,16 @@ Example: overrides the rest of `colors` attributes, and that you need the tree to load your field in the first place by adding it as invisible field. -**Note that you should always use single quotes for fields' ``options`` and wrap nested values in double quotes since ``options`` is a JSON object.** +* Can use strings too... In the tree view declaration, put ``options="{'fg_color': 'green:customer_state == \'success\''}"`` attribute in the ``field`` tag:: + + ... + + + ... + + ... + + + ... + +**Note that you can use single or normal quotes. If the declaration of the options doesn't follow the JSON format, the options string will be evaluated using py.eval()** diff --git a/web_tree_dynamic_colored_field/static/description/index.html b/web_tree_dynamic_colored_field/static/description/index.html index ae3e4ca4e..7426a425a 100644 --- a/web_tree_dynamic_colored_field/static/description/index.html +++ b/web_tree_dynamic_colored_field/static/description/index.html @@ -453,7 +453,22 @@ options='{"fg_color": "red:red_color == True; green:green_color = overrides the rest of `colors` attributes, and that you need the tree to load your field in the first place by adding it as invisible field. -

Note that you should always use single quotes for fields’ ``options`` and wrap nested values in double quotes since ``options`` is a JSON object.

+ +

Note that you can use single or normal quotes. If the declaration of the options doesn’t follow the JSON format, the options string will be evaluated using py.eval()

Known issues / Roadmap