From 3751379f1e9a4c215fb6eb898b4ccc67659b9ace Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 21:51:50 +0700 Subject: initial commit 2 --- .../static/src/snippets/s_timeline/options.js | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 addons/website/static/src/snippets/s_timeline/options.js (limited to 'addons/website/static/src/snippets/s_timeline/options.js') diff --git a/addons/website/static/src/snippets/s_timeline/options.js b/addons/website/static/src/snippets/s_timeline/options.js new file mode 100644 index 00000000..c1efa23c --- /dev/null +++ b/addons/website/static/src/snippets/s_timeline/options.js @@ -0,0 +1,32 @@ +odoo.define('website.s_timeline_options', function (require) { +'use strict'; + +const options = require('web_editor.snippets.options'); + +options.registry.Timeline = options.Class.extend({ + /** + * @override + */ + start: function () { + var $buttons = this.$el.find('we-button'); + var $overlayArea = this.$overlay.find('.o_overlay_options_wrap'); + $overlayArea.append($('
').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'); + }, +}); +}); -- cgit v1.2.3