diff --git a/addons/web_graph/static/src/css/graph.css b/addons/web_graph/static/src/css/graph.css
index f2d3338c385..6651ea39ae2 100644
--- a/addons/web_graph/static/src/css/graph.css
+++ b/addons/web_graph/static/src/css/graph.css
@@ -17,4 +17,8 @@ span.field-selection {
span.web_graph_indent {
padding-left: 50px;
+}
+
+.web_graph_click:hover {
+ cursor: pointer;
}
\ No newline at end of file
diff --git a/addons/web_graph/static/src/js/graph.js b/addons/web_graph/static/src/js/graph.js
index 5a4ff51f2d4..9f94f5eb0ee 100644
--- a/addons/web_graph/static/src/js/graph.js
+++ b/addons/web_graph/static/src/js/graph.js
@@ -144,7 +144,6 @@ var BasicDataView = instance.web.Widget.extend({
// measure: quantity to display. either a field from the model, or
// null, in which case we use the "count" measure
init: function (model, options) {
- console.log("initializing", model, options);
var self = this;
this.model = model;
this.fields = options.fields;
@@ -218,7 +217,7 @@ var PivotTable = BasicDataView.extend({
current_row_id : 0,
events: {
- 'click .graph_border > a' : function (event) {
+ 'click .web_graph_click' : function (event) {
var self = this;
event.preventDefault();
var row_id = event.target.attributes['data-row-id'].nodeValue;
@@ -241,6 +240,9 @@ var PivotTable = BasicDataView.extend({
};
this.dropdown = $(QWeb.render('field_selection', dropdown_options));
$(event.target).after(this.dropdown);
+ this.dropdown.css({position:"absolute",
+ left:event.pageX,
+ top:event.pageY});
$('.field-selection').next('.dropdown-menu').toggle();
}
}
@@ -292,9 +294,18 @@ var PivotTable = BasicDataView.extend({
});
}
if (options && options.foldable) {
- attrs.push(' ');
+ attrs.push('');
}
- return attrs.join(' ') + content + '';
+ if (content) {
+ attrs.push(content);
+ } else {
+ attrs.push('Undefined');
+ }
+ if (options && options.foldable) {
+ attrs.push('');
+ }
+ attrs.push('');
+ return attrs.join(' ');
},
make_row: function (data, parent_id) {