diff options
Diffstat (limited to 'addons/web_editor/static/src/js/editor.js')
| -rw-r--r-- | addons/web_editor/static/src/js/editor.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/editor.js b/addons/web_editor/static/src/js/editor.js index b09a69e3818..2958d045d0f 100644 --- a/addons/web_editor/static/src/js/editor.js +++ b/addons/web_editor/static/src/js/editor.js @@ -55,7 +55,7 @@ editor.reload = function () { /* ----- TOP EDITOR BAR FOR ADMIN ---- */ base.ready().then(function () { - if (editor.editable && location.search.indexOf("enable_editor") >= 0 && !editor.no_editor) { + if (editor.editable && location.search.indexOf("enable_editor") >= 0) { editor.editor_bar = new editor.Class(); editor.editor_bar.prependTo(document.body); } @@ -90,7 +90,7 @@ editor.Class = Widget.extend({ var flag = false; window.onbeforeunload = function(event) { - if ($('.o_editable.o_dirty').length && !flag) { + if (rte.history.getEditableHasUndo().length && !flag) { flag = true; setTimeout(function () {flag=false;},0); return _t('This document is not saved!'); |
