[MERGE] diagram view label
bzr revid: al@openerp.com-20120819124607-85jndw0al3yr0m9g
This commit is contained in:
commit
516f7afbf3
|
@ -43,10 +43,18 @@ instance.web.DiagramView = instance.web.View.extend({
|
|||
this.connectors = this.fields_view.arch.children[1],
|
||||
this.node = this.nodes.attrs.object,
|
||||
this.connector = this.connectors.attrs.object;
|
||||
this.labels = _.filter(this.fields_view.arch.children, function(label) {
|
||||
return label.tag == "label";
|
||||
});
|
||||
|
||||
this.$element.html(QWeb.render("DiagramView", this));
|
||||
this.$element.addClass(this.fields_view.arch.attrs['class']);
|
||||
|
||||
_.each(self.labels,function(label){
|
||||
html_label = '<p style="padding: 4px;">' + label.attrs.string + "</p>";
|
||||
self.$element.find('.oe_diagram_header').append(html_label);
|
||||
})
|
||||
|
||||
this.$element.find('div.oe_diagram_pager button[data-pager-action]').click(function() {
|
||||
var action = $(this).data('pager-action');
|
||||
self.on_pager_action(action);
|
||||
|
|
Loading…
Reference in New Issue