Browse Source

[UPDT] Issue fixed in top bar

pull/195/head
Ajmal Cybro 3 years ago
parent
commit
6b499e78b8
  1. 2
      code_backend_theme/__manifest__.py
  2. 6
      code_backend_theme/static/src/js/chrome/sidebar_menu.js
  3. 136
      code_backend_theme/static/src/scss/theme.scss
  4. 149
      code_backend_theme/static/src/xml/top_bar.xml

2
code_backend_theme/__manifest__.py

@ -25,7 +25,7 @@
"description": """Minimalist and elegant backend theme for Odoo 14, Backend Theme, Theme""",
"summary": "Code Backend Theme V15 is an attractive theme for backend",
"category": "Themes/Backend",
"version": "15.0.0.0.1",
"version": "15.0.1.0.2",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',

6
code_backend_theme/static/src/js/chrome/sidebar_menu.js

@ -13,7 +13,7 @@ odoo.define('code_backend_theme.SidebarMenu', function (require) {
$(document).on("click", "#openSidebar", function(event){
$("#sidebar_panel").css({'display':'block'});
$(".o_action_manager").css({'margin-left': '200px','transition':'all .1s linear'});
$(".top_heading").css({'margin-left': '200px','transition':'all .1s linear'});
$(".top_heading").css({'margin-left': '200px','transition':'all .1s linear', 'width':'auto'});
//add class in navbar
var navbar = $(".o_main_navbar");
@ -36,7 +36,7 @@ odoo.define('code_backend_theme.SidebarMenu', function (require) {
$(document).on("click", "#closeSidebar", function(event){
$("#sidebar_panel").css({'display':'none'});
$(".o_action_manager").css({'margin-left': '0px'});
$(".top_heading").css({'margin-left': '0px'});
$(".top_heading").css({'margin-left': '0px', 'width':'100%'});
//remove class in navbar
var navbar = $(".o_main_navbar");
@ -68,7 +68,7 @@ odoo.define('code_backend_theme.SidebarMenu', function (require) {
//sidebar close on menu-item click
$("#sidebar_panel").css({'display':'none'});
$(".o_action_manager").css({'margin-left': '0px'});
$(".top_heading").css({'margin-left': '0px'});
$(".top_heading").css({'margin-left': '0px', 'width':'100%'});
$("#closeSidebar").hide();
$("#openSidebar").show();

136
code_backend_theme/static/src/scss/theme.scss

@ -1,5 +1,4 @@
//Top Bar
// @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
@font-face {
font-family: 'Poppins' !important;
src: url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
@ -19,12 +18,12 @@ a.btn {
}
.o_main_navbar, .o_searchview_facet_label {
background-color: transparent !important;
color: $f_color !important;
border:1px !important;
background-color: transparent !important;
color: $f_color !important;
border:1px !important;
}
.o_menu_sections, .o_menu_systray, .o_web_client > header{
background: $bg_white !important;
background: $bg_white !important;
}
.oe_topbar_name {
color: $f_color !important;
@ -34,30 +33,28 @@ background: $bg_white !important;
font-size: 16px !important;
}
.o_main_navbar {
height: 65px;
// display: flex;
// justify-content: space-between;
align-items: center;
border-bottom: 0px solid #5f5e97 !important;
-webkit-box-shadow: 0 0.75rem 1.5rem rgba(18,38,63,.03) !important;
box-shadow: 0 0.75rem 1.5rem rgba(18,38,63,.03) !important;
background-color: #fff !important;
align-items: center;
border-bottom: 0px solid #5f5e97 !important;
-webkit-box-shadow: 0 0.75rem 1.5rem rgba(18,38,63,.03) !important;
box-shadow: 0 0.75rem 1.5rem rgba(18,38,63,.03) !important;
background-color: #fff !important;
}
.top_heading {
display: flex;
justify-content: center;
align-items: center;
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
}
.top_heading ul {
margin-bottom: 0 !important;
margin-bottom: 0 !important;
}
.top_heading > a {
margin-left: 10px;
font-size: 20px;
margin-left: 10px;
font-size: 20px;
}
.top_heading li {
list-style: none;
list-style: none;
}
.o-no-caret > i, button[aria-pressed="true"] {
@ -69,7 +66,10 @@ background: $bg_white !important;
color: $f_color !important;
line-height: 46px;
}
.o_main_navbar > .o_menu_sections > li > a:hover, .o_main_navbar > .o_menu_systray > li > a:hover, .o_main_navbar > .o_menu_sections > li.show > a, .o_main_navbar > .o_menu_systray > li.show > a {
.o_main_navbar > .o_menu_sections > li > a:hover,
.o_main_navbar > .o_menu_systray > li > a:hover,
.o_main_navbar > .o_menu_sections > li.show > a,
.o_main_navbar > .o_menu_systray > li.show > a {
background-color: $bg_white !important;
}
@ -418,36 +418,36 @@ th.o_list_record_selector {
// Checkbox
.custom-checkbox label {
position: relative;
cursor: pointer;
position: relative;
cursor: pointer;
}
.custom-checkbox label:before {
content:'';
-webkit-appearance: none;
background-color: transparent;
border: 1px solid #0079bf;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0px -15px 10px -12px rgba(0, 0, 0, 0.05);
padding: 10px;
display: inline-block;
position: relative;
vertical-align: middle;
cursor: pointer;
margin-right: 5px;
margin-top: 0px;
content:'';
-webkit-appearance: none;
background-color: transparent;
border: 1px solid #0079bf;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), inset 0px -15px 10px -12px rgba(0, 0, 0, 0.05);
padding: 10px;
display: inline-block;
position: relative;
vertical-align: middle;
cursor: pointer;
margin-right: 5px;
margin-top: 0px;
}
.custom-checkbox input:checked + label:after {
content: '';
display: block;
position: absolute;
top: 2px;
left: 9px;
width: 6px;
height: 14px;
border: solid #0079bf;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
content: '';
display: block;
position: absolute;
top: 2px;
left: 9px;
width: 6px;
height: 14px;
border: solid #0079bf;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
.custom-checkbox label::before {
@ -584,7 +584,7 @@ th.o_list_record_selector {
.o_required_modifier > .o_input_dropdown > .ui-autocomplete-input {
border-left: solid 3px #f46a6a !important;
}
.fa-building-o{
.fa-building-o {
color: #555b6d !important;
}
//sheet end
@ -939,7 +939,7 @@ select {
box-shadow: 0 0.75rem 1.5rem rgba(18,38,63, .03) !important;
background-color: #f8f8fb;
}
.o_action{
.o_action {
background: #f8f8fb;
}
//common ends
@ -1059,8 +1059,7 @@ td.o_main:hover {
//Purchase app ends
//input inside colour starts
.o_searchview .o_searchview_facet .o_facet_values{
.o_searchview .o_searchview_facet .o_facet_values {
border :1px solid white;
}
@ -1076,8 +1075,8 @@ select, input {
.o_datepicker.o_field_date.o_field_widget.o_required_modifier > input {
color: #4c4c4c !important;
}
.o_field_widget.o_field_many2manytags .o_tag_color_0{
max-height:20px;
.o_field_widget.o_field_many2manytags .o_tag_color_0 {
max-height:20px;
}
//input inside colour ends
@ -1270,22 +1269,22 @@ select, input {
background-color: #556ee6 !important;
}
.badge-secondary {
background-color: #74788d;
background-color: #74788d;
}
.badge-success {
background-color: #34c38f;
}
.badge-info {
background-color: #50a5f1;
background-color: #50a5f1;
}
.badge-danger {
background-color: #f46a6a;
background-color: #f46a6a;
}
.badge-warning {
background-color: #f1b44c;
background-color: #f1b44c;
}
.badge-dark {
background-color: #343a40;
background-color: #343a40;
}
.bg-success {
background-color: #34c38f !important;
@ -1386,7 +1385,7 @@ div.o_boolean_toggle.custom-control.custom-checkbox > label.custom-control-label
border-radius: 0 0 5px 5px;
}
.wysiwyg_iframe, .note-editor {
border: 1px solid #556ee640 !important;
border: 1px, bold !important;
border-radius: 5px;
}
//note editor ends
@ -1452,10 +1451,10 @@ ul.o_menu_systray.topbar_icon {
ul.o_menu_sections {
padding-left: 20px;
}
@media (max-width: 1371px){
@media (max-width: 1371px) {
nav.o_main_navbar {
display: flex;
flex-wrap: wrap;
//flex-wrap: wrap;
justify-content: right;
height: auto;
}
@ -1463,6 +1462,16 @@ ul.o_menu_sections {
margin-left: auto;
}
}
@media (max-width: 575.98px) {
.o_main_navbar .o_menu_sections {
max-width: 200px;
overflow-x: auto;
flex-wrap: nowrap !important;
}
.o_search_panel {
flex: auto;
}
}
//top menu bar ends
//datetimepicker starts
@ -1472,7 +1481,7 @@ ul.o_menu_sections {
.datepicker span {
padding: 0.5rem !important;
}
div.dropdown-menu.bootstrap-datetimepicker-widget{
div.dropdown-menu.bootstrap-datetimepicker-widget {
width: auto !important;
}
//datetimepicker ends
@ -1504,7 +1513,6 @@ div.dropdown-menu.bootstrap-datetimepicker-widget{
.sidebar_panel .sidebar_close {
display: block !important;
}
}
@media (max-width:480px) {
ul.o_menu_apps {
@ -1606,9 +1614,8 @@ div.dropdown-menu.bootstrap-datetimepicker-widget{
}
}
//Responsive ends
//New changes
//New changes
.o_main_navbar .dropdown .dropdown-toggle, .o_main_navbar .o_menu_sections .dropdown .dropdown-toggle,
.o_main_navbar .o_menu_systray .dropdown .dropdown-toggle, .o_main_navbar .o_nav_entry,
.o_main_navbar .o_menu_sections .o_nav_entry, .o_main_navbar .o_menu_systray .o_nav_entry,
@ -1625,7 +1632,6 @@ div.dropdown-menu.bootstrap-datetimepicker-widget{
}
//new fix
.o_form_view .oe_button_box + .oe_title, .o_form_view .oe_button_box + .oe_avatar + .oe_title
{
.o_form_view .oe_button_box + .oe_title, .o_form_view .oe_button_box + .oe_avatar + .oe_title {
width: 100% !important;
}

149
code_backend_theme/static/src/xml/top_bar.xml

@ -1,86 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve">
<t t-inherit="web.NavBar" t-inherit-mode="extension" owl="1">
<xpath expr="//nav[hasclass('o_main_navbar')]" position="replace">
<nav class="o_main_navbar"
t-on-dropdown-item-selected="onNavBarDropdownItemSelection"
data-command-category="navbar">
<div class="top_heading">
<!-- Apps Menu -->
<t t-call="web.NavBar.AppsMenu">
<t t-set="apps" t-value="menuService.getApps()"/>
</t>
<!-- App Brand -->
<MenuItem t-if="currentApp"
href="getMenuItemHref(currentApp)"
payload="currentApp"
t-esc="currentApp.name"
class="o_menu_brand"
t-ref="menuBrand"
/>
<!-- Current App Sections -->
<t t-if="currentAppSections.length" t-call="web.NavBar.SectionsMenu">
<t t-set="sections" t-value="currentAppSections" />
</t>
</div>
<nav class="o_main_navbar"
t-on-dropdown-item-selected="onNavBarDropdownItemSelection"
data-command-category="navbar">
<div class="top_heading">
<!-- Apps Menu -->
<t t-call="web.NavBar.AppsMenu">
<t t-set="apps" t-value="menuService.getApps()"/>
</t>
<!-- App Brand -->
<MenuItem t-if="currentApp"
href="getMenuItemHref(currentApp)"
payload="currentApp"
t-esc="currentApp.name"
class="o_menu_brand"
t-ref="menuBrand"
/>
</div>
<!-- Current App Sections -->
<t t-if="currentAppSections.length" t-call="web.NavBar.SectionsMenu">
<t t-set="sections" t-value="currentAppSections" />
</t>
<!-- Systray -->
<div class="o_menu_systray" role="menu">
<t t-foreach="systrayItems" t-as="item" t-key="item_index">
<NotUpdatable>
<ErrorHandler onError="error => handleItemError(error, item)">
<t t-component="item.Component" t-props="item.props" />
</ErrorHandler>
</NotUpdatable>
</t>
</div>
</nav>
<div class="sidebar_panel" id="sidebar_panel">
<div class="sidebar">
<div class="sidebar_close">
<a id="closeSidebar" style="cursor: pointer;">
<img src="/code_backend_theme/static/src/img/icons/close.png"/>
</a>
</div>
<div class="sidebar_logo">
<img src="/web/binary/company_logo" class="logo_img"/>
</div>
<h6 class="sidebar_head">MENU</h6>
<ul class="sidebar_menu">
<t t-foreach="menuService.getApps()" t-as="app">
<li>
<a role="menuitem"
t-attf-href="#menu_id={{app.id}}"
class="nav-link">
<img class="sidebar_img"
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>
<span class="sidebar_app_name">
<t t-esc="app.name"/>
</span>
</a>
</li>
</t>
</ul>
</div>
</div>
</xpath>
</t>
<!-- Systray -->
<div class="o_menu_systray" role="menu">
<t t-foreach="systrayItems" t-as="item" t-key="item_index">
<NotUpdatable>
<ErrorHandler onError="error => handleItemError(error, item)">
<t t-component="item.Component" t-props="item.props" />
</ErrorHandler>
</NotUpdatable>
</t>
</div>
</nav>
<div class="sidebar_panel" id="sidebar_panel">
<div class="sidebar">
<div class="sidebar_close">
<a id="closeSidebar" style="cursor: pointer;">
<img src="/code_backend_theme/static/src/img/icons/close.png"/>
</a>
</div>
<div class="sidebar_logo">
<img src="/web/binary/company_logo" class="logo_img"/>
</div>
<h6 class="sidebar_head">MENU</h6>
<ul class="sidebar_menu">
<t t-foreach="menuService.getApps()" t-as="app">
<li>
<a role="menuitem"
t-attf-href="#menu_id={{app.id}}"
class="nav-link">
<img class="sidebar_img"
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>
<span class="sidebar_app_name">
<t t-esc="app.name"/>
</span>
</a>
</li>
</t>
</ul>
</div>
</div>
</xpath>
</t>
<t t-inherit="web.NavBar.AppsMenu" t-inherit-mode="extension" owl="1">
<xpath expr="//Dropdown[hasclass('o_navbar_apps_menu')]" position="replace">
<li class="dropdown">
<a id="openSidebar" style="display: block; cursor: pointer;">
<i class="fa fa-bars fa-lg"/>
</a>
<a id="closeSidebar" style="display: none; cursor: pointer;">
<i class="fa fa-bars fa-lg"/>
</a>
</li>
</xpath>
</t>
<xpath expr="//Dropdown[hasclass('o_navbar_apps_menu')]" position="replace">
<li class="dropdown">
<a id="openSidebar" style="display: block; cursor: pointer;">
<i class="fa fa-bars fa-lg"/>
</a>
<a id="closeSidebar" style="display: none; cursor: pointer;">
<i class="fa fa-bars fa-lg"/>
</a>
</li>
</xpath>
</t>
<t t-inherit="web.UserMenu" t-inherit-mode="extension" owl="1">
<xpath expr="//span[hasclass('oe_topbar_name')]" position="replace">

Loading…
Cancel
Save