Browse Source

Sep 30 : [FIX] Bug Fixed 'jazzy_backend_theme'

pull/284/head
AjmalCybro 2 years ago
parent
commit
a69fc66e82
  1. 2
      jazzy_backend_theme/__init__.py
  2. 7
      jazzy_backend_theme/__manifest__.py
  3. 7
      jazzy_backend_theme/doc/RELEASE_NOTES.md
  4. 1
      jazzy_backend_theme/models/__init__.py
  5. 33
      jazzy_backend_theme/models/res_company.py
  6. 85
      jazzy_backend_theme/models/res_config_settings.py
  7. 272
      jazzy_backend_theme/static/src/components/app_menu/menu_order.css
  8. 52
      jazzy_backend_theme/static/src/components/app_menu/search_apps.js
  9. 161
      jazzy_backend_theme/static/src/components/app_menu/side_menu.xml
  10. 2
      jazzy_backend_theme/static/src/layout/style/layout_colors.scss
  11. 15
      jazzy_backend_theme/static/src/layout/style/layout_style.scss
  12. 2
      jazzy_backend_theme/static/src/layout/style/sidebar.scss
  13. 62
      jazzy_backend_theme/views/res_config_settings_views.xml

2
jazzy_backend_theme/__init__.py

@ -19,4 +19,4 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import models
from . import models

7
jazzy_backend_theme/__manifest__.py

