[FIX] Fixed resize after sending.

bzr revid: vta@openerp.com-20120830072024-004ingk1ourozupn
This commit is contained in:
vta vta@openerp.com 2012-08-30 09:20:24 +02:00
parent e2d9e9e2f7
commit baf572ae1c
1 changed files with 3 additions and 3 deletions

View File

@ -2324,6 +2324,7 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
template: 'FieldText',
initialize_content: function() {
this.$textarea = this.$el.find('textarea');
this.default_height = this.$textarea.css('height');
if (!this.get("effective_readonly")) {
this.$textarea.change(_.bind(function() {
this.set({'value': instance.web.parse_value(this.$textarea.val(), this)});
@ -2345,9 +2346,8 @@ instance.web.form.FieldText = instance.web.form.AbstractField.extend(instance.we
render_value: function() {
var show_value = instance.web.format_value(this.get('value'), this, '');
this.$textarea.val(show_value);
if (show_value) {
this.$textarea.autosize();
}
this.$textarea.autosize();
this.$textarea.css('height', parseInt(this.default_height)+"px");
},
is_syntax_valid: function() {
if (!this.get("effective_readonly")) {