mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
This commit fixes redraw issues when setting a `mode` attribute in the `timeline` view tag. This mode specifies a default scale one would want to set; same as when clicking on Day/Week/Month buttons at the top of the view. Initial rendering had issues here because data was loaded too soon, before the timeline component was rendered/ready. The fix is to load data into the component only after initial redraw event, called `changed` (see <https://visjs.github.io/vis-timeline/docs/timeline/#Events>). There was old code attempting to call `on_scale_xxx_clicked` methods at load time to simulate clicks on these Day/Week/Month buttons, but these methods have been renamed so this code is no longer working. This commit also removes the `current_window` instance variable, not needed and actually confusing as the timeline component already maintains its own start/end information (which we can query with `timeline.getWindow()`).
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
{
|
|
"name": "Web timeline",
|
|
"summary": "Interactive visualization chart to show events in time",
|
|
"version": "16.0.1.1.4",
|
|
"development_status": "Production/Stable",
|
|
"author": "ACSONE SA/NV, "
|
|
"Tecnativa, "
|
|
"Monk Software, "
|
|
"Onestein, "
|
|
"Trobz, "
|
|
"Odoo Community Association (OCA)",
|
|
"category": "web",
|
|
"license": "AGPL-3",
|
|
"website": "https://github.com/OCA/web",
|
|
"depends": ["web"],
|
|
"data": [],
|
|
"demo": ["demo/ir_cron_view.xml"],
|
|
"maintainers": ["tarteo"],
|
|
"application": False,
|
|
"installable": True,
|
|
"assets": {
|
|
"web.assets_backend": [
|
|
"web_timeline/static/src/scss/web_timeline.scss",
|
|
"web_timeline/static/src/js/timeline_view.js",
|
|
"web_timeline/static/src/js/timeline_renderer.js",
|
|
"web_timeline/static/src/js/timeline_controller.esm.js",
|
|
"web_timeline/static/src/js/timeline_model.js",
|
|
"web_timeline/static/src/js/timeline_canvas.js",
|
|
"web_timeline/static/src/xml/web_timeline.xml",
|
|
],
|
|
},
|
|
}
|