Permalink
Browse files

[FIX] website_slides: fix UI glitch when adding like/dislike to slide

Task #1923443

Purpose
=======

When adding a like/dislike to a slide, the like/dislike counter was not properly updated.

partly closes #29901

closes #30027
  • Loading branch information...
awa-odoo committed Jan 8, 2019
1 parent 46f6a26 commit ba925fb06d07a8ff58b1e558fe1a3c3bbb205eaa
Showing with 3 additions and 3 deletions.
  1. +1 −1 addons/website_slides/static/src/js/slides.js
  2. +2 −2 addons/website_slides/views/website_slides.xml
@@ -55,7 +55,7 @@ var page_widgets = {};
if(is_public){
this.popover_alert(button, _.str.sprintf(_t('Please <a href="/web?redirect=%s">login</a> to vote this slide'), (document.URL)));
}else{
var target = button.find('.fa');
var target = button.find('.o_wslides_like_dislike_count');
if (local_storage.getItem('slide_vote_' + slide_id) !== user_id.toString()) {
ajax.jsonRpc(href, 'call', {slide_id: slide_id}).then(function (data) {
target.text(data);
@@ -462,7 +462,7 @@
tabindex="0"
data-toggle="popover">
<i class="fa fa-thumbs-up fa-1x" role="img" aria-label="Likes" title="Likes"/>
<t t-esc="slide.likes"/>
<span class="o_wslides_like_dislike_count" t-esc="slide.likes"/>
</span>
<span
class="oe_slide_js_unlike"
@@ -473,7 +473,7 @@
tabindex="0"
data-toggle="popover">
<i class="fa fa-thumbs-down fa-1x" role="img" aria-label="Dislikes" title="Dislikes"/>
<t t-esc="slide.dislikes"/>
<span class="o_wslides_like_dislike_count" t-esc="slide.dislikes"/>
</span>
</div>
</div>

0 comments on commit ba925fb

Please sign in to comment.