[IMP] <web_group_expand> Make it work for v8

Adapt to OCA
This commit is contained in:
oihane
2015-08-11 12:21:21 +02:00
committed by BT-aestebanez
parent 739e83c55e
commit f4cb683f5e
9 changed files with 101 additions and 61 deletions

View File

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

View File

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

View File

@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- vim:fdl=1:
-->
<templates id="template" xml:space="preserve">
<t t-name="GroupExpand.Buttons">
<div class="oe_list_buttons"><ul id="oe_group_by" class="oe_view_manager_switch oe_button_group oe_right"><li class="oe_i oe_group_expand"><a id="oe_group_by_expand"><hr class="oe_expand_button_hr"/>( )</a></li><li class="oe_i"><a id="oe_group_by_reset">P</a></li></ul></div>
<div class="oe_list_buttons">
<ul id="oe_group_by" class="oe_view_manager_switch oe_button_group oe_right">
<li class="oe_group_expand"><a id="oe_group_by_expand"><i class="fa fa-expand" id="expand_icon" /></a></li>
<li class="oe_group_expand"><a id="oe_group_by_reset"><i class="fa fa-compress" id="compress_icon" /></a></li>
</ul>
</div>
</t>
</templates>