Skip to content

Commit

Permalink
[FIX] website_sale: multi-image - enable first image in carousel
Browse files Browse the repository at this point in the history
Before this commit, the first thumbnail from the multi image carousel was
always disabled since there are no atribute data-slide-to.

Now we force a '0' string instead of 0 falsy value to have explicitely
data-slide-to="0" after the qweb rendering.
  • Loading branch information
JKE-be committed Apr 9, 2018
1 parent 90da0f5 commit 8decf4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/website_sale/views/templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@
<li t-if="variant_img" data-target="#o-carousel-product" data-slide-to="0" class="active">
<img class="img img-responsive js_variant_img_small" t-attf-src="/website/image/product.product/{{product.product_variant_id.id}}/image/90x90" t-att-alt="product.name"/>
</li>
<li data-target="#o-carousel-product" t-att-data-slide-to="1 if variant_img else 0" t-att-class="'' if variant_img else 'active'">
<li data-target="#o-carousel-product" t-att-data-slide-to="1 if variant_img else '0'" t-att-class="'' if variant_img else 'active'">
<img class="img img-responsive" t-attf-src="/website/image/product.template/{{product.id}}/image/90x90" t-att-alt="product.name"/>
</li>
<t t-if="len(image_ids)" t-foreach="image_ids" t-as="pimg">
Expand Down

0 comments on commit 8decf4c

Please sign in to comment.