diff options
| author | qsm-odoo <qsm@odoo.com> | 2016-10-10 11:09:16 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2016-10-10 12:08:27 +0200 |
| commit | f242721eb0cb73dc791380beff3ca150c100b2af (patch) | |
| tree | a00a377f7a2b0ccf99e45096004c94f881eabc44 /addons/website/static/src/js/website.snippets.animation.js | |
| parent | e2ede31238e9c496f26360fafa1c71bbd90d30fc (diff) | |
[FIX] website: fix FAQ Roller opening on old apple devices
On old apple devices (IPad 2, IPhone 4, ...), the FAQ Roller could not
be opened on click. This is because the snippet does not use standard
bootstrap correctly and put the toggle on a <div/> element instead of
a <a/> element.
This fix forces an empty click handler on these <div/>, which allows
standard bootstrap to work.
Diffstat (limited to 'addons/website/static/src/js/website.snippets.animation.js')
| -rw-r--r-- | addons/website/static/src/js/website.snippets.animation.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/addons/website/static/src/js/website.snippets.animation.js b/addons/website/static/src/js/website.snippets.animation.js index 6702448fd58..5de8d9ce1ac 100644 --- a/addons/website/static/src/js/website.snippets.animation.js +++ b/addons/website/static/src/js/website.snippets.animation.js @@ -156,6 +156,20 @@ animation.registry.ul = animation.Class.extend({ }, }); +/** + * This is a fix for apple device (<= IPhone 4, IPad 2) + * Standard bootstrap requires data-toggle='collapse' element to be <a/> tags. Unfortunatly one snippet uses a + * <div/> tag instead. The fix forces an empty click handler on these div, which allows standard bootstrap to work. + * + * This should be removed in a future odoo snippets refactoring. + */ +animation.registry._fix_apple_collapse = animation.Class.extend({ + selector: ".s_faq_collapse [data-toggle='collapse']", + start: function () { + this.$target.off("click._fix_apple_collapse").on("click._fix_apple_collapse", function () {}); + }, +}); + /* ------------------------------------------------------------------------- Gallery Animation |
