diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/website/static/src/snippets/s_showcase/options.js | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/website/static/src/snippets/s_showcase/options.js')
| -rw-r--r-- | addons/website/static/src/snippets/s_showcase/options.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/addons/website/static/src/snippets/s_showcase/options.js b/addons/website/static/src/snippets/s_showcase/options.js new file mode 100644 index 00000000..b870393d --- /dev/null +++ b/addons/website/static/src/snippets/s_showcase/options.js @@ -0,0 +1,19 @@ +odoo.define('website.s_showcase_options', function (require) { +'use strict'; + +const options = require('web_editor.snippets.options'); + +options.registry.Showcase = options.Class.extend({ + /** + * @override + */ + onMove: function () { + const $showcaseCol = this.$target.parent().closest('.row > div'); + const isLeftCol = $showcaseCol.index() <= 0; + const $title = this.$target.children('.s_showcase_title'); + $title.toggleClass('flex-lg-row-reverse', isLeftCol); + $showcaseCol.find('.s_showcase_icon.ml-3').removeClass('ml-3').addClass('ml-lg-3'); // For compatibility with old version + $title.find('.s_showcase_icon').toggleClass('mr-lg-0 ml-lg-3', isLeftCol); + }, +}); +}); |
