summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@openerp.com>2012-11-15 13:03:31 +0100
committerChristophe Simonis <chs@openerp.com>2012-11-15 13:03:31 +0100
commit6227e4b5c04b9ee861511a45f7b50806e27cf33c (patch)
treec373a6b08b585700e1f48aaaf0f4d0c27d165ae6 /addons/web/static/src
parent6fe34606ade43201f220d85886f5e8124f7d2121 (diff)
[FIX] CrashManager do not have destroy() method
bzr revid: chs@openerp.com-20121115120331-ltujwzobh19muygl
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/chrome.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index 2753cb45d1e..f5fc7b8f632 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -190,7 +190,14 @@ instance.web.Dialog = instance.web.Widget.extend({
});
instance.web.CrashManager = instance.web.Class.extend({
+ init: function() {
+ this.active = true;
+ },
+
rpc_error: function(error) {
+ if (!this.active) {
+ return;
+ }
if (error.data.fault_code) {
var split = ("" + error.data.fault_code).split('\n')[0].split(' -- ');
if (split.length > 1) {
@@ -205,6 +212,9 @@ instance.web.CrashManager = instance.web.Class.extend({
}
},
show_warning: function(error) {
+ if (!this.active) {
+ return;
+ }
instance.web.dialog($('<div>' + QWeb.render('CrashManager.warning', {error: error}) + '</div>'), {
title: "OpenERP " + _.str.capitalize(error.type),
buttons: [
@@ -213,7 +223,9 @@ instance.web.CrashManager = instance.web.Class.extend({
});
},
show_error: function(error) {
- var self = this;
+ if (!this.active) {
+ return;
+ }
var buttons = {};
buttons[_t("Ok")] = function() {
$(this).dialog("close");
@@ -642,7 +654,7 @@ instance.web.client_actions.add("login", "instance.web.Login");
instance.web.redirect = function(url, wait) {
// Dont display a dialog if some xmlhttprequest are in progress
if (instance.client && instance.client.crashmanager) {
- instance.client.crashmanager.destroy();
+ instance.client.crashmanager.active = false;
}
var wait_server = function() {
@@ -658,7 +670,7 @@ instance.web.redirect = function(url, wait) {
} else {
window.location = url;
}
-}
+};
/**
* Client action to reload the whole interface.