[FIX] small problems in dialog actions
bzr revid: nicolas.vanhoren@openerp.com-20121016095824-woasfpauu7unye5n
This commit is contained in:
@@ -70,7 +70,9 @@ instance.web.Dialog = instance.web.Widget.extend({
|
||||
autoOpen: false,
|
||||
position: [false, 40],
|
||||
buttons: {},
|
||||
beforeClose: function () { self.trigger("closing") },
|
||||
beforeClose: function () {
|
||||
self.trigger("closing");
|
||||
},
|
||||
resizeStop: this.on_resized
|
||||
};
|
||||
for (var f in this) {
|
||||
|
||||
@@ -290,13 +290,13 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
}
|
||||
var widget = executor.widget();
|
||||
if (executor.action.target === 'new') {
|
||||
if (this.dialog === null) {
|
||||
if (this.dialog === null || this.dialog.isDestroyed()) {
|
||||
// These buttons will be overwrited by <footer> if any
|
||||
this.dialog = new instance.web.Dialog(this, {
|
||||
buttons: { "Close": function() { $(this).dialog("close"); }},
|
||||
dialogClass: executor.klass
|
||||
});
|
||||
if(on_close)
|
||||
if (on_close)
|
||||
this.dialog.on("closing", null, on_close);
|
||||
} else {
|
||||
this.dialog_widget.destroy();
|
||||
|
||||
Reference in New Issue
Block a user