diff options
| author | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-06-17 14:48:40 +0000 |
|---|---|---|
| committer | Laurent Stukkens (LTU) <ltu@odoo.com> | 2020-08-18 17:40:25 +0000 |
| commit | 0e7640b5f22d2bea04bbe22d3189cff7e03af545 (patch) | |
| tree | b5c388d2bd5ab95239edba0547c44371afda1ff7 /addons/website/static/src/snippets/s_dynamic_snippet_carousel/options.js | |
| parent | 8b6985eeed0a15ec673d96299b3ed331c684e62d (diff) | |
[IMP] website, website_sale: add dynamic snippets
* Implement new snippets that allow the user to choose a filter
and a template.
Three snippets have been created:
- Dynamic Snippet: Displays the data in a grid format
- Dynamic Carousel: Displays the date in a carousel
- Dynamic Products: Let the user pick a product category and
displays the products in a carousel
task-2276740
PR #53175
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website/static/src/snippets/s_dynamic_snippet_carousel/options.js')
| -rw-r--r-- | addons/website/static/src/snippets/s_dynamic_snippet_carousel/options.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/addons/website/static/src/snippets/s_dynamic_snippet_carousel/options.js b/addons/website/static/src/snippets/s_dynamic_snippet_carousel/options.js new file mode 100644 index 00000000000..cb9a3cf566a --- /dev/null +++ b/addons/website/static/src/snippets/s_dynamic_snippet_carousel/options.js @@ -0,0 +1,28 @@ +odoo.define('website.s_dynamic_snippet_carousel_options', function (require) { +'use strict'; + +const options = require('web_editor.snippets.options'); +const s_dynamic_snippet_options = require('website.s_dynamic_snippet_options'); + +const dynamicSnippetCarouselOptions = s_dynamic_snippet_options.extend({ + + //-------------------------------------------------------------------------- + // Options + //-------------------------------------------------------------------------- + + /** + * + * @override + * @private + */ + _setOptionsDefaultValues: function () { + this._super.apply(this, arguments); + this._setOptionValue('carouselInterval', '5000'); + } + +}); + +options.registry.dynamic_snippet_carousel = dynamicSnippetCarouselOptions; + +return dynamicSnippetCarouselOptions; +}); |
