diff options
| author | Christophe Simonis <chs@odoo.com> | 2016-11-22 12:39:02 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2016-11-22 12:39:02 +0100 |
| commit | 64e73b8352094f805cd3cdf2fcc2b617ee2bab48 (patch) | |
| tree | 6713d9619c567226b6695cfe251574e35265cc8a /addons/web_editor | |
| parent | 1adedfa977761a5384b697e19b3d3525d77ba783 (diff) | |
| parent | 290601e28f1056d1d529374fbe65751900ab4974 (diff) | |
[MERGE] forward port branch 9.0 up to 290601e
Diffstat (limited to 'addons/web_editor')
| -rw-r--r-- | addons/web_editor/static/src/js/backend.js | 10 | ||||
| -rw-r--r-- | addons/web_editor/static/src/js/rte.summernote.js | 2 |
2 files changed, 0 insertions, 12 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js index 3b414d45cb5..17ce8c3c1a1 100644 --- a/addons/web_editor/static/src/js/backend.js +++ b/addons/web_editor/static/src/js/backend.js @@ -161,11 +161,6 @@ var FieldTextHtmlSimple = widget.extend({ return !this.get('value') || this.get('value') === "<p><br/></p>" || !this.get('value').match(/\S/); }, commit_value: function () { - // leave code view before saving - if (this.$content.prev('textarea').length === 1) { - var layoutInfo = { 'editor': function() { return this.$content; }.bind(this) }; - $.summernote.pluginEvents.codeview(undefined, undefined, layoutInfo); - } if (this.options['style-inline']) { transcoder.class_to_style(this.$content); transcoder.font_to_img(this.$content); @@ -379,11 +374,6 @@ var FieldTextHtml = widget.extend({ this._dirty_flag = false; return this.editor.save(); } else if (this._dirty_flag && this.editor && this.editor.buildingBlock) { - // leave code view before saving - if (this.$content.prev('textarea').length === 1) { - var layoutInfo = { 'editor': function() { return this.$content; }.bind(this) }; - $.summernote.pluginEvents.codeview(undefined, undefined, layoutInfo); - } this.editor.buildingBlock.clean_for_save(); this.internal_set_value( this.$content.html() ); } diff --git a/addons/web_editor/static/src/js/rte.summernote.js b/addons/web_editor/static/src/js/rte.summernote.js index 4483dbcf617..73565e19743 100644 --- a/addons/web_editor/static/src/js/rte.summernote.js +++ b/addons/web_editor/static/src/js/rte.summernote.js @@ -539,8 +539,6 @@ function prettify_html(html) { } return result; } - -// Change Warning: called with dummy arguments to quit code view before saving $.summernote.pluginEvents.codeview = function (event, editor, layoutInfo) { if (layoutInfo.toolbar) { return eventHandler.modules.codeview.toggle(layoutInfo); |
