[FIX] form field statusbar clickable class

bzr revid: al@openerp.com-20120818225151-y2nymkwwn10uvo7u
This commit is contained in:
Antony Lesuisse 2012-08-19 00:51:51 +02:00
parent e9d39f98a0
commit d43eb323f1
1 changed files with 7 additions and 4 deletions

View File

@ -4666,12 +4666,15 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
template: "FieldStatus",
start: function() {
this._super();
this.selected_value = null;
// backward compatibility
init: function(field_manager, node) {
this._super(field_manager, node);
this.options.clickable = this.options.clickable || (this.node.attrs || {}).clickable || false;
this.options.visible = this.options.visible || (this.node.attrs || {}).statusbar_visible || false;
this.selected_value = null;
},
start: function() {
this._super();
// backward compatibility
this.loaded = new $.Deferred();
if (this.options.clickable) {
this.$element.on('click','li',this.on_click_stage);