[dev] extra_right parameter patch with Horde_Tree (in tree.js)

Daniel Vandal dvandal at infoteck.qc.ca
Fri Jan 7 12:38:52 PST 2005


Hi,

I found that in the HEAD version of Horde the extra right parmeter 
wasn't positioned like before, so I just made a little patch who solve 
this and place the extra right stuff to the right instead of directly 
after the tree label.

A patch is included in attachment.

Daniel Vandal
dvandal at infoteck.qc.ca
-------------- next part --------------
Index: tree.js
===================================================================
RCS file: /repository/horde/templates/javascript/tree.js,v
retrieving revision 1.65
diff -u -r1.65 tree.js
--- tree.js	5 Jan 2005 10:29:17 -0000	1.65
+++ tree.js	7 Jan 2005 20:32:05 -0000
@@ -27,7 +27,8 @@
 
     /* Variables that change based on text direction. */
 <?php if (empty($GLOBALS['nls']['rtl'][$GLOBALS['language']])): ?>
-    this.floatDir       = 'float:left;';
+    this.floatDirLeft   = 'float:left;';
+    this.floatDirRight  = 'float:right;';
     this.imgLine        = 'line.png';
     this.imgJoin        = 'join.png';
     this.imgJoinBottom  = 'joinbottom.png';
@@ -40,7 +41,8 @@
     this.imgNullOnly    = 'nullonly.png';
     this.imgLeaf        = 'leaf.png';
 <?php else: ?>
-    this.floatDir       = 'float:right;';
+    this.floatDirLeft   = 'float:left;';
+    this.floatDirRight  = 'float:right;';
     this.imgLine        = 'rev-line.png';
     this.imgJoin        = 'rev-join.png';
     this.imgJoinBottom  = 'rev-joinbottom.png';
@@ -123,7 +125,7 @@
             html += ' class="' + this.header[i]['class'] + '"';
         }
 
-        var style = this.floatDir;
+        var style = this.floatDirLeft;
         if (this.header[i]['width']) {
             style += 'width:' + this.header[i]['width'] + ';';
         }
@@ -198,7 +200,7 @@
         typeof(this.nodes[nodeId]['extra'][0]) != 'undefined') {
         var extra = this.nodes[nodeId]['extra'][0];
         for (var c = 0; c < extra.length; c++) {
-            style = this.floatDir;
+            style = this.floatDirLeft;
             if (this.header[column] && this.header[column]['width']) {
                 style += 'width:' + this.header[column]['width'] + ';';
             }
@@ -206,7 +208,7 @@
             column++;
         }
         for (var d = c; d < extraColsLeft; d++) {
-            style = this.floatDir;
+            style = this.floatDirLeft;
             if (this.header[column] && this.header[column]['width']) {
                 style += 'width:' + this.header[column]['width'] + ';';
             }
@@ -215,7 +217,7 @@
         }
     } else {
         for (var c = 0; c < extraColsLeft; c++) {
-            style = this.floatDir;
+            style = this.floatDirLeft;
             if (this.header[column] && this.header[column]['width']) {
                 style += 'width:' + this.header[column]['width'] + ';';
             }
@@ -224,7 +226,7 @@
         }
     }
 
-    style = this.floatDir;
+    style = this.floatDirLeft;
     if (this.header[column] && this.header[column]['width']) {
         style += 'width:' + this.header[column]['width'] + ';';
     }
@@ -258,7 +260,7 @@
         typeof(this.nodes[nodeId]['extra'][1]) != 'undefined') {
         var extra = this.nodes[nodeId]['extra'][1];
         for (var c = 0; c < extra.length; c++) {
-            style = this.floatDir;
+            style = this.floatDirRight;
             if (this.header[column] && this.header[column]['width']) {
                 style += 'width:' + this.header[column]['width'] + ';';
             }
@@ -266,7 +268,7 @@
             column++;
         }
         for (var d = c; d < extraColsRight; d++) {
-            style = this.floatDir;
+            style = this.floatDirRight;
             if (this.header[column] && this.header[column]['width']) {
                 style += 'width:' + this.header[column]['width'] + ';';
             }
@@ -275,7 +277,7 @@
         }
     } else {
         for (var c = 0; c < extraColsRight; c++) {
-            style = this.floatDir;
+            style = this.floatDirRight;
             if (this.header[column] && this.header[column]['width']) {
                 style += 'width:' + this.header[column]['width'] + ';';
             }


More information about the dev mailing list