mirror of https://github.com/OCA/web.git
commit
177fe61e0f
|
@ -0,0 +1 @@
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Copyright 2021 Quentin DUPONT
|
||||||
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||||
|
{
|
||||||
|
"name": "Web Widget DatePicker Full Options",
|
||||||
|
"version": "12.0.1.0.0",
|
||||||
|
"author": "GRAP, "
|
||||||
|
"Odoo Community Association (OCA)",
|
||||||
|
"license": "AGPL-3",
|
||||||
|
"category": "Web",
|
||||||
|
"website": "https://github.com/OCA/web/",
|
||||||
|
'installable': True,
|
||||||
|
"depends": [
|
||||||
|
"web",
|
||||||
|
],
|
||||||
|
"data": [
|
||||||
|
"views/web_widget_datepicker_fulloptions_assets.xml",
|
||||||
|
],
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
* `GRAP <http://www.grap.coop>`_:
|
||||||
|
|
||||||
|
* Quentin DUPONT <quentin.dupont@grap.coop>
|
|
@ -0,0 +1,5 @@
|
||||||
|
This module enables full options in datepicker used in date fields :
|
||||||
|
- Choose today's date in one click
|
||||||
|
- Three buttons enabled : show today, clear field, close datepicker
|
||||||
|
|
||||||
|
.. figure:: ../static/description/change.png
|
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
|
@ -0,0 +1,21 @@
|
||||||
|
/* Copyright 2021 Quentin DUPONT
|
||||||
|
* License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */
|
||||||
|
odoo.define('web_widget_datepicker_fulloptions.datepicker_fulloptions', function (require) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var DatePicker = require('web.datepicker');
|
||||||
|
|
||||||
|
var DatePickerFullOptions = DatePicker.DateWidget.include({
|
||||||
|
/**
|
||||||
|
* @override
|
||||||
|
*/
|
||||||
|
init: function (parent, options) {
|
||||||
|
this._super(parent, options);
|
||||||
|
this.options.useCurrent = true;
|
||||||
|
this.options.buttons.showToday = true;
|
||||||
|
this.options.buttons.showClear = true;
|
||||||
|
this.options.buttons.showClose = true;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<odoo>
|
||||||
|
<template id="web_widget_datepicker_fulloptions_assets_backend"
|
||||||
|
name="web_widget_datepicker_fulloptions_assets"
|
||||||
|
inherit_id="web.assets_backend">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
<script type="text/javascript"
|
||||||
|
src="/web_widget_datepicker_fulloptions/static/src/js/web_widget_datepicker_fulloptions.js"/>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
</odoo>
|
Loading…
Reference in New Issue