From e5686f4a011ea0110bf49ae1d56aa749c75ffc76 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 12 Sep 2008 08:13:13 -0400
Subject: [PATCH] - Added vertical splitter for folders list resizing - Added possibility to view all headers in message view - Fixed splitter drag/resize on Opera (#1485170) - debug console css fixes for IE

---
 program/js/common.js |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/program/js/common.js b/program/js/common.js
index 209ce10..063657f 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -253,23 +253,28 @@
     var obj;
 
     obj = document.createElement('DIV');
+
     with(obj)
       {
       id = this.name;
       with(style)
         {
-        position = 'absolute';
+	position = 'absolute';
         visibility = (vis) ? (vis==2) ? 'inherit' : 'visible' : 'hidden';
         left = l+'px';
         top = t+'px';
-        if(w) width = w+'px';
-        if(h) height = h+'px';
+        if (w)
+	  width = w.toString().match(/\%$/) ? w : w+'px';
+        if (h)
+	  height = h.toString().match(/\%$/) ? h : h+'px';
         if(z) zIndex = z;
-        }
+	}
       }
-      
-    if(parent) parent.appendChild(obj);
-    else document.body.appendChild(obj);
+
+    if (parent)
+      parent.appendChild(obj);
+    else
+      document.body.appendChild(obj);
 
     this.elm = obj;
     };
@@ -496,7 +501,7 @@
 
 
 // return the absolute position of an object within the document
-function rcube_get_object_pos(obj)
+function rcube_get_object_pos(obj, relative)
   {
   if(typeof(obj)=='string')
     obj = rcube_find_object(obj);
@@ -506,7 +511,7 @@
   var iX = (bw.layers) ? obj.x : obj.offsetLeft;
   var iY = (bw.layers) ? obj.y : obj.offsetTop;
 
-  if(bw.ie || bw.mz)
+  if(!relative && (bw.ie || bw.mz))
     {
     var elm = obj.offsetParent;
     while(elm && elm!=null)
@@ -598,8 +603,9 @@
   this.log = function(msg)
   {
     box = rcube_find_object('console');
+
     if (box)
-      if (msg[msg.length-1]=='\n')
+      if (msg.charAt(msg.length-1)=='\n')
         box.value += msg+'--------------------------------------\n';
       else
         box.value += msg+'\n--------------------------------------\n';

--
Gitblit v1.9.1