Browse Source

RST format

pull/236/head
Pierre Verkest 9 years ago
parent
commit
fd2cbe6078
  1. 29
      web_widget_boolean_switch/README.rst

29
web_widget_boolean_switch/README.rst

@ -19,11 +19,11 @@ field using this widget.
Example Example
------- -------
```xml
```
<field name="active" <field name="active"
widget="boolean_switch" widget="boolean_switch"
context="{'fake_parameter': 'foo'}" context="{'fake_parameter': 'foo'}"
options="{'quick_edit': True, 'extra': {'onText': 'Yes', 'offText': 'No' }"/>
options="{'quick_edit': True, 'extra': {'onText': 'Yes', 'offText': 'No' }}"/>
``` ```
.. note:: .. note::
@ -43,7 +43,7 @@ extra
``extra`` is used to set ``extra`` is used to set
`bootstrap-switch <http://www.bootstrap-switch.org/options.html>`_ options. `bootstrap-switch <http://www.bootstrap-switch.org/options.html>`_ options.
Available::
*Available options*:
* **size**: The checkbox size - default: `null` - values: null, 'mini', 'small', 'normal', 'large' * **size**: The checkbox size - default: `null` - values: null, 'mini', 'small', 'normal', 'large'
* **animate**: Animate the switch - default: `true` * **animate**: Animate the switch - default: `true`
@ -60,24 +60,17 @@ Available::
* **wrapperClass**: Container element class(es) - default: `"wrapper"`, * **wrapperClass**: Container element class(es) - default: `"wrapper"`,
.. warning::
Those parameters are overwritten by this module or highly discouraged::
* **radioAllOff**: Allow this radio button to be unchecked by the user - default: `false`
* **state**: The checkbox state - default: `true`
* **disabled**: Disable state - default: `false`
* **readonly**: Readonly state - default: `false`
* **onInit**: Callback function to execute on initialization - default: `function() {}`,
* **onSwitchChange**: Callback function to execute on switch state change - default: `function() {}`
..warning::
Usage
=====
Those parameters are overwritten by this module or highly discouraged:
To use this module, you need to:
* **radioAllOff**: Allow this radio button to be unchecked by the user - default: `false`
* **state**: The checkbox state - default: `true`
* **disabled**: Disable state - default: `false`
* **readonly**: Readonly state - default: `false`
* **onInit**: Callback function to execute on initialization - default: `function() {}`,
* **onSwitchChange**: Callback function to execute on switch state change - default: `function() {}`
* go to ...
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot :alt: Try me on Runbot

Loading…
Cancel
Save