diff --git a/README.md b/README.md index e9cc959..55d8af1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) -[![Nexus](https://img.shields.io/badge/Nexus-Install%20me-5d8da8.svg)](https://nexus.mukit.at/#browse/browse:odoo) -[![Weblate](https://img.shields.io/badge/Weblate-Translate%20me-0094E9.svg)](https://weblate.mukit.at) [![Website](https://img.shields.io/badge/Website-Open%20me-243742.svg)](https://mukit.at/) # MuK Odoo Web Modules @@ -16,35 +14,6 @@ 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 odoo13-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. - -You can also view available Apps directly in our [repository] and find a -more detailed installation guide on our [website]. - ### Upgrade To upgrade this module, you need to: @@ -52,18 +21,3 @@ 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. - - [PyPI]: https://pypi.org/project/pip/ - [odoo-autodiscover]: https://pypi.org/project/odoo-autodiscover/ - [repository]: https://nexus.mukit.at/#browse/browse:odoo - [website]: https://mukit.at/page/open-source - [MuK IT]: https://www.mukit.at/ diff --git a/muk_web_theme/__init__.py b/muk_web_theme/__init__.py index c592894..d380f7e 100644 --- a/muk_web_theme/__init__.py +++ b/muk_web_theme/__init__.py @@ -1,31 +1,9 @@ -################################################################################### -# -# Copyright (c) 2017-today MuK IT GmbH. -# -# This file is part of MuK Theme -# (see https://mukit.at). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -################################################################################### - from . import models from odoo import api, SUPERUSER_ID -def _uninstall_reset_changes(cr, registry): +def _uninstall_cleanup(cr, registry): env = api.Environment(cr, SUPERUSER_ID, {}) env['web_editor.assets'].reset_asset( '/muk_web_theme/static/src/colors.scss', diff --git a/muk_web_theme/__manifest__.py b/muk_web_theme/__manifest__.py index 098b541..508bcfe 100644 --- a/muk_web_theme/__manifest__.py +++ b/muk_web_theme/__manifest__.py @@ -1,29 +1,7 @@ -################################################################################### -# -# Copyright (c) 2017-today MuK IT GmbH. -# -# This file is part of MuK Theme -# (see https://mukit.at). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -################################################################################### - { 'name': 'MuK Backend Theme', 'summary': 'Odoo Community Backend Theme', - 'version': '15.0.1.0.1', + 'version': '16.0.1.0.0', 'category': 'Themes/Backend', 'license': 'LGPL-3', 'author': 'MuK IT', @@ -41,40 +19,36 @@ 'web_enterprise', ], 'data': [ - 'templates/webclient.xml', - 'views/res_config_settings_view.xml', - 'views/res_users.xml', + 'templates/webclient.xml', + 'views/res_config_settings.xml', + 'views/res_users.xml', ], 'assets': { - 'web.assets_qweb': [ - 'muk_web_theme/static/src/**/*.xml', - ], 'web._assets_primary_variables': [ - 'muk_web_theme/static/src/colors.scss', + ( + 'after', + 'web/static/src/scss/primary_variables.scss', + 'muk_web_theme/static/src/colors.scss' + ), ], 'web._assets_backend_helpers': [ 'muk_web_theme/static/src/variables.scss', 'muk_web_theme/static/src/mixins.scss', ], 'web.assets_backend': [ + 'muk_web_theme/static/src/core/**/*.xml', + 'muk_web_theme/static/src/webclient/**/*.xml', 'muk_web_theme/static/src/webclient/**/*.scss', 'muk_web_theme/static/src/webclient/**/*.js', - 'muk_web_theme/static/src/search/**/*.scss', - 'muk_web_theme/static/src/search/**/*.js', - 'muk_web_theme/static/src/legacy/**/*.scss', - 'muk_web_theme/static/src/legacy/**/*.js', + 'muk_web_theme/static/src/views/**/*.scss', ], }, 'images': [ 'static/description/banner.png', 'static/description/theme_screenshot.png' ], - 'external_dependencies': { - 'python': [], - 'bin': [], - }, 'installable': True, - 'application': False, + 'application': True, 'auto_install': False, - 'uninstall_hook': '_uninstall_reset_changes', + 'uninstall_hook': '_uninstall_cleanup', } diff --git a/muk_web_theme/models/__init__.py b/muk_web_theme/models/__init__.py index 794beaf..1f01491 100644 --- a/muk_web_theme/models/__init__.py +++ b/muk_web_theme/models/__init__.py @@ -1,27 +1,5 @@ -################################################################################### -# -# Copyright (c) 2017-today MuK IT GmbH. -# -# This file is part of MuK Theme -# (see https://mukit.at). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -################################################################################### - -from . import ir_http from . import res_company from . import res_config_settings from . import res_users from . import web_editor_assets +from . import ir_http diff --git a/muk_web_theme/models/ir_http.py b/muk_web_theme/models/ir_http.py index 1a9b439..e52a58d 100644 --- a/muk_web_theme/models/ir_http.py +++ b/muk_web_theme/models/ir_http.py @@ -1,25 +1,3 @@ -################################################################################### -# -# Copyright (c) 2017-today MuK IT GmbH. -# -# This file is part of MuK Theme -# (see https://mukit.at). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -################################################################################### - from odoo import models from odoo.http import request @@ -28,12 +6,15 @@ class IrHttp(models.AbstractModel): _inherit = "ir.http" + #---------------------------------------------------------- + # Functions + #---------------------------------------------------------- + def session_info(self): result = super(IrHttp, self).session_info() - company = request.session.uid and request.env.user.company_id - blend_mode = company and company.background_blend_mode or False - result.update( - theme_background_blend_mode=blend_mode or "normal", - theme_has_background_image=bool(company and company.background_image) - ) + if request.env.user._is_internal(): + for company in request.env.user.company_ids: + result['user_companies']['allowed_companies'][company.id].update({ + 'has_background_image': bool(company.background_image), + }) return result diff --git a/muk_web_theme/models/res_company.py b/muk_web_theme/models/res_company.py index 21e204e..0546ebe 100644 --- a/muk_web_theme/models/res_company.py +++ b/muk_web_theme/models/res_company.py @@ -1,25 +1,3 @@ -################################################################################### -# -# Copyright (c) 2017-today MuK IT GmbH. -# -# This file is part of MuK Theme -# (see https://mukit.at). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -################################################################################### - from odoo import models, fields @@ -28,52 +6,10 @@ class ResCompany(models.Model): _inherit = 'res.company' #---------------------------------------------------------- - # Database + # Fields #---------------------------------------------------------- background_image = fields.Binary( string='Apps Menu Background Image', attachment=True ) - - background_blend_mode = fields.Selection( - selection=[ - ('normal', 'Normal'), - ('multiply', 'Multiply'), - ('screen', 'Screen'), - ('overlay', 'Overlay'), - ('hard-light', 'Hard-light'), - ('darken', 'Darken'), - ('lighten', 'Lighten'), - ('color-dodge', 'Color-dodge'), - ('color-burn', 'Color-burn'), - ('hard-light', 'Hard-light'), - ('difference', 'Difference'), - ('exclusion', 'Exclusion'), - ('hue', 'Hue'), - ('saturation', 'Saturation'), - ('color', 'Color'), - ('luminosity', 'Luminosity'), - ], - string='Apps Menu Background Blend Mode', - default='normal' - ) - - default_sidebar_preference = fields.Selection( - selection=[ - ('invisible', 'Invisible'), - ('small', 'Small'), - ('large', 'Large') - ], - string='Sidebar Type', - default='large' - ) - - default_chatter_preference = fields.Selection( - selection=[ - ('normal', 'Normal'), - ('sided', 'Sided'), - ], - string='Chatter Position', - default='sided' - ) diff --git a/muk_web_theme/models/res_config_settings.py b/muk_web_theme/models/res_config_settings.py index 745879c..7859959 100644 --- a/muk_web_theme/models/res_config_settings.py +++ b/muk_web_theme/models/res_config_settings.py @@ -1,25 +1,3 @@ -################################################################################### -# -# Copyright (c) 2017-today MuK IT GmbH. -# -# This file is part of MuK Theme -# (see https://mukit.at). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -################################################################################### - import re import uuid import base64 @@ -32,7 +10,7 @@ class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' #---------------------------------------------------------- - # Database + # Fields #---------------------------------------------------------- theme_favicon = fields.Binary( @@ -45,21 +23,6 @@ class ResConfigSettings(models.TransientModel): readonly=False ) - theme_background_blend_mode = fields.Selection( - related='company_id.background_blend_mode', - readonly=False - ) - - theme_default_sidebar_preference = fields.Selection( - related='company_id.default_sidebar_preference', - readonly=False - ) - - theme_default_chatter_preference = fields.Selection( - related='company_id.default_chatter_preference', - readonly=False - ) - theme_color_brand = fields.Char( string='Theme Brand Color' ) @@ -68,10 +31,6 @@ class ResConfigSettings(models.TransientModel): string='Theme Primary Color' ) - theme_color_required = fields.Char( - string='Theme Required Color' - ) - theme_color_menu = fields.Char( string='Theme Menu Color' ) @@ -84,41 +43,50 @@ class ResConfigSettings(models.TransientModel): string='Theme AppBar Background' ) + #---------------------------------------------------------- + # Action + #---------------------------------------------------------- + + def action_reset_theme_assets(self): + self.env['web_editor.assets'].reset_asset( + '/muk_web_theme/static/src/colors.scss', 'web._assets_primary_variables', + ) + return { + 'type': 'ir.actions.client', + 'tag': 'reload', + } + #---------------------------------------------------------- # Functions #---------------------------------------------------------- def set_values(self): res = super(ResConfigSettings, self).set_values() - param = self.env['ir.config_parameter'].sudo() variables = [ 'o-brand-odoo', 'o-brand-primary', - 'mk-required-color', - 'mk-apps-color', + 'mk-menu-color', 'mk-appbar-color', 'mk-appbar-background', ] - colors = self.env['web_editor.assets'].get_variables_values( + colors = self.env['web_editor.assets'].get_theme_variables_values( '/muk_web_theme/static/src/colors.scss', 'web._assets_primary_variables', variables ) colors_changed = [] colors_changed.append(self.theme_color_brand != colors['o-brand-odoo']) colors_changed.append(self.theme_color_primary != colors['o-brand-primary']) - colors_changed.append(self.theme_color_required != colors['mk-required-color']) - colors_changed.append(self.theme_color_menu != colors['mk-apps-color']) + colors_changed.append(self.theme_color_menu != colors['mk-menu-color']) colors_changed.append(self.theme_color_appbar_color != colors['mk-appbar-color']) colors_changed.append(self.theme_color_appbar_background != colors['mk-appbar-background']) if(any(colors_changed)): variables = [ {'name': 'o-brand-odoo', 'value': self.theme_color_brand or "#243742"}, {'name': 'o-brand-primary', 'value': self.theme_color_primary or "#5D8DA8"}, - {'name': 'mk-required-color', 'value': self.theme_color_required or "#d1dfe6"}, - {'name': 'mk-apps-color', 'value': self.theme_color_menu or "#f8f9fa"}, + {'name': 'mk-menu-color', 'value': self.theme_color_menu or "#f8f9fa"}, {'name': 'mk-appbar-color', 'value': self.theme_color_appbar_color or "#dee2e6"}, {'name': 'mk-appbar-background', 'value': self.theme_color_appbar_background or "#000000"}, ] - self.env['web_editor.assets'].replace_variables_values( + self.env['web_editor.assets'].replace_theme_variables_values( '/muk_web_theme/static/src/colors.scss', 'web._assets_primary_variables', variables ) return res @@ -126,23 +94,20 @@ class ResConfigSettings(models.TransientModel): @api.model def get_values(self): res = super(ResConfigSettings, self).get_values() - params = self.env['ir.config_parameter'].sudo() variables = [ 'o-brand-odoo', 'o-brand-primary', - 'mk-required-color', - 'mk-apps-color', + 'mk-menu-color', 'mk-appbar-color', 'mk-appbar-background', ] - colors = self.env['web_editor.assets'].get_variables_values( + colors = self.env['web_editor.assets'].get_theme_variables_values( '/muk_web_theme/static/src/colors.scss', 'web._assets_primary_variables', variables ) res.update({ 'theme_color_brand': colors['o-brand-odoo'], 'theme_color_primary': colors['o-brand-primary'], - 'theme_color_required': colors['mk-required-color'], - 'theme_color_menu': colors['mk-apps-color'], + 'theme_color_menu': colors['mk-menu-color'], 'theme_color_appbar_color': colors['mk-appbar-color'], 'theme_color_appbar_background': colors['mk-appbar-background'], }) diff --git a/muk_web_theme/models/res_users.py b/muk_web_theme/models/res_users.py index 908cfa2..06f8210 100644 --- a/muk_web_theme/models/res_users.py +++ b/muk_web_theme/models/res_users.py @@ -1,25 +1,3 @@ -################################################################################### -# -# Copyright (c) 2017-today MuK IT GmbH. -# -# This file is part of MuK Theme -# (see https://mukit.at). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -################################################################################### - from odoo import models, fields, api @@ -28,19 +6,23 @@ class ResUsers(models.Model): _inherit = 'res.users' #---------------------------------------------------------- - # Defaults + # Properties #---------------------------------------------------------- - @api.model - def _default_sidebar_type(self): - return self.env.user.company_id.default_sidebar_preference or 'large' - - @api.model - def _default_chatter_position(self): - return self.env.user.company_id.default_chatter_preference or 'sided' - + @property + def SELF_READABLE_FIELDS(self): + return super().SELF_READABLE_FIELDS + [ + 'sidebar_type', + ] + + @property + def SELF_WRITEABLE_FIELDS(self): + return super().SELF_WRITEABLE_FIELDS + [ + 'sidebar_type', + ] + #---------------------------------------------------------- - # Database + # Fields #---------------------------------------------------------- sidebar_type = fields.Selection( @@ -49,32 +31,7 @@ class ResUsers(models.Model): ('small', 'Small'), ('large', 'Large') ], - required=True, string="Sidebar Type", - default=lambda self: self._default_sidebar_type() - ) - - chatter_position = fields.Selection( - selection=[ - ('normal', 'Normal'), - ('sided', 'Sided'), - ], + default='large', required=True, - string="Chatter Position", - default=lambda self: self._default_chatter_position() ) - - #---------------------------------------------------------- - # Setup - #---------------------------------------------------------- - - def __init__(self, pool, cr): - init_res = super(ResUsers, self).__init__(pool, cr) - theme_fields = ['sidebar_type', 'chatter_position'] - readable_fields = list(self.SELF_READABLE_FIELDS) - writeable_fields = list(self.SELF_WRITEABLE_FIELDS) - readable_fields.extend(theme_fields) - writeable_fields.extend(theme_fields) - type(self).SELF_READABLE_FIELDS = readable_fields - type(self).SELF_WRITEABLE_FIELDS = writeable_fields - return init_res diff --git a/muk_web_theme/models/web_editor_assets.py b/muk_web_theme/models/web_editor_assets.py index 031d6d8..366c490 100644 --- a/muk_web_theme/models/web_editor_assets.py +++ b/muk_web_theme/models/web_editor_assets.py @@ -1,25 +1,3 @@ -################################################################################### -# -# Copyright (c) 2017-today MuK IT GmbH. -# -# This file is part of MuK Theme -# (see https://mukit.at). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# 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 for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see . -# -################################################################################### - import re import uuid import base64 @@ -36,15 +14,15 @@ class ScssEditor(models.AbstractModel): # Helper # ---------------------------------------------------------- - def _get_variable(self, content, variable): + def _get_theme_variable(self, content, variable): regex = r'{0}\:?\s(.*?);'.format(variable) value = re.search(regex, content) return value and value.group(1) - def _get_variables(self, content, variables): - return {var: self._get_variable(content, var) for var in variables} + def _get_theme_variables(self, content, variables): + return {var: self._get_theme_variable(content, var) for var in variables} - def _replace_variables(self, content, variables): + def _replace_theme_variables(self, content, variables): for variable in variables: variable_content = '{0}: {1};'.format( variable['name'], @@ -53,19 +31,28 @@ class ScssEditor(models.AbstractModel): regex = r'{0}\:?\s(.*?);'.format(variable['name']) content = re.sub(regex, variable_content, content) return content + + @api.model + def _save_asset_hook(self): + res = super()._save_asset_hook() + if self.env.context.get('theme_variables', False): + res['website_id'] = False + return res # ---------------------------------------------------------- # Functions # ---------------------------------------------------------- - def get_variables_values(self, url, bundle, variables): - custom_url = self.make_custom_asset_file_url(url, bundle) - content = self.get_asset_content(custom_url) + def get_theme_variables_values(self, url, bundle, variables): + custom_url = self._make_custom_asset_url(url, bundle) + content = self._get_content_from_url(custom_url) if not content: - content = self.get_asset_content(url) - return self._get_variables(content.decode('utf-8'), variables) + content = self._get_content_from_url(url) + return self._get_theme_variables(content.decode('utf-8'), variables) - def replace_variables_values(self, url, bundle, variables): - original = self.get_asset_content(url).decode('utf-8') - content = self._replace_variables(original, variables) - self.save_asset(url, bundle, content, 'scss') + def replace_theme_variables_values(self, url, bundle, variables): + original = self._get_content_from_url(url).decode('utf-8') + content = self._replace_theme_variables(original, variables) + self.with_context(theme_variables=True).save_asset( + url, bundle, content, 'scss' + ) diff --git a/muk_web_theme/static/description/branding_mail_banner.png b/muk_web_theme/static/description/branding_mail_banner.png deleted file mode 100644 index 2e6859f..0000000 Binary files a/muk_web_theme/static/description/branding_mail_banner.png and /dev/null differ diff --git a/muk_web_theme/static/description/branding_saas_banner.png b/muk_web_theme/static/description/branding_saas_banner.png deleted file mode 100644 index e1a7a34..0000000 Binary files a/muk_web_theme/static/description/branding_saas_banner.png and /dev/null differ diff --git a/muk_web_theme/static/description/branding_website_banner.png b/muk_web_theme/static/description/branding_website_banner.png deleted file mode 100644 index 8400152..0000000 Binary files a/muk_web_theme/static/description/branding_website_banner.png and /dev/null differ diff --git a/muk_web_theme/static/description/index.html b/muk_web_theme/static/description/index.html index 6e518a1..d9deb7e 100644 --- a/muk_web_theme/static/description/index.html +++ b/muk_web_theme/static/description/index.html @@ -4,6 +4,13 @@

Odoo Community Backend Theme

MuK IT GmbH - www.mukit.at

+
+ Community + Enterprise + onPremise + Odoo.sh + Odoo Online +
@@ -128,10 +135,10 @@
- +

- Odoo
Implementation + Odoo
Development

@@ -148,20 +155,20 @@
- +

- Odoo
Customization + Odoo
Infrastructure

- +

- Odoo
Development + Odoo
Training

@@ -177,4 +184,4 @@
- \ No newline at end of file + diff --git a/muk_web_theme/static/description/screenshot.png b/muk_web_theme/static/description/screenshot.png index f0b7b14..065787f 100644 Binary files a/muk_web_theme/static/description/screenshot.png and b/muk_web_theme/static/description/screenshot.png differ diff --git a/muk_web_theme/static/description/screenshot_apps.png b/muk_web_theme/static/description/screenshot_apps.png index 186fea1..b56e93b 100644 Binary files a/muk_web_theme/static/description/screenshot_apps.png and b/muk_web_theme/static/description/screenshot_apps.png differ diff --git a/muk_web_theme/static/description/screenshot_chatter.png b/muk_web_theme/static/description/screenshot_chatter.png index c6e4a37..52513b6 100644 Binary files a/muk_web_theme/static/description/screenshot_chatter.png and b/muk_web_theme/static/description/screenshot_chatter.png differ diff --git a/muk_web_theme/static/description/screenshot_customize.png b/muk_web_theme/static/description/screenshot_customize.png index c63c09e..481c4b4 100644 Binary files a/muk_web_theme/static/description/screenshot_customize.png and b/muk_web_theme/static/description/screenshot_customize.png differ diff --git a/muk_web_theme/static/description/screenshot_mobile_apps.png b/muk_web_theme/static/description/screenshot_mobile_apps.png index 18684c8..18044f6 100644 Binary files a/muk_web_theme/static/description/screenshot_mobile_apps.png and b/muk_web_theme/static/description/screenshot_mobile_apps.png differ diff --git a/muk_web_theme/static/description/screenshot_mobile_form.png b/muk_web_theme/static/description/screenshot_mobile_form.png index a8b115c..2c47581 100644 Binary files a/muk_web_theme/static/description/screenshot_mobile_form.png and b/muk_web_theme/static/description/screenshot_mobile_form.png differ diff --git a/muk_web_theme/static/description/screenshot_mobile_kanban.png b/muk_web_theme/static/description/screenshot_mobile_kanban.png index 3a782a0..43434f5 100644 Binary files a/muk_web_theme/static/description/screenshot_mobile_kanban.png and b/muk_web_theme/static/description/screenshot_mobile_kanban.png differ diff --git a/muk_web_theme/static/description/screenshot_mobile_menu.png b/muk_web_theme/static/description/screenshot_mobile_menu.png index cd61707..190a0af 100644 Binary files a/muk_web_theme/static/description/screenshot_mobile_menu.png and b/muk_web_theme/static/description/screenshot_mobile_menu.png differ diff --git a/muk_web_theme/static/description/screenshot_settings.png b/muk_web_theme/static/description/screenshot_settings.png index 3d0f981..e681b28 100644 Binary files a/muk_web_theme/static/description/screenshot_settings.png and b/muk_web_theme/static/description/screenshot_settings.png differ diff --git a/muk_web_theme/static/description/service_customization.png b/muk_web_theme/static/description/service_customization.png deleted file mode 100644 index 3eac664..0000000 Binary files a/muk_web_theme/static/description/service_customization.png and /dev/null differ diff --git a/muk_web_theme/static/description/service_development.png b/muk_web_theme/static/description/service_development.png index 580d460..d64b66b 100644 Binary files a/muk_web_theme/static/description/service_development.png and b/muk_web_theme/static/description/service_development.png differ diff --git a/muk_web_theme/static/description/service_implementation.png b/muk_web_theme/static/description/service_implementation.png deleted file mode 100644 index d64b66b..0000000 Binary files a/muk_web_theme/static/description/service_implementation.png and /dev/null differ diff --git a/muk_web_theme/static/description/service_infrastructure.png b/muk_web_theme/static/description/service_infrastructure.png new file mode 100644 index 0000000..b899a31 Binary files /dev/null and b/muk_web_theme/static/description/service_infrastructure.png differ diff --git a/muk_web_theme/static/description/service_training.png b/muk_web_theme/static/description/service_training.png new file mode 100644 index 0000000..19ea76e Binary files /dev/null and b/muk_web_theme/static/description/service_training.png differ diff --git a/muk_web_theme/static/src/colors.scss b/muk_web_theme/static/src/colors.scss index 9898fe6..7156972 100644 --- a/muk_web_theme/static/src/colors.scss +++ b/muk_web_theme/static/src/colors.scss @@ -1,35 +1,9 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - $o-brand-odoo: #243742; $o-brand-primary: #5D8DA8; -$mk-required-color: #d1dfe6; - -$mk-apps-color: #f8f9fa; - +$mk-menu-color: #f8f9fa; $mk-appbar-color: #dee2e6; $mk-appbar-background: #000000; $mk-brand-gradient-start: lighten($o-brand-odoo, 10%); $mk-brand-gradient-end: lighten($o-brand-odoo, 20%); - diff --git a/muk_web_theme/static/src/core/pager/pager.xml b/muk_web_theme/static/src/core/pager/pager.xml new file mode 100644 index 0000000..0d727a8 --- /dev/null +++ b/muk_web_theme/static/src/core/pager/pager.xml @@ -0,0 +1,25 @@ + + + \ No newline at end of file diff --git a/muk_web_theme/static/src/legacy/js/fields_relational.js b/muk_web_theme/static/src/legacy/js/fields_relational.js deleted file mode 100644 index baa6068..0000000 --- a/muk_web_theme/static/src/legacy/js/fields_relational.js +++ /dev/null @@ -1,64 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -odoo.define('muk_web_theme.relational_fields', function (require) { -"use strict"; - -const config = require("web.config"); -const fields = require('web.relational_fields'); - -fields.FieldStatus.include({ - _setState() { - this._super(...arguments); - if (config.device.isMobile) { - _.map(this.status_information, (value) => { - value.fold = true; - }); - } - }, -}); - -fields.FieldOne2Many.include({ - _renderButtons() { - const result = this._super(...arguments); - if (config.device.isMobile && this.$buttons) { - const $buttons = this.$buttons.find('.btn-secondary'); - $buttons.addClass('btn-primary mk_mobile_add'); - $buttons.removeClass('btn-secondary'); - } - return result; - } -}); - -fields.FieldMany2Many.include({ - _renderButtons() { - const result = this._super(...arguments); - if (config.device.isMobile && this.$buttons) { - const $buttons = this.$buttons.find('.btn-secondary'); - $buttons.addClass('btn-primary mk_mobile_add'); - $buttons.removeClass('btn-secondary'); - } - return result; - } -}); - -}); \ No newline at end of file diff --git a/muk_web_theme/static/src/legacy/js/form_renderer.js b/muk_web_theme/static/src/legacy/js/form_renderer.js deleted file mode 100644 index c5ab7e6..0000000 --- a/muk_web_theme/static/src/legacy/js/form_renderer.js +++ /dev/null @@ -1,49 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -odoo.define('muk_web_theme.FormRenderer', function (require) { -"use strict"; - -const core = require('web.core'); -const config = require("web.config"); - -const FormRenderer = require('web.FormRenderer'); - -FormRenderer.include({ - _renderHeaderButtons() { - const $buttons = this._super(...arguments); - if ( - !config.device.isMobile || - !$buttons.is(":has(>:not(.o_invisible_modifier))") - ) { - return $buttons; - } - $buttons.addClass("dropdown-menu"); - const $dropdown = $( - core.qweb.render("muk_web_theme.MenuStatusbarButtons") - ); - $buttons.addClass("dropdown-menu").appendTo($dropdown); - return $dropdown; - }, -}); - -}); \ No newline at end of file diff --git a/muk_web_theme/static/src/legacy/js/form_view.js b/muk_web_theme/static/src/legacy/js/form_view.js deleted file mode 100644 index ba24fe2..0000000 --- a/muk_web_theme/static/src/legacy/js/form_view.js +++ /dev/null @@ -1,49 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -odoo.define('muk_web_theme.FormView', function (require) { -"use strict"; - -const config = require("web.config"); - -const FormView = require('web.FormView'); -const QuickCreateFormView = require('web.QuickCreateFormView'); - -FormView.include({ - init() { - this._super(...arguments); - if (config.device.isMobile) { - this.controllerParams.disableAutofocus = true; - } - }, -}); - -QuickCreateFormView.include({ - init() { - this._super(...arguments); - if (config.device.isMobile) { - this.controllerParams.disableAutofocus = true; - } - }, -}); - -}); diff --git a/muk_web_theme/static/src/legacy/js/kanban_column.js b/muk_web_theme/static/src/legacy/js/kanban_column.js deleted file mode 100644 index 263d72e..0000000 --- a/muk_web_theme/static/src/legacy/js/kanban_column.js +++ /dev/null @@ -1,42 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -odoo.define('muk_web_theme.KanbanColumn', function (require) { -"use strict"; - -const config = require('web.config'); - -const KanbanColumn = require('web.KanbanColumn'); - -if (!config.device.isMobile) { - return; -} - -KanbanColumn.include({ - init() { - this._super(...arguments); - this.recordsDraggable = false; - this.canBeFolded = false; - }, -}); - -}); diff --git a/muk_web_theme/static/src/legacy/js/kanban_quick_create.js b/muk_web_theme/static/src/legacy/js/kanban_quick_create.js deleted file mode 100644 index 0bb4602..0000000 --- a/muk_web_theme/static/src/legacy/js/kanban_quick_create.js +++ /dev/null @@ -1,44 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -odoo.define('muk_web_theme.kanban_column_quick_create', function (require) { -"use strict"; - -const config = require('web.config'); - -const KanbanRenderer = require('web.kanban_column_quick_create'); - -KanbanRenderer.include({ - init() { - this._super(...arguments); - this.isMobile = config.device.isMobile; - }, - _cancel() { - if (!config.device.isMobile) { - this._super(...arguments); - } else if (!this.folded) { - this.$input.val(''); - } - }, -}); - -}); diff --git a/muk_web_theme/static/src/legacy/js/kanban_renderer.js b/muk_web_theme/static/src/legacy/js/kanban_renderer.js deleted file mode 100644 index 0ea465c..0000000 --- a/muk_web_theme/static/src/legacy/js/kanban_renderer.js +++ /dev/null @@ -1,271 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -odoo.define('muk_web_theme.KanbanRenderer', function (require) { -"use strict"; - -const config = require('web.config'); -const core = require('web.core'); - -const KanbanRenderer = require('web.KanbanRenderer'); - -const _t = core._t; -const qweb = core.qweb; - -if (!config.device.isMobile) { - return; -} - -KanbanRenderer.include({ - custom_events: _.extend({}, KanbanRenderer.prototype.custom_events || {}, { - quick_create_column_created: '_onColumnAdded', - }), - events: _.extend({}, KanbanRenderer.prototype.events, { - 'click .o_kanban_mobile_tab': '_onMobileTabClicked', - 'click .o_kanban_mobile_add_column': '_onMobileQuickCreateClicked', - }), - ANIMATE: true, - init() { - this._super.apply(this, arguments); - this.activeColumnIndex = 0; - this._scrollPosition = null; - }, - on_attach_callback() { - if (this._scrollPosition && this.state.groupedBy.length && this.widgets.length) { - var $column = this.widgets[this.activeColumnIndex].$el; - $column.scrollLeft(this._scrollPosition.left); - $column.scrollTop(this._scrollPosition.top); - } - this._computeTabPosition(); - this._super.apply(this, arguments); - }, - on_detach_callback() { - if (this.state.groupedBy.length && this.widgets.length) { - var $column = this.widgets[this.activeColumnIndex].$el; - this._scrollPosition = { - left: $column.scrollLeft(), - top: $column.scrollTop(), - }; - } else { - this._scrollPosition = null; - } - this._super.apply(this, arguments); - }, - addQuickCreate() { - if(this._canCreateColumn() && !this.quickCreate.folded) { - this._onMobileQuickCreateClicked(); - } - return this.widgets[this.activeColumnIndex].addQuickCreate(); - }, - updateColumn(localID) { - var index = _.findIndex(this.widgets, {db_id: localID}); - var $column = this.widgets[index].$el; - var scrollTop = $column.scrollTop(); - return this._super.apply(this, arguments) - .then(() => this._layoutUpdate(false)) - .then(() => $column.scrollTop(scrollTop)); - }, - _canCreateColumn: function() { - return this.quickCreateEnabled && this.quickCreate && this.widgets.length; - }, - _computeColumnPosition(animate) { - if (this.widgets.length) { - const rtl = _t.database.parameters.direction === 'rtl'; - this.$('.o_kanban_group').show(); - const $columnAfter = this._toNode(this.widgets.filter((widget, index) => index > this.activeColumnIndex)); - const promiseAfter = this._updateColumnCss($columnAfter, rtl ? {right: '100%'} : {left: '100%'}, animate); - const $columnBefore = this._toNode(this.widgets.filter((widget, index) => index < this.activeColumnIndex)); - const promiseBefore = this._updateColumnCss($columnBefore, rtl ? {right: '-100%'} : {left: '-100%'}, animate); - const $columnCurrent = this._toNode(this.widgets.filter((widget, index) => index === this.activeColumnIndex)); - const promiseCurrent = this._updateColumnCss($columnCurrent, rtl ? {right: '0%'} : {left: '0%'}, animate); - promiseAfter - .then(promiseBefore) - .then(promiseCurrent) - .then(() => { - $columnAfter.hide(); - $columnBefore.hide(); - }); - } - }, - _computeCurrentColumn() { - if (this.widgets.length) { - var column = this.widgets[this.activeColumnIndex]; - if (!column) { - return; - } - var columnID = column.id || column.db_id; - this.$('.o_kanban_mobile_tab.o_current, .o_kanban_group.o_current') - .removeClass('o_current'); - this.$('.o_kanban_group[data-id="' + columnID + '"], ' + - '.o_kanban_mobile_tab[data-id="' + columnID + '"]') - .addClass('o_current'); - } - }, - _computeTabPosition() { - this._computeTabJustification(); - this._computeTabScrollPosition(); - }, - _computeTabScrollPosition() { - if (this.widgets.length) { - var lastItemIndex = this.widgets.length - 1; - var moveToIndex = this.activeColumnIndex; - var scrollToLeft = 0; - for (var i = 0; i < moveToIndex; i++) { - var columnWidth = this._getTabWidth(this.widgets[i]); - if (moveToIndex !== lastItemIndex && i === moveToIndex - 1) { - var partialWidth = 0.75; - scrollToLeft += columnWidth * partialWidth; - } else { - scrollToLeft += columnWidth; - } - } - this.$('.o_kanban_mobile_tabs').scrollLeft(scrollToLeft); - } - }, - _computeTabJustification() { - if (this.widgets.length) { - var self = this; - var widthChilds = this.widgets.reduce(function (total, column) { - return total + self._getTabWidth(column); - }, 0); - var $tabs = this.$('.o_kanban_mobile_tabs'); - $tabs.toggleClass('justify-content-between', $tabs.outerWidth() >= widthChilds); - } - }, - _enableSwipe() { - var self = this; - var step = _t.database.parameters.direction === 'rtl' ? -1 : 1; - this.$el.swipe({ - excludedElements: ".o_kanban_mobile_tabs", - swipeLeft() { - var moveToIndex = self.activeColumnIndex + step; - if (moveToIndex < self.widgets.length) { - self._moveToGroup(moveToIndex, self.ANIMATE); - } - }, - swipeRight() { - var moveToIndex = self.activeColumnIndex - step; - if (moveToIndex > -1) { - self._moveToGroup(moveToIndex, self.ANIMATE); - } - } - }); - }, - _getTabWidth (column) { - var columnID = column.id || column.db_id; - return this.$('.o_kanban_mobile_tab[data-id="' + columnID + '"]').outerWidth(); - }, - _layoutUpdate (animate) { - this._computeCurrentColumn(); - this._computeTabPosition(); - this._computeColumnPosition(animate); - }, - _moveToGroup(moveToIndex, animate) { - if (moveToIndex < 0 || moveToIndex >= this.widgets.length) { - this._layoutUpdate(animate); - return Promise.resolve(); - } - this.activeColumnIndex = moveToIndex; - var column = this.widgets[this.activeColumnIndex]; - if (column.data.isOpen) { - this._layoutUpdate(animate); - } else { - this.trigger_up('column_toggle_fold', { - db_id: column.db_id, - onSuccess: () => this._layoutUpdate(animate) - }); - } - this._enableSwipe(); - return Promise.resolve(); - }, - _renderGrouped(fragment) { - var self = this; - var newFragment = document.createDocumentFragment(); - this._super.apply(this, [newFragment]); - this.defs.push(Promise.all(this.defs).then(function () { - var data = []; - _.each(self.state.data, function (group) { - if (!group.value) { - group = _.extend({}, group, {value: _t('Undefined')}); - data.unshift(group); - } else { - data.push(group); - } - }); - - var kanbanColumnContainer = document.createElement('div'); - kanbanColumnContainer.classList.add('o_kanban_columns_content'); - kanbanColumnContainer.appendChild(newFragment); - fragment.appendChild(kanbanColumnContainer); - $(qweb.render('KanbanView.MobileTabs', { - data: data, - quickCreateEnabled: self._canCreateColumn() - })).prependTo(fragment); - })); - }, - _renderView() { - var self = this; - return this._super.apply(this, arguments).then(function () { - if (self.state.groupedBy.length) { - return self._moveToGroup(0); - } else { - if(self._canCreateColumn()) { - self._onMobileQuickCreateClicked(); - } - return Promise.resolve(); - } - }); - }, - _toNode(widgets) { - const selectorCss = widgets - .map(widget => '.o_kanban_group[data-id="' + (widget.id || widget.db_id) + '"]') - .join(', '); - return this.$(selectorCss); - }, - _updateColumnCss($column, cssProperties, animate) { - if (animate) { - return new Promise(resolve => $column.animate(cssProperties, 'fast', resolve)); - } else { - $column.css(cssProperties); - return Promise.resolve(); - } - }, - _onColumnAdded() { - this._computeTabPosition(); - if(this._canCreateColumn() && !this.quickCreate.folded) { - this.quickCreate.toggleFold(); - } - }, - _onMobileQuickCreateClicked: function() { - this.$('.o_kanban_group').toggle(); - this.quickCreate.toggleFold(); - }, - _onMobileTabClicked(event) { - if(this._canCreateColumn() && !this.quickCreate.folded) { - this.quickCreate.toggleFold(); - } - this._moveToGroup($(event.currentTarget).index(), true); - }, - _renderExampleBackground() {}, -}); - -}); \ No newline at end of file diff --git a/muk_web_theme/static/src/legacy/js/kanban_view.js b/muk_web_theme/static/src/legacy/js/kanban_view.js deleted file mode 100644 index ffdc0ff..0000000 --- a/muk_web_theme/static/src/legacy/js/kanban_view.js +++ /dev/null @@ -1,37 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -odoo.define('muk_web_theme.KanbanView', function (require) { -"use strict"; - -const config = require("web.config"); - -const KanbanView = require('web.KanbanView'); - -KanbanView.include({ - init() { - this._super.apply(this, arguments); - this.jsLibs.push("/web/static/lib/jquery.touchSwipe/jquery.touchSwipe.js"); - }, -}); - -}); diff --git a/muk_web_theme/static/src/legacy/scss/calendar_view.scss b/muk_web_theme/static/src/legacy/scss/calendar_view.scss deleted file mode 100644 index 5ad0327..0000000 --- a/muk_web_theme/static/src/legacy/scss/calendar_view.scss +++ /dev/null @@ -1,50 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -@include media-breakpoint-down(sm) { - .o_calendar_view .o_calendar_widget { - .fc-timeGridDay-view .fc-axis, - .fc-timeGridWeek-view .fc-axis { - padding-left: 0px; - } - .fc-dayGridMonth-view { - padding-left: 0px; - .fc-week-number { - display: none; - } - } - .fc-dayGridYear-view { - padding-left: 0px; - > .fc-month-container { - width: 95%; - } - } - .fc-timeGridDay-view .fc-widget-header { - margin: 0 4px; - } - .fc-timeGridWeek-view .fc-widget-header { - word-spacing: 4em; - white-space: normal; - text-align: center; - } - } -} \ No newline at end of file diff --git a/muk_web_theme/static/src/legacy/scss/fields.scss b/muk_web_theme/static/src/legacy/scss/fields.scss deleted file mode 100644 index 6136792..0000000 --- a/muk_web_theme/static/src/legacy/scss/fields.scss +++ /dev/null @@ -1,40 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -.o_field_widget { - &.o_field_many2one .o_external_button { - color: $o-brand-odoo - } -} - -.o_required_modifier { - &.o_input, .o_input { - background-color: $mk-required-color !important; - } -} - -@include media-breakpoint-down(sm) { - .o_form_view .mk_mobile_add { - margin-left: 0 !important; - margin-bottom: 10px !important; - } -} \ No newline at end of file diff --git a/muk_web_theme/static/src/legacy/scss/form_view.scss b/muk_web_theme/static/src/legacy/scss/form_view.scss deleted file mode 100644 index d890c45..0000000 --- a/muk_web_theme/static/src/legacy/scss/form_view.scss +++ /dev/null @@ -1,158 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -.o_form_view { - .o_form_sheet_bg { - background: $o-webclient-background-color; - border-bottom: 1px solid gray('300'); - > .o_form_sheet { - @include mk-container-widths(); - background-color: $o-view-background-color; - border: 1px solid gray('400'); - box-shadow: 0 5px 20px -15px black; - max-width: calc(100% - #{$o-horizontal-padding*2}); - } - .o_form_statusbar { - position: sticky; - z-index: 1; - top: 0; - } - .oe_button_box { - .btn.oe_stat_button > .o_button_icon { - color: $o-brand-odoo; - } - } - .oe_title { - max-width: 100%; - width: initial; - span.o_field_widget { - max-width: 100%; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - width: initial; - } - } - .o_notebook { - .nav-tabs { - overflow-x : auto; - overflow-y: hidden; - flex-flow: nowrap; - .nav-item { - white-space: nowrap; - } - } - > .tab-content > .tab-pane > :first-child { - margin-top: 0; - } - } - } - &.o_form_editable { - .oe_title { - max-width: map-get($container-max-widths, md) - (2 * $o-horizontal-padding); - } - } - @include media-breakpoint-down(sm) { - .o_form_sheet { - min-width: 100% !important; - max-width: 100% !important; - margin-top: 15px !important; - } - .o_group { - @for $i from 1 through $o-form-group-cols { - .o_group_col_#{$i} { - width: 100% !important; - } - } - .o_field_widget.o_text_overflow { - width: auto !important; - } - } - .o_statusbar_buttons_dropdown { - border: { - bottom: 0; - radius: 0; - top: 0; - } - height: 100%; - } - .o_statusbar_buttons > .btn { - border-radius: 0; - border: 0; - width: 100%; - margin-bottom: 0.2rem; - &:last-child { - margin-bottom: 0; - } - } - .o_statusbar_status { - .o_arrow_button:first-child::before { - content: none; - display: none; - } - } - .app_settings_block { - .row { - margin: 0; - } - } - .o_notebook .nav-tabs { - &::-webkit-scrollbar { - display: none; - } - } - .o_cp_buttons { - width: 100%; - div, .o-kanban-button-new { - width: 100%; - } - } - } - @include media-breakpoint-down(xs) { - .oe_title { - width: 100% !important; - max-width: 100% !important; - } - } -} - -.mk_chatter_position_sided { - @include media-breakpoint-up(xxl, $o-extra-grid-breakpoints) { - .o_form_view:not(.o_form_nosheet) { - display: flex; - flex-flow: row nowrap; - height: 100%; - .o_form_sheet_bg { - min-width: $mk-form-min-width; - flex: 1 1 auto; - overflow: auto; - } - > .o_FormRenderer_chatterContainer { - flex: 1 1 auto; - overflow: auto; - min-width: $mk-chatter-min-width; - max-width: $mk-chatter-max-width; - border-left: 1px solid gray('400'); - } - } - } -} diff --git a/muk_web_theme/static/src/legacy/scss/kanban_view.scss b/muk_web_theme/static/src/legacy/scss/kanban_view.scss deleted file mode 100644 index 9637200..0000000 --- a/muk_web_theme/static/src/legacy/scss/kanban_view.scss +++ /dev/null @@ -1,100 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -@include media-breakpoint-down(sm) { - .o_kanban_view.o_kanban_grouped { - display: block; - position: relative; - overflow-x: hidden; - .o_kanban_mobile_tabs_container { - position: sticky; - display: flex; - justify-content: space-between; - width: 100%; - top: 0; - z-index: 1; - background-color: #5E5E5E; - .o_kanban_mobile_add_column { - height: $o-kanban-mobile-tabs-height; - padding: 10px; - border-left: grey 1px solid; - color: white; - font-size: 14px; - } - .o_kanban_mobile_tabs { - position: relative; - display: flex; - width: 100%; - height: $o-kanban-mobile-tabs-height; - overflow-x: auto; - .o_kanban_mobile_tab { - height: $o-kanban-mobile-tabs-height; - padding: 10px 20px; - font-size: 14px; - color: white; - &.o_current { - font-weight: bold; - border-bottom: 3px solid $o-brand-primary; - } - .o_column_title { - white-space: nowrap; - text-transform: uppercase; - } - } - } - } - .o_kanban_columns_content { - position: relative; - } - &[class] .o_kanban_group:not(.o_column_folded) { - @include o-position-absolute($top: $o-kanban-mobile-tabs-height, $left: 0, $bottom: 0); - width: 100%; - padding: 0; - margin-left: 0; - border: none; - &.o_current { - position: inherit; - top: 0; - &.o_kanban_no_records { - min-height: $o-kanban-mobile-empty-height; - } - } - .o_kanban_header { - display: none; - } - .o_kanban_record, .o_kanban_quick_create { - border: none; - border-bottom: 1px solid lightgray; - padding: 10px 16px; - margin: 0; - } - } - } - .o_kanban_view .o_column_quick_create { - .o_quick_create_folded { - display: none !important; - } - .o_quick_create_unfolded{ - width: 100%; - } - } -} diff --git a/muk_web_theme/static/src/legacy/scss/list_view.scss b/muk_web_theme/static/src/legacy/scss/list_view.scss deleted file mode 100644 index 307bf19..0000000 --- a/muk_web_theme/static/src/legacy/scss/list_view.scss +++ /dev/null @@ -1,75 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -.o_list_view { - table { - overflow-x: hidden; - } - table, thead, tfoot, td, th { - border: none !important; - } - thead { - background-color: white; - th.o_column_sortable:hover { - background-color: white; - } - } - tfoot { - color: white !important; - cursor: default; - font-weight: normal; - } -} - -.o_list_table_grouped.table tbody tr { - &:nth-of-type(2n+1) { - background-color: white; - } - &.o_group_header { - background-image: none; - background-color: gray('200'); - box-shadow: inset 0 1px 0 gray('300'); - } - &:hover { - background-color: gray('200'); - } -} - -.o_content, .modal-content { - > div > .table-responsive { - overflow-x: initial; - > .o_list_view { - thead, thead tr:nth-child(1) th { - border-bottom: solid 1px gray('300'); - background-color: white; - position: sticky; - z-index: 1; - top: 0; - } - tfoot, tfoot tr:nth-child(1) td { - background-color: $o-list-footer-bg-color; - position: sticky; - bottom: 0; - } - } - } -} diff --git a/muk_web_theme/static/src/legacy/scss/settings_view.scss b/muk_web_theme/static/src/legacy/scss/settings_view.scss deleted file mode 100644 index c36f6ad..0000000 --- a/muk_web_theme/static/src/legacy/scss/settings_view.scss +++ /dev/null @@ -1,38 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -@include media-breakpoint-down(sm) { - .o_base_settings .o_setting_container { - display: block; - .settings_tab { - flex-flow: row nowrap; - padding-top: 0px; - .tab { - padding-right: 16px; - } - .selected { - background-color: #212529; - box-shadow: inset 0 -5px #7c7bad; - } - } - } -} \ No newline at end of file diff --git a/muk_web_theme/static/src/legacy/xml/views.xml b/muk_web_theme/static/src/legacy/xml/views.xml deleted file mode 100644 index ee7f778..0000000 --- a/muk_web_theme/static/src/legacy/xml/views.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Edit - - - - - - Create - - - - - - Save - - - - - - Discard - - - - - - - - - Create - - - - - - - Save - - - - - - - Discard - - - - - - - - - - - - - - - - - Favorites - - - - - \ No newline at end of file diff --git a/muk_web_theme/static/src/mixins.scss b/muk_web_theme/static/src/mixins.scss index d7c4319..1ccc086 100644 --- a/muk_web_theme/static/src/mixins.scss +++ b/muk_web_theme/static/src/mixins.scss @@ -1,25 +1,3 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - @mixin mk-disable-scrollbar { scrollbar-width: none; -ms-overflow-style: none; @@ -45,11 +23,3 @@ box-shadow: none; border: none; } - -@mixin mk-container-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) { - @each $breakpoint, $container-max-width in $max-widths { - @include media-breakpoint-up($breakpoint, $breakpoints) { - width: $container-max-width; - } - } -} diff --git a/muk_web_theme/static/src/search/control_panel/control_panel.js b/muk_web_theme/static/src/search/control_panel/control_panel.js deleted file mode 100644 index c678ec5..0000000 --- a/muk_web_theme/static/src/search/control_panel/control_panel.js +++ /dev/null @@ -1,64 +0,0 @@ -/** @odoo-module **/ - -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -import { patch } from "web.utils"; -import { useService } from "@web/core/utils/hooks"; -import { SIZES } from "@web/core/ui/ui_service"; - -import LegacyControlPanel from "web.ControlPanel"; -import { ControlPanel } from "@web/search/control_panel/control_panel"; -import { SearchBar } from "@web/search/search_bar/search_bar"; - -const {useState, useContext} = owl.hooks; - -patch(LegacyControlPanel.prototype, "muk_web_theme.LegacyControlPanelMobile", { - setup() { - this._super(); - this.state = useState({ - mobileSearchMode: "", - }); - }, - setMobileSearchMode(ev) { - this.state.mobileSearchMode = ev.detail; - }, -}); - -patch(ControlPanel.prototype, "muk_web_theme.ControlPanelMobile", { - setup() { - this._super(); - this.state = useState({ - mobileSearchMode: "", - }); - this.SIZES = SIZES; - this.uiService = useService("ui"); - console.log(this); - }, - setMobileSearchMode(ev) { - this.state.mobileSearchMode = ev.detail; - }, -}); - -patch(SearchBar, "muk_web_theme.SearchBarMobile", { - template: "muk_web_theme.SearchBar", -}); \ No newline at end of file diff --git a/muk_web_theme/static/src/search/control_panel/control_panel.scss b/muk_web_theme/static/src/search/control_panel/control_panel.scss deleted file mode 100644 index 5132b50..0000000 --- a/muk_web_theme/static/src/search/control_panel/control_panel.scss +++ /dev/null @@ -1,243 +0,0 @@ -/********************************************************************************** -* -* Copyright (c) 2017-today MuK IT GmbH. -* -* This file is part of MuK Theme -* (see https://mukit.at). -* -* This program is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* 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 for more details. -* -* You should have received a copy of the GNU Lesser General Public License -* along with this program. If not, see . -* -**********************************************************************************/ - -@include media-breakpoint-down(sm) { - .o_control_panel { - padding-left: $o-horizontal-padding /2; - padding-right: $o-horizontal-padding /2; - .o_cp_top { - justify-content: space-between; - .o_cp_top_left { - flex-grow: 100; - .breadcrumb { - overflow: hidden; - display: block; - white-space: nowrap; - text-overflow: ellipsis; - } - } - .o_cp_top_right { - flex-grow: 1; - min-height: 35px; - .o_searchview_mobile { - border: none; - } - } - } - .o_cp_bottom { - justify-content: space-between; - .o_cp_bottom_left { - flex-grow: 1; - .o_cp_action_menus, .o_cp_buttons { - flex: 1 1 100%; - } - .o_cp_action_menus .o_dropdown .o_dropdown_toggler_btn { - .o_dropdown_title { - display: none; - } - i:last-of-type{ - display: none; - } - &::after{ - display: inline-block; - width: 0; - height: 0; - margin-left: 0.255em; - vertical-align: 0.255em; - content: ""; - border-top: 0.3em solid; - border-right: 0.3em solid transparent; - border-bottom: 0; - border-left: 0.3em solid transparent; - } - } - } - .o_cp_bottom_right { - .o_cp_pager { - white-space: nowrap; - .o_pager_counter { - max-width: 60px; - @include o-text-overflow; - } - .o_pager_previous, .o_pager_next { - border: none; - } - } - .o_search_options { - display: none; - } - } - } - .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_searchview_input_container > .o_searchview_autocomplete { - left: 0; - right: 0; - > li { - padding: 10px 0px; - } - } - .o_searchview_quick { - display: flex; - flex: 1 1 auto; - align-items: center; - .o_searchview_input_container { - flex: 1 1 auto; - } - } - .o_searchview { - padding: 1px 0px 3px 0px; - &.o_searchview_mobile { - cursor: pointer; - } - } - .o_cp_buttons .btn.d-block:not(.d-none) { - display: inline-block !important; - } - .o_cp_switch_buttons { - display: flex; - min-width: 0px; - flex-direction: row; - align-content: center; - justify-content: space-around; - padding: 0; - .btn { - margin: 5px; - border: none; - font-size: 1.25rem; - } - } - } - .o_controller_with_searchpanel .o_search_panel { - display: none; - } -} - -.mk_cp_mobile_search { - position: fixed; - top: 0; - left: 0; - bottom: 0; - padding: 0; - width: 100%; - background-color: white; - z-index: $zindex-modal; - overflow: auto; - .mk_mobile_search_header { - height: 46px; - margin-bottom: 10px; - width: 100%; - background-color: $o-brand-odoo; - color: white; - span:active { - background-color: darken($o-brand-primary, 10%); - } - span { - cursor: pointer; - } - } - .o_searchview_input_container { - display: flex; - padding: 15px 20px 0 20px; - position: relative; - .o_searchview_input { - width: 100%; - margin-bottom: 15px; - border-bottom: 1px solid $o-brand-primary; - } - .o_searchview_facet { - display: inline-flex; - order: 1; - } - .o_searchview_autocomplete { - top: 3rem; - } - } - .mk_mobile_search_filter { - padding-bottom: 15%; - > .dropdown { - flex-direction: column; - line-height: 2rem; - width: 100%; - margin: 15px 5px 0px 5px; - border: solid 1px darken(gray("200"), 20%); - } - .dropdown.show > .dropdown-toggle { - background-color: gray("200"); - } - .dropdown-toggle { - width: 100%; - text-align: left; - &:after { - top: auto; - } - } - .dropdown-item:before { - top: auto; - } - .dropdown-item.focus { - background-color: white; - } - .dropdown-menu { - position: relative !important; - top: 0 !important; - left: 0 !important; - width: 100%; - max-height: 100%; - box-shadow: none; - border: none; - color: gray("600"); - .divider { - margin: 0px; - } - > li > a { - padding: 10px 26px; - } - } - } - .mk_mobile_search_show_result { - padding: 10px; - font-size: 15px; - } -} - diff --git a/muk_web_theme/static/src/search/control_panel/control_panel.xml b/muk_web_theme/static/src/search/control_panel/control_panel.xml deleted file mode 100644 index 2dea736..0000000 --- a/muk_web_theme/static/src/search/control_panel/control_panel.xml +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - model.config.env.device.isMobile and state.mobileSearchMode == 'quick' ? 'o_hidden' : '' - - - - - - - - - - - - -