summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2016-11-22 13:28:15 +0100
committerChristophe Simonis <chs@odoo.com>2016-11-22 13:28:15 +0100
commitd1fddd24dd12de384d5741c86f24cf15fb83e0d5 (patch)
treee5197d6d285bfe4984be487c6fba3f85d89e2bc7 /addons/web_editor/static/src
parent65e9a8260d276ac5f4312397b487b7f62f66cdd0 (diff)
parent659fb5d47e3b6d391870096374eaa7fe6aba9e4a (diff)
[MERGE] forward port branch saas-11 up to 659fb5d
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 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 5c621ebbe70..a83e9136a06 100644
--- a/addons/web_editor/static/src/js/rte.summernote.js
+++ b/addons/web_editor/static/src/js/rte.summernote.js
@@ -538,8 +538,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);