summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-11-22 14:02:03 +0100
committerChristophe Simonis <chs@odoo.com>2016-11-22 14:02:03 +0100
commit457a705bf0927e281d5269014f955d3e2a828e11 (patch)
treed00415174246df11592453234cdc357705c6b24e /addons/web_editor/static/src
parenta7b614f43bff473b73088c0c7d18863e731ba3b0 (diff)
parentd1fddd24dd12de384d5741c86f24cf15fb83e0d5 (diff)
[MERGE] forward port branch saas-12 up to d1fddd2
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/backend.js10
-rw-r--r--addons/web_editor/static/src/js/rte.summernote.js2
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 90fb0f656e3..8d05a92260c 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);
@@ -382,11 +377,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 1eb8054cdc6..1789ed69e7e 100644
--- a/addons/web_editor/static/src/js/rte.summernote.js
+++ b/addons/web_editor/static/src/js/rte.summernote.js
@@ -511,8 +511,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);