diff --git a/web_searchbar_full_width/README.rst b/web_searchbar_full_width/README.rst new file mode 100644 index 00000000..80f71584 --- /dev/null +++ b/web_searchbar_full_width/README.rst @@ -0,0 +1,30 @@ +Show searchbar over full width +============================== + +Odoo's default search bar is rather narrow, which causes it to grow vertically when applying a lot of filters. For small screens this can be a problem as it wastes a lot of space. This addon addresses this issue by growing the search bar to the whole width of the screen, moving it below the breadcrumb. A side effect of this is that the breadcrump can also use the full screen width, which makes it reasonable not to cut off titles after 7 characters. + +The result looks like this: + +.. image:: /web_searchbar_full_width/static/description/preview.png + :alt: Searchbar over full screen width + +Credits +======= + +Contributors +------------ + +* Holger Brunn + +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_searchbar_full_width/__init__.py b/web_searchbar_full_width/__init__.py new file mode 100644 index 00000000..faef9dac --- /dev/null +++ b/web_searchbar_full_width/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2015 Therp BV . +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## diff --git a/web_searchbar_full_width/__openerp__.py b/web_searchbar_full_width/__openerp__.py new file mode 100644 index 00000000..390c4e95 --- /dev/null +++ b/web_searchbar_full_width/__openerp__.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2015 Therp BV . +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +{ + "name": "Full width searchbar", + "version": "1.0", + "author": "Therp BV", + "license": "AGPL-3", + "category": "Tools", + "summary": "Show search bar in full screen width", + "depends": [ + ], + "data": [ + 'views/templates.xml', + ], + "qweb": [ + 'static/src/xml/web_searchbar_full_width.xml', + ], + "test": [ + ], + "auto_install": False, + "installable": True, + "application": False, + "external_dependencies": { + 'python': [], + }, +} diff --git a/web_searchbar_full_width/static/description/icon.png b/web_searchbar_full_width/static/description/icon.png new file mode 100644 index 00000000..80100ac6 Binary files /dev/null and b/web_searchbar_full_width/static/description/icon.png differ diff --git a/web_searchbar_full_width/static/description/preview.png b/web_searchbar_full_width/static/description/preview.png new file mode 100644 index 00000000..51be2203 Binary files /dev/null and b/web_searchbar_full_width/static/description/preview.png differ diff --git a/web_searchbar_full_width/static/src/css/web_searchbar_full_width.css b/web_searchbar_full_width/static/src/css/web_searchbar_full_width.css new file mode 100644 index 00000000..160ecbf7 --- /dev/null +++ b/web_searchbar_full_width/static/src/css/web_searchbar_full_width.css @@ -0,0 +1,20 @@ +.openerp .oe_application .oe_breadcrumb_item:not(:last-child) +{ + max-width: inherit; +} +.openerp .oe_searchview +{ + width: 100%; +} +.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row_top td +{ + padding-bottom: 0px; +} +.openerp .oe_view_manager_current > .oe_view_manager_header span.oe_breadcrumb_item +{ + padding-top: 3px; +} +.openerp .oe_view_manager table.oe_view_manager_header h2 +{ + line-height: 20px; +} diff --git a/web_searchbar_full_width/static/src/xml/web_searchbar_full_width.xml b/web_searchbar_full_width/static/src/xml/web_searchbar_full_width.xml new file mode 100644 index 00000000..8a2c3d70 --- /dev/null +++ b/web_searchbar_full_width/static/src/xml/web_searchbar_full_width.xml @@ -0,0 +1,15 @@ + + + + + jQuery(this).attr('colspan', 4); + + + var $new_row = jQuery(''); + jQuery(this) + .parents('tr') + .after($new_row); + $new_row.append(jQuery(this).attr('colspan', 4)); + + + diff --git a/web_searchbar_full_width/views/templates.xml b/web_searchbar_full_width/views/templates.xml new file mode 100644 index 00000000..013cffa7 --- /dev/null +++ b/web_searchbar_full_width/views/templates.xml @@ -0,0 +1,10 @@ + + + + + +