[ADD] Added @text attribute to fields@widget=url

bzr revid: fme@openerp.com-20130313154345-6y8s7k5s0vyc3cc8
This commit is contained in:
Fabien Meghazi 2013-03-13 16:43:45 +01:00
parent 4ee7a67789
commit fe758caa05
1 changed files with 2 additions and 1 deletions

View File

@ -2357,7 +2357,8 @@ instance.web.form.FieldUrl = instance.web.form.FieldChar.extend({
if (!s) {
tmp = "http://" + this.get('value');
}
this.$el.find('a').attr('href', tmp).text(this.get('value') ? tmp : '');
var text = this.get('value') ? this.node.attrs.text || tmp : '';
this.$el.find('a').attr('href', tmp).text(text);
}
},
on_button_clicked: function() {