projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ee7a67
)
[ADD] Added @text attribute to fields@widget=url
author
Fabien Meghazi
<fme@openerp.com>
Wed, 13 Mar 2013 15:43:45 +0000
(16:43 +0100)
committer
Fabien Meghazi
<fme@openerp.com>
Wed, 13 Mar 2013 15:43:45 +0000
(16:43 +0100)
bzr revid: fme@openerp.com-
20130313154345
-6y8s7k5s0vyc3cc8
addons/web/static/src/js/view_form.js
patch
|
blob
|
history
diff --git
a/addons/web/static/src/js/view_form.js
b/addons/web/static/src/js/view_form.js
index
a0eb396
..
adae7d0
100644
(file)
--- a/
addons/web/static/src/js/view_form.js
+++ b/
addons/web/static/src/js/view_form.js
@@
-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() {