[FIX] website_forum: use same dom for all icon
Before this commit we try to imitate the btn with the form (eg. flag button) But if you style in a theme your button and not the form (like odoo.com) you will see a difference between the 4 icons.
This commit is contained in:
@@ -261,7 +261,7 @@ sAnimations.registry.websiteForum = sAnimations.Class.extend({
|
||||
ev.preventDefault();
|
||||
var $link = $(ev.currentTarget);
|
||||
this._rpc({
|
||||
route: $link.data('href') || ($link.attr('href') !== '#' && $link.attr('href')) || $link.attr('action'),
|
||||
route: $link.data('href') || ($link.attr('href') !== '#' && $link.attr('href')) || $link.closest('form').attr('action'),
|
||||
}).then(function (data) {
|
||||
if (data.error) {
|
||||
var $warning;
|
||||
|
||||
@@ -756,11 +756,14 @@
|
||||
<t t-set="icon" t-value="'fa-check'"/>
|
||||
<t t-set="karma" t-value="not question.can_moderate and question.forum_id.karma_moderate or 0"/>
|
||||
</t>
|
||||
<a t-if="question.active" href="#" t-attf-style="#{not question.can_flag and 'display:none;' or ''}"
|
||||
t-attf-class="flag px-3 py-2 #{not question.can_flag and 'karma_required' or ''}"
|
||||
t-attf-data-karma="#{not question.can_flag and question.forum_id.karma_flag or 0}"
|
||||
t-attf-data-href="/forum/#{slug(forum)}/post/#{slug(question)}/flag" title="Flag"
|
||||
><i t-attf-class="fa #{not question.can_flag and 'karma_required fa-flag-o' or 'fa-flag'}"/>
|
||||
<a t-if="question.active" href="#" t-call="website_forum.link_button">
|
||||
<t t-set="url" t-value="'/forum/' + slug(forum) +'/post/' + slug(question) + '/flag'"/>
|
||||
<t t-set="title">Flag</t>
|
||||
<t t-set="inDropdown" t-value="False"/>
|
||||
<t t-set="icon" t-value="not question.can_flag and 'fa-flag-o' or 'fa-flag'"/>
|
||||
<t t-set="karma" t-value="not question.can_flag and question.forum_id.karma_flag or 0"/>
|
||||
<t t-set="classes" t-value="'flag'"/>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user