diff --git a/web_group_expand/README.rst b/web_group_expand/README.rst new file mode 100644 index 00000000..01793c07 --- /dev/null +++ b/web_group_expand/README.rst @@ -0,0 +1,59 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +==================== +Group Expand Buttons +==================== + +A group by list can be expanded and collapased with buttons + +You'll see two buttons appear on top right corner of the list when you perform +a group by with which you can expand and collapse grouped records by level. + + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/162/8.0 + +For further information, please visit: + +* https://www.odoo.com/forum/help-1 + + +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 +`here `_. + + +Credits +======= + +Contributors +------------ + +* Mantavya Gajjar +* Oihane Crucelaegui +* Pedro Baeza + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://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_group_expand/__openerp__.py b/web_group_expand/__openerp__.py index 233dfba4..468a0606 100644 --- a/web_group_expand/__openerp__.py +++ b/web_group_expand/__openerp__.py @@ -1,19 +1,19 @@ { - "name" : "Group Expand Buttons", - "category": "Hidden", - "version" : '1.0', - "author" : 'OpenERP SA', - "description": - """ -A group by list can be expanded and collapased with buttons -=============================================================== -You'll see two buttons appear on top right corner of the list when you perform a group by with which you can expand and collapse grouped records by level. - """, - "depends" : ["web"], - "js": ["static/src/js/web_group_expand.js"], - 'qweb' : ["static/src/xml/expand_buttons.xml"], - 'css' : ["static/src/css/expand_buttons.css"], - 'installable': True, - 'auto_install': False, + "name": "Group Expand Buttons", + "category": "Web", + "version": "1.0", + "author": "OpenERP SA, " + "AvanzOSC, " + "Serv. Tecnol. Avanzados - Pedro M. Baeza, " + "Odoo Community Association (OCA)", + "depends": [ + "web" + ], + "qweb": [ + "static/src/xml/expand_buttons.xml", + ], + "data": [ + "views/templates.xml", + ], + "installable": True, } - diff --git a/web_group_expand/static/description/expand_list.png b/web_group_expand/static/description/expand_list.png deleted file mode 100644 index a1e15234..00000000 Binary files a/web_group_expand/static/description/expand_list.png and /dev/null differ diff --git a/web_group_expand/static/description/icon.png b/web_group_expand/static/description/icon.png index f391ccdf..9eb607c3 100644 Binary files a/web_group_expand/static/description/icon.png and b/web_group_expand/static/description/icon.png differ diff --git a/web_group_expand/static/description/index.html b/web_group_expand/static/description/index.html deleted file mode 100644 index 5e182743..00000000 --- a/web_group_expand/static/description/index.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
-
-

Expand and Collapse Group By

-

A group by list can be expanded and collapased with buttons

-
-
-
- - - - -
-
-
-

- You'll see two buttons appear on top right corner of the list when you perform a group by with which you can expand and collapse grouped records by level. -

- -
-
-
diff --git a/web_group_expand/static/src/css/expand_buttons.css b/web_group_expand/static/src/css/expand_buttons.css index a878050c..e02cfec5 100644 --- a/web_group_expand/static/src/css/expand_buttons.css +++ b/web_group_expand/static/src/css/expand_buttons.css @@ -1,18 +1,8 @@ .openerp ul#oe_group_by li.oe_group_expand{ - border: none; - border-top: 1px solid #ababab; - position:relative; - font-size:13px; - transform: rotate(90deg); - -webkit-transform: rotate(90deg); + line-height: 25px; } -.openerp hr.oe_expand_button_hr{ - height:2px; - visibility:hidden; - margin-bottom:-7px; -} -.openerp #oe_group_by_reset { - top:3px; - position:relative; +.openerp .fa-expand, .openerp .fa-compress { + font-size:15px; + font-weight:bold; } diff --git a/web_group_expand/static/src/js/web_group_expand.js b/web_group_expand/static/src/js/web_group_expand.js index 8649b514..37bee516 100644 --- a/web_group_expand/static/src/js/web_group_expand.js +++ b/web_group_expand/static/src/js/web_group_expand.js @@ -1,3 +1,4 @@ +"use strict"; openerp.web_group_expand = function(openerp) { var QWeb = openerp.web.qweb; openerp.web.ViewManager.include({ @@ -19,7 +20,7 @@ openerp.web_group_expand = function(openerp) { expand: function(domains, contexts, groupbys) { this.$el.find("ul#oe_group_by").remove(); if(groupbys.length && this.active_view == 'list') { - this.load_expand_buttons(); + this.load_expand_buttons(); this.$el.find("a#oe_group_by_reset").click(function(){ $('span.ui-icon-triangle-1-s').click() }); @@ -34,8 +35,8 @@ openerp.web_group_expand = function(openerp) { this.$el.find("ul.oe_view_manager_switch.oe_button_group.oe_right").before(this.$ExpandButtons); }, setup_search_view: function(view_id, search_defaults) { - self = this; - res = this._super.apply(this, arguments); + var self = this; + var res = this._super.apply(this, arguments); this.searchview.on('search_data', self, this.expand); return res }, diff --git a/web_group_expand/static/src/xml/expand_buttons.xml b/web_group_expand/static/src/xml/expand_buttons.xml index 2371ac82..27d3a50a 100644 --- a/web_group_expand/static/src/xml/expand_buttons.xml +++ b/web_group_expand/static/src/xml/expand_buttons.xml @@ -1,8 +1,11 @@ - - +
+
    +
  • +
  • +
+
diff --git a/web_group_expand/views/templates.xml b/web_group_expand/views/templates.xml new file mode 100644 index 00000000..e5326153 --- /dev/null +++ b/web_group_expand/views/templates.xml @@ -0,0 +1,11 @@ + + + + + +