diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-05-26 17:34:04 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-05-28 14:27:38 +0200 |
| commit | fe2b5f35a40ca8df662130608b0f89427a196362 (patch) | |
| tree | 0c7773f0599f3b1e6dbb869104fad0b04869b269 /addons/web/static/src/js/framework | |
| parent | d4d8a2eae31e7a6a45029b84603e055300e3be36 (diff) | |
| parent | bf1e99964cdbc374f8a0c4cec1b338bf7c7c2930 (diff) | |
[MERGE] forward port of branch saas-6 up to bf1e999
Diffstat (limited to 'addons/web/static/src/js/framework')
| -rw-r--r-- | addons/web/static/src/js/framework/crash_manager.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/addons/web/static/src/js/framework/crash_manager.js b/addons/web/static/src/js/framework/crash_manager.js index 01fef03267b..303cd66a4a3 100644 --- a/addons/web/static/src/js/framework/crash_manager.js +++ b/addons/web/static/src/js/framework/crash_manager.js @@ -36,19 +36,24 @@ var CrashManager = core.Class.extend({ this.active = false; }, rpc_error: function(error) { + var self = this; if (!this.active) { return; } + if (this.$indicator){ + return; + } if (error.code == -32098) { $.blockUI({ message: '' , overlayCSS: {'z-index': 9999, backgroundColor: '#FFFFFF', opacity: 0.0, cursor: 'wait'}}); - var $indicator = $('<div class="oe_indicator">' + _t("Trying to reconnect... ") + '<i class="fa fa-refresh"></i></div>'); - $indicator.prependTo("body"); + this.$indicator = $('<div class="oe_indicator">' + _t("Trying to reconnect... ") + '<i class="fa fa-refresh"></i></div>'); + this.$indicator.prependTo("body"); var timeinterval = setInterval(function(){ ajax.jsonRpc('/web/webclient/version_info').then(function() { clearInterval(timeinterval); - $indicator.html(_t("You are back online")); - $indicator.delay(2000).fadeOut('slow',function(){ - $indicator.remove(); + self.$indicator.html(_t("You are back online")); + self.$indicator.delay(2000).fadeOut('slow',function(){ + $(this).remove(); + self.$indicator.remove(); }); $.unblockUI(); }); |
