From e35aaa8c6b54677b8669126a989a8cdf7c2d1cec Mon Sep 17 00:00:00 2001 From: MuK IT GmbH Date: Thu, 28 Feb 2019 11:34:19 +0000 Subject: [PATCH] publish muk_web_theme - 12.0 --- muk_web_theme/README.rst | 123 ++++++++++++++++++ muk_web_theme/__manifest__.py | 2 +- muk_web_theme/doc/index.rst | 2 +- muk_web_theme/static/src/js/chrome/apps.js | 6 +- muk_web_theme/static/src/js/chrome/menu.js | 8 +- .../static/src/scss/control_panel.scss | 25 +++- muk_web_theme/static/src/scss/form_view.scss | 13 ++ muk_web_theme/static/src/scss/navbar.scss | 5 +- muk_web_theme/static/src/xml/apps.xml | 6 +- 9 files changed, 179 insertions(+), 11 deletions(-) create mode 100644 muk_web_theme/README.rst diff --git a/muk_web_theme/README.rst b/muk_web_theme/README.rst new file mode 100644 index 0000000..76c46c9 --- /dev/null +++ b/muk_web_theme/README.rst @@ -0,0 +1,123 @@ +============= +MuK Web Theme +============= + +This module offers a mobile compatible design for Odoo Community. Furthermore +it allows the user to define some design preferences. So he can choose the +size of the sidebar and the position of the chatter. In addition, the background +image of the app menu can be set for each company. + +Installation +============ + +To install this module, you need to: + +Download the module and add it to your Odoo addons folder. Afterward, log on to +your Odoo server and go to the Apps menu. Trigger the debug mode and update the +list by clicking on the "Update Apps List" link. Now install the module by +clicking on the install button. + +Another way to install this module is via the package management for Python +(`PyPI `_). + +To install our modules using the package manager make sure +`odoo-autodiscover `_ is installed +correctly. Then open a console and install the module by entering the following +command: + +``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` + +The module name consists of the Odoo version and the module name, where +underscores are replaced by a dash. + +**Module:** + +``odoo-addon-`` + +**Example:** + +``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` + +Once the installation has been successfully completed, the app is already in the +correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the +debug mode and update the list by clicking on the "Update Apps List" link. Now +install the module by clicking on the install button. + +The biggest advantage of this variant is that you can now also update the app +using the "pip" command. To do this, enter the following command in your console: + +``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` + +When the process is finished, restart your server and update the application in +Odoo. The steps are the same as for the installation only the button has changed +from "Install" to "Upgrade". + +You can also view available Apps directly in our `repository `_ +and find a more detailed installation guide on our `website `_. + +For modules licensed under OPL-1, you will receive access data when you purchase +the module. If the modules were not purchased directly from +`MuK IT `_ please contact our support (support@mukit.at) +with a confirmation of purchase to receive the corresponding access data. + +Upgrade +============ + +To upgrade this module, you need to: + +Download the module and add it to your Odoo addons folder. Restart the server +and log on to your Odoo server. Select the Apps menu and upgrade the module by +clicking on the upgrade button. + +If you installed the module using the "pip" command, you can also update the +module in the same way. Just type the following command into the console: + +``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` + +When the process is finished, restart your server and update the application in +Odoo, just like you would normally. + +Configuration +============= + +No additional configuration is needed to use this module. + +Usage +============= + +After the module is installed, the design is adjusted accordingly. + +Credits +======= + +Contributors +------------ + +* Mathias Markl + +Images +------------ + +Some pictures are based on or inspired by: + +* `Freepik `_ + +Projects +------------ + +Parts of the module are based on or inspired by: + +* `Web Responsive `_ +* `Openworx Backend Theme `_ + +Author & Maintainer +------------------- + +This module is maintained by the `MuK IT GmbH `_. + +MuK IT is an Austrian company specialized in customizing and extending Odoo. +We develop custom solutions for your individual needs to help you focus on +your strength and expertise to grow your business. + +If you want to get in touch please contact us via mail +(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_web_theme/__manifest__.py b/muk_web_theme/__manifest__.py index ccdcd77..94f2763 100644 --- a/muk_web_theme/__manifest__.py +++ b/muk_web_theme/__manifest__.py @@ -19,7 +19,7 @@ { "name": "MuK Backend Theme", "summary": "Odoo Community Backend Theme", - "version": "12.0.1.2.8", + "version": "12.0.1.2.9", "category": "Themes/Backend", "license": "AGPL-3", "author": "MuK IT", diff --git a/muk_web_theme/doc/index.rst b/muk_web_theme/doc/index.rst index 683537d..76c46c9 100644 --- a/muk_web_theme/doc/index.rst +++ b/muk_web_theme/doc/index.rst @@ -5,7 +5,7 @@ MuK Web Theme This module offers a mobile compatible design for Odoo Community. Furthermore it allows the user to define some design preferences. So he can choose the size of the sidebar and the position of the chatter. In addition, the background -image of the app menu can be set for each company. +image of the app menu can be set for each company. Installation ============ diff --git a/muk_web_theme/static/src/js/chrome/apps.js b/muk_web_theme/static/src/js/chrome/apps.js index de89a27..bb000b4 100644 --- a/muk_web_theme/static/src/js/chrome/apps.js +++ b/muk_web_theme/static/src/js/chrome/apps.js @@ -139,7 +139,7 @@ AppsMenu.include({ core.bus.trigger("change_menu_section", app.menuID); }, _onSearchResultsNavigate: function (event) { - if (this.$search_results.is(":empty")) { + if (this.$search_results.html().trim() === "") { this._searchMenusSchedule(); return; } @@ -162,7 +162,9 @@ AppsMenu.include({ offset++; break; default: - this._searchMenusSchedule(); + if (key.length === 1 || key === "Backspace") { + this._searchMenusSchedule(); + } return; } if (offset < 0) { diff --git a/muk_web_theme/static/src/js/chrome/menu.js b/muk_web_theme/static/src/js/chrome/menu.js index 4c5e667..6101882 100644 --- a/muk_web_theme/static/src/js/chrome/menu.js +++ b/muk_web_theme/static/src/js/chrome/menu.js @@ -62,13 +62,13 @@ Menu.include({ if ($section.hasClass('show')) { $section.removeClass('show'); $section.find('.show').removeClass('show'); - $section.find('.fa-chevron-down').show(); - $section.find('.fa-chevron-right').hide(); + $section.find('.fa-chevron-down:first').hide(); + $section.find('.fa-chevron-right:first').show(); } else { $section.addClass('show'); $section.find('ul:first').addClass('show'); - $section.find('.fa-chevron-down:first').hide(); - $section.find('.fa-chevron-right:first').show(); + $section.find('.fa-chevron-down').show(); + $section.find('.fa-chevron-right').hide(); } }, }); diff --git a/muk_web_theme/static/src/scss/control_panel.scss b/muk_web_theme/static/src/scss/control_panel.scss index ca6623d..e6285e8 100644 --- a/muk_web_theme/static/src/scss/control_panel.scss +++ b/muk_web_theme/static/src/scss/control_panel.scss @@ -53,14 +53,37 @@ width: auto; flex: 1 1 auto; } + .breadcrumb-item { + &:not(.active) { + padding-left: 0; + } + &::before { + content: none; + padding-right: 0; + } + &:nth-last-of-type(1n+3) { + display: none; + } + &:nth-last-of-type(2) { + &::before { + content: "\f053"; + cursor: pointer; + color: $o-brand-primary; + font-family: FontAwesome; + } + a { + display: none; + } + } + } .o_cp_buttons .btn.d-block:not(.d-none) { display: inline-block !important; } .o_cp_switch_buttons.show { .dropdown-menu { - align-content: center; display: flex; flex-direction: row; + align-content: center; justify-content: space-around; padding: 0; .btn { diff --git a/muk_web_theme/static/src/scss/form_view.scss b/muk_web_theme/static/src/scss/form_view.scss index 73d9bd3..9eeadcf 100644 --- a/muk_web_theme/static/src/scss/form_view.scss +++ b/muk_web_theme/static/src/scss/form_view.scss @@ -145,6 +145,19 @@ .o_followers_title_box { margin-left: 0; } + .o_chatter_topbar, + .o_thread_composer { + position: sticky; + } + .o_chatter_topbar { + top: -1px; + z-index: 2; + background-color: $o-view-background-color; + } + .o_thread_composer { + top: $o-statusbar-height; + z-index: 1; + } } } } diff --git a/muk_web_theme/static/src/scss/navbar.scss b/muk_web_theme/static/src/scss/navbar.scss index 61a8dea..5378eb9 100644 --- a/muk_web_theme/static/src/scss/navbar.scss +++ b/muk_web_theme/static/src/scss/navbar.scss @@ -49,6 +49,9 @@ @include mk-full-screen-sections(); } } + .o_user_menu img { + margin-bottom: 3px; + } .o_menu_brand, .o_menu_sections, .oe_topbar_name { display: none; } @@ -100,7 +103,7 @@ min-width: auto; box-shadow: none; background: none; - position: relative; + position: initial; } @for $index from 1 through 5 { .o_menu_entry_lvl_#{$index} { diff --git a/muk_web_theme/static/src/xml/apps.xml b/muk_web_theme/static/src/xml/apps.xml index 73097c0..65cda9a 100644 --- a/muk_web_theme/static/src/xml/apps.xml +++ b/muk_web_theme/static/src/xml/apps.xml @@ -20,6 +20,9 @@ + + #menu_id=#{app.menuID}&action_id=#{app.actionID} + h @@ -56,8 +59,9 @@ -