[FIX] Fix dialog close problems
bzr revid: fme@openerp.com-20110727150542-ta6ewb3kji993oh1
This commit is contained in:
parent
470faa8bc9
commit
25af6f34c0
|
@ -544,8 +544,8 @@ openerp.base.Dialog = openerp.base.BaseWidget.extend({
|
|||
max_height: '100%',
|
||||
autoOpen: false,
|
||||
buttons: {},
|
||||
close: function () {
|
||||
self.stop();
|
||||
beforeClose: function () {
|
||||
self.on_close();
|
||||
}
|
||||
};
|
||||
for (var f in this) {
|
||||
|
@ -609,7 +609,15 @@ openerp.base.Dialog = openerp.base.BaseWidget.extend({
|
|||
this.set_options(options);
|
||||
this.$dialog.dialog(this.options).dialog('open');
|
||||
},
|
||||
close: function() {
|
||||
// Closes the dialog but leave it in a state where it could be opened again.
|
||||
this.$dialog.dialog('close');
|
||||
},
|
||||
on_close: function() {
|
||||
},
|
||||
stop: function () {
|
||||
// Destroy widget
|
||||
this.close();
|
||||
this.$dialog.dialog('destroy');
|
||||
}
|
||||
});
|
||||
|
|
|
@ -98,11 +98,14 @@ openerp.base.ActionManager = openerp.base.Controller.extend({
|
|||
|
||||
openerp.base.ActionDialog = openerp.base.Dialog.extend({
|
||||
identifier_prefix: 'action_dialog',
|
||||
stop: function() {
|
||||
on_close: function() {
|
||||
this._super(this, arguments);
|
||||
if (this.close_callback) {
|
||||
this.close_callback();
|
||||
}
|
||||
},
|
||||
stop: function() {
|
||||
this._super(this, arguments);
|
||||
if (this.viewmanager) {
|
||||
this.viewmanager.stop();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue