this.$element.dialog('close');
},
on_close: function() {
+ if (this.__tmp_dialog_destroying)
+ return;
if (this.dialog_options.destroy_on_close) {
+ this.__tmp_dialog_closing = true;
this.destroy();
+ this.__tmp_dialog_closing = undefined;
}
},
on_resized: function() {
_.each(this.getChildren(), function(el) {
el.destroy();
});
+ if (! this.__tmp_dialog_closing) {
+ this.__tmp_dialog_destroying = true;
+ this.close();
+ this.__tmp_dialog_destroying = undefined;
+ }
if (! this.isDestroyed()) {
this.$element.dialog('destroy');
}
on_confirmed: function() {
var self = this;
- var context = this.node.attrs.context;
- if (context && context.__ref) {
- context = new instance.web.CompoundContext(context);
- context.set_eval_context(this._build_eval_context());
- }
+ var context = this.build_context();
return this.view.do_execute_action(
_.extend({}, this.node.attrs, {context: context}),