diff --git a/website_search_header/README.rst b/website_search_header/README.rst index 0b0ef03b18..5d037ddc9d 100644 --- a/website_search_header/README.rst +++ b/website_search_header/README.rst @@ -7,7 +7,7 @@ Website Search in Header !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:d16cfb3e2bf08f7b6803f08d17d302e2ee86b04c1e4296db2ea051d1cb3dec43 + !! source digest: sha256:0190640b3113a806206eba0406254bfdb594eb50e99f4f870b3815401ff7621f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -28,7 +28,7 @@ Website Search in Header |badge1| |badge2| |badge3| |badge4| |badge5| -This module adds a search bar in the header of your website. +This module adds a search bar in the header of your website **Table of contents** @@ -40,6 +40,16 @@ Usage On desktop, the user will be able to show and hide the search input in the website header. While on mobile our searchbox will behave by default. +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + Credits ======= @@ -47,11 +57,11 @@ Authors ~~~~~~~ * ForgeFlow -* Ooops Contributors ~~~~~~~~~~~~ + * Jordi Ballester * Elmer GarcĂ­a diff --git a/website_search_header/static/description/index.html b/website_search_header/static/description/index.html index 67d665feeb..36f95548c4 100644 --- a/website_search_header/static/description/index.html +++ b/website_search_header/static/description/index.html @@ -367,10 +367,10 @@

Website Search in Header

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:d16cfb3e2bf08f7b6803f08d17d302e2ee86b04c1e4296db2ea051d1cb3dec43 +!! source digest: sha256:0190640b3113a806206eba0406254bfdb594eb50e99f4f870b3815401ff7621f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/website Translate me on Weblate Try me on Runboat

-

This module allows to restrict access to specific website pages to logged users.

+

This module adds a search bar in the header of your website

Table of contents

    @@ -386,8 +386,7 @@

    Website Search in Header

Usage

-

Website > Configuration > Authorization required URLs: select a website and enter a relative path, eg: /shop

-

When public user will try to access mywebsite.com/shop or any of its child pages, they will be requested to login.

+

On desktop, the user will be able to show and hide the search input in the website header. While on mobile our searchbox will behave by default.

Bug Tracker

@@ -409,7 +408,7 @@

Authors

diff --git a/website_search_header/static/src/js/website.js b/website_search_header/static/src/js/website.js index 76b6c44aee..9a3d223733 100644 --- a/website_search_header/static/src/js/website.js +++ b/website_search_header/static/src/js/website.js @@ -27,18 +27,19 @@ odoo.define("website_search_header.search_header", function (require) { }, desktopSearch: function () { - if ($(".o_search_header").hasClass("d-lg-none")) { - $(".o_search_header").removeClass("d-lg-none"); - $("#search_btn_toggle_search i").removeClass("oi-search"); - $("#search_btn_toggle_search i").addClass("oi-close"); - $("#div_search_header").removeClass("ms-lg-0"); - $("#div_search_button").removeClass("ms-lg-2"); - } else { + if (!$(".o_search_header").hasClass("d-lg-none")) { $(".o_search_header").addClass("d-lg-none"); $("#search_btn_toggle_search i").removeClass("oi-close"); $("#search_btn_toggle_search i").addClass("oi-search"); $("#div_search_header").addClass("ms-lg-0"); $("#div_search_button").addClass("ms-lg-2"); + } else { + $(".o_search_header").removeClass("d-lg-none"); + $("#search_btn_toggle_search i").removeClass("oi-search"); + $("#search_btn_toggle_search i").addClass("oi-close"); + $("#div_search_header").removeClass("ms-lg-0"); + $("#div_search_button").removeClass("ms-lg-2"); + $("input.oe_search_box").focus(); } }, diff --git a/website_search_header/views/templates.xml b/website_search_header/views/templates.xml index a18293accb..973eecba23 100644 --- a/website_search_header/views/templates.xml +++ b/website_search_header/views/templates.xml @@ -12,22 +12,19 @@