[IMP] web_widget_numeric_step: Better CSS and supports mobile layouts

This commit is contained in:
Alexandre Díaz
2020-02-07 02:43:49 +01:00
committed by Thanakrit Pintana
parent aa9dd2716d
commit 6c6566078a
14 changed files with 384 additions and 153 deletions

View File

@@ -1,3 +1,7 @@
* `GRAP <http://www.grap.coop>`_:
* Quentin DUPONT <quentin.dupont@grap.coop>
* `Tecnativa <https://www.tecnativa.com/>`_:
* Alexandre Díaz

View File

@@ -1,2 +1,4 @@
This widget changes input number field and make it easier to incremente the number thanks to 2 buttons (+ and -).
Use JS native logic for input number, so you can use the options ``min``, ``max``, ``step``, ``placeholder``.
This widget changes input number field and make it easier to increment the number thanks to 2 buttons (+ and -).
Use JS native logic for input number, so you can use the options ``min``, ``max``, ``step``, ``placeholder``.
Demo available at `Settings > Users & Companies > Users > *Select One* > See 'Credit Limit' field`

View File

@@ -11,13 +11,15 @@ Add an option to choose the step iteration and limits (min and max values).
Example for an 0.25 step, min to -1 and max to 10 :
``<field name="sale_delay" widget="numeric_step" options="{'step': 0.25, 'min': -1, 'max': 10}" /> days``
.. code:: xml
<field name="sale_delay" widget="numeric_step" options="{'step': 0.25, 'min': -1, 'max': 10}" /> days
**Examples**
Iteration with 0.25 step, min to -1 and max to 10.
Start to incremente with button, continue incrementing with scrolling mouse.
Start to increment with button, continue incrementing with scrolling mouse.
.. figure:: ../static/description/step0,25andlimits.gif