@ -22,10 +22,11 @@
{
"name": "Jazzy Backend Theme v16",
"description": """Minimalist and elegant backend theme for Odoo 16, Backend Theme, Theme""",
"description": """Minimalist and elegant backend theme for Odoo 16,
Backend Theme, Theme""",
"summary": "Jazzy backed Theme V16 is an attractive theme for backend",
"category": "Themes/Backend",
"version": "16.0.1.0.0",
"version": "16.0.1.1.0",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
@ -33,7 +34,7 @@
"depends": ['base', 'web', 'mail'],
"data": [
'views/style.xml',
'views/res_config_settings.xml',
'views/res_config_settings_views.xml',
],
'assets': {
'web.assets_backend': [

7
jazzy_backend_theme/doc/RELEASE_NOTES.md

@ -2,4 +2,9 @@
#### Version 16.0.1.0.0
##### ADD
##### Initial Commit for Jazzy Backend Theme
- Initial Commit for Jazzy Backend Theme
#### 27.09.2023
#### Version 16.0.1.0.1
##### UPDT

1
jazzy_backend_theme/models/__init__.py

@ -19,4 +19,5 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from . import res_company
from . import res_config_settings

33
jazzy_backend_theme/models/res_company.py

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2021-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
"""
This module helps user to change the backend theme of the odoo according to
there choices
"""
from odoo import models, fields
class ResCompany(models.Model):
"""Inherits the Res Company Model"""
_inherit = 'res.company'
background_image = fields.Binary(string="Background Image", attachment=True)

85
jazzy_backend_theme/models/res_config_settings.py

@ -19,17 +19,13 @@
# If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
"""
This module helps user to change the backend theme of the odoo according to
the users choices
"""
from odoo import models, fields
class ResCompany(models.Model):
"""Inherits the Res Company Model"""
_inherit = 'res.company'
background_image = fields.Binary(string="Background Image", attachment=True)
class ResConfigSettings(models.TransientModel):
"""Inherits the Configuration settings Model"""
_inherit = 'res.config.settings'
@ -37,61 +33,50 @@ class ResConfigSettings(models.TransientModel):
theme_background = fields.Binary(string="App menu Background",
related='company_id.background_image',
readonly=False)
app_bar_color = fields.Char(string='Appbar color',
config_parameter='jazzy_backend_theme.appbar_color',
default='#000000')
primary_accent = fields.Char(string="Navbar color",
config_parameter='jazzy_backend_theme.primary_accent_color',
default='#004589')
secondary_accent = fields.Char(string="Navbar color",
config_parameter='jazzy_backend_theme.secondary_color',
default='#0C4D9D')
kanban_bg_color = fields.Char(string="Kanban Bg Color",
config_parameter='jazzy_backend_theme.kanban_bg_color',
default='#F7F7F7')
primary_hover = fields.Char(string="Hover Primary Color",
config_parameter='jazzy_backend_theme.primary_hover',
default='#00376E')
light_hover = fields.Char(string="Light Hover",
config_parameter='jazzy_backend_theme.light_hover',
default='#ffffff')
appbar_text = fields.Char(string="Home Menu Text Color",
config_parameter='jazzy_backend_theme.appbar_text',
default='#ffffff')
secoundary_hover = fields.Char(string="AppBar Hover",
config_parameter='jazzy_backend_theme.secoundary_hover',
default='#F2F2F3')
secondary_hover = fields.Char(string="AppBar Hover",
config_parameter='jazzy_backend_theme.secondary_hover',
default='#F2F2F3')
kanban_bg_color = fields.Char(string="Kanban Bg Color",
config_parameter='jazzy_backend_theme.kanban_bg_color',
default='#F7F7F7')
def config_color_settings(self):
"""Define the configuration color settings"""
colors = {}
colors['full_bg_img'] = self.env.user.company_id.background_image
colors['appbar_color'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.appbar_color')
colors['primary_accent'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.primary_accent_color')
colors['secondary_color'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.secondary_color')
colors['kanban_bg_color'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.kanban_bg_color')
colors['primary_hover'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.primary_hover')
colors['light_hover'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.light_hover')
colors['appbar_text'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.appbar_text')
colors['secoundary_hover'] = self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.secoundary_hover')
colors = {'full_bg_img': self.env.user.company_id.background_image,
'appbar_color': self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.appbar_color'),
'primary_accent': self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.primary_accent_color'),
'secondary_color': self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.secondary_color'),
'kanban_bg_color': self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.kanban_bg_color'),
'primary_hover': self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.primary_hover'),
'light_hover': self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.light_hover'),
'appbar_text': self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.appbar_text'),
'secondary_hover': self.env[
'ir.config_parameter'].sudo().get_param(
'jazzy_backend_theme.secondary_hover')}
return colors

272
jazzy_backend_theme/static/src/components/app_menu/menu_order.css

@ -1,102 +1,147 @@
.nav-container {
@keyframes fadeIn{
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
float: left;
position: relative;
width: 99vw;
height: 100%;
background: #fff;
display: flex;
justify-content: start;
align-items: start;
padding: 0px 20rem;
margin-top: 2rem;
}
/*.search-results {*/
/* float: left;*/
/* position: relative;*/
/* width: 100vw;*/
/* height: 100vh;*/
/* background: #fff;*/
/* display: flex;*/
/* justify-content: center;*/
/* align-items: center;*/
/* padding: 0 20rem;*/
/*}*/
.o_main_navbar .dropdown-menu .show {
max-height: auto !important;
min-width: 100%;
overflow: auto;
margin-top: 0;
position: static;
top: 0;
o_setting_search {
position: relative;
}
.o_setting_search .searchInput {
height: 28px;
padding: 0px;
border: 0px;
box-shadow: none;
font-weight: 500;
}
.o_setting_search .searchIcon {
color: gray('700');
}
.o_kanban_renderer{
background-color: var(--kanban-bg-color);
}
.oe_kanban_global_click{
border-radius: 15px;
}
.search-container.has-results .search-input {
height: 3em;
}
.search-container.has-results .search-results {
height: calc(100% - 3em);
overflow: auto;
margin-top: 10px;
}
.o_setting_search.col-md-10{
padding: 20px;
}
.app-menu {
width: 100%;
display: flex;
box-shadow: none;
border: none;
flex-wrap: wrap;
flex-direction: row;
overflow: unset;
padding-left: calc((100vw - 850px) / 2);
padding-right: calc((100vw - 850px) / 2);
}
.o-menu-search-result.dropdown-item.col-12.ml-auto.mr-auto {
background-repeat: no-repeat;
background-size: contain;
padding-left: 5.5rem;
}
.form-control {
padding: 0 !important;
}
@media (max-width: 1371px){
}
@media (max-width:992px) {
}
@media (max-width:400px) {
}
.o_main_navbar .o_menu_brand {
text-decoration: none !important;
margin-left: 10px;
}
.dropdown-item.o_app.mt0 {
flex-basis: 20%;
.o_navbar .o_main_navbar .dropdown-toggle .dropdown-menu .search-container {
padding-left: calc((100vw - 850px) / 2);
padding-right: calc((100vw - 850px) / 2);
padding-top:20px;
padding-bottom:20px;
display: table;
}
.o_apps_menu_opened .o_main_navbar .o_menu_brand{
display:none;
}
.app_components {
position: absolute;
height: 100vh;
width: 100%;
background: #f5f5f5f0;
z-index: 99;
top: 40px;
display:none;
background: url("../../src/img/home-menu-bg-overlay.svg"), linear-gradient(to bottom, #71639e, #b0adba);
}
.app-menu a{
flex-basis: 19%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin-bottom: 23px;
}
.o_setting_search {
position: relative;
.searchInput {
height: 28px;
padding: 0px;
border: 0px;
border-dropdown-item bottom: 1px solid gray('400');
border-color: gray('700');
box-shadow: none;
font-weight: 500;
}
.searchIcon {
@include o-position-absolute(4px, 0);
color: gray('700');
}
}
.search-container.has-results {
height: 100%;
.search-input {
height: 3em;
}
.search-results {
height: calc(100% - 3em);
overflow: auto;
}
}
o_setting_search {
position: relative;
}
.o_setting_search .searchInput {
height: 28px;
padding: 0px;
border: 0px;
box-shadow: none;
font-weight: 500;
}
.o_setting_search .searchIcon {
color: gray('700');
}
.app-menu {
.search-container.has-results .search-input {
height: 3em;
display: table;
}
.search-container.has-results .search-results {
height: calc(100% - 3em);
overflow: auto;
margin-top: 10px;
}
.o_setting_search.col-md-10{
padding: 20px;
}
.app-menu {
width: 100%;
display: flex;
flex-wrap: wrap;
padding-left: calc((100vw - 850px) / 2);
padding-right: calc((100vw - 850px) / 2);
}
.o_main_navbar .dropdown-menu.show {
max-height: none !important;
min-width: 100vw;
min-heigt: 100vh;
overflow: auto;
margin-top: 0;
}
.o-menu-search-result.dropdown-item.col-12.ml-auto.mr-auto {
.o-menu-search-result.dropdown-item.col-12.ml-auto.mr-auto {
background-repeat: no-repeat;
background-size: 100%;
padding-left: 30%;
margin-bottom: 5%;
background-size: contain;
padding-left: 3rem;
}
.form-control {
padding: 0 !important;
@ -108,7 +153,70 @@
@media (max-width:992px) {
}
@media (max-width:400px) {
}
}
.o_main_navbar .o_menu_brand {
text-decoration: none !important;
margin-left: 10px;
}
.o_navbar .o_main_navbar .dropdown-toggle .dropdown-menu .search-container {
padding-left: calc((100vw - 850px) / 2);
padding-right: calc((100vw - 850px) / 2);
padding-top:20px;
padding-bottom:20px;
}
.o_apps_menu_opened .o_main_navbar .o_menu_brand{
display:none;
}
.app_components {
position: absolute;
height: 100vh;
width: 100%;
background: #f5f5f5f0;
z-index: 99;
top: 40px;
display:none;
background: url("../../img/home-menu-bg-overlay.svg"), linear-gradient(to bottom, #71639e, #b0adba);
}
.app-menu a{
flex-basis: 19%;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin-bottom: 23px;
cursor:pointer;
}
.app_components .search-input{
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(0, 0, 0, 0.1);
border-radius: 4px;
width:100%;
background-color: rgba(255, 255, 255, 0.1);
margin-bottom:1rem;
text-shadow: 0 1px 0 rgb(0 0 0 / 50%);
}
.o_navbar .o_main_navbar .o_main-menu-button:hover{
background:rgba(0, 0, 0, 0.08);
cursor: pointer;
}
@media (max-width: 850px) {
.app_components .search-input {
width:90%;
margin:0 auto;
}
.app-menu {
width:90%;
margin:0 auto;
}
}
@media (max-width: 444px) {
.app-menu{
width:80%;
}
.app-menu a{
flex-basis: 25%;
}
}

52
jazzy_backend_theme/static/src/components/app_menu/search_apps.js

@ -1,14 +1,11 @@
/** @odoo-module */
import { NavBar } from "@web/webclient/navbar/navbar";
import { registry } from "@web/core/registry";
const { fuzzyLookup } = require('@web/core/utils/search');
import { computeAppsAndMenuItems } from "@web/webclient/menus/menu_helpers";
import core from 'web.core';
const commandProviderRegistry = registry.category("command_provider");
const { onMounted } = owl;
import { patch } from 'web.utils';
var rpc = require('web.rpc');
patch(NavBar.prototype, 'jazzy_backend_theme/static/src/js/appMenu.js', {
@ -40,21 +37,22 @@ patch(NavBar.prototype, 'jazzy_backend_theme/static/src/js/appMenu.js', {
document.documentElement.style.setProperty("--app-bar-accent",result.appbar_color);}
if (result.primary_hover !== false){
document.documentElement.style.setProperty("--primary-hover",result.primary_hover);}
if (result.secondary_color !== false){
document.documentElement.style.setProperty("--primary-accent-border",result.secondary_color);}
if (result.full_bg_img !== false){
document.documentElement.style.setProperty("--full-screen-bg",'url(data:image/png;base64,'+result.full_bg_img+')');
if (result.full_bg_img !== false) {
var imageUrl = 'url(data:image/png;base64,' + result.full_bg_img + ')';
var appComponentsDivs = document.getElementsByClassName('app_components');
for (var i = 0; i < appComponentsDivs.length; i++) {
appComponentsDivs[i].style.backgroundImage = imageUrl;
}
}
if (result.appbar_text !== false){
document.documentElement.style.setProperty("--app-menu-font-color",result.appbar_text);}
if (result.secoundary_hover !== false){
document.documentElement.style.setProperty("--secoundary-hover",result.secoundary_hover);}
if (result.kanban_bg_color !== false){
document.documentElement.style.setProperty("--kanban-bg-color",result.kanban_bg_color);}
if (result.secondary_hover !== false){
document.documentElement.style.setProperty("--secondary-hover",result.secondary_hover);}
if (result.kanban_bg_color !== false) {
document.documentElement.style.setProperty("--kanban-bg-color", result.kanban_bg_color);
}
});
},
onMounted() {
this.$search_container = $(".search-container");
this.$search_input = $(".search-input input");
@ -68,10 +66,8 @@ patch(NavBar.prototype, 'jazzy_backend_theme/static/src/js/appMenu.js', {
this._search_def.reject();
this._search_def = $.Deferred();
setTimeout(this._search_def.resolve.bind(this._search_def), 50);
this._search_def.done(this._searchMenus.bind(this));
},
_searchMenus: function () {
var query = this.$search_input.val();
if (query === "") {
@ -92,7 +88,6 @@ patch(NavBar.prototype, 'jazzy_backend_theme/static/src/js/appMenu.js', {
webIconData: menu.webIconData,
});
});
fuzzyLookup(query, this._searchableMenus, (menu) =>
(menu.parents + " / " + menu.label).split("/").reverse().join("/")
).forEach((menu) => {
@ -103,7 +98,6 @@ patch(NavBar.prototype, 'jazzy_backend_theme/static/src/js/appMenu.js', {
id: menu.id,
});
});
this.$search_container.toggleClass(
"has-results",
Boolean(results.length)
@ -118,4 +112,28 @@ patch(NavBar.prototype, 'jazzy_backend_theme/static/src/js/appMenu.js', {
)
);
},
OnClickMainMenu() {
if ($('.app_components').css("display") === "none") {
$('.app_components').fadeIn(250);
$('.o_menu_sections').attr('style','display: none !important');
$('.o_menu_brand').attr('style','display: none !important');
$('.o_action_manager').attr('style','display: none !important');
$('.sidebar_panel').attr('style','display: none !important');
} else {
$('.app_components').fadeOut(50);
$('.o_menu_sections').attr('style','display: flex !important');
$('.o_menu_brand').attr('style','display: block !important');
$('.o_action_manager').attr('style','display: block !important');
$('.sidebar_panel').attr('style','display: block !important');
}
},
onNavBarDropdownItemSelection(app) {
var appComponentsDiv = document.querySelector('.app_components');
appComponentsDiv.style.display = 'none';
$('.o_action_manager').attr('style','display: block !important');
$('.sidebar_panel').attr('style','display: block !important');
$('.o_menu_brand').attr('style','display: flex !important');
$('.o_menu_sections').attr('style','display: flex !important');
this._super(app);
}
});

161
jazzy_backend_theme/static/src/components/app_menu/side_menu.xml

@ -1,98 +1,105 @@
<templates id="template" xml:space="preserve">
<!-- Inherit the dropdown to select the apps, to add the function OnClickMainMenu-->
<t t-inherit="web.NavBar.AppsMenu" t-inherit-mode="extension" owl="1">
<xpath expr="//Dropdown"
position="replace">
<li class="dropdown d-flex justify-content-center align-items-center">
<a class="full" data-bs-toggle="dropdown" data-display="static"
href="#">
<i class="fa fa-th-large"
style="font-size: 18px !important; color: white; margin-top: 3px;"/>
</a>
<div class="dropdown-menu fullscreen-menu" role="menu">
<div class="search-container form-row align-items-center m-auto mb-5 col-12">
<div class="search-input col-md-10 ml-auto mr-auto mb-5"
t-on-input="_searchMenusSchedule">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<i class="fa fa-search"/>
</div>
</div>
<input type="search"
autocomplete="off"
placeholder="Search menus..."
class="form-control"/>
<div class="d-flex justify-content-center align-items-center o_main-menu-button p-2"
t-on-click="OnClickMainMenu">
<i class="oi oi-apps"
style="font-size: 18px !important; color: white; margin-top: 3px;"/>
</div>
</xpath>
</t>
<!-- Added the installed apps to show the Enterprise like app drawer -->
<t t-inherit-mode="extension" t-inherit="web.NavBar" owl="1">
<xpath expr="//header" position="after">
<div class="app_components">
<div class="search-container form-row align-items-center m-auto col-12"
style="padding-left: calc((100vw - 850px) / 2);padding-right: calc((100vw - 850px) / 2);padding-top:20px;padding-bottom:20px; display: table;">
<div class="search-input col-md-10"
style="padding:0.8rem 1.2rem;width: max-content;margin-left: -30px;"
t-on-input="_searchMenusSchedule">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text"
style="background:none;border:none;color:white;font-size:1.5rem;">
<i class="fa fa-search"/>
</div>
</div>
<div class="search-results col-md-10 ml-auto mr-auto"/>
</div>
<div class="nav-container">
<div class="app-menu">
<t t-foreach="menuService.getApps()" t-as="app" t-key="app_index">
<a role="menuitem"
t-attf-href="#menu_id={{app.id}}"
class="dropdown-item o_app mt0"
t-att-data-menu-id="app.menuID"
t-att-data-menu-xmlid="app.xmlID"
t-att-data-action-id="app.actionID">
<img t-if="app.webIcon.includes('.png')" t-att-title="app.name"
style="width: 70px !important;height: 70px !important;border-radius: 10px !important;margin: 5px 5px 5px 5px;"
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>
<img t-if="app.webIcon.includes('.svg')" t-att-title="app.name"
style="width: 70px !important;height: 70px !important;border-radius: 10px !important;margin: 5px 5px 5px 5px;"
t-attf-src="data:image/svg+xml;base64,{{app.webIconData}}"/>
<b class="a_app_menu_title"><t t-esc="app.name"/></b>
</a>
</t>
<input type="search"
autocomplete="off"
placeholder="Search menus..."
class="form-control"
style="background:none;border:none;color:white;"/>
</div>
</div>
</div>
</li>
<div class="search-results col-md-10 ml-auto mr-auto"
style="margin-top:20px;"/>
</div>
<div class="app-menu">
<t t-foreach="menuService.getApps()" t-as="app"
t-key="app_index">
<a role="menuitem"
t-on-click="() => this.onNavBarDropdownItemSelection(app)"
t-att-class="{ o_dropdown_active: menuService.getCurrentApp() === app }">
<img t-if="app.webIcon.includes('.png')"
t-att-title="app.name"
style="width: 70px !important;height: 70px !important;margin: 5px 5px 5px 5px;"
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>
<img t-if="app.webIcon.includes('.svg')"
t-att-title="app.name"
style="width: 70px !important;height: 70px !important;margin: 5px 5px 5px 5px;"
t-attf-src="data:image/svg+xml;base64,{{app.webIconData}}"/>
<b class="a_app_menu_title"
style="color:white;text-shadow: 1px 1px 1px rgb(0 0 0 / 40%);"><t t-esc="app.name"/></b>
</a>
</t>
</div>
</div>
</xpath>
</t>
<!-- To show the search results when the user search app from the app drawer -->
<t t-name="jazzy_backend_theme.SearchResults">
<t t-foreach="results" t-as="result">
<div class="search_icons">
<a t-attf-class="o-menu-search-result dropdown-item col-12 ml-auto mr-auto #{result_first ? 'active' : ''}"
t-attf-style="background-image:url('data:image/svg+xml;base64,#{result.webIconData}')"
t-attf-style="background-image:url('data:image/png;base64,#{result.webIconData}')"
t-attf-href="#menu_id=#{result.id}&amp;action_id=#{result.actionID}"
t-att-data-menu-id="result.id"
t-att-data-action-id="result.actionID"
t-raw="result.name"
onclick="$('.dropdown-menu').removeClass('show'); $('.search-results').addClass('o_hidden'); $('.app-menu').removeClass('o_hidden'); $('.search-input input').val('');"/>
</div>
style="color:white;"
onclick="$('.o_menu_sections').css('display','flex');$('.search-results').addClass('o_hidden');$('.o_menu_brand').css('display','flex');$('.app_components').css('display','none'); $('.app-menu').removeClass('o_hidden'); $('.search-input input').val('');$('.o_action_manager').attr('style','display: block !important');$('.sidebar_panel').attr('style','display: block !important');"/>
</t>
</t>
<!-- To show the sidebar to select the apps from the sidebar -->
<t t-inherit="web.NavBar" t-inherit-mode="extension" owl="1">
<xpath expr="//nav[hasclass('o_main_navbar')]" position="after">
<div class="sidebar_panel" id="sidebar_panel">
<div class="sidebar">
<ul class="sidebar_menu">
<t t-foreach="menuService.getApps()" t-as="app" t-key="app_index">
<li>
<a role="menuitem"
t-attf-href="#menu_id={{app.id}}"
class="dropdown-item o_app mt0"
t-att-data-menu-id="app.menuID"
t-att-data-menu-xmlid="app.xmlID"
t-att-data-action-id="app.actionID">
<img t-if="app.webIcon.includes('.png')" t-att-title="app.name"
style="width: 25px !important;height: 25px !important;border-radius: 5px !important;padding:0 !important;"
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>
<img t-if="app.webIcon.includes('.svg')" t-att-title="app.name"
style="width: 25px !important;height: 25px !important;border-radius: 5px !important;padding:0 !important;"
t-attf-src="data:image/svg+xml;base64,{{app.webIconData}}"/>
</a>
</li>
</t>
</ul>
</div>
</div>
</xpath>
</t>
</templates>
<div class="sidebar_panel" id="sidebar_panel">
<div class="sidebar">
<ul class="sidebar_menu">
<t t-foreach="menuService.getApps()" t-as="app"
t-key="app_index">
<li>
<a role="menuitem"
t-attf-href="#menu_id={{app.id}}"
class="dropdown-item o_app mt0"
t-att-data-menu-id="app.menuID"
t-att-data-menu-xmlid="app.xmlID"
t-att-data-action-id="app.actionID">
<img t-if="app.webIcon.includes('.png')"
t-att-title="app.name"
style="width: 25px !important;height: 25px !important;border-radius: 5px !important;padding:0 !important;"
t-attf-src="data:image/png;base64,{{app.webIconData}}"/>
<img t-if="app.webIcon.includes('.svg')"
t-att-title="app.name"
style="width: 25px !important;height: 25px !important;border-radius: 5px !important;padding:0 !important;"
t-attf-src="data:image/svg+xml;base64,{{app.webIconData}}"/>
</a>
</li>
</t>
</ul>
</div>
</div>
</xpath>
</t>
</templates>

2
jazzy_backend_theme/static/src/layout/style/layout_colors.scss

@ -27,6 +27,6 @@ $fullscreen-bg-color: var(--fullscreen-bg-color) !important;
--color-white : #ffffff !important;
--primary-hover: #00376e;
--light-hover: #d5d5d5 ;
--secoundary-hover:#ffffff;
--secondary-hover:#ffffff;
--fullscreen-bg-color: #C5F0FC !important;
}

15
jazzy_backend_theme/static/src/layout/style/layout_style.scss

@ -15,7 +15,7 @@
}
.app_bar .app_container a:hover{
background:var(--secoundary-hover) !important;
background:var(--secondary-hover) !important;
}
.fullscreen-menu{
@ -249,9 +249,6 @@
.o_form_view .oe_button_box .oe_stat_button .o_button_icon {
color: var(--primary-accent) !important;
}
//.o_required_modifier.o_input, .o_required_modifier .o_input {
// background-color: var(--primary-accent) !important;
//}
//small icons
.o_search_panel .o_search_panel_category .o_search_panel_section_icon {
@ -373,13 +370,9 @@
}
.nav-container {
/*float: left;*/
position: relative;
width: 100vw !important;
/*height: 100%;*/
/*background: #fff;*/
display: flex;
/* justify-content: start; */
align-items: start;
margin-top: 2rem;
}
@ -429,12 +422,6 @@
margin-top: 1.5rem;
}
}
//@media(max-width:716px){
//html .o_web_client > .o_action_manager > .o_action > .o_content{
// overflow-x: hidden !important;
// }
//}
@media (max-width:524px){

2
jazzy_backend_theme/static/src/layout/style/sidebar.scss

@ -49,7 +49,7 @@
transition:.3s all;
}
.sidebar_panel .sidebar .sidebar_menu li:hover a {
background: var(--secoundary-hover) !important;
background: var(--secondary-hover) !important;
color: #fff;
}

62
jazzy_backend_theme/views/res_config_settings.xml → jazzy_backend_theme/views/res_config_settings_views.xml

@ -1,19 +1,22 @@
<odoo>
<record id="res_config_cam" model="ir.ui.view">
<field name="name">res.config.jazzy.backend.theme</field>
<!-- Inherited the res.config.settings model view to add the fields to configure the theme -->
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.jazzy.backend.theme</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="90"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@id='companies']" position='after'>
<h2>jazzy Backend Theme</h2>
<div class="row mt16 o_settings_container" name="barcode_scanner_using_cam">
<div class="row mt16 o_settings_container"
name="barcode_scanner_using_cam">
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<!-- <field name="theme_background"/>-->
</div>
<div class="o_setting_right_pane">
<label string="Background Image" for="theme_background" class="ml-4" required="1"/>
<label string="Background Image"
for="theme_background" class="ml-4"
required="1"/>
<field name="theme_background" widget="image"/>
<div class="text-muted">
</div>
@ -24,7 +27,8 @@
<field name="app_bar_color" widget="color"/>
</div>
<div class="o_setting_right_pane">
<label string="App Bar Background Color" for="app_bar_color"/>
<label string="App Bar Background Color"
for="app_bar_color"/>
<div class="text-muted">
</div>
@ -35,7 +39,8 @@
<field name="appbar_text" widget="color"/>
</div>
<div class="o_setting_right_pane">
<label string="AppMenu Text color" for="appbar_text"/>
<label string="AppMenu Text color"
for="appbar_text"/>
<div class="text-muted">
</div>
@ -43,11 +48,11 @@
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="secoundary_hover" widget="color"/>
<field name="secondary_hover" widget="color"/>
</div>
<div class="o_setting_right_pane">
<label string="AppBar Hover color" for="secoundary_hover"/>
<label string="AppBar Hover color"
for="secondary_hover"/>
<div class="text-muted">
</div>
</div>
@ -57,19 +62,19 @@
<field name="primary_accent" widget="color"/>
</div>
<div class="o_setting_right_pane">
<label string="Navbar Background Color" for="primary_accent"/>
<label string="Navbar Background Color"
for="primary_accent"/>
<div class="text-muted">
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="secondary_accent" widget="color"/>
<field name="primary_hover" widget="color"/>
</div>
<div class="o_setting_right_pane">
<label string="Primary Border Color" for="secondary_accent"/>
<label string="Primary Button Hover"
for="primary_hover"/>
<div class="text-muted">
</div>
</div>
@ -79,35 +84,12 @@
<field name="kanban_bg_color" widget="color"/>
</div>
<div class="o_setting_right_pane">
<label string="Kanban Background Color" for="kanban_bg_color"/>
<label string="Kanban Background Color"
for="kanban_bg_color"/>
<div class="text-muted">
</div>
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="primary_hover" widget="color"/>
</div>
<div class="o_setting_right_pane">
<label string="Primary Button Hover" for="primary_hover"/>
<div class="text-muted">
</div>
</div>
</div>
<!-- <div class="col-xs-12 col-md-6 o_setting_box">-->
<!-- <div class="o_setting_left_pane">-->
<!-- </div>-->
<!-- <div class="o_setting_right_pane">-->
<!-- <label string="Light Hover color" for="light_hover"/>-->
<!-- <field name="light_hover" widget="color"/>-->
<!-- <div class="text-muted">-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</xpath>
</field>
Loading…
Cancel
Save