[FIX] small problems in dialog actions

bzr revid: nicolas.vanhoren@openerp.com-20121016095824-woasfpauu7unye5n
This commit is contained in:
niv-openerp
2012-10-16 11:58:24 +02:00
parent 5a6158bb5f
commit 97cb5f4dc4
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -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) {
+2 -2
View File
@@ -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();