From 91cb0e0645025ba4483ac423f0cd21fd9ec91c72 Mon Sep 17 00:00:00 2001 From: Pierre Verkest Date: Fri, 2 Oct 2015 17:25:08 +0200 Subject: [PATCH] documentation --- web_widget_boolean_switch/README.rst | 77 ++++++++++++++-------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/web_widget_boolean_switch/README.rst b/web_widget_boolean_switch/README.rst index df31a543..292dee45 100644 --- a/web_widget_boolean_switch/README.rst +++ b/web_widget_boolean_switch/README.rst @@ -6,27 +6,31 @@ Web widget boolean switch ========================= -This module add a widget to render boolean fields +This module add a widget ``boolean_switch`` to render boolean fields. One +of it's main features is to quick edit that field without enter in edit mode. -Installation -============ - -To install this module, you need to: - -* do this ... Configuration ============= +In the view (test on tree view and form view), you can declare any boolean +field using this widget. + Example ------- ```xml ``` +.. note:: + + ``context`` is sent to the ``write`` method of the field model in case of + special needs with the quick edition. + Options ------- @@ -41,31 +45,31 @@ extra Available:: - * **size**: - default: `null` - * **animate**: - default: `true` - * **indeterminate**: `false` - * **inverse**: `false` - * **radioAllOff**: `false` - * **onColor**: `"primary"` - * **offColor**: `default` - * **onText**: `"ON"`, - * **offText**: `"OFF"`, - * **labelText**: `" "`, - * **handleWidth**: `"auto"`, - * **labelWidth**: `"auto"`, - * **baseClass**: `"bootstrap-switch"`, - * **wrapperClass**: `"wrapper"`, + * **size**: The checkbox size - default: `null` - values: null, 'mini', 'small', 'normal', 'large' + * **animate**: Animate the switch - default: `true` + * **indeterminate**: Indeterminate state - default: `false` + * **inverse**: Inverse switch direction - default: `false` + * **onColor**: Color of the left side of the switch - default: `"primary"` - values: 'primary', 'info', 'success', 'warning', 'danger', 'default' + * **offColor**: Color of the right side of the switch - default: `default` - values: 'primary', 'info', 'success', 'warning', 'danger', 'default' + * **onText**: Text of the left side of the switch - default: `"ON"` + * **offText**: Text of the right side of the switch - default: `"OFF"`, + * **labelText**: Text of the center handle of the switch - default: `" "`, + * **handleWidth**: Width of the left and right sides in pixels - default: `"auto"`, + * **labelWidth**: Width of the center handle in pixels - default: `"auto"`, + * **baseClass**: Global class prefix - default: `"bootstrap-switch"`, + * **wrapperClass**: Container element class(es) - default: `"wrapper"`, .. warning:: - Those parameters are overwritten by this module or highly discourage:: + Those parameters are overwritten by this module or highly discouraged:: - * **state**: true, - * **disabled**: `false` - * **readonly**: `false` - * **onInit**: `function() {}`, - * **onSwitchChange**: `function() {}` + * **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() {}` Usage @@ -77,26 +81,23 @@ To use this module, you need to: .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/{repo_id}/{branch} - -.. repo_id is available in https://github.com/OCA/maintainer-tools/blob/master/tools/repos_with_ids.txt -.. branch is "8.0" for example + :target: https://runbot.odoo-community.org/runbot/162/7.0 Known issues / Roadmap ====================== -* ... +* Manage Null values +* Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback `here `_. +If you spotted it first, help us smashing it by providing a detailed and +welcomed feedback `here `_. Credits