# HG changeset patch
# User Ranjith S R <ranjith@qualiantech.com>
# Date 1510134062 -19800
#      Wed Nov 08 15:11:02 2017 +0530
# Node ID 5bfccd85dabd58e90e183b76fcd7cce4552848ae
# Parent  f21e14b092a045a017abaf9b5d96ed76e14c7dd0
Fixed issue 37044 : Created Processing Dialog

diff -r f21e14b092a0 -r 5bfccd85dabd web/org.openbravo.mobile.core/assets/css/ob-standard.css
--- a/web/org.openbravo.mobile.core/assets/css/ob-standard.css	Wed Nov 08 09:00:45 2017 +0100
+++ b/web/org.openbravo.mobile.core/assets/css/ob-standard.css	Wed Nov 08 15:11:02 2017 +0530
@@ -1483,6 +1483,110 @@
   padding-left: 40px;
 }
 
+/* Popup.css */
+div.popup-processing {
+  box-shadow: none;
+  border: none;
+  border-radius: 0px;
+  padding: 0px;
+  color: #ffffff;
+  background: none;
+}
+
+div.popup-processing div.processing-container {
+  width: 350px;
+  border: 2px solid white;
+  background-color: black;
+  opacity: 0.8;
+}
+
+div.processing-container div.processing-label {
+  color: #fff;
+  font-size: 20px;
+  text-align: center;
+  line-height: 140%;
+  padding: 15px;
+}
+
+div.processing-container div.processing-spinner {
+  position: relative;
+  height: 120px; 
+  left: 125px; 
+  top: 30px;
+}
+
+@keyframes processing-spinner {
+  0% {
+    opacity: 1;
+  }
+  100% {
+    opacity: 0;
+  }
+}
+
+div.processing-spinner div {
+  position: absolute;
+  animation-name: processing-spinner;
+  animation-duration: 1.1s;
+  animation-timing-function: linear;
+  animation-iteration-count: infinite;
+  left: 47px;
+  top: 0;
+  width: 9px;
+  height: 19.5px;
+  background-color: #cccccc;
+  border-radius: 20%;
+  transform-origin: 4.5px 42px;
+}
+div.processing-spinner div:nth-child(1) {
+  transform: rotate(0deg);
+  animation-delay: -1.000s;
+}
+div.processing-spinner div:nth-child(2) {
+  transform: rotate(30deg);
+  animation-delay: -0.909s;
+}
+div.processing-spinner div:nth-child(3) {
+  transform: rotate(60deg);
+  animation-delay: -0.818s;
+}
+div.processing-spinner div:nth-child(4) {
+  transform: rotate(90deg);
+  animation-delay: -0.727s;
+}
+div.processing-spinner div:nth-child(5) {
+  transform: rotate(120deg);
+  animation-delay: -0.636s;
+}
+div.processing-spinner div:nth-child(6) {
+  transform: rotate(150deg);
+  animation-delay: -0.545s;
+}
+div.processing-spinner div:nth-child(7) {
+  transform: rotate(180deg);
+  animation-delay: -0.455s;
+}
+div.processing-spinner div:nth-child(8) {
+  transform: rotate(210deg);
+  animation-delay: -0.364s;
+}
+div.processing-spinner div:nth-child(9) {
+  transform: rotate(240deg);
+  animation-delay: -0.273s;
+}
+div.processing-spinner div:nth-child(10) {
+  transform: rotate(270deg);
+  animation-delay: -0.182s;
+}
+div.processing-spinner div:nth-child(11) {
+  transform: rotate(300deg);
+  animation-delay: -0.091s;
+}
+div.processing-spinner div:nth-child(12) {
+  transform: rotate(330deg);
+  animation-delay: 0s;
+}
+
 .flexContainer {
   padding: 0;
   margin: 0;
diff -r f21e14b092a0 -r 5bfccd85dabd web/org.openbravo.mobile.core/source/component/ob-terminal-component.js
--- a/web/org.openbravo.mobile.core/source/component/ob-terminal-component.js	Wed Nov 08 09:00:45 2017 +0100
+++ b/web/org.openbravo.mobile.core/source/component/ob-terminal-component.js	Wed Nov 08 15:11:02 2017 +0530
@@ -125,6 +125,24 @@
   }, {
     name: 'dialogsContainer'
   }, {
+    name: 'processingContainer',
+    kind: 'OB.UI.Popup',
+    classes: 'popup-processing',
+    autoDismiss: false,
+    closeOnEscKey: false,
+    components: [{
+      classes: 'processing-container',
+      components: [{
+        classes: 'processing-spinner',
+        allowHtml: true,
+        content: '<div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div>'
+      }, {
+        classes: 'processing-label',
+        name: 'processingLabel',
+        content: ''
+      }]
+    }]
+  }, {
     name: 'alertContainer',
     components: [{
       kind: 'OB.UTIL.showAlert',
diff -r f21e14b092a0 -r 5bfccd85dabd web/org.openbravo.mobile.core/source/utils/ob-utilitiesui.js
--- a/web/org.openbravo.mobile.core/source/utils/ob-utilitiesui.js	Wed Nov 08 09:00:45 2017 +0100
+++ b/web/org.openbravo.mobile.core/source/utils/ob-utilitiesui.js	Wed Nov 08 15:11:02 2017 +0530
@@ -464,6 +464,15 @@
   }
 };
 
+OB.UTIL.showProcessing = function (value, label) {
+  if (value) {
+    OB.MobileApp.view.$.processingLabel.setContent(OB.UTIL.isNullOrUndefined(label) ? 'Processing...' : label);
+    OB.MobileApp.view.$.processingContainer.show();
+  } else {
+    OB.MobileApp.view.$.processingContainer.hide();
+  }
+};
+
 OB.UTIL.showLoggingOut = function (value) {
   if (value) {
     OB.MobileApp.view.$.containerLoggingOut_label.setContent(OB.I18N.getLabel('OBMOBC_LblLoggingOut'));
