From 8ff02de12d2ea1aa42fe8f290c73a627f302d120 Mon Sep 17 00:00:00 2001 From: achulii <96129046+achulii@users.noreply.github.com> Date: Thu, 16 May 2024 13:12:04 +0200 Subject: [PATCH] [IMP] web_widget_numeric_step: pre-commit auto fixes --- web_widget_numeric_step/README.rst | 77 +++++++++++-------- web_widget_numeric_step/pyproject.toml | 3 + .../readme/CONTRIBUTORS.md | 8 ++ .../readme/CONTRIBUTORS.rst | 12 --- web_widget_numeric_step/readme/DESCRIPTION.md | 6 ++ .../readme/DESCRIPTION.rst | 4 - web_widget_numeric_step/readme/USAGE.md | 38 +++++++++ web_widget_numeric_step/readme/USAGE.rst | 36 --------- .../static/description/index.html | 53 +++++++------ 9 files changed, 126 insertions(+), 111 deletions(-) create mode 100644 web_widget_numeric_step/pyproject.toml create mode 100644 web_widget_numeric_step/readme/CONTRIBUTORS.md delete mode 100644 web_widget_numeric_step/readme/CONTRIBUTORS.rst create mode 100644 web_widget_numeric_step/readme/DESCRIPTION.md delete mode 100644 web_widget_numeric_step/readme/DESCRIPTION.rst create mode 100644 web_widget_numeric_step/readme/USAGE.md delete mode 100644 web_widget_numeric_step/readme/USAGE.rst diff --git a/web_widget_numeric_step/README.rst b/web_widget_numeric_step/README.rst index a821ca88a..97c1bf160 100644 --- a/web_widget_numeric_step/README.rst +++ b/web_widget_numeric_step/README.rst @@ -17,21 +17,24 @@ Web Widget Numeric Step :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github - :target: https://github.com/OCA/web/tree/16.0/web_widget_numeric_step + :target: https://github.com/OCA/web/tree/17.0/web_widget_numeric_step :alt: OCA/web .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_widget_numeric_step + :target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_widget_numeric_step :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -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``. +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` +Demo available at Settings > Users & Companies > Users > \*Select One\* +> See 'Credit Limit' field **Table of contents** @@ -41,42 +44,48 @@ Demo available at `Settings > Users & Companies > Users > *Select One* > See 'Cr Usage ===== -In your xml view, add ``widget="numeric_step"`` -This will add the 2 buttons "+" and "-" just next to the input field in edit mode. -Iteration step by default is 1. - -.. figure:: https://raw.githubusercontent.com/OCA/web/16.0/web_widget_numeric_step/static/description/add_two_buttons.png +In your xml view, add ``widget="numeric_step"`` This will add the 2 +buttons "+" and "-" just next to the input field in edit mode. Iteration +step by default is 1. +|image1| **Optional** -Add an option to choose the step iteration and limits (min and max values). +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 : .. code:: xml - days + days **Available Options** -- step > Amount to increase/decrease (default: 1.0) -- min > Min. value allowed (default: no limit) -- max > Max. value allowed (default: no limit) -- auto_select > Select the content when the element get focus (default: False) -- placeholder > Define the placeholder text (default: None) +- step > Amount to increase/decrease (default: 1.0) +- min > Min. value allowed (default: no limit) +- max > Max. value allowed (default: no limit) +- auto_select > Select the content when the element get focus (default: + False) +- placeholder > Define the placeholder text (default: None) **Examples** Iteration with 0.25 step, min to -1 and max to 10. -Start to increment with button, continue incrementing with scrolling mouse. +Start to increment with button, continue incrementing with scrolling +mouse. -.. figure:: https://raw.githubusercontent.com/OCA/web/16.0/web_widget_numeric_step/static/description/step0,25andlimits.gif +|image2| Iteration with 10 step, max limit 15, placeholder with onchange -.. figure:: https://raw.githubusercontent.com/OCA/web/16.0/web_widget_numeric_step/static/description/step10_limit15_placeholder117_with_onchange.gif +|image3| + +.. |image1| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_widget_numeric_step/static/description/add_two_buttons.png +.. |image2| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_widget_numeric_step/static/description/step0,25andlimits.gif +.. |image3| image:: https://raw.githubusercontent.com/OCA/web/17.0/web_widget_numeric_step/static/description/step10_limit15_placeholder117_with_onchange.gif Bug Tracker =========== @@ -84,7 +93,7 @@ Bug Tracker 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 to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -92,29 +101,29 @@ Credits ======= Authors -~~~~~~~ +------- * GRAP * Tecnativa Contributors -~~~~~~~~~~~~ +------------ -* `GRAP `_: +- `GRAP `__: - * Quentin DUPONT + - Quentin DUPONT -* `Tecnativa `_: +- `Tecnativa `__: - * Alexandre Díaz - * Carlos Roca + - Alexandre Díaz + - Carlos Roca -* Helly kapatel -* Thanakrit Pintana -* Dhara Solanki +- Helly kapatel +- Thanakrit Pintana +- Dhara Solanki Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -137,6 +146,6 @@ Current `maintainers `__: |maintainer-rafaelbn| |maintainer-yajo| -This module is part of the `OCA/web `_ project on GitHub. +This module is part of the `OCA/web `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_widget_numeric_step/pyproject.toml b/web_widget_numeric_step/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/web_widget_numeric_step/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_widget_numeric_step/readme/CONTRIBUTORS.md b/web_widget_numeric_step/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..3ab6f2745 --- /dev/null +++ b/web_widget_numeric_step/readme/CONTRIBUTORS.md @@ -0,0 +1,8 @@ +- [GRAP](http://www.grap.coop): + - Quentin DUPONT \<\> +- [Tecnativa](https://www.tecnativa.com/): + - Alexandre Díaz + - Carlos Roca +- Helly kapatel \<\> +- Thanakrit Pintana \<\> +- Dhara Solanki \<\> diff --git a/web_widget_numeric_step/readme/CONTRIBUTORS.rst b/web_widget_numeric_step/readme/CONTRIBUTORS.rst deleted file mode 100644 index 3af1d6666..000000000 --- a/web_widget_numeric_step/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,12 +0,0 @@ -* `GRAP `_: - - * Quentin DUPONT - -* `Tecnativa `_: - - * Alexandre Díaz - * Carlos Roca - -* Helly kapatel -* Thanakrit Pintana -* Dhara Solanki diff --git a/web_widget_numeric_step/readme/DESCRIPTION.md b/web_widget_numeric_step/readme/DESCRIPTION.md new file mode 100644 index 000000000..c679491a0 --- /dev/null +++ b/web_widget_numeric_step/readme/DESCRIPTION.md @@ -0,0 +1,6 @@ +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 diff --git a/web_widget_numeric_step/readme/DESCRIPTION.rst b/web_widget_numeric_step/readme/DESCRIPTION.rst deleted file mode 100644 index 4f251db10..000000000 --- a/web_widget_numeric_step/readme/DESCRIPTION.rst +++ /dev/null @@ -1,4 +0,0 @@ -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` diff --git a/web_widget_numeric_step/readme/USAGE.md b/web_widget_numeric_step/readme/USAGE.md new file mode 100644 index 000000000..67b4bfab2 --- /dev/null +++ b/web_widget_numeric_step/readme/USAGE.md @@ -0,0 +1,38 @@ +In your xml view, add `widget="numeric_step"` This will add the 2 +buttons "+" and "-" just next to the input field in edit mode. Iteration +step by default is 1. + +![](../static/description/add_two_buttons.png) + +**Optional** + +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 : + +``` xml + days +``` + +**Available Options** + +- step \> Amount to increase/decrease (default: 1.0) +- min \> Min. value allowed (default: no limit) +- max \> Max. value allowed (default: no limit) +- auto_select \> Select the content when the element get focus (default: + False) +- placeholder \> Define the placeholder text (default: None) + +**Examples** + +Iteration with 0.25 step, min to -1 and max to 10. + +Start to increment with button, continue incrementing with scrolling +mouse. + +![](../static/description/step0,25andlimits.gif) + +Iteration with 10 step, max limit 15, placeholder with onchange + +![](../static/description/step10_limit15_placeholder117_with_onchange.gif) diff --git a/web_widget_numeric_step/readme/USAGE.rst b/web_widget_numeric_step/readme/USAGE.rst deleted file mode 100644 index fabb69723..000000000 --- a/web_widget_numeric_step/readme/USAGE.rst +++ /dev/null @@ -1,36 +0,0 @@ -In your xml view, add ``widget="numeric_step"`` -This will add the 2 buttons "+" and "-" just next to the input field in edit mode. -Iteration step by default is 1. - -.. figure:: ../static/description/add_two_buttons.png - - -**Optional** - -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 : - -.. code:: xml - - days - -**Available Options** - -- step > Amount to increase/decrease (default: 1.0) -- min > Min. value allowed (default: no limit) -- max > Max. value allowed (default: no limit) -- auto_select > Select the content when the element get focus (default: False) -- placeholder > Define the placeholder text (default: None) - -**Examples** - -Iteration with 0.25 step, min to -1 and max to 10. - -Start to increment with button, continue incrementing with scrolling mouse. - -.. figure:: ../static/description/step0,25andlimits.gif - -Iteration with 10 step, max limit 15, placeholder with onchange - -.. figure:: ../static/description/step10_limit15_placeholder117_with_onchange.gif diff --git a/web_widget_numeric_step/static/description/index.html b/web_widget_numeric_step/static/description/index.html index 2f907f713..d2fd91539 100644 --- a/web_widget_numeric_step/static/description/index.html +++ b/web_widget_numeric_step/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code { margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.option { span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,10 +369,13 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:aa00ea1d2e4245170c8f2a6e774bffe29af982ceddd43292a7871cf6f194fc25 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

