summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-03-29 17:09:37 +0200
committerChristophe Simonis <chs@odoo.com>2018-03-29 17:09:37 +0200
commitc1c10e2c4c882ceaf8e2d5ef36e7179d91053b2b (patch)
treec64427e7da3156d470f55fe2b73b17706d3431e7 /addons/web_editor/static/src/js
parentce5b4b651277694af1de5b48d21adce10efcf175 (diff)
parent2b4bc45e589de7a3d8934640ecc6ad82673ae707 (diff)
[MERGE] forward port branch 10.0 up to 2b4bc45e589
Diffstat (limited to 'addons/web_editor/static/src/js')
-rw-r--r--addons/web_editor/static/src/js/backend.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js
index 23505c082fa..b160e6a7e97 100644
--- a/addons/web_editor/static/src/js/backend.js
+++ b/addons/web_editor/static/src/js/backend.js
@@ -194,7 +194,8 @@ var FieldTextHtml = widget.extend({
},
start: function () {
var self = this;
-
+ // Do not Forward port in >= 11.0
+ this.$formButtons = this.getParent().$buttons;
this.callback = _.uniqueId('FieldTextHtml_');
window.odoo[this.callback+"_editor"] = function (EditorBar) {
setTimeout(function () {
@@ -297,7 +298,8 @@ var FieldTextHtml = widget.extend({
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);
+ // Do not Forward port in >= 11.0
+ this.$formButtons.find('button').addClass('o_disabled').attr('disabled', true);
this.document = null;
this.$body = $();
this.$content = $();
@@ -324,7 +326,8 @@ var FieldTextHtml = widget.extend({
this._dirty_flag = false;
this.render_value();
// 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);
+ // Do not Forward port in >= 11.0
+ this.$formButtons.find('button').removeClass('o_disabled').attr('disabled', false);
setTimeout(function () {
self.add_button();
setTimeout(self.resize,0);
@@ -422,6 +425,8 @@ var FieldTextHtml = widget.extend({
}
},
destroy: function () {
+ // Do not Forward port in >= 11.0
+ this.$formButtons.find('button').removeClass('o_disabled').attr('disabled', false);
$(window).off('resize', this.resize);
delete window.odoo[this.callback+"_editor"];
delete window.odoo[this.callback+"_content"];