From bc02c20b7d7c1f2aa30e41b49f438485fbd29ee5 Mon Sep 17 00:00:00 2001 From: "anjeel.haria" Date: Wed, 1 Mar 2023 15:35:45 +0100 Subject: [PATCH] [MIG] web_responsive: Migration to 16.0 Fix for optional dropdown checkbox in list view Made Changes for compatibility with web_chatter_position module Fix for attachment delete dialog --- web_responsive/README.rst | 60 +- web_responsive/__init__.py | 1 - web_responsive/__manifest__.py | 27 +- web_responsive/models/__init__.py | 1 - web_responsive/models/res_users.py | 26 - web_responsive/readme/CONTRIBUTORS.rst | 4 +- web_responsive/readme/DESCRIPTION.rst | 54 +- web_responsive/static/description/index.html | 73 +-- web_responsive/static/img/appsearch.gif | Bin 219564 -> 191495 bytes web_responsive/static/img/calendar.gif | Bin 210152 -> 53850 bytes .../static/img/default_icon_app.png | Bin 0 -> 9824 bytes web_responsive/static/img/kanban.gif | Bin 61030 -> 43323 bytes .../src/components/apps_menu/apps_menu.esm.js | 237 +++++--- .../src/components/apps_menu/apps_menu.scss | 81 +-- .../src/components/apps_menu/apps_menu.xml | 53 +- .../attachment_viewer.esm.js | 25 +- .../attachment_viewer/attachment_viewer.scss | 23 +- .../attachment_viewer/attachment_viewer.xml | 8 +- .../chatter_topbar/chatter_topbar.esm.js | 15 + .../chatter_topbar/chatter_topbar.xml | 223 +++++++ .../control_panel/control_panel.esm.js | 14 +- .../control_panel/control_panel.scss | 46 +- .../control_panel/control_panel.xml | 125 +--- .../static/src/components/hotkey/hotkey.xml | 32 - .../src/components/navbar/main_navbar.scss | 53 -- .../src/components/navbar/main_navbar.xml | 13 - .../search_panel/search_panel.esm.js | 4 +- .../components/search_panel/search_panel.scss | 4 +- .../components/search_panel/search_panel.xml | 2 +- .../static/src/components/ui_context.esm.js | 7 +- .../src/legacy/js/kanban_renderer_mobile.js | 569 ------------------ .../static/src/legacy/js/web_responsive.js | 212 +------ .../static/src/legacy/js/website_apps_menu.js | 52 -- .../src/legacy/scss/kanban_view_mobile.scss | 113 ---- .../src/legacy/scss/web_responsive.scss | 321 ++++------ .../src/legacy/scss/website_apps_menu.scss | 35 -- .../static/src/legacy/xml/form_buttons.xml | 225 ++++--- .../src/views/form/form_controller.esm.js | 14 + web_responsive/tests/__init__.py | 1 - web_responsive/tests/test_res_users.py | 14 - web_responsive/views/res_users.xml | 17 - web_responsive/views/web.xml | 14 +- 42 files changed, 930 insertions(+), 1868 deletions(-) delete mode 100644 web_responsive/models/__init__.py delete mode 100644 web_responsive/models/res_users.py create mode 100644 web_responsive/static/img/default_icon_app.png create mode 100644 web_responsive/static/src/components/chatter_topbar/chatter_topbar.esm.js create mode 100644 web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml delete mode 100644 web_responsive/static/src/components/navbar/main_navbar.scss delete mode 100644 web_responsive/static/src/components/navbar/main_navbar.xml delete mode 100644 web_responsive/static/src/legacy/js/kanban_renderer_mobile.js delete mode 100644 web_responsive/static/src/legacy/js/website_apps_menu.js delete mode 100644 web_responsive/static/src/legacy/scss/kanban_view_mobile.scss delete mode 100644 web_responsive/static/src/legacy/scss/website_apps_menu.scss create mode 100644 web_responsive/static/src/views/form/form_controller.esm.js delete mode 100644 web_responsive/tests/__init__.py delete mode 100644 web_responsive/tests/test_res_users.py delete mode 100644 web_responsive/views/res_users.xml diff --git a/web_responsive/README.rst b/web_responsive/README.rst index a07297d60..00261a274 100644 --- a/web_responsive/README.rst +++ b/web_responsive/README.rst @@ -14,13 +14,13 @@ Web Responsive :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github - :target: https://github.com/OCA/web/tree/15.0/web_responsive + :target: https://github.com/OCA/web/tree/16.0/web_responsive :alt: OCA/web .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/web-15-0/web-15-0-web_responsive + :target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_responsive :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/162/15.0 + :target: https://runbot.odoo-community.org/runbot/162/16.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -31,83 +31,83 @@ This module adds responsiveness to web backend. * New navigation with the fullscreen app menu - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/appmenu.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/appmenu.gif * Quick menu search inside the app menu - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/appsearch.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/appsearch.gif * Sticky header & footer in list view - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/listview.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/listview.gif * Sticky statusbar in form view - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/formview.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/formview.gif * Bigger checkboxes in list view - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/listview.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/listview.gif * Increase the size of the labels in extra large screens - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/label_size_small.png + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/label_size_small.png - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/label_size_large.png + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/label_size_large.png **Features for mobile**: * App-specific submenus are shown on full screen when toggling them from the "hamburger" menu - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/hamburger.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/hamburger.gif * User-specific submenus are shown on full screen when toggling them from the "avatar" menu - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/usermenu.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/usermenu.gif * View type picker dropdown displays comfortably - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/viewtype.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/viewtype.gif * Top app bar is always visible, but the control panel is hidden when scrolling down, to save some valuable vertical space - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/navbar.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/navbar.gif * Form status bar action and status buttons are collapsed in dropdowns. Other control panel buttons use icons to save space. - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/form_buttons.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/form_buttons.gif * Breadcrumbs navigation is collapsed with a "back arrow" button. - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/breadcrumbs.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/breadcrumbs.gif * Search panel is collapsed to mobile version on small screens. - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/search_panel.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/search_panel.gif * Followers and send button is displayed on mobile. Avatar is hidden. - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/chatter.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/chatter.gif * Scrollable dropdowns - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/dropdown_scroll.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/dropdown_scroll.gif * Kanban interface adopted to mobile - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/kanban.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/kanban.gif * Calendar interface adopted to mobile - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/calendar.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/calendar.gif * Interface is adapted dynamically on device rotation - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/device_rotation.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/device_rotation.gif * Big inputs on form in edit mode @@ -120,29 +120,29 @@ This module adds responsiveness to web backend. accessible by fingers of one hand. F.x. `Alt + S` for `Save` - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/shortcuts.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/shortcuts.gif * Autofocus on search menu box when opening the app menu - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/appsearch.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/appsearch.gif * Full width form sheets - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/formview.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/formview.gif * Set chatter on the side of the screen, optional per user - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/chatter_sided.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/chatter_sided.gif * Sticky chatter topbar - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/chatter_topbar.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/chatter_topbar.gif * When the chatter is configured on the side part, the document viewer fills that part for side-by-side reading instead of full screen. You can still put it on full width preview clicking on the new maximize button. - .. image:: https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/document_viewer.gif + .. image:: https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/document_viewer.gif **Table of contents** @@ -170,7 +170,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -223,6 +223,6 @@ Current `maintainers `__: |maintainer-Yajo| |maintainer-Tardo| |maintainer-SplashS| -This module is part of the `OCA/web `_ project on GitHub. +This module is part of the `OCA/web `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_responsive/__init__.py b/web_responsive/__init__.py index 0650744f6..e69de29bb 100644 --- a/web_responsive/__init__.py +++ b/web_responsive/__init__.py @@ -1 +0,0 @@ -from . import models diff --git a/web_responsive/__manifest__.py b/web_responsive/__manifest__.py index befa094e3..482a018e6 100644 --- a/web_responsive/__manifest__.py +++ b/web_responsive/__manifest__.py @@ -2,52 +2,47 @@ # Copyright 2017-2018 Tecnativa - Jairo Llopis # Copyright 2018-2019 Tecnativa - Alexandre Díaz # Copyright 2021 ITerra - Sergey Shebanin +# Copyright 2023 Onestein - Anjeel Haria # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). { "name": "Web Responsive", "summary": "Responsive web client, community-supported", - "version": "15.0.1.1.6", + "version": "16.0.1.0.0", "category": "Website", "website": "https://github.com/OCA/web", - "author": "LasLabs, Tecnativa, ITerra, " "Odoo Community Association (OCA)", + "author": "LasLabs, Tecnativa, ITerra, Onestein, " + "Odoo Community Association (OCA)", "license": "LGPL-3", "installable": True, "depends": ["web", "mail"], "development_status": "Production/Stable", "maintainers": ["Yajo", "Tardo", "SplashS"], "excludes": ["web_enterprise"], - "data": ["views/res_users.xml", "views/web.xml"], + "data": ["views/web.xml"], "assets": { - "web.assets_frontend": [ - "/web_responsive/static/src/legacy/js/website_apps_menu.js", - "/web_responsive/static/src/legacy/scss/website_apps_menu.scss", - ], "web.assets_backend": [ + "/web_responsive/static/src/views/form/form_controller.esm.js", "/web_responsive/static/src/legacy/scss/web_responsive.scss", "/web_responsive/static/src/legacy/js/web_responsive.js", - "/web_responsive/static/src/legacy/scss/kanban_view_mobile.scss", - "/web_responsive/static/src/legacy/js/kanban_renderer_mobile.js", "/web_responsive/static/src/components/ui_context.esm.js", "/web_responsive/static/src/components/apps_menu/apps_menu.scss", "/web_responsive/static/src/components/apps_menu/apps_menu.esm.js", - "/web_responsive/static/src/components/navbar/main_navbar.scss", "/web_responsive/static/src/components/control_panel/control_panel.scss", "/web_responsive/static/src/components/control_panel/control_panel.esm.js", "/web_responsive/static/src/components/search_panel/search_panel.scss", "/web_responsive/static/src/components/search_panel/search_panel.esm.js", - "/web_responsive/static/src/components/attachment_viewer/attachment_viewer.scss", - "/web_responsive/static/src/components/attachment_viewer/attachment_viewer.esm.js", "/web_responsive/static/src/components/hotkey/hotkey.scss", - ], - "web.assets_qweb": [ "/web_responsive/static/src/legacy/xml/form_buttons.xml", "/web_responsive/static/src/components/apps_menu/apps_menu.xml", "/web_responsive/static/src/components/control_panel/control_panel.xml", - "/web_responsive/static/src/components/navbar/main_navbar.xml", "/web_responsive/static/src/components/search_panel/search_panel.xml", - "/web_responsive/static/src/components/attachment_viewer/attachment_viewer.xml", "/web_responsive/static/src/components/hotkey/hotkey.xml", + "/web_responsive/static/src/components/chatter_topbar/chatter_topbar.esm.js", + "/web_responsive/static/src/components/chatter_topbar/chatter_topbar.xml", + "/web_responsive/static/src/components/attachment_viewer/attachment_viewer.scss", + "/web_responsive/static/src/components/attachment_viewer/attachment_viewer.esm.js", + "/web_responsive/static/src/components/attachment_viewer/attachment_viewer.xml", ], "web.assets_tests": [ "/web_responsive/static/tests/test_patch.js", diff --git a/web_responsive/models/__init__.py b/web_responsive/models/__init__.py deleted file mode 100644 index 883516533..000000000 --- a/web_responsive/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import res_users diff --git a/web_responsive/models/res_users.py b/web_responsive/models/res_users.py deleted file mode 100644 index ef1fc947c..000000000 --- a/web_responsive/models/res_users.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2018-2019 Alexandre Díaz -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). - -from odoo import fields, models - - -class ResUsers(models.Model): - _inherit = "res.users" - - chatter_position = fields.Selection( - [("normal", "Normal"), ("sided", "Sided")], - default="sided", - ) - - """Override to add access rights. - Access rights are disabled by default, but allowed on some specific - fields defined in self.SELF_{READ/WRITE}ABLE_FIELDS. - """ - - @property - def SELF_READABLE_FIELDS(self): - return super().SELF_READABLE_FIELDS + ["chatter_position"] - - @property - def SELF_WRITEABLE_FIELDS(self): - return super().SELF_WRITEABLE_FIELDS + ["chatter_position"] diff --git a/web_responsive/readme/CONTRIBUTORS.rst b/web_responsive/readme/CONTRIBUTORS.rst index ca52594ac..a28b2f384 100644 --- a/web_responsive/readme/CONTRIBUTORS.rst +++ b/web_responsive/readme/CONTRIBUTORS.rst @@ -1,6 +1,8 @@ * Dave Lasley * Jairo Llopis -* Dennis Sluijk +* `Onestein `_: + * Dennis Sluijk + * Anjeel Haria * Sergio Teruel * Alexandre Díaz * Mathias Markl diff --git a/web_responsive/readme/DESCRIPTION.rst b/web_responsive/readme/DESCRIPTION.rst index e4b6960d7..9012daa13 100644 --- a/web_responsive/readme/DESCRIPTION.rst +++ b/web_responsive/readme/DESCRIPTION.rst @@ -22,42 +22,16 @@ This module adds responsiveness to web backend. .. image:: ../static/img/listview.gif -* Increase the size of the labels in extra large screens - - .. image:: ../static/img/label_size_small.png - - .. image:: ../static/img/label_size_large.png **Features for mobile**: - -* App-specific submenus are shown on full screen when toggling them from the - "hamburger" menu - - .. image:: ../static/img/hamburger.gif - -* User-specific submenus are shown on full screen when toggling them from the - "avatar" menu - - .. image:: ../static/img/usermenu.gif - * View type picker dropdown displays comfortably .. image:: ../static/img/viewtype.gif -* Top app bar is always visible, but the control panel is hidden when - scrolling down, to save some valuable vertical space - - .. image:: ../static/img/navbar.gif - -* Form status bar action and status buttons are collapsed in dropdowns. - Other control panel buttons use icons to save space. +* Control panel buttons use icons to save space. .. image:: ../static/img/form_buttons.gif -* Breadcrumbs navigation is collapsed with a "back arrow" button. - - .. image:: ../static/img/breadcrumbs.gif - * Search panel is collapsed to mobile version on small screens. .. image:: ../static/img/search_panel.gif @@ -66,22 +40,6 @@ This module adds responsiveness to web backend. .. image:: ../static/img/chatter.gif -* Scrollable dropdowns - - .. image:: ../static/img/dropdown_scroll.gif - -* Kanban interface adopted to mobile - - .. image:: ../static/img/kanban.gif - -* Calendar interface adopted to mobile - - .. image:: ../static/img/calendar.gif - -* Interface is adapted dynamically on device rotation - - .. image:: ../static/img/device_rotation.gif - * Big inputs on form in edit mode **Features for desktop computers**: @@ -103,15 +61,7 @@ This module adds responsiveness to web backend. .. image:: ../static/img/formview.gif -* Set chatter on the side of the screen, optional per user - - .. image:: ../static/img/chatter_sided.gif - -* Sticky chatter topbar - - .. image:: ../static/img/chatter_topbar.gif - -* When the chatter is configured on the side part, the document viewer fills that +* When the chatter is on the side part, the document viewer fills that part for side-by-side reading instead of full screen. You can still put it on full width preview clicking on the new maximize button. diff --git a/web_responsive/static/description/index.html b/web_responsive/static/description/index.html index 780ecebc1..2416f33f6 100644 --- a/web_responsive/static/description/index.html +++ b/web_responsive/static/description/index.html @@ -367,71 +367,40 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: LGPL-3 OCA/web Translate me on Weblate Try me on Runbot

+

Production/Stable License: LGPL-3 OCA/web Translate me on Weblate Try me on Runbot

This module adds responsiveness to web backend.

Features for all devices:

  • New navigation with the fullscreen app menu

    -https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/appmenu.gif +https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/appmenu.gif
  • Quick menu search inside the app menu

    -https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/appsearch.gif +https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/appsearch.gif
  • Sticky header & footer in list view

    -https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/listview.gif +https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/listview.gif
  • Sticky statusbar in form view

    -https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/formview.gif +https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/formview.gif
  • Bigger checkboxes in list view

    -https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/listview.gif -
  • -
  • Increase the size of the labels in extra large screens

    -https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/label_size_small.png -https://raw.githubusercontent.com/OCA/web/15.0/web_responsive/static/img/label_size_large.png +https://raw.githubusercontent.com/OCA/web/16.0/web_responsive/static/img/listview.gif

Features for mobile: