From d62b9f00def7f5ab3c04c2fbeb1fd34a637b8ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 8 Oct 2020 13:40:13 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Fix=20documented=20default=20ena?= =?UTF-8?q?ble=20logic=20on=20custom=20controls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are only disabled when the printer is disconnected, not when it is printing. This behaviour can be overridden with the `enabled` property. Closes #3758 --- docs/features/custom_controls.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/features/custom_controls.rst b/docs/features/custom_controls.rst index ad8756bbe..522d392cb 100644 --- a/docs/features/custom_controls.rst +++ b/docs/features/custom_controls.rst @@ -172,9 +172,10 @@ Controls turn the button red. * - ``enabled`` - (Optional) A JavaScript snippet returning either ``true`` or ``false`` determining whether the control - should be enabled or not. This allow to override the default logic for this (disabled if printer is offline - or currently printing). The JavaScript snippet is ``eval``'d and processed in a context where the control - it is part of is provided as local variable ``data`` and the ``ControlViewModel`` is available as ``self``. + should be enabled or not. This allows to override the default logic for the enable state + of the control (disabled if printer is offline). The JavaScript snippet is ``eval``'d and processed + in a context where the control it is part of is provided as local variable ``data`` and the + ``ControlViewModel`` is available as ``self``. * - ``input`` - (Optional) A list of definitions of input parameters for a ``command`` or ``commands``, to be rendered as additional input fields. ``command``/``commands`` may contain placeholders to be replaced by the values obtained