-

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

+

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

+

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

Table of contents

    @@ -387,14 +391,13 @@ Use JS native logic for input number, so you can use the options

    Usage

    -

    In your xml view, add widget="numeric_step" -This will add the 2 buttons “+” and “-” just next to the input field in edit mode. -Iteration step by default is 1.

    -
    -https://raw.githubusercontent.com/OCA/web/16.0/web_widget_numeric_step/static/description/add_two_buttons.png -
    +

    In your xml view, add widget="numeric_step" This will add the 2 +buttons “+” and “-” just next to the input field in edit mode. Iteration +step by default is 1.

    +

    image1

    Optional

    -

    Add an option to choose the step iteration and limits (min and max values).

    +

    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
    @@ -404,26 +407,24 @@ Iteration step by default is 1.

  • step > Amount to increase/decrease (default: 1.0)
  • min > Min. value allowed (default: no limit)
  • max > Max. value allowed (default: no limit)
  • -
  • auto_select > Select the content when the element get focus (default: False)
  • +
  • auto_select > Select the content when the element get focus (default: +False)
  • placeholder > Define the placeholder text (default: None)

Examples

Iteration with 0.25 step, min to -1 and max to 10.

-

Start to increment with button, continue incrementing with scrolling mouse.

-
-https://raw.githubusercontent.com/OCA/web/16.0/web_widget_numeric_step/static/description/step0,25andlimits.gif -
+

Start to increment with button, continue incrementing with scrolling +mouse.

+

image2

Iteration with 10 step, max limit 15, placeholder with onchange

-
-https://raw.githubusercontent.com/OCA/web/16.0/web_widget_numeric_step/static/description/step10_limit15_placeholder117_with_onchange.gif -
+

image3

Bug Tracker

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 to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -455,13 +456,15 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

Current maintainers:

rafaelbn yajo

-

This module is part of the OCA/web project on GitHub.

+

This module is part of the OCA/web project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.