[REF] removes useless comments (addon web_graph)

bzr revid: ged@openerp.com-20140110120149-pi0h75eqlr2tl9n5
This commit is contained in:
Gery Debongnie 2014-01-10 13:01:49 +01:00
parent f625675079
commit dbf064e817
2 changed files with 2 additions and 58 deletions

View File

@ -41,7 +41,6 @@ instance.web_graph.GraphView = instance.web.View.extend({
this.widget_config = { title: arch.attrs.string };
debugger;
if (!_.has(arch.attrs, 'type')) {
this.widget_config.mode = 'bar_chart';
} else {
@ -238,7 +237,7 @@ instance.web_graph.Graph = instance.web.Widget.extend(openerp.EventDispatcherMix
self.add_measures_to_options();
});
$.when(def1, def2).then(function () {
return $.when(def1, def2).then(function () {
self.pivot = new openerp.web_graph.PivotTable(self.model, self.domain, self.fields, self.pivot_options);
self.pivot.on('redraw_required', self, self.proxy('display_data'));
self.pivot.on('groupby_changed', self, function () { self.trigger('groupby_changed'); });
@ -329,57 +328,6 @@ instance.web_graph.Graph = instance.web.Widget.extend(openerp.EventDispatcherMix
});
},
// self.fields = fs;
// var temp = _.map(fs, function (field, name) {
// return {name:name, type: field.type};
// });
// temp = _.filter(temp, function (field) {
// return (((field.type === 'integer') || (field.type === 'float')) && (field.name !== 'id'));
// });
// self.measure_list = _.map(temp, function (field) {
// return field.name;
// });
// var measure_selection = self.$('.graph_measure_selection');
// _.each(self.measure_list, function (measure) {
// var choice = $('<a></a>').attr('data-choice', measure)
// .attr('href', '#')
// .append(self.fields[measure].string);
// measure_selection.append($('<li></li>').append(choice));
// });
// });
// },
// hide ui/show, stacked/grouped
// config: function (options) {
// Possible modes: pivot, heatmap, row_heatmap, col_heatmap,
// bar_chart, pie_chart, line_chart
// if (_.has(options, 'mode')) { this.mode = mode; }
// if (_.has(options, 'visible_ui')) {
// this.visible_ui = options.visible_ui;
// }
// if (_.has(options, 'bar_ui')) {
// this.bar_ui = options.bar_ui;
// }
// if (_.has(options, 'title')) {
// this.title = options.title;
// }
// debugger;
// this.pivot.config(options);
// },
// get the most important fields (of the model) by looking at the
// groupby filters defined in the search view
// get the fields descriptions and measure list from the model
// return $.when(deferred1, deferred2).then(function () {
// self.pivot = new openerp.web_graph.PivotTable(self.model, self.fields);
// self.activate_display();
// });
// },
set_mode: function (mode) {
},
@ -797,7 +745,6 @@ instance.web_graph.Graph = instance.web.Widget.extend(openerp.EventDispatcherMix
pie_chart: function () {
var self = this,
dim_x = this.pivot.rows.groupby.length;
debugger;
var data = _.map(this.pivot.get_rows_leaves(), function (row) {
var title = _.map(row.path, function (p) {
return p || 'Undefined';

View File

@ -9,8 +9,7 @@
// Here is a short description of the way the data is organized:
// Main fields:
// cells = [cell]
// cell = {x: _, y: _, values: [value]}
// value = {type: _, value: _}
// cell = {x: _, y: _, values: [_]}
// measures = [measure]
// measure = {field: _, string: _, type: _}
// rows, cols = {groupby: [groupby], headers: [header]}
@ -20,7 +19,6 @@
// path: _,
// title: _,
// expanded: _,
// parent: _,
// children: _,
// domain: _,
// root: _,
@ -28,7 +26,6 @@
//
// Pivot Table emits the events 'groupby_changed' and 'redraw_required' when necessary.
// PivotTable require a 'update_data' after init to be ready
// to do: add an option to enable/disable update_data at the end of init
openerp.web_graph.PivotTable = openerp.web.Class.extend(openerp.EventDispatcherMixin, {
init: function (model, domain, fields, options) {