From f14cecfc0a7f401533213aaa968ee233e19d1325 Mon Sep 17 00:00:00 2001 From: Gorash Date: Mon, 19 Aug 2019 09:51:34 +0000 Subject: [REV] web_editor: revert summernote update Summernote was updated alongside the new editor of saas-12.2. However, since we are putting back the editor of 12.0, summernote needs to be downgraded back to the version that was compatible with the 12.0 editor. This is a revert of 17c6d005. Part of PR 35677. Co-authored-by: Nicolas Bayet Co-authored-by: Antoine Guenet Co-authored-by: Christophe Matthieu Co-authored-by: David Monjoie --- .../plugin/hello/summernote-ext-hello.js | 81 ---------------------- 1 file changed, 81 deletions(-) delete mode 100644 addons/web_editor/static/lib/summernote/plugin/hello/summernote-ext-hello.js (limited to 'addons/web_editor/static/lib/summernote/plugin/hello/summernote-ext-hello.js') diff --git a/addons/web_editor/static/lib/summernote/plugin/hello/summernote-ext-hello.js b/addons/web_editor/static/lib/summernote/plugin/hello/summernote-ext-hello.js deleted file mode 100644 index 22e4f6ac034..00000000000 --- a/addons/web_editor/static/lib/summernote/plugin/hello/summernote-ext-hello.js +++ /dev/null @@ -1,81 +0,0 @@ -(function(factory) { - /* global define */ - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['jquery'], factory); - } else if (typeof module === 'object' && module.exports) { - // Node/CommonJS - module.exports = factory(require('jquery')); - } else { - // Browser globals - factory(window.jQuery); - } -}(function($) { - // Extends plugins for adding hello. - // - plugin is external module for customizing. - $.extend($.summernote.plugins, { - /** - * @param {Object} context - context object has status of editor. - */ - 'hello': function(context) { - var self = this; - - // ui has renders to build ui elements. - // - you can create a button with `ui.button` - var ui = $.summernote.ui; - - // add hello button - context.memo('button.hello', function() { - // create button - var button = ui.button({ - contents: ' Hello', - tooltip: 'hello', - click: function() { - self.$panel.show(); - self.$panel.hide(500); - // invoke insertText method with 'hello' on editor module. - context.invoke('editor.insertText', 'hello'); - } - }); - - // create jQuery object from button instance. - var $hello = button.render(); - return $hello; - }); - - // This events will be attached when editor is initialized. - this.events = { - // This will be called after modules are initialized. - 'summernote.init': function(we, e) { - console.log('summernote initialized', we, e); - }, - // This will be called when user releases a key on editable. - 'summernote.keyup': function(we, e) { - console.log('summernote keyup', we, e); - } - }; - - // This method will be called when editor is initialized by $('..').summernote(); - // You can create elements for plugin - this.initialize = function() { - this.$panel = $('
').css({ - position: 'absolute', - width: 100, - height: 100, - left: '50%', - top: '50%', - background: 'red' - }).hide(); - - this.$panel.appendTo('body'); - }; - - // This methods will be called when editor is destroyed by $('..').summernote('destroy'); - // You should remove elements on `initialize`. - this.destroy = function() { - this.$panel.remove(); - this.$panel = null; - }; - } - }); -})); -- cgit v1.2.3