Related to issue 20207: 'Message Box' style fix for classic windows in IE9 and HTML5
authorDavid Baz Fayos <david.baz@openbravo.com>
Thu, 10 May 2012 21:06:22 +0200
changeset 16491 29d705534d05
parent 16490 bca89372cadc
child 16492 b53dc1683c2c
Related to issue 20207: 'Message Box' style fix for classic windows in IE9 and HTML5
web/js/utils.js
web/skins/Default/Openbravo_ERP_250.css
--- a/web/js/utils.js	Thu May 10 17:50:29 2012 +0200
+++ b/web/js/utils.js	Thu May 10 21:06:22 2012 +0200
@@ -3402,6 +3402,29 @@
   }
   if (isIE9Strict) {
     addStyleRule("th.DataGrid_Header_Cell", "height: 20px;");
+
+    var messageType = {};
+    messageType.name = ['ERROR', 'INFO', 'SUCCESS', 'WARNING'];
+    messageType.backgroundColor = ['C72F15', '5886BF', '7BBF58', 'ECE274'];
+    messageType.borderColor = ['461107', '1F3044', '2C441F', '535029'];
+    messageType.image = ['Error', 'Info', 'Success', 'Warning'];
+
+    for (var i=0; i < messageType.name.length; i++) {
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_LeftTrans', 'border-top-left-radius: 20px;');
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_LeftTrans', 'background-color: #' + messageType.backgroundColor[i] + ';');
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_LeftTrans', 'background-image: url(../../Default/Common/MessageBox/message' + messageType.image[i] + 'Left.png);');
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_LeftTrans', 'background-repeat: repeat-y;');
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_TopLeft', 'border-top-left-radius: 20px;');
+
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_RightTrans', 'border-top-right-radius: 20px;');
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_RightTrans', 'background-color: #' + messageType.backgroundColor[i] + ';');
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_RightTrans', 'background-image: url(../../Default/Common/MessageBox/message' + messageType.image[i] + 'Right.png);');
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_RightTrans', 'background-repeat: repeat-y;');
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_TopRight', 'border-top-right-radius: 20px;');
+
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' td.MessageBox_Icon_ContentCell', 'padding-top: 10px;');
+      addStyleRule('table.MessageBox' + messageType.name[i] + ' .MessageBox_Body_ContentCell #messageBoxIDContent', 'padding-top: 10px;');
+    }
   }
 }
 
--- a/web/skins/Default/Openbravo_ERP_250.css	Thu May 10 17:50:29 2012 +0200
+++ b/web/skins/Default/Openbravo_ERP_250.css	Thu May 10 21:06:22 2012 +0200
@@ -3334,11 +3334,13 @@
 table.MessageBoxERROR .MessageBox_RightTrans {
   width: 9px;
   height: 100%;
+  vertical-align: top;
 }
 
 table.MessageBoxERROR .MessageBox_LeftTrans {
   width: 9px;
   height: 100%;
+  vertical-align: top;
 }
 
 table.MessageBoxERROR td.MessageBox_BottomRight {
@@ -3510,11 +3512,13 @@
 table.MessageBoxINFO .MessageBox_RightTrans {
   width: 9px;
   height: 100%;
+  vertical-align: top;
 }
 
 table.MessageBoxINFO .MessageBox_LeftTrans {
   width: 9px;
   height: 100%;
+  vertical-align: top;
 }
 
 table.MessageBoxINFO td.MessageBox_BottomRight {
@@ -3686,11 +3690,13 @@
 table.MessageBoxSUCCESS .MessageBox_RightTrans {
   width: 9px;
   height: 100%;
+  vertical-align: top;
 }
 
 table.MessageBoxSUCCESS .MessageBox_LeftTrans {
   width: 9px;
   height: 100%;
+  vertical-align: top;
 }
 
 table.MessageBoxSUCCESS td.MessageBox_BottomRight {
@@ -3862,11 +3868,13 @@
 table.MessageBoxWARNING .MessageBox_RightTrans {
   width: 9px;
   height: 100%;
+  vertical-align: top;
 }
 
 table.MessageBoxWARNING .MessageBox_LeftTrans {
   width: 9px;
   height: 100%;
+  vertical-align: top;
 }
 
 table.MessageBoxWARNING td.MessageBox_BottomRight {