fix wysiwyg destroying

This commit is contained in:
yuri
2017-02-08 12:00:53 +02:00
parent 3ac375c95c
commit abcaaddc2f
2 changed files with 9 additions and 1 deletions
+6 -1
View File
@@ -84,7 +84,12 @@ Espo.define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], fun
}.bind(this));
this.once('remove', function () {
$('body > .tooltip').remove();
//$('body > .note-popover').remove();
this.$summernote.summernote('destroy');
});
this.on('inline-edit-off', function () {
this.$summernote.summernote('destroy');
});
},
+3
View File
@@ -379,6 +379,9 @@ Espo.define('views/record/detail', ['views/record/base', 'view-record-helper'],
for (var field in fields) {
var fieldView = fields[field];
if (fieldView.mode != 'detail') {
if (fieldView.mode === 'edit') {
fieldView.trigger('inline-edit-off');
}
fieldView.setMode('detail');
fieldView.render();
}