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. 48
      code_backend_theme/static/src/scss/theme.scss
  4. 5
      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""", "description": """Minimalist and elegant backend theme for Odoo 14, Backend Theme, Theme""",
"summary": "Code Backend Theme V15 is an attractive theme for backend", "summary": "Code Backend Theme V15 is an attractive theme for backend",
"category": "Themes/Backend", "category": "Themes/Backend",
"version": "15.0.0.0.1", "version": "15.0.1.0.2",
'author': 'Cybrosys Techno Solutions', 'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions', 'company': 'Cybrosys Techno Solutions',
'maintainer': '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){ $(document).on("click", "#openSidebar", function(event){
$("#sidebar_panel").css({'display':'block'}); $("#sidebar_panel").css({'display':'block'});
$(".o_action_manager").css({'margin-left': '200px','transition':'all .1s linear'}); $(".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 //add class in navbar
var navbar = $(".o_main_navbar"); var navbar = $(".o_main_navbar");
@ -36,7 +36,7 @@ odoo.define('code_backend_theme.SidebarMenu', function (require) {
$(document).on("click", "#closeSidebar", function(event){ $(document).on("click", "#closeSidebar", function(event){
$("#sidebar_panel").css({'display':'none'}); $("#sidebar_panel").css({'display':'none'});
$(".o_action_manager").css({'margin-left': '0px'}); $(".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 //remove class in navbar
var navbar = $(".o_main_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 close on menu-item click
$("#sidebar_panel").css({'display':'none'}); $("#sidebar_panel").css({'display':'none'});
$(".o_action_manager").css({'margin-left': '0px'}); $(".o_action_manager").css({'margin-left': '0px'});
$(".top_heading").css({'margin-left': '0px'}); $(".top_heading").css({'margin-left': '0px', 'width':'100%'});
$("#closeSidebar").hide(); $("#closeSidebar").hide();
$("#openSidebar").show(); $("#openSidebar").show();

48
code_backend_theme/static/src/scss/theme.scss

@ -1,5 +1,4 @@
//Top Bar //Top Bar
// @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
@font-face { @font-face {
font-family: 'Poppins' !important; font-family: 'Poppins' !important;
src: url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap'); src: url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
@ -24,7 +23,7 @@ a.btn {
border:1px !important; border:1px !important;
} }
.o_menu_sections, .o_menu_systray, .o_web_client > header{ .o_menu_sections, .o_menu_systray, .o_web_client > header{
background: $bg_white !important; background: $bg_white !important;
} }
.oe_topbar_name { .oe_topbar_name {
color: $f_color !important; color: $f_color !important;
@ -34,9 +33,6 @@ background: $bg_white !important;
font-size: 16px !important; font-size: 16px !important;
} }
.o_main_navbar { .o_main_navbar {
height: 65px;
// display: flex;
// justify-content: space-between;
align-items: center; align-items: center;
border-bottom: 0px solid #5f5e97 !important; border-bottom: 0px solid #5f5e97 !important;
-webkit-box-shadow: 0 0.75rem 1.5rem rgba(18,38,63,.03) !important; -webkit-box-shadow: 0 0.75rem 1.5rem rgba(18,38,63,.03) !important;
@ -46,8 +42,9 @@ background: $bg_white !important;
.top_heading { .top_heading {
display: flex; display: flex;
justify-content: center; justify-content: flex-start;
align-items: center; align-items: center;
width: 100%;
} }
.top_heading ul { .top_heading ul {
margin-bottom: 0 !important; margin-bottom: 0 !important;
@ -69,7 +66,10 @@ background: $bg_white !important;
color: $f_color !important; color: $f_color !important;
line-height: 46px; 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; background-color: $bg_white !important;
} }
@ -584,7 +584,7 @@ th.o_list_record_selector {
.o_required_modifier > .o_input_dropdown > .ui-autocomplete-input { .o_required_modifier > .o_input_dropdown > .ui-autocomplete-input {
border-left: solid 3px #f46a6a !important; border-left: solid 3px #f46a6a !important;
} }
.fa-building-o{ .fa-building-o {
color: #555b6d !important; color: #555b6d !important;
} }
//sheet end //sheet end
@ -939,7 +939,7 @@ select {
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: #f8f8fb; background-color: #f8f8fb;
} }
.o_action{ .o_action {
background: #f8f8fb; background: #f8f8fb;
} }
//common ends //common ends
@ -1059,8 +1059,7 @@ td.o_main:hover {
//Purchase app ends //Purchase app ends
//input inside colour starts //input inside colour starts
.o_searchview .o_searchview_facet .o_facet_values {
.o_searchview .o_searchview_facet .o_facet_values{
border :1px solid white; border :1px solid white;
} }
@ -1076,7 +1075,7 @@ select, input {
.o_datepicker.o_field_date.o_field_widget.o_required_modifier > input { .o_datepicker.o_field_date.o_field_widget.o_required_modifier > input {
color: #4c4c4c !important; color: #4c4c4c !important;
} }
.o_field_widget.o_field_many2manytags .o_tag_color_0{ .o_field_widget.o_field_many2manytags .o_tag_color_0 {
max-height:20px; max-height:20px;
} }
@ -1386,7 +1385,7 @@ div.o_boolean_toggle.custom-control.custom-checkbox > label.custom-control-label
border-radius: 0 0 5px 5px; border-radius: 0 0 5px 5px;
} }
.wysiwyg_iframe, .note-editor { .wysiwyg_iframe, .note-editor {
border: 1px solid #556ee640 !important; border: 1px, bold !important;
border-radius: 5px; border-radius: 5px;
} }
//note editor ends //note editor ends
@ -1452,10 +1451,10 @@ ul.o_menu_systray.topbar_icon {
ul.o_menu_sections { ul.o_menu_sections {
padding-left: 20px; padding-left: 20px;
} }
@media (max-width: 1371px){ @media (max-width: 1371px) {
nav.o_main_navbar { nav.o_main_navbar {
display: flex; display: flex;
flex-wrap: wrap; //flex-wrap: wrap;
justify-content: right; justify-content: right;
height: auto; height: auto;
} }
@ -1463,6 +1462,16 @@ ul.o_menu_sections {
margin-left: auto; 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 //top menu bar ends
//datetimepicker starts //datetimepicker starts
@ -1472,7 +1481,7 @@ ul.o_menu_sections {
.datepicker span { .datepicker span {
padding: 0.5rem !important; padding: 0.5rem !important;
} }
div.dropdown-menu.bootstrap-datetimepicker-widget{ div.dropdown-menu.bootstrap-datetimepicker-widget {
width: auto !important; width: auto !important;
} }
//datetimepicker ends //datetimepicker ends
@ -1504,7 +1513,6 @@ div.dropdown-menu.bootstrap-datetimepicker-widget{
.sidebar_panel .sidebar_close { .sidebar_panel .sidebar_close {
display: block !important; display: block !important;
} }
} }
@media (max-width:480px) { @media (max-width:480px) {
ul.o_menu_apps { ul.o_menu_apps {
@ -1606,9 +1614,8 @@ div.dropdown-menu.bootstrap-datetimepicker-widget{
} }
} }
//Responsive ends //Responsive ends
//New changes
//New changes
.o_main_navbar .dropdown .dropdown-toggle, .o_main_navbar .o_menu_sections .dropdown .dropdown-toggle, .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_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, .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 //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; width: 100% !important;
} }

5
code_backend_theme/static/src/xml/top_bar.xml

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<templates id="template" xml:space="preserve"> <templates id="template" xml:space="preserve">
<t t-inherit="web.NavBar" t-inherit-mode="extension" owl="1"> <t t-inherit="web.NavBar" t-inherit-mode="extension" owl="1">
<xpath expr="//nav[hasclass('o_main_navbar')]" position="replace"> <xpath expr="//nav[hasclass('o_main_navbar')]" position="replace">
<nav class="o_main_navbar" <nav class="o_main_navbar"
t-on-dropdown-item-selected="onNavBarDropdownItemSelection" t-on-dropdown-item-selected="onNavBarDropdownItemSelection"
data-command-category="navbar"> data-command-category="navbar">
@ -20,12 +18,11 @@
class="o_menu_brand" class="o_menu_brand"
t-ref="menuBrand" t-ref="menuBrand"
/> />
</div>
<!-- Current App Sections --> <!-- Current App Sections -->
<t t-if="currentAppSections.length" t-call="web.NavBar.SectionsMenu"> <t t-if="currentAppSections.length" t-call="web.NavBar.SectionsMenu">
<t t-set="sections" t-value="currentAppSections" /> <t t-set="sections" t-value="currentAppSections" />
</t> </t>
</div>
<!-- Systray --> <!-- Systray -->
<div class="o_menu_systray" role="menu"> <div class="o_menu_systray" role="menu">

Loading…
Cancel
Save