[REF] web: switch company menu design
This commit is contained in:
committed by
Aaron Bohy
parent
1c5553b032
commit
50fc5ff347
@@ -4,21 +4,5 @@
|
||||
> a .oe_topbar_name {
|
||||
@include o-text-overflow($max-width: 250px);
|
||||
}
|
||||
.dropdown-item {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.o_py {
|
||||
padding-top: 0.2rem !important;
|
||||
padding-bottom: 0.2rem !important;
|
||||
|
||||
&:hover {
|
||||
background-color: #e9ecef !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,35 +21,38 @@
|
||||
<div>
|
||||
<t t-set="isCompanySelected" t-value="selectedCompanies.includes(company.id)"/>
|
||||
<t t-set="isCurrent" t-value="company.id === companyService.currentCompany.id"/>
|
||||
<DropdownItem>
|
||||
<div class="dropdown-item d-flex py-0 px-0" data-menu="company" t-att-data-company-id="company.id">
|
||||
<DropdownItem class="p-0 bg-white">
|
||||
<div class="d-flex" data-menu="company" t-att-data-company-id="company.id">
|
||||
<div
|
||||
role="menuitemcheckbox"
|
||||
t-att-aria-checked="isCompanySelected"
|
||||
t-att-aria-label="company.name"
|
||||
t-att-title="(isCompanySelected ? 'Hide ' : 'Show ') + company.name + ' content.'"
|
||||
tabindex="0"
|
||||
class="ml-auto pl-3 pr-3 border border-top-0 border-left-0 border-bottom-0 toggle_company o_py"
|
||||
class="border-right toggle_company o_py"
|
||||
t-attf-class="{{isCurrent ? 'border-primary' : ''}}"
|
||||
t-on-click.stop="toggleCompany(company.id)">
|
||||
|
||||
<span style="height: 2rem;">
|
||||
<i class="fa fa-fw pt-2" t-attf-class="{{isCompanySelected ? 'fa-check-square' : 'fa-square-o'}}"/>
|
||||
<span class="btn btn-light border-0 p-2">
|
||||
<i class="fa fa-fw py-2" t-att-class="isCompanySelected ? 'fa-check-square text-primary' : 'fa-square-o'"/>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div
|
||||
role="button"
|
||||
t-att-aria-pressed="isCurrent"
|
||||
aria-label="Switch to this company"
|
||||
t-att-aria-label="'Switch to ' + company.name "
|
||||
t-att-title="'Switch to ' + company.name "
|
||||
tabindex="0"
|
||||
class="d-flex flex-grow-1 align-items-center py-0 log_into pl-3 o_py"
|
||||
t-attf-style="{{isCurrent ? 'background-color: lightgrey;' : ''}}"
|
||||
class="d-flex flex-grow-1 align-items-center py-0 log_into pl-2 o_py"
|
||||
t-att-class="isCurrent ? 'alert-primary ml-1 mr-2' : 'btn btn-light font-weight-normal border-0'"
|
||||
t-on-click="logIntoCompany(company.id)">
|
||||
|
||||
<span class='mr-3 company_label' t-attf-class="{{selectedCompanies.includes(company.id) ? '' : 'text-muted'}}">
|
||||
<span
|
||||
class='company_label pr-3'
|
||||
t-att-class="isCurrent ? 'text-900 font-weight-bold' : 'ml-1'">
|
||||
<t t-esc="company.name"/>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</DropdownItem>
|
||||
|
||||
Reference in New Issue
Block a user