Skip to content

Commit

Permalink
[UPDATE] Fix separation between searchbox and icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ElmerGForgeFlow authored and JordiBForgeFlow committed Nov 22, 2023
1 parent 4c06fa5 commit 1f6d30d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +0,0 @@
.o_search_header {
.form-control {
border: 2px solid white !important;
}
}
17 changes: 7 additions & 10 deletions website_search_header/views/templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,28 @@
</template>

<template id="header_search_link" name="Header Search Link">
<div t-attf-class="#{_item_class}">
<div t-attf-class="#{_item_class} ms-auto">
<a t-attf-class="d-none #{_link_class}">
</a>
<t t-call="website_search_header.global_product_search_box_input" />
</div>
<div
id="div_search_button"
t-attf-class="#{_item_class} ms-2 ms-lg-2 me-4 me-lg-0"
>
<div id="div_search_button" t-attf-class="#{_item_class} ms-2">
<a t-attf-class="d-none #{_link_class}">
</a>
<script type="text/javascript">
function test() {
if ($(".o_search_header").hasClass('d-none')) {
$(".o_search_header").removeClass('d-none');
$(".o_search_header").addClass('ms-2 ms-lg-2');
$(".o_search_header").addClass('ms-2');
$("#search_btn_toggle_search i").removeClass('oi-search');
$("#div_search_button").removeClass('ms-2 ms-lg-2');
$("#div_search_button").removeClass('ms-2');
$("#search_btn_toggle_search i").addClass('oi-close');
} else {
$(".o_search_header").addClass('d-none');
$(".o_search_header").removeClass('ms-2 ms-lg-2');
$(".o_search_header").removeClass('ms-2');
$("#search_btn_toggle_search i").removeClass('oi-close');
$("#search_btn_toggle_search i").addClass('oi-search');
$("#div_search_button").addClass('ms-2 ms-lg-2');
$("#div_search_button").addClass('ms-2');
}
}
</script>
Expand All @@ -65,7 +62,7 @@
position="before"
>
<t t-call="website_search_header.header_search_link">
<t t-set="_item_class" t-value="'nav-item mx-lg-3'" />
<t t-set="_item_class" t-value="'nav-item'" />
<t t-set="_link_class" t-value="'nav-link'" />
</t>
</xpath>
Expand Down

0 comments on commit 1f6d30d

Please sign in to comment.