summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-01-27 17:34:46 +0100
committerXavier Morel <xmo@openerp.com>2012-01-27 17:34:46 +0100
commit2c073283dff2e17be326ca3d7e4a0c83c5801202 (patch)
tree1480f828abbf91a7ba97ad405938e15c0dd18439 /addons/web/static/src/js
parent8965f85968d81cfce4d0f7e7e098ae5ab1c4fe65 (diff)
[FIX] don't initialize common controls twice in WebClient root, causes duplicated error popups if going through login page
lp bug: https://launchpad.net/bugs/922296 fixed bzr revid: xmo@openerp.com-20120127163446-a2i3vfzzxz0yaujn
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/chrome.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index 3aa3e6042ee..8804de96d34 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -1107,12 +1107,13 @@ openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebC
self.menu.start();
},
show_common: function() {
- var self = this;
- self.crashmanager = new openerp.web.CrashManager();
- self.notification = new openerp.web.Notification(self);
- self.notification.appendTo(self.$element);
- self.loading = new openerp.web.Loading(self);
- self.loading.appendTo(self.$element);
+ if (this.initialized_common) { return; }
+ this.initialized_common = true;
+ this.crashmanager = new openerp.web.CrashManager();
+ this.notification = new openerp.web.Notification(this);
+ this.notification.appendTo(this.$element);
+ this.loading = new openerp.web.Loading(this);
+ this.loading.appendTo(this.$element);
},
destroy_content: function() {
_.each(_.clone(this.widget_children), function(el) {