diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-11-30 18:43:08 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-11-30 18:43:08 +0100 |
| commit | 42264d8dcb7f8d0795c84718d1fc9a5fd1aefd32 (patch) | |
| tree | 216ded7eac5ba06623892aaaece74c586afd4b5e /addons/web_editor/static/src/js/backend | |
| parent | e4a281b5a5f7ea44e4f25259b1a84cb0dc437ebc (diff) | |
| parent | 5d7ad2b16cc3ef579a6657822b7c57b07fef4f52 (diff) | |
[MERGE] forward port branch saas-16 up to 5d7ad2b16cc
Diffstat (limited to 'addons/web_editor/static/src/js/backend')
| -rw-r--r-- | addons/web_editor/static/src/js/backend/fields.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js index bf83e5b8dec..00c02e20513 100644 --- a/addons/web_editor/static/src/js/backend/fields.js +++ b/addons/web_editor/static/src/js/backend/fields.js @@ -309,6 +309,8 @@ var FieldTextHtml = AbstractField.extend({ old_initialize_content: function () { this.$el.closest('.modal-body').css('max-height', 'none'); this.$iframe = this.$el.find('iframe'); + // deactivate any button to avoid saving a not ready iframe + $('.o_cp_buttons, .o_statusbar_buttons').find('button').addClass('o_disabled').attr('disabled', true); this.document = null; this.$body = $(); this.$content = $(); @@ -324,6 +326,8 @@ var FieldTextHtml = AbstractField.extend({ this.render(); this.add_button(); this.loaded = true; + // reactivate all the buttons when the field's content (the iframe) is loaded + $('.o_cp_buttons, .o_statusbar_buttons').find('button').removeClass('o_disabled').attr('disabled', false); setTimeout(self.resize, 0); }, on_editor_loaded: function (EditorBar) { |
