Browse Source

[UPDT] Updated 'code_backend_theme'

pull/195/head
Ajmal Cybro 4 years ago
parent
commit
021c60513f
  1. 3
      code_backend_theme/__manifest__.py
  2. 684
      code_backend_theme/static/description/index.html
  3. 57
      code_backend_theme/static/src/js/user_menu/user_menu.js
  4. 4
      code_backend_theme/static/src/scss/login.scss
  5. 4
      code_backend_theme/static/src/scss/navigation_bar.scss
  6. 57
      code_backend_theme/static/src/scss/theme.scss
  7. 57
      code_backend_theme/static/src/xml/top_bar.xml

3
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": "Theme/Backend",
"version": "15.0.1.0.0",
"version": "15.0.0.0.1",
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
@ -51,7 +51,6 @@
('replace', '/web/static/src/views/graph/graph_arch_parser.js', '/code_backend_theme/static/src/js/fields/graph_arch_parser.js'),
('replace', '/web/static/src/views/graph/graph_view.js', '/code_backend_theme/static/src/js/fields/graph_view.js'),
'code_backend_theme/static/src/js/chrome/sidebar_menu.js',
('replace', '/web/static/src/webclient/user_menu/user_menu.js', '/code_backend_theme/static/src/js/user_menu/user_menu.js'),
],
'web.assets_qweb': [
'code_backend_theme/static/src/xml/styles.xml',

684
code_backend_theme/static/description/index.html

File diff suppressed because it is too large

57
code_backend_theme/static/src/js/user_menu/user_menu.js

@ -1,57 +0,0 @@
/** @odoo-module **/
import { browser } from "@web/core/browser/browser";
import { DropdownItem } from "@web/core/dropdown/dropdown_item";
import { registry } from "@web/core/registry";
import { useEffect, useService } from "@web/core/utils/hooks";
const { Component } = owl;
const userMenuRegistry = registry.category("user_menuitems");
class UserMenuItem extends DropdownItem {
setup() {
super.setup();
useEffect(
() => {
if (this.props.payload.id) {
this.el.dataset.menu = this.props.payload.id;
}
},
() => []
);
}
}
export class UserMenu extends Component {
setup() {
this.user = useService("user");
const { origin } = browser.location;
const { userId } = this.user;
this.source = `${origin}/web/image?model=res.users&field=avatar_128&id=${userId}`;
}
getElements() {
const sortedItems = userMenuRegistry
.getAll()
.map((element) => element(this.env))
.sort((x, y) => {
const xSeq = x.sequence ? x.sequence : 100;
const ySeq = y.sequence ? y.sequence : 100;
return xSeq - ySeq;
});
return sortedItems;
}
onDropdownItemSelected(ev) {
ev.detail.payload.callback();
}
}
UserMenu.template = "web.UserMenu";
UserMenu.components = { UserMenuItem };
const systrayItem = {
Component: UserMenu,
isDisplayed: (env) => true,
};
registry.category("systray").add("web.user_menu", systrayItem, { sequence: 0 });

4
code_backend_theme/static/src/scss/login.scss

@ -21,7 +21,9 @@ body.bg-100 {
box-shadow: 0 0.75rem 1.5rem rgba(18,38,63, .03) !important;
width: 450px;
}
.o_main_navbar .o_menu_sections {
flex-wrap: w
}
a {
color: #556ee6;
text-decoration: none;

4
code_backend_theme/static/src/scss/navigation_bar.scss

@ -334,6 +334,10 @@ z-index: 1;
.o_optional_columns_dropdown_toggle{
z-index: 999;
}
.o_home_menu_background:not(.o_home_menu_background_custom) .o_main_navbar{
max-height:100px;
}
.o_progressbar .o_progress .o_progressbar_complete {
background-color: #3d9bbb;

57
code_backend_theme/static/src/scss/theme.scss

@ -98,7 +98,6 @@ background: $bg_white !important;
.o_searchview {
border: 1px solid #ddd;
height: 38px;
padding-left: 12px;
padding-right: 20px;
-webkit-box-shadow: none;
@ -117,7 +116,8 @@ background: $bg_white !important;
border: 1px solid #ddd;
background: #f8f8fb;
border-radius: 10px;
padding: 0 4px;
padding: 0 2px;
max-height:20px;
}
.o_cp_bottom_right span.o_dropdown_title {
color: #555b6d;
@ -584,6 +584,9 @@ th.o_list_record_selector {
.o_required_modifier > .o_input_dropdown > .ui-autocomplete-input {
border-left: solid 3px #f46a6a !important;
}
.fa-building-o{
color: #555b6d !important;
}
//sheet end
//Discuss
@ -724,6 +727,7 @@ i.o_PartnerImStatusIcon_outerBackground.fa.fa-circle.fa-stack-1x {
border-bottom: solid;
font-weight: bold;
background: $primary_accent;
background-color: $primary_accent !important;
color: #ffffff !important;
border-radius: 5px;
}
@ -855,6 +859,7 @@ select {
border: none !important;
height: auto !important;
margin: 0 !important;
padding: 0px;
}
.o_base_settings .o_control_panel .o_panel .o_setting_search .searchIcon {
top: 9px;
@ -889,7 +894,6 @@ select {
border-radius: 5px;
}
.settings_tab {
flex : auto;
background-color: #ffffff !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;
@ -1055,6 +1059,11 @@ td.o_main:hover {
//Purchase app ends
//input inside colour starts
.o_searchview .o_searchview_facet .o_facet_values{
border :1px solid white;
}
select, input {
color: #4c4c4c !important;
}
@ -1067,6 +1076,10 @@ 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;
}
//input inside colour ends
//welcome demo starts
@ -1443,14 +1456,12 @@ ul.o_menu_sections {
nav.o_main_navbar {
display: flex;
flex-wrap: wrap;
justify-content: left;
justify-content: right;
height: auto;
}
ul.o_menu_systray.topbar_icon {
margin-right: 0;
margin-left: auto;
}
}
//top menu bar ends
@ -1480,12 +1491,8 @@ div.dropdown-menu.bootstrap-datetimepicker-widget{
//Responsive starts
@media (max-width:992px) {
.o-dropdown.dropup > .o-dropdown--menu, .o-dropdown.dropdown > .o-dropdown--menu, .o-dropdown.dropleft > .o-dropdown--menu, .o-dropdown.dropright > .o-dropdown--menu {
position:absolute !important;
}
.o_action_manager.sidebar_margin {
margin: 0 !important;
background-color:red;
}
.top_heading.sidebar_margin {
margin: 0 !important;
@ -1523,7 +1530,7 @@ div.dropdown-menu.bootstrap-datetimepicker-widget{
margin-left: 20px;
}
.o_main_navbar .o_user_menu {
margin-left: auto;
margin-left: 20px;
}
.sidebar_panel .sidebar .sidebar_logo img {
max-width: 112px;
@ -1598,27 +1605,9 @@ div.dropdown-menu.bootstrap-datetimepicker-widget{
background: #74788d;
}
}
@media (max-width:400px) {
.o_main_navbar .o_user_menu .oe_topbar_avatar {
height: 35px;
width: 35px;
}
ul.o_menu_systray.topbar_icon .dropdown-menu.show{
left: 0px !important;
margin-right: 50px !important;
}
ul.o_menu_systray.topbar_icon {
margin-left: 0;
}
}
//Responsive ends
//New changes
.o_base_settings .o_setting_container .settings_tab {
flex:auto !important;
}
.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,
@ -1628,11 +1617,15 @@ div.dropdown-menu.bootstrap-datetimepicker-widget{
.o_main_navbar .o_menu_toggle, .o_main_navbar .o_navbar_apps_menu, .o_main_navbar .o_menu_brand {
color: $f_color !important;
}
.o_content .o_expense_purple {
color: #556ee6;
}
.row.o_recruitment_kanban_boxes .custom-checkbox input:checked + label::after {
display:none
}
//new fix
.o_form_view .oe_button_box + .oe_title, .o_form_view .oe_button_box + .oe_avatar + .oe_title
{
width: 100% !important;
}

57
code_backend_theme/static/src/xml/top_bar.xml

@ -4,50 +4,48 @@
<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 d-flex justify-content-between"
<nav class="o_main_navbar"
t-on-dropdown-item-selected="onNavBarDropdownItemSelection"
data-command-category="navbar">
<div class="d-flex">
<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>
<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"/>
<!-- Current App Sections -->
<t t-if="currentAppSections.length" t-call="web.NavBar.SectionsMenu">
<t t-set="sections" t-value="currentAppSections" />
</t>
</div>
<!-- Systray -->
<div class="o_menu_systray" role="menu">
<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"/>
<t t-component="item.Component" t-props="item.props" />
</ErrorHandler>
</NotUpdatable>
</t>
</div>
</nav>
<div class="sidebar_panel" id="sidebar_panel">
<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">
<div class="sidebar_logo">
<img src="/web/binary/company_logo" class="logo_img"/>
</div>
<h6 class="sidebar_head">MENU</h6>
@ -72,15 +70,12 @@
</t>
<t t-inherit="web.NavBar.AppsMenu" t-inherit-mode="extension" owl="1">
<xpath expr="//Dropdown[hasclass('o_navbar_apps_menu')]"
position="replace">
<xpath expr="//Dropdown[hasclass('o_navbar_apps_menu')]" position="replace">
<li class="dropdown">
<a id="openSidebar"
style="display: block; cursor: pointer;">
<a id="openSidebar" style="display: block; cursor: pointer;">
<i class="fa fa-bars fa-lg"/>
</a>
<a id="closeSidebar"
style="display: none; cursor: pointer;">
<a id="closeSidebar" style="display: none; cursor: pointer;">
<i class="fa fa-bars fa-lg"/>
</a>
</li>

Loading…
Cancel
Save