details:   https://code.openbravo.com/erp/devel/pi/rev/b53dc1683c2c
changeset: 16492:b53dc1683c2c
user:      David Baz Fayos <david.baz <at> openbravo.com>
date:      Fri May 11 01:24:29 2012 +0200
summary:   Related to issue 20207: Improved style of labels after checkboxes in 
IE9 and HTML5

diffstat:

 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/SelectExpectedPayments.html
 |   2 +-
 web/js/utils.js                                                                
                                   |  30 ++++++++++
 web/skins/Default/Openbravo_ERP_250.css                                        
                                   |   3 +
 3 files changed, 34 insertions(+), 1 deletions(-)

diffs (85 lines):

diff -r 29d705534d05 -r b53dc1683c2c 
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/SelectExpectedPayments.html
--- 
a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/SelectExpectedPayments.html
 Thu May 10 21:06:22 2012 +0200
+++ 
b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/SelectExpectedPayments.html
 Fri May 11 01:24:29 2012 +0200
@@ -441,7 +441,7 @@
             <tr>
               <td class="Radio_Check_ContentCell" colspan="3">
                 <span class="Radio_Check_ContentCell 
Checkbox_container_NOT_Focused"><input type="checkbox" 
name="inpAlternativePaymentMethod" value="Y" id="paramAlternativePaymentMethod" 
onclick="loadGridList()"></input></span>
-                <span class="TitleCell LabelText"><label 
for="paramAlternativePaymentMethod">Show payments for alternative payment 
methods</label></span>
+                <span class="TitleCell LabelText"><label 
for="paramAlternativePaymentMethod" class="LabelTextAfterCheckbox">Show 
payments for alternative payment methods</label></span>
               </td>
               <td class="TableEdition_OneCell_width"></td>
               <td class="TableEdition_OneCell_width"></td>
diff -r 29d705534d05 -r b53dc1683c2c web/js/utils.js
--- a/web/js/utils.js   Thu May 10 21:06:22 2012 +0200
+++ b/web/js/utils.js   Fri May 11 01:24:29 2012 +0200
@@ -33,12 +33,14 @@
   isWindowInMDITab = checkWindowInMDITab();
   isWindowInMDIPage = checkWindowInMDIPage();
   isWindowInMDIContext = checkWindowInMDIContext();
+  isRTL = checkWindowInRTLMode();
   if (isWindowInMDIPage) {
     adaptSkinToMDIEnvironment();
   }
 }
 
 var isIE9Strict = false;
+var isRTL = false;
 var isWindowInMDIPopup = false;
 var isWindowInMDITab = false;
 var isWindowInMDIPage = false;
@@ -3403,6 +3405,12 @@
   if (isIE9Strict) {
     addStyleRule("th.DataGrid_Header_Cell", "height: 20px;");
 
+    if (!isRTL) {
+      addStyleRule('.LabelTextAfterCheckbox', 'margin-left: 15px;');
+    } else {
+      addStyleRule('.LabelTextAfterCheckbox', 'margin-right: 15px;');
+    }
+
     var messageType = {};
     messageType.name = ['ERROR', 'INFO', 'SUCCESS', 'WARNING'];
     messageType.backgroundColor = ['C72F15', '5886BF', '7BBF58', 'ECE274'];
@@ -5728,6 +5736,28 @@
   } catch (e) { }
 }
 
+/*
+ * Function that checks if the rendered html is rendered in RTL mode or not.
+ */
+function checkWindowInRTLMode() {
+  var strDirection = '';
+  var htmlTag = document.getElementsByTagName('html')[0];
+
+  if (htmlTag) {
+    if(document.defaultView && document.defaultView.getComputedStyle){
+      strDirection = document.defaultView.getComputedStyle(htmlTag, 
'').getPropertyValue('direction');
+    } else if(htmlTag.currentStyle){
+      strDirection = htmlTag.currentStyle['direction'];
+    }
+  }
+
+  if (strDirection.toLowerCase() === 'rtl') {
+    return true;
+  } else {
+    return false;
+  }
+}
+
 function fixIE9WindowBorders() {
   if (isIE9Strict) {
     var leftContentPane = getElementsByClassName('Main_ContentPane_Left', 
'table');
diff -r 29d705534d05 -r b53dc1683c2c web/skins/Default/Openbravo_ERP_250.css
--- a/web/skins/Default/Openbravo_ERP_250.css   Thu May 10 21:06:22 2012 +0200
+++ b/web/skins/Default/Openbravo_ERP_250.css   Fri May 11 01:24:29 2012 +0200
@@ -2869,6 +2869,9 @@
   color: #404040;
 }
 
+.LabelTextAfterCheckbox {
+}
+
 .Label_ReadOnly_Text {
   font-size: 8pt;
   font-weight: bold;

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to