mirror of https://github.com/OCA/web.git
[FIX] autosize the textareas
parent
d53c5ddc03
commit
6e6125df17
|
@ -30,6 +30,7 @@ Replace the standard translation view by an alternative one:
|
||||||
* The translation dialog displays empty fields for the untranslated fields,
|
* The translation dialog displays empty fields for the untranslated fields,
|
||||||
instead of the source values.
|
instead of the source values.
|
||||||
* Support HTML fields
|
* Support HTML fields
|
||||||
|
* Autosize the textareas to the size of the content
|
||||||
|
|
||||||
""",
|
""",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
|
|
|
@ -77,9 +77,6 @@ openerp.web_translate_dialog = function (instance) {
|
||||||
this.$buttons.find(".oe_form_translate_dialog_cancel_button").click(function(){
|
this.$buttons.find(".oe_form_translate_dialog_cancel_button").click(function(){
|
||||||
self.on_button_close();
|
self.on_button_close();
|
||||||
});
|
});
|
||||||
var $textarea = self.$el.find('textarea.oe_trad_field');
|
|
||||||
$textarea.css({minHeight:'100px'});
|
|
||||||
$textarea.autosize();
|
|
||||||
this.initialize_html_fields();
|
this.initialize_html_fields();
|
||||||
|
|
||||||
this.do_load_fields_values();
|
this.do_load_fields_values();
|
||||||
|
@ -158,6 +155,10 @@ openerp.web_translate_dialog = function (instance) {
|
||||||
$tarea.cleditor()[0].updateFrame();
|
$tarea.cleditor()[0].updateFrame();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
var $textarea = self.$el.find('textarea.oe_trad_field');
|
||||||
|
$textarea.css({minHeight:'100px'});
|
||||||
|
$textarea.autosize();
|
||||||
|
$(window).resize(); // triggers the autosize
|
||||||
deff.resolve();
|
deff.resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue