summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static/src/js')
-rw-r--r--addons/website/static/src/js/editor/wysiwyg_multizone_translate.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/website/static/src/js/editor/wysiwyg_multizone_translate.js b/addons/website/static/src/js/editor/wysiwyg_multizone_translate.js
index 0541d60bf33..978ac4d98a6 100644
--- a/addons/website/static/src/js/editor/wysiwyg_multizone_translate.js
+++ b/addons/website/static/src/js/editor/wysiwyg_multizone_translate.js
@@ -91,6 +91,9 @@ var WysiwygTranslate = WysiwygMultizone.extend({
*/
start: function () {
var self = this;
+ // Hacky way to keep the top editor toolbar in translate mode for now
+ this.$webEditorTopEdit = $('<div id="web_editor-top-edit"></div>').prependTo(document.body);
+ this.options.toolbarHandler = this.$webEditorTopEdit;
this.editor = new (this.Editor)(this, Object.assign({Editor: RTETranslatorWidget}, this.options));
this.$editor = this.editor.rte.editable();
var promise = this.editor.prependTo(this.$editor[0].ownerDocument.body);
@@ -133,6 +136,13 @@ var WysiwygTranslate = WysiwygMultizone.extend({
self._markTranslatableNodes();
});
},
+ /**
+ * @override
+ */
+ destroy: function () {
+ this._super(...arguments);
+ this.$webEditorTopEdit.remove();
+ },
//--------------------------------------------------------------------------
// Public