Fixed issue 20480: Unneeded scrollbar is not shown anymore in IE9 classic popups
authorDavid Baz Fayos <david.baz@openbravo.com>
Sat, 12 May 2012 16:52:38 +0200
changeset 16500 791f143310a1
parent 16499 9ae759d03174
child 16501 3e863f6c3a41
child 16503 bebb88e36e56
Fixed issue 20480: Unneeded scrollbar is not shown anymore in IE9 classic popups
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-compatibility.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-compatibility.js	Sat May 12 16:00:55 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-compatibility.js	Sat May 12 16:52:38 2012 +0200
@@ -363,6 +363,16 @@
         if (isModal !== false) {
           isModal = true;
         }
+        var _htmlCode, _isIE9Strict = false,
+            _navUserAgent = navigator.userAgent.toUpperCase();
+        if (_navUserAgent.indexOf("MSIE") !== -1 && (document.documentMode && document.documentMode >= 9)) {
+          _isIE9Strict = true;
+        }
+        if (_isIE9Strict || _navUserAgent.indexOf("MSIE") === -1) { // IE >= 9 (Strict) or any other browser
+          _htmlCode = '<html><head></head><body style="margin: 0; padding: 0; border: none;">' + '<iframe id="MDIPopupContainer" name="MDIPopupContainer" style="margin: 0; padding: 0; border: none; width: 100%; height: 100%;"></iframe>' + '<iframe name="frameMenu" scrolling="no" src="' + OB.Application.contextUrl + 'utility/VerticalMenu.html?Command=HIDE" id="paramFrameMenuLoading" style="margin: 0px; padding: 0px; border: 0px; height: 0px; width: 0px;"></iframe>' + '</body></html>';
+        } else { // IE <= 8
+          _htmlCode = '<html><head></head><frameset cols="*, 0%" rows="*" frameborder="no" border="0" framespacing="0">' + '<frame id="MDIPopupContainer" name="MDIPopupContainer"></frame>' + '<frame name="frameMenu" scrolling="no" src="' + OB.Application.contextUrl + 'utility/VerticalMenu.html?Command=HIDE" id="paramFrameMenuLoading"></frame>' + '</frameset><body></body></html>';
+        }
         var cPopup = isc.OBClassicPopup.create({
           ID: name + '_' + cobcomp.Popup.secString,
           width: width,
@@ -376,7 +386,7 @@
           areParamsSet: false,
           isFramesetDraw: false,
           isLoaded: false,
-          htmlCode: '<html><head></head><frameset cols="*, 0%" rows="*" frameborder="no" border="0" framespacing="0">' + '<frame id="MDIPopupContainer" name="MDIPopupContainer"></frame>' + '<frame name="frameMenu" scrolling="no" src="' + OB.Application.contextUrl + 'utility/VerticalMenu.html?Command=HIDE" id="paramFrameMenuLoading"></frame>' + '</frameset><body></body></html>',
+          htmlCode: _htmlCode,
           popupURL: url + urlCharacter + 'IsPopUpCall=1'
         });
         cPopup.show();