diff --git a/addons/website_forum/static/src/js/tours/website_forum.js b/addons/website_forum/static/src/js/tours/website_forum.js index 0b5442db3dc6d..dc727ac58a61d 100644 --- a/addons/website_forum/static/src/js/tours/website_forum.js +++ b/addons/website_forum/static/src/js/tours/website_forum.js @@ -39,8 +39,8 @@ auto: true, }, { - trigger: "a:contains(\"Answer\").collapsed", - content: _t("Click to answer."), + trigger: "a:contains(\"Reply\").collapsed", + content: _t("Click to reply."), position: "bottom", }, { diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index 80904576e3659..2aa190ae24a96 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -18,6 +18,7 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ 'click .karma_required': '_onKarmaRequiredClick', 'mouseenter .o_js_forum_tag_follow': '_onTagFollowBoxMouseEnter', 'mouseleave .o_js_forum_tag_follow': '_onTagFollowBoxMouseLeave', + "click .o_js_forum_tag_follow": "_onTagFollowClick", 'mouseenter .o_forum_user_info': '_onUserInfoMouseEnter', 'mouseleave .o_forum_user_info': '_onUserInfoMouseLeave', 'mouseleave .o_forum_user_bio_expand': '_onUserBioExpandMouseLeave', @@ -78,6 +79,7 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ } } }, + createSearchChoicePosition: "bottom", formatResult: function (term) { if (term.isNew) { return 'New ' + escape(term.text); @@ -303,6 +305,16 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ _onTagFollowBoxMouseLeave: function (ev) { $(ev.currentTarget).find('.o_forum_tag_follow_box').stop().fadeOut().css('display', 'none'); }, + /** + * @private + * @param {Event} ev + */ + _onTagFollowClick: function (ev) { + const closestBtn = ev.target.closest("button"); + if (closestBtn) { + ev.currentTarget.querySelector(".o_js_forum_tag_link").classList.toggle("text-muted"); + } + }, /** * @private * @param {Event} ev diff --git a/addons/website_forum/static/src/scss/website_forum.scss b/addons/website_forum/static/src/scss/website_forum.scss index f3f23af1ca61b..47b6eb4c9b649 100644 --- a/addons/website_forum/static/src/scss/website_forum.scss +++ b/addons/website_forum/static/src/scss/website_forum.scss @@ -77,7 +77,7 @@ $-forum-sidebar-width: map-get($container-max-widths, sm) / 2; } .o_wforum_index_entry_title a:visited span { - color: lighten($body-color, 50%); + color: lighten($body-color, 25%); } .btn[aria-expanded="true"] { @@ -115,7 +115,7 @@ $-forum-sidebar-width: map-get($container-max-widths, sm) / 2; max-height: 100%; &.o_expand { - .o_wforum_expand_toggle { + .o_wforum_expand_toggle::before { content:'\f066'; } @@ -168,8 +168,25 @@ $-forum-sidebar-width: map-get($container-max-widths, sm) / 2; } } - textarea.o_wysiwyg_loader + .note-editor { - border: 0; + textarea.o_wysiwyg_loader { + // Prevent background display inside the wysiwyg loader + background: none !important; + + .note-editor { + border: 0; + } + } + + .o_wforum_question > .post_content_wrapper { + animation: fade-out-background-color 2s ease-in-out; + } + + @keyframes fade-out-background-color { + 0% { + background-color: $info; + } + 100% { + background-color: transparent; + } } .o_wforum_answer { diff --git a/addons/website_forum/static/tests/tours/website_forum_question.js b/addons/website_forum/static/tests/tours/website_forum_question.js index e5f504ce861ad..bc571f393b236 100644 --- a/addons/website_forum/static/tests/tours/website_forum_question.js +++ b/addons/website_forum/static/tests/tours/website_forum_question.js @@ -37,8 +37,8 @@ registry.category("web_tour.tours").add('forum_question', { trigger: ".modal-header button.btn-close", }, { - trigger: "a:contains(\"Answer\").collapsed", - content: "Click to answer.", + trigger: "a:contains(\"Reply\").collapsed", + content: "Click to reply.", position: "bottom", }, { diff --git a/addons/website_forum/views/forum_forum_templates.xml b/addons/website_forum/views/forum_forum_templates.xml index 5ae739b72178e..3ee4b57d9f559 100644 --- a/addons/website_forum/views/forum_forum_templates.xml +++ b/addons/website_forum/views/forum_forum_templates.xml @@ -93,7 +93,22 @@ - Tip: consider adding an example. +
+ Tip: + +
@@ -167,7 +182,22 @@