With [1], not all overlays are displayed anymore but we rather show the parent one in some cases. The timeline cards were considered as one of those cases while it should not, as it prevents to use the overlay buttons allowing to switch the cards order. [1]: https://github.com/odoo/odoo/commit/9bbe5be3fb0d995374a369851df3641979d8e553 Discovered while working on task-2431484 closes odoo/odoo#73515 X-original-commit: 26708e168c717ae7e3a29c7705c80679b8e45f7d Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
35 lines
1.0 KiB
JavaScript
35 lines
1.0 KiB
JavaScript
odoo.define('website.s_timeline_options', function (require) {
|
|
'use strict';
|
|
|
|
const options = require('web_editor.snippets.options');
|
|
|
|
options.registry.Timeline = options.Class.extend({
|
|
displayOverlayOptions: true,
|
|
|
|
/**
|
|
* @override
|
|
*/
|
|
start: function () {
|
|
var $buttons = this.$el.find('we-button.o_we_overlay_opt');
|
|
var $overlayArea = this.$overlay.find('.o_overlay_options_wrap');
|
|
$overlayArea.append($('<div/>').append($buttons));
|
|
|
|
return this._super(...arguments);
|
|
},
|
|
|
|
//--------------------------------------------------------------------------
|
|
// Options
|
|
//--------------------------------------------------------------------------
|
|
|
|
/**
|
|
* Moves the card to the right/left.
|
|
*
|
|
* @see this.selectClass for parameters
|
|
*/
|
|
timelineCard: function (previewMode, widgetValue, params) {
|
|
const $timelineRow = this.$target.closest('.s_timeline_row');
|
|
$timelineRow.toggleClass('flex-row-reverse flex-row');
|
|
},
|
|
});
|
|
});
|