robert2206 8 роки тому
коміт
629f8d9875

+ 1 - 0
__init__.py

@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-


+ 15 - 0
__openerp__.py

@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+{
+    'name': "Internet Connection Check and Notify",
+    'author': "Robert Gauto",
+    'website': "http://www.yourcompany.com",
+    'category': 'Uncategorized',
+    'version': '0.1',
+    'depends': ['base', 'web'],
+    'data': [
+        'templates.xml',
+    ],
+    'qweb': [
+        'static/src/xml/*.xml'
+    ]
+}

BIN
static/description/icon.png


+ 109 - 0
static/lib/offline-language-spanish.css

@@ -0,0 +1,109 @@
+@charset "UTF-8";
+/* line 6, ../sass/_content.sass */
+.offline-ui .offline-ui-retry:before {
+  content: "Reconectar";
+}
+/* line 11, ../sass/_content.sass */
+.offline-ui.offline-ui-up .offline-ui-content:before {
+  content: "Tu computador está conectado a internet.";
+}
+@media (max-width: 1024px) {
+  /* line 11, ../sass/_content.sass */
+  .offline-ui.offline-ui-up .offline-ui-content:before {
+    content: "Tu dispositivo está conectado a internet.";
+  }
+}
+@media (max-width: 568px) {
+  /* line 11, ../sass/_content.sass */
+  .offline-ui.offline-ui-up .offline-ui-content:before {
+    content: "Tu dispositivo está conectado.";
+  }
+}
+/* line 22, ../sass/_content.sass */
+.offline-ui.offline-ui-down .offline-ui-content:before {
+  content: "Tu computador perdió su conexión a internet.";
+}
+@media (max-width: 1024px) {
+  /* line 22, ../sass/_content.sass */
+  .offline-ui.offline-ui-down .offline-ui-content:before {
+    content: "Tu dispositivo perdió su conexión a internet.";
+  }
+}
+@media (max-width: 568px) {
+  /* line 22, ../sass/_content.sass */
+  .offline-ui.offline-ui-down .offline-ui-content:before {
+    content: "Tu dispositivo no está conectado.";
+  }
+}
+/* line 33, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-connecting .offline-ui-content:before, .offline-ui.offline-ui-down.offline-ui-connecting-2s .offline-ui-content:before {
+  content: "Intentando reconectar...";
+}
+/* line 42, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="second"]:before {
+  content: "Conexión perdida. Reconectando en " attr(data-retry-in-value) " segundos...";
+}
+@media (max-width: 568px) {
+  /* line 42, ../sass/_content.sass */
+  .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="second"]:before {
+    content: "Reconectando en " attr(data-retry-in-value) "s...";
+  }
+}
+/* line 50, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="second"][data-retry-in-value="1"]:before {
+  content: "Conexión perdida. Reconectando en " attr(data-retry-in-value) " segundo...";
+}
+@media (max-width: 568px) {
+  /* line 50, ../sass/_content.sass */
+  .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="second"][data-retry-in-value="1"]:before {
+    content: "Reconectando en " attr(data-retry-in-value) "s...";
+  }
+}
+/* line 58, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="minute"]:before {
+  content: "Conexión perdida. Reconectando en " attr(data-retry-in-value) " minutos...";
+}
+@media (max-width: 568px) {
+  /* line 58, ../sass/_content.sass */
+  .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="minute"]:before {
+    content: "Reconectando en " attr(data-retry-in-value) "m...";
+  }
+}
+/* line 66, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="minute"][data-retry-in-value="1"]:before {
+  content: "Conexión perdida. Reconectando en " attr(data-retry-in-value) " minuto...";
+}
+@media (max-width: 568px) {
+  /* line 66, ../sass/_content.sass */
+  .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="minute"][data-retry-in-value="1"]:before {
+    content: "Reconectando en " attr(data-retry-in-value) "m...";
+  }
+}
+/* line 74, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="hour"]:before {
+  content: "Conexión perdida. Reconectando en " attr(data-retry-in-value) " horas...";
+}
+@media (max-width: 568px) {
+  /* line 74, ../sass/_content.sass */
+  .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="hour"]:before {
+    content: "Reconectando en " attr(data-retry-in-value) "h...";
+  }
+}
+/* line 82, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="hour"][data-retry-in-value="1"]:before {
+  content: "Conexión perdida. Reconectando en " attr(data-retry-in-value) " hora...";
+}
+@media (max-width: 568px) {
+  /* line 82, ../sass/_content.sass */
+  .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content[data-retry-in-unit="hour"][data-retry-in-value="1"]:before {
+    content: "Reconectando en " attr(data-retry-in-value) "h...";
+  }
+}
+/* line 90, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-reconnect-failed-2s.offline-ui-waiting .offline-ui-retry {
+  display: none;
+}
+/* line 93, ../sass/_content.sass */
+.offline-ui.offline-ui-down.offline-ui-reconnect-failed-2s .offline-ui-content:before {
+  content: "Intento fallido.";
+}

