diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-11-04 10:29:36 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-11-04 16:10:44 +0100 |
| commit | 554bfa7d1075bff3598d7dec1bd084f3c4a70243 (patch) | |
| tree | ef1b8781dca7bf2ad4929ed3c42bad3ddf02e1ab /addons/web_editor/static/src/js/editor.js | |
| parent | bdb787a18dec45809b67c0f22e0705d2404eed83 (diff) | |
[FIX] web_editor: use history to enable or disable save button
Diffstat (limited to 'addons/web_editor/static/src/js/editor.js')
| -rw-r--r-- | addons/web_editor/static/src/js/editor.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/editor.js b/addons/web_editor/static/src/js/editor.js index f74df98b42a..88d86bc825b 100644 --- a/addons/web_editor/static/src/js/editor.js +++ b/addons/web_editor/static/src/js/editor.js @@ -120,8 +120,7 @@ editor.Class = Widget.extend({ }); }, rte_changed: function () { - // todo: use !rte.history.getEditableHasUndo().length (but phantomjs unknow error) - this.$('button[data-action=save]').prop('disabled', !$('.o_dirty').length); + this.$('button[data-action=save]').prop('disabled', !rte.history.getEditableHasUndo().length); }, save: function () { return this.rte.save().then(function () { |
