fixes issue 32227: Mark MS Edge as supported browser
authorCarlos Aristu <carlos.aristu@openbravo.com>
Fri, 19 Feb 2016 14:01:00 +0100
changeset 28626 a26021f45e55
parent 28625 e408f8f90401
child 28627 bf8f775716f0
fixes issue 32227: Mark MS Edge as supported browser
src/org/openbravo/erpCommon/security/Login.html
--- a/src/org/openbravo/erpCommon/security/Login.html	Fri Feb 19 13:22:52 2016 +0100
+++ b/src/org/openbravo/erpCommon/security/Login.html	Fri Feb 19 14:01:00 2016 +0100
@@ -46,11 +46,13 @@
 var validBrowserChrome = '46.0.0.0';
 var validBrowserExplorer = '9.0.0.0';
 var validBrowserSafari = '8.0.0.0';
+var validBrowserEdge = '12.0.0.0'; // EdgeHTML version
 
 var recBrowserFirefox = '38.0.0.0';
 var recBrowserChrome = '47.0.0.0';
 var recBrowserExplorer = '11.0.0.0';
 var recBrowserSafari = '9.0.0.0';
+var recBrowserEdge = '13.0.0.0'; // EdgeHTML version
 </script>
 
 <script type="text/javascript">
@@ -328,6 +330,10 @@
       if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserSafari)) {
         isValid = true;
       }
+    } else if (browserName.toUpperCase().indexOf('MICROSOFT EDGE') != -1) {
+      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(validBrowserEdge)) {
+        isValid = true;
+      }
     }
     return isValid;
   }
@@ -356,6 +362,10 @@
       if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserSafari)) {
         isRecommended = true;
       }
+    } else if (browserName.toUpperCase().indexOf('MICROSOFT EDGE') != -1) {
+      if (browserVersionToFloat(browserVersion) >= browserVersionToFloat(recBrowserEdge)) {
+        isRecommended = true;
+      }
     }
     return isRecommended;
   }
@@ -366,13 +376,14 @@
       + '<br>' + ' * Mozilla Firefox ' + browserVersionTrim(validBrowserFirefox) + ' ' + validBrowserMsgOrHigher
       + '<br>' + ' * Google Chrome ' + browserVersionTrim(validBrowserChrome) + ' ' + validBrowserMsgOrHigher
       + '<br>' + ' * Microsoft Internet Explorer ' + browserVersionTrim(validBrowserExplorer) + ' ' + validBrowserMsgOrHigher
+      + '<br>' + ' * Microsoft Edge ' + browserVersionTrim(validBrowserEdge) + ' ' + validBrowserMsgOrHigher
       + '<br>' + ' * Apple Safari ' + browserVersionTrim(validBrowserSafari) + ' ' + validBrowserMsgOrHigher;
     return displayValidBrowserMsg;
   }
 
   function buildRecBrowserMsgText() {
     var displayRecBrowserMsgText = recBrowserMsgText;
-    displayRecBrowserMsgText = displayRecBrowserMsgText.replace('XX', 'Google Chrome ' + browserVersionTrim(recBrowserChrome) + ', Mozilla Firefox ' + browserVersionTrim(recBrowserFirefox) + ', Internet Explorer ' + browserVersionTrim(recBrowserExplorer));
+    displayRecBrowserMsgText = displayRecBrowserMsgText.replace('XX', 'Google Chrome ' + browserVersionTrim(recBrowserChrome) + ', Mozilla Firefox ' + browserVersionTrim(recBrowserFirefox) + ', Internet Explorer ' + browserVersionTrim(recBrowserExplorer) + ', Microsoft Edge ' + browserVersionTrim(recBrowserEdge));
     displayRecBrowserMsgText = displayRecBrowserMsgText.replace('YY', 'Apple Safari ' + browserVersionTrim(recBrowserSafari) + '');
     return displayRecBrowserMsgText;
   }