summaryrefslogtreecommitdiff
path: root/addons/website/static/src/snippets/s_timeline/options.js
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/website/static/src/snippets/s_timeline/options.js
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/website/static/src/snippets/s_timeline/options.js')
-rw-r--r--addons/website/static/src/snippets/s_timeline/options.js32
1 files changed, 32 insertions, 0 deletions
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($('<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');
+ },
+});
+});