mirror of https://github.com/OCA/web.git
[FIX]: Change README.rst according to OCA template
[IMP]: New module icon [ADD]: Screenshot / images to give an visual overviewpull/357/head
parent
720a5eb08d
commit
83117dc8eb
|
@ -1,55 +1,72 @@
|
|||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:alt: License: AGPL-3
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
|
||||
==============================
|
||||
Timepicker widget in form view
|
||||
==============================
|
||||
|
||||
This module defines a timepicker widget, to be used with float fields
|
||||
or (function) fields. Use ``widget='timepicker'`` in your form view
|
||||
definition. It can be use as a replacement for the standard float_time widget.
|
||||
===============================
|
||||
Timepicker widget in form views
|
||||
===============================
|
||||
|
||||
If you use the widget with a field record, the input field has the following default
|
||||
timepicker options:
|
||||
This module provides a timepicker widget for float fields.
|
||||
It can be used as a replacement for the standard float_time widget in form views.
|
||||
|
||||
* By default the possible selection is based on 15 minute interval (step: 15)
|
||||
* By default 24 hour mode with H:i format (timeFormat: 'H:i')
|
||||
* By default scroll selection starts at current time (scrollDefault: 'now')
|
||||
|
||||
The widget uses the jquery.timepicker plugin by Jon Thornton
|
||||
|picker|
|
||||
|
||||
|
||||
The widget has the following default timepicker options:
|
||||
|
||||
* the possible selection is based on 15 minute interval (step: 15)
|
||||
* 24 hour mode in H:i format (timeFormat: 'H:i')
|
||||
* scroll selection starts at current time (scrollDefault: 'now')
|
||||
|
||||
|
||||
|formview|
|
||||
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
This module defines a new widget type for form views input fileds.
|
||||
Set the attribute ``widget=timepicker`` in a ``field`` tag in a form view.
|
||||
|
||||
You can pass custom options through the "timepicker" field in the options attribute:
|
||||
In the form view declaration, put widget='timepicker' attribute in the field tag::
|
||||
|
||||
...
|
||||
<field name="mytimefieldname" `widget=timepicker`` options="{'step': '30', 'disableTextInput': false}"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="View name">
|
||||
...
|
||||
<field name="name"/>
|
||||
<field name="mytimefieldname" widget="timepicker"/>
|
||||
...
|
||||
</form>
|
||||
</field>
|
||||
...
|
||||
|
||||
See the available options at https://github.com/jonthornton/jquery-timepicker#timepicker-plugin-for-jquery.
|
||||
Additional jquery-timepicker plugin options can be specified by an options attribute::
|
||||
|
||||
...
|
||||
<field name="mytimefieldname" widget="timepicker" options="{'step': '30', 'disableTextInput': false}"/>
|
||||
...
|
||||
|
||||
See the available options at `jquery-timepicker <https://github.com//jonthornton//jquery-timepicker#timepicker-plugin-for-jquery>`_.
|
||||
|
||||
.. |picker| image:: ./images/picker.png
|
||||
.. |formview| image:: ./images/form_view.png
|
||||
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
* Absolutely no sanity check or validation on options.
|
||||
* No validation on options.
|
||||
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Jon Thornton (https://cdnjs.com/libraries/jquery-timepicker)
|
||||
jquery.timepicker plugin - This software is made available under the open source MIT License. © 2014 Jon Thornton and contributors
|
||||
* The module uses the `jquery-timepicker <https://cdnjs.com//libraries//jquery-timepicker>`_ plugin by Jon Thornton. This software is made available under the open source MIT License. © 2014 Jon Thornton and contributors
|
||||
|
||||
Odoo Community Association (OCA)
|
||||
* Odoo Community Association (OCA)
|
||||
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Michael Fried
|
||||
* Michael Fried <Michael.Fried@vividlab.de>
|
||||
|
|
|
@ -1,32 +1,29 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Michael Fried @ Vividlab (<http://www.vividlab.de>)
|
||||
# © 2016 Vividlab (<http://www.vividlab.de>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Web Timepicker Widget',
|
||||
'version': '9.0.1.0.0',
|
||||
'author': 'Michael Fried@Vividlab, Odoo Community Association (OCA)',
|
||||
'license': 'AGPL-3',
|
||||
'category': 'Web',
|
||||
'website': 'https://github.com/OCA/Web',
|
||||
|
||||
'depends': [
|
||||
'web'
|
||||
],
|
||||
'css': [
|
||||
'static/src/lib/jquery.timerpicker/jquery.timepicker.css',
|
||||
'static/src/css/web_widget_timepicker.css'
|
||||
],
|
||||
'js': [
|
||||
'static/src/lib/jquery.timerpicker/jquery.timepicker.js',
|
||||
'static/src/js/web_widget_timepicker.js',
|
||||
],
|
||||
'qweb': [
|
||||
'static/src/xml/web_widget_timepicker.xml'
|
||||
],
|
||||
'data': [
|
||||
'views/web_widget_timepicker_assets.xml'
|
||||
],
|
||||
|
||||
"name": "Web Timepicker Widget",
|
||||
"version": "9.0.1.0.0",
|
||||
"author": "VividLab, Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"category": "Web",
|
||||
"website": "http://www.vividlab.de",
|
||||
"installable": True,
|
||||
"depends": [
|
||||
"web",
|
||||
],
|
||||
"css": [
|
||||
"static/src/lib/jquery.timerpicker/jquery.timepicker.css",
|
||||
"static/src/css/web_widget_timepicker.css",
|
||||
],
|
||||
"js": [
|
||||
"static/src/lib/jquery.timerpicker/jquery.timepicker.js",
|
||||
"static/src/js/web_widget_timepicker.js",
|
||||
],
|
||||
"data": [
|
||||
"views/web_widget_timepicker_assets.xml",
|
||||
],
|
||||
"qweb": [
|
||||
"static/src/xml/web_widget_timepicker.xml",
|
||||
]
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue