diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 4b2ff673f29..bf13ccdb012 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -35,6 +35,19 @@ border: 0; } +.oe_indicator{ + z-index: 99999; + position: absolute; + top: 10px; + display: inline-block; + color: white; + background: #a24689; + padding: 6px 16px; + border-radius: 4px; + box-shadow: 0 0 1px black; + left: 40%; +} + .oe_notification { z-index: 1600; } diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 12741d7675c..368fc53e5fb 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -144,6 +144,19 @@ $sheet-padding: 16px border: 0 // Notifications {{{ + +.oe_indicator + z-index: 99999 + position: absolute + top: 10px + display: inline-block + color: white + background: #a24689 + padding: 6px 16px + border-radius: 4px + box-shadow: 0 0 1px black + left: 40% + .oe_notification z-index: 1600 diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 3ef2dc5d433..8eabafb5f2d 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -252,6 +252,22 @@ instance.web.CrashManager = instance.web.Class.extend({ if (!this.active) { return; } + if (error.code == -32098) { + $.blockUI({ message: '' , overlayCSS: {'z-index': 9999, backgroundColor: '#FFFFFF', opacity: 0.0, cursor: 'wait'}}); + var $indicator = $('
' + _t("Trying to reconnect... ") + '
'); + $indicator.prependTo("body"); + var timeinterval = setInterval(function(){ + openerp.jsonRpc('/web/webclient/version_info').then(function() { + clearInterval(timeinterval); + $indicator.html(_t("You are back online")); + $indicator.delay(2000).fadeOut('slow',function(){ + $indicator.remove(); + }); + $.unblockUI(); + }); + }, 2000); + return; + } var handler = instance.web.crash_manager_registry.get_object(error.data.name, true); if (handler) { new (handler)(this, error).display();