Created
November 22, 2016 03:25
-
-
Save cybern0id/0d100ce4e703dcbe9527dd2c468b0e64 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -Naur addons/web_editor/static/src/js.orig/backend.js addons/web_editor/static/src/js/backend.js | |
| --- addons/web_editor/static/src/js.orig/backend.js 2016-11-22 02:59:37.212513617 +0000 | |
| +++ addons/web_editor/static/src/js/backend.js 2016-11-22 03:18:00.540454826 +0000 | |
| @@ -161,11 +161,6 @@ | |
| 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 @@ | |
| 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 -Naur addons/web_editor/static/src/js.orig/rte.summernote.js addons/web_editor/static/src/js/rte.summernote.js | |
| --- addons/web_editor/static/src/js.orig/rte.summernote.js 2016-11-22 03:05:38.955282797 +0000 | |
| +++ addons/web_editor/static/src/js/rte.summernote.js 2016-11-22 03:18:23.979986063 +0000 | |
| @@ -511,8 +511,6 @@ | |
| } | |
| 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment