[IMP] this commit adds two css classes (graph_pivot_mode and graph_chart_mode) to better separate the ui from the code in graph view (addon web_graph)

bzr revid: ged@openerp.com-20140226143919-cejqoq2kd4iwrq04
This commit is contained in:
Gery Debongnie 2014-02-26 15:39:19 +01:00
parent eb1eb48ef3
commit b453252c2d
2 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,9 @@
.graph_main_content {
position: relative;
.graph_pivot_mode {
position:initial;
}
.graph_chart_mode {
position:relative;
}
.graph_main_content td {

View File

@ -37,8 +37,9 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
if (this.mode !== 'pivot') {
this.$('.graph_heatmap label').addClass('disabled');
this.$('.graph_main_content').addClass('graph_chart_mode');
} else {
this.$('.graph_main_content').css('position', 'initial');
this.$('.graph_main_content').addClass('graph_pivot_mode');
}
return this.model.call('fields_get', []).then(function (f) {
@ -168,10 +169,10 @@ openerp.web_graph.Graph = openerp.web.Widget.extend({
if (mode === 'pivot') {
this.$('.graph_heatmap label').removeClass('disabled');
this.$('.graph_main_content').css('position', 'initial');
this.$('.graph_main_content').removeClass('graph_chart_mode').addClass('graph_pivot_mode');
} else {
this.$('.graph_heatmap label').addClass('disabled');
this.$('.graph_main_content').css('position', 'relative');
this.$('.graph_main_content').removeClass('graph_pivot_mode').addClass('graph_chart_mode');
}
this.display_data();
},