diff --git a/web_fullscreen/README.rst b/web_fullscreen/README.rst new file mode 100644 index 000000000..642d5bcf4 --- /dev/null +++ b/web_fullscreen/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +========== +Fullscreen +========== + +Adds a fullscreen mode button that toggles the primary +and secondary menu. + +**NB:** This module will be less useful if *web_responsive* module is installed +since it contains the functionality described above. The major reason why this +module was ported from `8 `_ to 10 is because, it targets the traditional GUI and +just adds a small fullscreen button on views, in order to see more clearly on +small screens. + +Usage +====== + +.. image:: /web_fullscreen/static/src/img/web_fullscreen.gif + :width: 1063 + :alt: check the static/img folder for a demo + + + +Credits +======= + +Contributors +------------ + +* Dennis Sluijk +* Tom Blauwendraat + + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/web_fullscreen/__init__.py b/web_fullscreen/__init__.py new file mode 100644 index 000000000..94673b34d --- /dev/null +++ b/web_fullscreen/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/web_fullscreen/__manifest__.py b/web_fullscreen/__manifest__.py new file mode 100644 index 000000000..823afb0de --- /dev/null +++ b/web_fullscreen/__manifest__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2016 Onestein () +# Copyright 2019 Sunflower IT () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + 'name': 'Fullscreen', + 'summary': 'Adds a fullscreen mode button', + 'author': 'Onestein, Sunflower IT, Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'website': 'https://github.com/OCA/web/', + 'category': 'Extra Tools', + 'version': '10.0.1.0.0', + 'depends': ['web'], + 'data': [ + 'views/web_fullscreen_view.xml' + ], + 'qweb': [ + 'static/src/xml/*.xml' + ], + 'installable': True, +} diff --git a/web_fullscreen/static/src/css/web_fullscreen.css b/web_fullscreen/static/src/css/web_fullscreen.css new file mode 100644 index 000000000..e6d686a9f --- /dev/null +++ b/web_fullscreen/static/src/css/web_fullscreen.css @@ -0,0 +1,3 @@ +.o_control_panel .o_cp_fullscreen { + padding-left: 5px; +} diff --git a/web_fullscreen/static/src/img/web_fullscreen.gif b/web_fullscreen/static/src/img/web_fullscreen.gif new file mode 100644 index 000000000..9a82311bb Binary files /dev/null and b/web_fullscreen/static/src/img/web_fullscreen.gif differ diff --git a/web_fullscreen/static/src/js/web_fullscreen.js b/web_fullscreen/static/src/js/web_fullscreen.js new file mode 100644 index 000000000..9c20a03c5 --- /dev/null +++ b/web_fullscreen/static/src/js/web_fullscreen.js @@ -0,0 +1,17 @@ +odoo.define('web.fullscreen', function (require) { + "use strict"; + + var ControlPanel = require('web.ControlPanel'); + + ControlPanel.include({ + start: function () { + this._super.apply(this, arguments); + this.$el.on('click', '.o_cp_fullscreen', function () { + $("#oe_main_menu_navbar").toggle(); + $(".o_sub_menu").toggle(); + }); + }, + }); + /* eslint require-jsdoc: 0*/ +}); + diff --git a/web_fullscreen/static/src/xml/web_fullscreen_templates.xml b/web_fullscreen/static/src/xml/web_fullscreen_templates.xml new file mode 100644 index 000000000..8ad30d39b --- /dev/null +++ b/web_fullscreen/static/src/xml/web_fullscreen_templates.xml @@ -0,0 +1,15 @@ + + + + +
+