[IMP] improve the way indentation is done in pivot table (addon web_graph)
Previously, it was done in a ugly way: added several spans with the class .graph_indent. Now, it simply sets the margin of the content. bzr revid: ged@openerp.com-20140508110027-bdjdzlpfptjuf4fa
This commit is contained in:
parent
8e29e128eb
commit
79c197814b
|
@ -96,10 +96,6 @@ span.field-selection {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
span.web_graph_indent {
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
.web_graph_click:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -543,15 +543,13 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
|
|||
var content = $('<span>').addClass('web_graph_click')
|
||||
.attr('href','#')
|
||||
.text(' ' + (header.title || _t('Undefined')))
|
||||
.css('margin-left', header.indent*30 + 'px')
|
||||
.attr('data-id', header.id);
|
||||
if (_.has(header, 'expanded')) {
|
||||
content.addClass(header.expanded ? 'fa fa-minus-square' : 'fa fa-plus-square');
|
||||
} else {
|
||||
content.css('font-weight', 'bold');
|
||||
}
|
||||
if (_.has(header, 'indent')) {
|
||||
for (var i = 0; i < header.indent; i++) { cell.prepend($('<span>', {class:'web_graph_indent'})); }
|
||||
}
|
||||
return cell.append(content);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue