[FIX] web_editor: don't display the html content field
issue: message, click on a record, return to the list view, click on an other record => nothing desplayed. opw-671047
This commit is contained in:
@@ -67,12 +67,15 @@ var FieldTextHtmlSimple = widget.extend({
|
||||
|
||||
if (this.get("effective_readonly")) {
|
||||
if (this.options['style-inline']) {
|
||||
this.$textarea.hide().after('<iframe class="o_readonly"/>');
|
||||
setTimeout(function () {
|
||||
self.$content = $("body", self.$('iframe').contents()[0]);
|
||||
var $iframe = $('<iframe class="o_readonly"/>');
|
||||
this.$textarea.hide().after($iframe);
|
||||
var load = function () {
|
||||
self.$content = $($iframe.contents()[0]).find("body");
|
||||
self.$content.html(self.text_to_html(self.get('value')));
|
||||
self.resize();
|
||||
});
|
||||
};
|
||||
setTimeout(load);
|
||||
$iframe.on('load', load);
|
||||
} else {
|
||||
this.$content = $('<div class="o_readonly"/>');
|
||||
this.$textarea.hide().after(this.$content);
|
||||
|
||||
Reference in New Issue
Block a user