Browse Source
[FIX]: Change README.rst according to OCA template
[FIX]: Change README.rst according to OCA template
[IMP]: New module icon [ADD]: Screenshot / images to give an visual overviewpull/357/head
docmfried
9 years ago
5 changed files with 61 additions and 47 deletions
-
61web_widget_timepicker/README.rst
-
45web_widget_timepicker/__openerp__.py
-
BINweb_widget_timepicker/images/form_view.png
-
BINweb_widget_timepicker/images/picker.png
-
BINweb_widget_timepicker/static/description/icon.png
@ -1,55 +1,72 @@ |
|||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg |
||||
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
:alt: License: AGPL-3 |
: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 |
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. |
|
||||
|
In the form view declaration, put widget='timepicker' attribute in the field tag:: |
||||
|
|
||||
You can pass custom options through the "timepicker" field in the options attribute: |
|
||||
|
... |
||||
|
<field name="arch" type="xml"> |
||||
|
<form string="View name"> |
||||
|
... |
||||
|
<field name="name"/> |
||||
|
<field name="mytimefieldname" widget="timepicker"/> |
||||
|
... |
||||
|
</form> |
||||
|
</field> |
||||
|
... |
||||
|
|
||||
|
Additional jquery-timepicker plugin options can be specified by an options attribute:: |
||||
|
|
||||
... |
... |
||||
<field name="mytimefieldname" `widget=timepicker`` options="{'step': '30', 'disableTextInput': false}"/> |
|
||||
|
<field name="mytimefieldname" widget="timepicker" options="{'step': '30', 'disableTextInput': false}"/> |
||||
... |
... |
||||
|
|
||||
See the available options at https://github.com/jonthornton/jquery-timepicker#timepicker-plugin-for-jquery. |
|
||||
|
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 |
Known issues / Roadmap |
||||
====================== |
====================== |
||||
|
|
||||
* Absolutely no sanity check or validation on options. |
|
||||
|
* No validation on options. |
||||
|
|
||||
|
|
||||
Credits |
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 |
Contributors |
||||
------------ |
------------ |
||||
|
|
||||
* Michael Fried |
|
||||
|
* Michael Fried <Michael.Fried@vividlab.de> |
@ -1,32 +1,29 @@ |
|||||
# -*- coding: utf-8 -*- |
# -*- 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). |
# 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' |
|
||||
|
"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", |
||||
], |
], |
||||
'js': [ |
|
||||
'static/src/lib/jquery.timerpicker/jquery.timepicker.js', |
|
||||
'static/src/js/web_widget_timepicker.js', |
|
||||
|
"css": [ |
||||
|
"static/src/lib/jquery.timerpicker/jquery.timepicker.css", |
||||
|
"static/src/css/web_widget_timepicker.css", |
||||
], |
], |
||||
'qweb': [ |
|
||||
'static/src/xml/web_widget_timepicker.xml' |
|
||||
|
"js": [ |
||||
|
"static/src/lib/jquery.timerpicker/jquery.timepicker.js", |
||||
|
"static/src/js/web_widget_timepicker.js", |
||||
], |
], |
||||
'data': [ |
|
||||
'views/web_widget_timepicker_assets.xml' |
|
||||
|
"data": [ |
||||
|
"views/web_widget_timepicker_assets.xml", |
||||
], |
], |
||||
|
|
||||
"installable": True, |
|
||||
|
"qweb": [ |
||||
|
"static/src/xml/web_widget_timepicker.xml", |
||||
|
] |
||||
} |
} |
After Width: 380 | Height: 178 | Size: 4.2 KiB |
After Width: 101 | Height: 177 | Size: 3.8 KiB |
Before Width: 128 | Height: 128 | Size: 9.2 KiB After Width: 256 | Height: 256 | Size: 13 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue