mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[MIG] web_responsive: Migration to 17.0
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
/** @odoo-module **/
|
||||
/* Copyright 2023 Taras Shabaranskyi
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
import {AppsMenuCanonicalSearchBar} from "@web_responsive/components/menu_canonical_searchbar/searchbar.esm";
|
||||
import {AppsMenuOdooSearchBar} from "@web_responsive/components/menu_odoo_searchbar/searchbar.esm";
|
||||
import {AppsMenuFuseSearchBar} from "@web_responsive/components/menu_fuse_searchbar/searchbar.esm";
|
||||
import {Component} from "@odoo/owl";
|
||||
import {session} from "@web/session";
|
||||
|
||||
export class AppsMenuSearchBar extends Component {
|
||||
setup() {
|
||||
super.setup();
|
||||
this.searchType = session.apps_menu.search_type || "canonical";
|
||||
}
|
||||
}
|
||||
|
||||
Object.assign(AppsMenuSearchBar, {
|
||||
props: {},
|
||||
template: "web_responsive.AppsMenuSearchBar",
|
||||
components: {
|
||||
AppsMenuOdooSearchBar,
|
||||
AppsMenuCanonicalSearchBar,
|
||||
AppsMenuFuseSearchBar,
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Copyright 2018 Tecnativa - Jairo Llopis
|
||||
* Copyright 2021 ITerra - Sergey Shebanin
|
||||
* Copyright 2023 Taras Shabaranskyi
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
.o_grid_apps_menu .search-container {
|
||||
width: 100%;
|
||||
|
||||
.search-input {
|
||||
display: flex;
|
||||
justify-items: center;
|
||||
gap: 0.75rem;
|
||||
box-shadow: $app-menu-box-shadow;
|
||||
border-radius: 4px;
|
||||
padding: 0.5rem 0.75rem;
|
||||
background-color: white;
|
||||
|
||||
.search-icon {
|
||||
color: $app-menu-text-color;
|
||||
font-size: 1.5rem;
|
||||
padding-top: 1px;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
height: 1.75rem;
|
||||
background: none;
|
||||
border: none;
|
||||
color: $app-menu-text-color;
|
||||
display: block;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
|
||||
&::placeholder {
|
||||
color: $app-menu-text-color;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_command_palette_search .form-control {
|
||||
&:focus {
|
||||
box-shadow: unset;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- Copyright 2018 Tecnativa - Jairo Llopis
|
||||
Copyright 2021 ITerra - Sergey Shebanin
|
||||
Copyright 2023 Onestein - Anjeel Haria
|
||||
Copyright 2023 Taras Shabaranskyi
|
||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
|
||||
<templates>
|
||||
<!-- Search bar -->
|
||||
<t t-name="web_responsive.AppsMenuSearchBar">
|
||||
<AppsMenuCanonicalSearchBar t-if="searchType==='canonical'" />
|
||||
<AppsMenuOdooSearchBar t-if="searchType==='command_palette'" />
|
||||
<AppsMenuFuseSearchBar t-if="searchType==='fuse'" />
|
||||
</t>
|
||||
</templates>
|
||||
Reference in New Issue
Block a user