3
0
Fork 0

add web_searchbar_full_width

9.0
Holger Brunn 2015-05-01 12:18:16 +02:00
parent ee954bbf32
commit 56156617f8
8 changed files with 139 additions and 0 deletions

View File

@ -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 <hbrunn@therp.nl>
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.

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2015 Therp BV <http://therp.nl>.
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################

View File

@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2015 Therp BV <http://therp.nl>.
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"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': [],
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -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;
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-extend="ViewManagerAction">
<t t-jquery="tr.oe_header_row_top td:nth-child(1)">
jQuery(this).attr('colspan', 4);
</t>
<t t-jquery="tr.oe_header_row_top td:nth-child(2)">
var $new_row = jQuery('<tr class="oe_header_row"/>');
jQuery(this)
.parents('tr')
.after($new_row);
$new_row.append(jQuery(this).attr('colspan', 4));
</t>
</t>
</templates>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<template id="assets_backend" name="web_searchbar_full_width assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/web_searchbar_full_width/static/src/css/web_searchbar_full_width.css"/>
</xpath>
</template>
</data>
</openerp>