summaryrefslogtreecommitdiff
path: root/addons/web_graph/static/src/js
diff options
context:
space:
mode:
authorGery Debongnie <ged@openerp.com>2013-12-24 16:37:35 +0100
committerGery Debongnie <ged@openerp.com>2013-12-24 16:37:35 +0100
commitd145c7a8c4bd828d741fdd6fd9f3d8d0fee0fa84 (patch)
treed92b09da6aa399a96a3b8415933d57cca178f074 /addons/web_graph/static/src/js
parent69f6efa000e5368462fa3a0c66577d0f405334f0 (diff)
[IMP] displays a nice message when the graph view has no data to display (addon web_graph)
bzr revid: ged@openerp.com-20131224153735-on6cx12v7x2r1ln0
Diffstat (limited to 'addons/web_graph/static/src/js')
-rw-r--r--addons/web_graph/static/src/js/graph.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js
index c155337d90e..17a0721fd82 100644
--- a/addons/web_graph/static/src/js/graph.js
+++ b/addons/web_graph/static/src/js/graph.js
@@ -272,6 +272,7 @@ instance.web_graph.Graph = instance.web.Widget.extend({
display_data: function () {
this.$('.graph_main_content svg').remove();
+ this.$('.graph_main_content div').remove();
this.table.empty();
if (this.visible_ui) {
@@ -280,8 +281,9 @@ instance.web_graph.Graph = instance.web.Widget.extend({
this.$('.graph_header').css('display', 'none');
}
if (this.pivot.no_data) {
- var msg = 'No data available. Try to remove any filter or add some data.';
- this.table.append($('<tr><td>' + msg + '</td></tr>'));
+ this.$('.graph_main_content').append($(QWeb.render('graph_no_data')));
+ // var msg = 'No data available. Try to remove any filter or add some data.';
+ // this.table.append($('<tr><td>' + msg + '</td></tr>'));
} else {
var table_modes = ['pivot', 'heatmap', 'row_heatmap', 'col_heatmap'];
if (_.contains(table_modes, this.mode)) {