From 0f825ed48e668f95035fc2b8f9f4b7597aa4f6f6 Mon Sep 17 00:00:00 2001 From: Cedric Snauwaert Date: Mon, 23 Jun 2014 11:25:22 +0200 Subject: [PATCH] [FIX]modal: when trying to dropdb or change password, if rpc call result in error, modal was stuck --- addons/web/static/src/js/chrome.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 19962029b9d..fc98763866c 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -493,7 +493,7 @@ instance.web.DatabaseManager = instance.web.Widget.extend({ size: 'medium', title: error.title, buttons: [ - {text: _t("Ok"), click: function() { this.$el.parents('.modal').modal('hide'); }} + {text: _t("Ok"), click: function() { this.parents('.modal').modal('hide'); }} ] }, $('
').html(error.error)).open(); }, @@ -706,7 +706,7 @@ instance.web.ChangePassword = instance.web.Widget.extend({ var $button = self.$el.find('.oe_form_button'); $button.appendTo(this.getParent().$buttons); $button.eq(2).click(function(){ - self.getParent().close(); + self.$el.parents('.modal').modal('hide'); }); $button.eq(0).click(function(){ self.rpc("/web/session/change_password",{ @@ -726,7 +726,7 @@ instance.web.ChangePassword = instance.web.Widget.extend({ size: 'medium', title: error.title, buttons: [ - {text: _t("Ok"), click: function() { this.$el.parents('.modal').modal('hide'); }} + {text: _t("Ok"), click: function() { this.parents('.modal').modal('hide'); }} ] }, $('
').html(error.error)).open(); },