[FIX] website_forum, *: remove underline on icon buttons hovering
* portal In our default theme, when hovering links (or .btn-link elements), the text is underlined. This effect is however not desired for links which contain only an icon, especially in the forum. This commit removes that underline effect for all icon buttons in the frontend (at least by default, this is a theme choice). Icon buttons are defined as link or .btn-link elements which directly use the "fa" class on them. This commit also solves the flag button of the forum which did not have any effect because of bad bootstrap use. closes odoo/odoo#29434
This commit is contained in:
@@ -87,6 +87,13 @@ ul.flex-column > li > a {
|
||||
padding: 2px 15px;
|
||||
}
|
||||
|
||||
// Link without text but an icon
|
||||
a, .btn-link {
|
||||
&.fa:hover {
|
||||
text-decoration: $o-theme-btn-icon-hover-decoration;
|
||||
}
|
||||
}
|
||||
|
||||
// Odoo options classes
|
||||
.jumbotron {
|
||||
margin-bottom: 0;
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
$o-portal-default-body-bg: #FCFCFC;
|
||||
|
||||
$o-theme-btn-icon-hover-decoration: none;
|
||||
|
||||
@@ -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('action'),
|
||||
route: $link.data('href') || ($link.attr('href') !== '#' && $link.attr('href')) || $link.attr('action'),
|
||||
}).then(function (data) {
|
||||
if (data.error) {
|
||||
var $warning;
|
||||
|
||||
@@ -756,11 +756,11 @@
|
||||
<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" t-attf-style="#{not question.can_flag and 'display:none;' or ''}"
|
||||
<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="text-primary fa #{not question.can_flag and 'karma_required fa-flag-o' or 'fa-flag'}"/>
|
||||
><i t-attf-class="fa #{not question.can_flag and 'karma_required fa-flag-o' or 'fa-flag'}"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -982,7 +982,6 @@
|
||||
<div class="mt-2"><span t-field="message.body" class="oe_no_empty text-dark"/></div>
|
||||
</small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="css_editable_mode_hidden">
|
||||
<form t-attf-id="comment#{ object._name.replace('.','') + '-' + str(object.id) }" class="collapse oe_comment_grey js_website_submit_form"
|
||||
|
||||
Reference in New Issue
Block a user