+ 597 - 0
static/lib/offline-theme-chrome.css

@@ -0,0 +1,597 @@
+/* line 4, ../sass/_offline-theme-base.sass */
+.offline-ui, .offline-ui *, .offline-ui:before, .offline-ui:after, .offline-ui *:before, .offline-ui *:after {
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  box-sizing: border-box;
+}
+
+/* line 7, ../sass/_offline-theme-base.sass */
+.offline-ui {
+  display: none;
+  position: fixed;
+  background: white;
+  z-index: 2000;
+  margin: auto;
+  top: 0;
+  left: 0;
+  right: 0;
+}
+/* line 17, ../sass/_offline-theme-base.sass */
+.offline-ui .offline-ui-content:before {
+  display: inline;
+}
+/* line 20, ../sass/_offline-theme-base.sass */
+.offline-ui .offline-ui-retry {
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  user-select: none;
+  display: none;
+}
+/* line 24, ../sass/_offline-theme-base.sass */
+.offline-ui .offline-ui-retry:before {
+  display: inline;
+}
+/* line 29, ../sass/_offline-theme-base.sass */
+.offline-ui.offline-ui-up.offline-ui-up-5s {
+  display: block;
+}
+/* line 32, ../sass/_offline-theme-base.sass */
+.offline-ui.offline-ui-down {
+  display: block;
+}
+/* line 37, ../sass/_offline-theme-base.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-retry {
+  display: block;
+}
+/* line 42, ../sass/_offline-theme-base.sass */
+.offline-ui.offline-ui-down.offline-ui-reconnect-failed-2s.offline-ui-waiting .offline-ui-retry {
+  display: none;
+}
+
+@-webkit-keyframes offline-dropin {
+  /* line 40, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 0;
+  }
+
+  /* line 43, ../sass/_keyframes.sass */
+  1% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 0;
+  }
+
+  /* line 48, ../sass/_keyframes.sass */
+  2% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 1;
+  }
+
+  /* line 51, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 1;
+  }
+}
+
+@-moz-keyframes offline-dropin {
+  /* line 40, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 0;
+  }
+
+  /* line 43, ../sass/_keyframes.sass */
+  1% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 0;
+  }
+
+  /* line 48, ../sass/_keyframes.sass */
+  2% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 1;
+  }
+
+  /* line 51, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 1;
+  }
+}
+
+@-ms-keyframes offline-dropin {
+  /* line 40, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 0;
+  }
+
+  /* line 43, ../sass/_keyframes.sass */
+  1% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 0;
+  }
+
+  /* line 48, ../sass/_keyframes.sass */
+  2% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 1;
+  }
+
+  /* line 51, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 1;
+  }
+}
+
+@-o-keyframes offline-dropin {
+  /* line 40, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 0;
+  }
+
+  /* line 43, ../sass/_keyframes.sass */
+  1% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 0;
+  }
+
+  /* line 48, ../sass/_keyframes.sass */
+  2% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 1;
+  }
+
+  /* line 51, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 1;
+  }
+}
+
+@keyframes offline-dropin {
+  /* line 40, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 0;
+  }
+
+  /* line 43, ../sass/_keyframes.sass */
+  1% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 0;
+  }
+
+  /* line 48, ../sass/_keyframes.sass */
+  2% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+    opacity: 1;
+  }
+
+  /* line 51, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+    opacity: 1;
+  }
+}
+
+@-webkit-keyframes offline-dropout {
+  /* line 57, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+  }
+
+  /* line 59, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+  }
+}
+
+@-moz-keyframes offline-dropout {
+  /* line 57, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+  }
+
+  /* line 59, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+  }
+}
+
+@-ms-keyframes offline-dropout {
+  /* line 57, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+  }
+
+  /* line 59, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+  }
+}
+
+@-o-keyframes offline-dropout {
+  /* line 57, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+  }
+
+  /* line 59, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+  }
+}
+
+@keyframes offline-dropout {
+  /* line 57, ../sass/_keyframes.sass */
+  0% {
+    transform: translateY(0);
+    -webkit-transform: translateY(0);
+    -moz-transform: translateY(0);
+    -ms-transform: translateY(0);
+    -o-transform: translateY(0);
+  }
+
+  /* line 59, ../sass/_keyframes.sass */
+  100% {
+    transform: translateY(-800px);
+    -webkit-transform: translateY(-800px);
+    -moz-transform: translateY(-800px);
+    -ms-transform: translateY(-800px);
+    -o-transform: translateY(-800px);
+  }
+}
+
+@-webkit-keyframes offline-rotation {
+  /* line 64, ../sass/_keyframes.sass */
+  0% {
+    transform: rotate(0deg);
+    -webkit-transform: rotate(0deg);
+    -moz-transform: rotate(0deg);
+    -ms-transform: rotate(0deg);
+    -o-transform: rotate(0deg);
+  }
+
+  /* line 66, ../sass/_keyframes.sass */
+  100% {
+    transform: rotate(359deg);
+    -webkit-transform: rotate(359deg);
+    -moz-transform: rotate(359deg);
+    -ms-transform: rotate(359deg);
+    -o-transform: rotate(359deg);
+  }
+}
+
+@-moz-keyframes offline-rotation {
+  /* line 64, ../sass/_keyframes.sass */
+  0% {
+    transform: rotate(0deg);
+    -webkit-transform: rotate(0deg);
+    -moz-transform: rotate(0deg);
+    -ms-transform: rotate(0deg);
+    -o-transform: rotate(0deg);
+  }
+
+  /* line 66, ../sass/_keyframes.sass */
+  100% {
+    transform: rotate(359deg);
+    -webkit-transform: rotate(359deg);
+    -moz-transform: rotate(359deg);
+    -ms-transform: rotate(359deg);
+    -o-transform: rotate(359deg);
+  }
+}
+
+@-ms-keyframes offline-rotation {
+  /* line 64, ../sass/_keyframes.sass */
+  0% {
+    transform: rotate(0deg);
+    -webkit-transform: rotate(0deg);
+    -moz-transform: rotate(0deg);
+    -ms-transform: rotate(0deg);
+    -o-transform: rotate(0deg);
+  }
+
+  /* line 66, ../sass/_keyframes.sass */
+  100% {
+    transform: rotate(359deg);
+    -webkit-transform: rotate(359deg);
+    -moz-transform: rotate(359deg);
+    -ms-transform: rotate(359deg);
+    -o-transform: rotate(359deg);
+  }
+}
+
+@-o-keyframes offline-rotation {
+  /* line 64, ../sass/_keyframes.sass */
+  0% {
+    transform: rotate(0deg);
+    -webkit-transform: rotate(0deg);
+    -moz-transform: rotate(0deg);
+    -ms-transform: rotate(0deg);
+    -o-transform: rotate(0deg);
+  }
+
+  /* line 66, ../sass/_keyframes.sass */
+  100% {
+    transform: rotate(359deg);
+    -webkit-transform: rotate(359deg);
+    -moz-transform: rotate(359deg);
+    -ms-transform: rotate(359deg);
+    -o-transform: rotate(359deg);
+  }
+}
+
+@keyframes offline-rotation {
+  /* line 64, ../sass/_keyframes.sass */
+  0% {
+    transform: rotate(0deg);
+    -webkit-transform: rotate(0deg);
+    -moz-transform: rotate(0deg);
+    -ms-transform: rotate(0deg);
+    -o-transform: rotate(0deg);
+  }
+
+  /* line 66, ../sass/_keyframes.sass */
+  100% {
+    transform: rotate(359deg);
+    -webkit-transform: rotate(359deg);
+    -moz-transform: rotate(359deg);
+    -ms-transform: rotate(359deg);
+    -o-transform: rotate(359deg);
+  }
+}
+
+/* line 16, ../sass/offline-theme-chrome.sass */
+.offline-ui {
+  -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 1em rgba(0, 0, 0, 0.3);
+  -moz-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 1em rgba(0, 0, 0, 0.3);
+  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 1em rgba(0, 0, 0, 0.3);
+  font-family: "Lucida Grande", sans-serif;
+  font-size: 14px;
+  padding: 1em;
+  width: 38em;
+  max-width: 100%;
+  background: #f6f6f6;
+  color: #444444;
+  overflow: hidden;
+}
+/* line 27, ../sass/offline-theme-chrome.sass */
+.offline-ui .offline-ui-content {
+  padding-left: 2em;
+}
+/* line 30, ../sass/offline-theme-chrome.sass */
+.offline-ui .offline-ui-content:before {
+  line-height: 1.25em;
+}
+/* line 33, ../sass/offline-theme-chrome.sass */
+.offline-ui .offline-ui-content:after {
+  -webkit-border-radius: 50%;
+  -moz-border-radius: 50%;
+  -ms-border-radius: 50%;
+  -o-border-radius: 50%;
+  border-radius: 50%;
+  content: " ";
+  display: block;
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 1em;
+  margin: auto;
+  height: 1em;
+  width: 1em;
+}
+/* line 45, ../sass/offline-theme-chrome.sass */
+.offline-ui .offline-ui-retry {
+  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
+  -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
+  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.75);
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+  -ms-border-radius: 2px;
+  -o-border-radius: 2px;
+  border-radius: 2px;
+  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ededed), color-stop(38%, #ededed), color-stop(100%, #dedede));
+  background-image: -webkit-linear-gradient(#ededed, #ededed 38%, #dedede);
+  background-image: -moz-linear-gradient(#ededed, #ededed 38%, #dedede);
+  background-image: -o-linear-gradient(#ededed, #ededed 38%, #dedede);
+  background-image: linear-gradient(#ededed, #ededed 38%, #dedede);
+  position: absolute;
+  right: 4em;
+  top: 1em;
+  bottom: 1em;
+  border: 1px solid rgba(0, 0, 0, 0.25);
+  text-shadow: 0 1px 0 #f0f0f0;
+  padding: 0 1em;
+  line-height: 1.6em;
+  height: 1.7em;
+  margin: auto;
+  font-size: 12px;
+  text-decoration: none;
+  color: inherit;
+}
+/* line 63, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-up {
+  -webkit-animation: offline-dropout forwards 0.5s 2s;
+  -moz-animation: offline-dropout forwards 0.5s 2s;
+  -ms-animation: offline-dropout forwards 0.5s 2s;
+  -o-animation: offline-dropout forwards 0.5s 2s;
+  animation: offline-dropout forwards 0.5s 2s;
+  -webkit-backface-visibility: hidden;
+}
+/* line 66, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-up .offline-ui-content:after {
+  background: #80d580;
+}
+/* line 69, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down {
+  -webkit-animation: offline-dropin 0.5s;
+  -moz-animation: offline-dropin 0.5s;
+  -ms-animation: offline-dropin 0.5s;
+  -o-animation: offline-dropin 0.5s;
+  animation: offline-dropin 0.5s;
+  -webkit-backface-visibility: hidden;
+}
+/* line 72, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down .offline-ui-content:after {
+  background: #ec8787;
+}
+/* line 75, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-connecting, .offline-ui.offline-ui-down.offline-ui-waiting {
+  padding-right: 3em;
+}
+/* line 78, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-connecting .offline-ui-content:after, .offline-ui.offline-ui-down.offline-ui-waiting .offline-ui-content:after {
+  background: #ec8787;
+}
+/* line 81, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-connecting:after, .offline-ui.offline-ui-down.offline-ui-waiting:after {
+  -webkit-animation: offline-rotation 0.7s linear infinite;
+  -moz-animation: offline-rotation 0.7s linear infinite;
+  -ms-animation: offline-rotation 0.7s linear infinite;
+  -o-animation: offline-rotation 0.7s linear infinite;
+  animation: offline-rotation 0.7s linear infinite;
+  -webkit-backface-visibility: hidden;
+  -webkit-border-radius: 50%;
+  -moz-border-radius: 50%;
+  -ms-border-radius: 50%;
+  -o-border-radius: 50%;
+  border-radius: 50%;
+  content: " ";
+  display: block;
+  position: absolute;
+  right: 1em;
+  top: 0;
+  bottom: 0;
+  margin: auto;
+  height: 1em;
+  width: 1em;
+  border: 2px solid rgba(0, 0, 0, 0);
+  border-top-color: rgba(0, 0, 0, 0.5);
+  border-left-color: rgba(0, 0, 0, 0.5);
+  opacity: 0.7;
+}
+/* line 98, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting {
+  padding-right: 11em;
+}
+/* line 101, ../sass/offline-theme-chrome.sass */
+.offline-ui.offline-ui-down.offline-ui-waiting.offline-ui-reconnect-failed-2s {
+  padding-right: 0;
+}

+ 290 - 0
static/lib/offline.js

@@ -0,0 +1,290 @@
+/*! offline-js 0.7.18 */
+(function() {
+  var Offline, checkXHR, defaultOptions, extendNative, grab, handlers, init;
+  extendNative = function(to, from) {
+    var key, results, val;
+    results = [];
+    for (key in from.prototype) try {
+      val = from.prototype[key], null == to[key] && "function" != typeof val ? results.push(to[key] = val) :results.push(void 0);
+    } catch (_error) {
+      _error;
+    }
+    return results;
+  }, Offline = {}, Offline.options = window.Offline ? window.Offline.options || {} :{}, 
+  defaultOptions = {
+    checks:{
+      xhr:{
+        url:function() {
+          return "/favicon.ico?_=" + new Date().getTime();
+        },
+        timeout:5e3,
+        type:"HEAD"
+      },
+      image:{
+        url:function() {
+          return "/favicon.ico?_=" + new Date().getTime();
+        }
+      },
+      active:"xhr"
+    },
+    checkOnLoad:!1,
+    interceptRequests:!0,
+    reconnect:!0,
+    deDupBody:!1
+  }, grab = function(obj, key) {
+    var cur, i, j, len, part, parts;
+    for (cur = obj, parts = key.split("."), i = j = 0, len = parts.length; j < len && (part = parts[i], 
+    "object" == typeof (cur = cur[part])); i = ++j) ;
+    return i === parts.length - 1 ? cur :void 0;
+  }, Offline.getOption = function(key) {
+    var ref, val;
+    return val = null != (ref = grab(Offline.options, key)) ? ref :grab(defaultOptions, key), 
+    "function" == typeof val ? val() :val;
+  }, "function" == typeof window.addEventListener && window.addEventListener("online", function() {
+    return setTimeout(Offline.confirmUp, 100);
+  }, !1), "function" == typeof window.addEventListener && window.addEventListener("offline", function() {
+    return Offline.confirmDown();
+  }, !1), Offline.state = "up", Offline.markUp = function() {
+    if (Offline.trigger("confirmed-up"), "up" !== Offline.state) return Offline.state = "up", 
+    Offline.trigger("up");
+  }, Offline.markDown = function() {
+    if (Offline.trigger("confirmed-down"), "down" !== Offline.state) return Offline.state = "down", 
+    Offline.trigger("down");
+  }, handlers = {}, Offline.on = function(event, handler, ctx) {
+    var e, events, j, len, results;
+    if (events = event.split(" "), events.length > 1) {
+      for (results = [], j = 0, len = events.length; j < len; j++) e = events[j], results.push(Offline.on(e, handler, ctx));
+      return results;
+    }
+    return null == handlers[event] && (handlers[event] = []), handlers[event].push([ ctx, handler ]);
+  }, Offline.off = function(event, handler) {
+    var _handler, i, ref, results;
+    if (null != handlers[event]) {
+      if (handler) {
+        for (i = 0, results = []; i < handlers[event].length; ) ref = handlers[event][i], 
+        ref[0], _handler = ref[1], _handler === handler ? results.push(handlers[event].splice(i, 1)) :results.push(i++);
+        return results;
+      }
+      return handlers[event] = [];
+    }
+  }, Offline.trigger = function(event) {
+    var ctx, handler, j, len, ref, ref1, results;
+    if (null != handlers[event]) {
+      for (ref = handlers[event].slice(0), results = [], j = 0, len = ref.length; j < len; j++) ref1 = ref[j], 
+      ctx = ref1[0], handler = ref1[1], results.push(handler.call(ctx));
+      return results;
+    }
+  }, checkXHR = function(xhr, onUp, onDown) {
+    var _onerror, _onload, _onreadystatechange, _ontimeout, checkStatus;
+    return checkStatus = function() {
+      return xhr.status && xhr.status < 12e3 ? onUp() :onDown();
+    }, null === xhr.onprogress ? (_onerror = xhr.onerror, xhr.onerror = function() {
+      return onDown(), "function" == typeof _onerror ? _onerror.apply(null, arguments) :void 0;
+    }, _ontimeout = xhr.ontimeout, xhr.ontimeout = function() {
+      return onDown(), "function" == typeof _ontimeout ? _ontimeout.apply(null, arguments) :void 0;
+    }, _onload = xhr.onload, xhr.onload = function() {
+      return checkStatus(), "function" == typeof _onload ? _onload.apply(null, arguments) :void 0;
+    }) :(_onreadystatechange = xhr.onreadystatechange, xhr.onreadystatechange = function() {
+      return 4 === xhr.readyState ? checkStatus() :0 === xhr.readyState && onDown(), "function" == typeof _onreadystatechange ? _onreadystatechange.apply(null, arguments) :void 0;
+    });
+  }, Offline.checks = {}, Offline.checks.xhr = function() {
+    var xhr;
+    xhr = new XMLHttpRequest(), xhr.offline = !1, xhr.open(Offline.getOption("checks.xhr.type"), Offline.getOption("checks.xhr.url"), !0), 
+    null != xhr.timeout && (xhr.timeout = Offline.getOption("checks.xhr.timeout")), 
+    checkXHR(xhr, Offline.markUp, Offline.markDown);
+    try {
+      xhr.send();
+    } catch (_error) {
+      _error, Offline.markDown();
+    }
+    return xhr;
+  }, Offline.checks.image = function() {
+    var img;
+    img = document.createElement("img"), img.onerror = Offline.markDown, img.onload = Offline.markUp, 
+    img.src = Offline.getOption("checks.image.url");
+  }, Offline.checks.down = Offline.markDown, Offline.checks.up = Offline.markUp, Offline.check = function() {
+    return Offline.trigger("checking"), Offline.checks[Offline.getOption("checks.active")]();
+  }, Offline.confirmUp = Offline.confirmDown = Offline.check, Offline.onXHR = function(cb) {
+    var _XDomainRequest, _XMLHttpRequest, monitorXHR;
+    if (monitorXHR = function(req, flags) {
+      var _open;
+      return _open = req.open, req.open = function(type, url, async, user, password) {
+        return cb({
+          type:type,
+          url:url,
+          async:async,
+          flags:flags,
+          user:user,
+          password:password,
+          xhr:req
+        }), _open.apply(req, arguments);
+      };
+    }, _XMLHttpRequest = window.XMLHttpRequest, window.XMLHttpRequest = function(flags) {
+      var _overrideMimeType, _setRequestHeader, req;
+      return req = new _XMLHttpRequest(flags), monitorXHR(req, flags), _setRequestHeader = req.setRequestHeader, 
+      req.headers = {}, req.setRequestHeader = function(name, value) {
+        return req.headers[name] = value, _setRequestHeader.call(req, name, value);
+      }, _overrideMimeType = req.overrideMimeType, req.overrideMimeType = function(type) {
+        return req.mimeType = type, _overrideMimeType.call(req, type);
+      }, req;
+    }, extendNative(window.XMLHttpRequest, _XMLHttpRequest), null != window.XDomainRequest) return _XDomainRequest = window.XDomainRequest, 
+    window.XDomainRequest = function() {
+      var req;
+      return req = new _XDomainRequest(), monitorXHR(req), req;
+    }, extendNative(window.XDomainRequest, _XDomainRequest);
+  }, init = function() {
+    if (Offline.getOption("interceptRequests") && Offline.onXHR(function(arg) {
+      var xhr;
+      if (xhr = arg.xhr, !1 !== xhr.offline) return checkXHR(xhr, Offline.markUp, Offline.confirmDown);
+    }), Offline.getOption("checkOnLoad")) return Offline.check();
+  }, setTimeout(init, 0), window.Offline = Offline;
+}).call(this), function() {
+  var down, next, nope, rc, reset, retryIntv, tick, tryNow, up;
+  if (!window.Offline) throw new Error("Offline Reconnect brought in without offline.js");
+  rc = Offline.reconnect = {}, retryIntv = null, reset = function() {
+    var ref;
+    return null != rc.state && "inactive" !== rc.state && Offline.trigger("reconnect:stopped"), 
+    rc.state = "inactive", rc.remaining = rc.delay = null != (ref = Offline.getOption("reconnect.initialDelay")) ? ref :3;
+  }, next = function() {
+    var delay, ref;
+    return delay = null != (ref = Offline.getOption("reconnect.delay")) ? ref :Math.min(Math.ceil(1.5 * rc.delay), 3600), 
+    rc.remaining = rc.delay = delay;
+  }, tick = function() {
+    if ("connecting" !== rc.state) return rc.remaining -= 1, Offline.trigger("reconnect:tick"), 
+    0 === rc.remaining ? tryNow() :void 0;
+  }, tryNow = function() {
+    if ("waiting" === rc.state) return Offline.trigger("reconnect:connecting"), rc.state = "connecting", 
+    Offline.check();
+  }, down = function() {
+    if (Offline.getOption("reconnect")) return reset(), rc.state = "waiting", Offline.trigger("reconnect:started"), 
+    retryIntv = setInterval(tick, 1e3);
+  }, up = function() {
+    return null != retryIntv && clearInterval(retryIntv), reset();
+  }, nope = function() {
+    if (Offline.getOption("reconnect")) return "connecting" === rc.state ? (Offline.trigger("reconnect:failure"), 
+    rc.state = "waiting", next()) :void 0;
+  }, rc.tryNow = tryNow, reset(), Offline.on("down", down), Offline.on("confirmed-down", nope), 
+  Offline.on("up", up);
+}.call(this), function() {
+  var clear, flush, held, holdRequest, makeRequest, waitingOnConfirm;
+  if (!window.Offline) throw new Error("Requests module brought in without offline.js");
+  held = [], waitingOnConfirm = !1, holdRequest = function(req) {
+    if (!1 !== Offline.getOption("requests")) return Offline.trigger("requests:capture"), 
+    "down" !== Offline.state && (waitingOnConfirm = !0), held.push(req);
+  }, makeRequest = function(arg) {
+    var body, name, password, ref, type, url, user, val, xhr;
+    if (xhr = arg.xhr, url = arg.url, type = arg.type, user = arg.user, password = arg.password, 
+    body = arg.body, !1 !== Offline.getOption("requests")) {
+      xhr.abort(), xhr.open(type, url, !0, user, password), ref = xhr.headers;
+      for (name in ref) val = ref[name], xhr.setRequestHeader(name, val);
+      return xhr.mimeType && xhr.overrideMimeType(xhr.mimeType), xhr.send(body);
+    }
+  }, clear = function() {
+    return held = [];
+  }, flush = function() {
+    var body, i, key, len, request, requests, url;
+    if (!1 !== Offline.getOption("requests")) {
+      for (Offline.trigger("requests:flush"), requests = {}, i = 0, len = held.length; i < len; i++) request = held[i], 
+      url = request.url.replace(/(\?|&)_=[0-9]+/, function(match, chr) {
+        return "?" === chr ? chr :"";
+      }), Offline.getOption("deDupBody") ? (body = request.body, body = "[object Object]" === body.toString() ? JSON.stringify(body) :body.toString(), 
+      requests[request.type.toUpperCase() + " - " + url + " - " + body] = request) :requests[request.type.toUpperCase() + " - " + url] = request;
+      for (key in requests) request = requests[key], makeRequest(request);
+      return clear();
+    }
+  }, setTimeout(function() {
+    if (!1 !== Offline.getOption("requests")) return Offline.on("confirmed-up", function() {
+      if (waitingOnConfirm) return waitingOnConfirm = !1, clear();
+    }), Offline.on("up", flush), Offline.on("down", function() {
+      return waitingOnConfirm = !1;
+    }), Offline.onXHR(function(request) {
+      var _onreadystatechange, _send, async, hold, xhr;
+      if (xhr = request.xhr, async = request.async, !1 !== xhr.offline && (hold = function() {
+        return holdRequest(request);
+      }, _send = xhr.send, xhr.send = function(body) {
+        return request.body = body, _send.apply(xhr, arguments);
+      }, async)) return null === xhr.onprogress ? (xhr.addEventListener("error", hold, !1), 
+      xhr.addEventListener("timeout", hold, !1)) :(_onreadystatechange = xhr.onreadystatechange, 
+      xhr.onreadystatechange = function() {
+        return 0 === xhr.readyState ? hold() :4 === xhr.readyState && (0 === xhr.status || xhr.status >= 12e3) && hold(), 
+        "function" == typeof _onreadystatechange ? _onreadystatechange.apply(null, arguments) :void 0;
+      });
+    }), Offline.requests = {
+      flush:flush,
+      clear:clear
+    };
+  }, 0);
+}.call(this), function() {
+  var base, i, len, ref, simulate, state;
+  if (!Offline) throw new Error("Offline simulate brought in without offline.js");
+  for (ref = [ "up", "down" ], i = 0, len = ref.length; i < len; i++) {
+    state = ref[i];
+    try {
+      simulate = document.querySelector("script[data-simulate='" + state + "']") || ("undefined" != typeof localStorage && null !== localStorage ? localStorage.OFFLINE_SIMULATE :void 0) === state;
+    } catch (_error) {
+      _error, simulate = !1;
+    }
+  }
+  simulate && (null == Offline.options && (Offline.options = {}), null == (base = Offline.options).checks && (base.checks = {}), 
+  Offline.options.checks.active = state);
+}.call(this), function() {
+  var RETRY_TEMPLATE, TEMPLATE, _onreadystatechange, addClass, content, createFromHTML, el, flashClass, flashTimeouts, init, removeClass, render, roundTime;
+  if (!window.Offline) throw new Error("Offline UI brought in without offline.js");
+  TEMPLATE = '<div class="offline-ui"><div class="offline-ui-content"></div></div>', 
+  RETRY_TEMPLATE = '<a href class="offline-ui-retry"></a>', createFromHTML = function(html) {
+    var el;
+    return el = document.createElement("div"), el.innerHTML = html, el.children[0];
+  }, el = content = null, addClass = function(name) {
+    return removeClass(name), el.className += " " + name;
+  }, removeClass = function(name) {
+    return el.className = el.className.replace(new RegExp("(^| )" + name.split(" ").join("|") + "( |$)", "gi"), " ");
+  }, flashTimeouts = {}, flashClass = function(name, time) {
+    return addClass(name), null != flashTimeouts[name] && clearTimeout(flashTimeouts[name]), 
+    flashTimeouts[name] = setTimeout(function() {
+      return removeClass(name), delete flashTimeouts[name];
+    }, 1e3 * time);
+  }, roundTime = function(sec) {
+    var mult, unit, units, val;
+    units = {
+      day:86400,
+      hour:3600,
+      minute:60,
+      second:1
+    };
+    for (unit in units) if (mult = units[unit], sec >= mult) return val = Math.floor(sec / mult), 
+    [ val, unit ];
+    return [ "now", "" ];
+  }, render = function() {
+    var button, handler;
+    return el = createFromHTML(TEMPLATE), document.body.appendChild(el), null != Offline.reconnect && Offline.getOption("reconnect") && (el.appendChild(createFromHTML(RETRY_TEMPLATE)), 
+    button = el.querySelector(".offline-ui-retry"), handler = function(e) {
+      return e.preventDefault(), Offline.reconnect.tryNow();
+    }, null != button.addEventListener ? button.addEventListener("click", handler, !1) :button.attachEvent("click", handler)), 
+    addClass("offline-ui-" + Offline.state), content = el.querySelector(".offline-ui-content");
+  }, init = function() {
+    return render(), Offline.on("up", function() {
+      return removeClass("offline-ui-down"), addClass("offline-ui-up"), flashClass("offline-ui-up-2s", 2), 
+      flashClass("offline-ui-up-5s", 5);
+    }), Offline.on("down", function() {
+      return removeClass("offline-ui-up"), addClass("offline-ui-down"), flashClass("offline-ui-down-2s", 2), 
+      flashClass("offline-ui-down-5s", 5);
+    }), Offline.on("reconnect:connecting", function() {
+      return addClass("offline-ui-connecting"), removeClass("offline-ui-waiting");
+    }), Offline.on("reconnect:tick", function() {
+      var ref, time, unit;
+      return addClass("offline-ui-waiting"), removeClass("offline-ui-connecting"), ref = roundTime(Offline.reconnect.remaining), 
+      time = ref[0], unit = ref[1], content.setAttribute("data-retry-in-value", time), 
+      content.setAttribute("data-retry-in-unit", unit);
+    }), Offline.on("reconnect:stopped", function() {
+      return removeClass("offline-ui-connecting offline-ui-waiting"), content.setAttribute("data-retry-in-value", null), 
+      content.setAttribute("data-retry-in-unit", null);
+    }), Offline.on("reconnect:failure", function() {
+      return flashClass("offline-ui-reconnect-failed-2s", 2), flashClass("offline-ui-reconnect-failed-5s", 5);
+    }), Offline.on("reconnect:success", function() {
+      return flashClass("offline-ui-reconnect-succeeded-2s", 2), flashClass("offline-ui-reconnect-succeeded-5s", 5);
+    });
+  }, "complete" === document.readyState ? init() :null != document.addEventListener ? document.addEventListener("DOMContentLoaded", init, !1) :(_onreadystatechange = document.onreadystatechange, 
+  document.onreadystatechange = function() {
+    return "complete" === document.readyState && init(), "function" == typeof _onreadystatechange ? _onreadystatechange.apply(null, arguments) :void 0;
+  });
+}.call(this);

+ 38 - 0
static/src/css/main.css

@@ -0,0 +1,38 @@
+.offline-ui {
+    height: 100%;
+    width: 100%;
+    background-color: #000;
+    opacity: 0.8;
+    display: none;
+    position: fixed;
+    bottom: 0;
+    z-index: 3000;
+}
+
+.offline-ui-content {
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    color: white;
+}
+
+.offline-ui-content > i {
+    font-size: 60pt;
+    text-align: center;
+    padding-bottom: 0.233em;
+}
+
+.offline-ui-content > h1 {
+    font-size: 30pt;
+}
+
+.offline-ui-content > p {
+    font-size: 16pt;
+}
+
+.offline-reconnect-remaining {
+    font-size: 3pt;
+}

+ 53 - 0
static/src/js/main.js

@@ -0,0 +1,53 @@
+(function () {
+    "use strict";
+
+    var qweb = openerp.web.qweb;
+    var checkerId = undefined;
+    var checker = function() {
+        checkerId = setInterval(function () {
+            Offline.check();
+        }, 1000);
+    };
+
+    Offline.options = {
+        checkOnLoad: true,
+        checks: {
+            xhr: {
+                url: '/web/static/src/img/favicon.ico?_=' + new Date().getTime()
+            }
+        }
+    };
+
+    Offline.on('up', function () {
+        $('.offline-ui').hide({
+            effect: 'fade',
+            duration: 200
+        });
+    });
+
+    Offline.on('confirmed-down', function () {
+        clearInterval(checkerId);
+
+        $('.offline-ui').show({
+            effect: 'fade',
+            duration: 200,
+            complete: function () {
+                $('.offline-ui-content').html(qweb.render('MessageTmpl'));
+            }
+        });
+    });
+
+    Offline.on('reconnect:tick', function (e) {
+        var widget = qweb.render('ReconnectTmpl', { remaining: Offline.reconnect.remaining + 1 });
+        console.log(widget);
+        // $('.offline-reconnect-remaining').replaceWith(widget);
+    });
+
+    Offline.on('reconnect:stopped', function () {
+        if (Offline.state === 'up') {
+            checker();
+        }
+    });
+
+    checker();
+})();

+ 13 - 0
static/src/xml/main.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<template xml:space="preserve">
+    <t t-name="MessageTmpl">
+        <i class="fa fa-desktop"></i>
+        <h1>Al parecer su equipo no está conectado a internet</h1>
+        <p>Por favor, revise su conexión o comuníquese con su proveedor de internet</p>
+        <h3 class="offline-reconnect-remaining"></h3>
+    </t>
+    <t t-name="ReconnectTmpl">
+        <p>Intentando conexión en <t t-esc="remaining" /> segundos</p>
+    </t>
+</template>

+ 15 - 0
templates.xml

@@ -0,0 +1,15 @@
+<openerp>
+    <data>
+        <template id="eiru_internet_check_assets" inherit_id="web.assets_eiru">
+            <xpath expr="." position="inside">
+                <!-- Dependency -->
+                <script type="text/javascript" src="/eiru_internet_check/static/lib/offline.js" />
+
+                <!-- Main assets -->
+                <link rel="stylesheet" href="/eiru_internet_check/static/src/css/main.css" />
+                <script type="text/javascript" src="/eiru_internet_check/static/src/js/main.js" />
+            </xpath>
+        </template>
+
+    </data>
+</openerp>