click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r902352 - in /incubator/click/trunk/click/extras/src: META-INF/resources/click/tree/tree.css org/apache/click/extras/tree/Tree.java
Date Sat, 23 Jan 2010 06:36:14 GMT
Author: sabob
Date: Sat Jan 23 06:36:13 2010
New Revision: 902352

URL: http://svn.apache.org/viewvc?rev=902352&view=rev
Log:
added holly hack and removed other IE hacks from tree control. CLK-616

Modified:
    incubator/click/trunk/click/extras/src/META-INF/resources/click/tree/tree.css
    incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java

Modified: incubator/click/trunk/click/extras/src/META-INF/resources/click/tree/tree.css
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/META-INF/resources/click/tree/tree.css?rev=902352&r1=902351&r2=902352&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/META-INF/resources/click/tree/tree.css (original)
+++ incubator/click/trunk/click/extras/src/META-INF/resources/click/tree/tree.css Sat Jan
23 06:36:13 2010
@@ -17,11 +17,11 @@
  * under the License.
  */
 .treestyle {
-   white-space: nowrap;	
+   white-space: nowrap;
    border: 1px solid #ccc;
    width: 20em;
    overflow: auto;
-   line-height: 1.5em;         
+   line-height: 1.5em;
    padding-top: 2px;
 }
 .treestyle ul {
@@ -47,7 +47,6 @@
    margin-left: 0px;
 }
 .treestyle li {
-   /* li is not needed*/
    margin: 0;
    padding: 0;
    padding-left: 10px;
@@ -65,12 +64,12 @@
 .treestyle span.collapsed {
    background-image: url(images/plus.png);
    background-repeat: no-repeat;
-}  
+}
 .treestyle span.leafLastNode {
    background-image: url(images/corner.png);
    background-repeat: no-repeat;
    background-color: #fff;
-}                       
+}
 .treestyle span.expandedLastNode {
    background-image: url(images/minus-corner.png);
    background-color: #fff;
@@ -83,18 +82,17 @@
 }
 .treestyle span.leafIcon {
     background: url(images/item.png) 0 50% no-repeat;
-    padding-left: 0.9em;
+    padding-left: 14px;
 }
 .treestyle span.expandedIcon {
     background: url(images/folder-open.png) 0 50% no-repeat;
-    padding-left: 1.1em;
+    padding-left: 18px;
 }
 .treestyle span.collapsedIcon {
     background: url(images/folder-closed.png) 0 50% no-repeat;
-    padding-left: 1.1em;
+    padding-left: 18px;
 }
 .treestyle .spacer {
-    float: left;
     min-height: 18px;
     padding-left: 18px;
 }
@@ -110,31 +108,31 @@
 .treestyle .unselected {
     margin-left: 1px;
 }
- 
-/*needed for client side */
-.treestyle .hide { 
+
+/* Needed for client side */
+.treestyle .hide {
    display : none;
 }
-.treestyle .show { 
+.treestyle .show {
 }
 
+/* Style for a custom TreeNode icon. Tweak it if further customization is needed */
+.treestyle img.customIcon {
+    margin-right: 2px;
+    vertical-align: top;
+}
+
+.treestyle a.spacer,
+.treestyle span.spacer,
+.treestyle span.leafIcon,
+.treestyle span.expandedIcon,
+.treestyle span.collapsedIcon,
 .treestyle span.leaf,
 .treestyle span.expanded,
 .treestyle span.collapsed,
 .treestyle span.leafLastNode,
 .treestyle span.expandedLastNode,
-.treestyle span.collapsedLastNode,
-.treestyle span.leafIcon,
-.treestyle span.expandedIcon,
-.treestyle span.collapsedIcon,
-.treestyle .spacer,
-.treestyle img.customIcon {
-    clear: both;
-    _float: none; /*IE only*/
-}
-
-/* Style for a custom TreeNode icon. Tweak it if further customization is needed */
-.treestyle img.customIcon {
-    margin-right: 2px;
-    vertical-align: top;
+.treestyle span.collapsedLastNode {
+    /* Holly hack for IE6+7 */
+    zoom: 1;
 }

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java?rev=902352&r1=902351&r2=902352&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java (original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java Sat Jan
23 06:36:13 2010
@@ -1110,7 +1110,6 @@
         } else {
             buffer.append("<span class=\"spacer\"></span>");
         }
-        buffer.append("\n");
     }
 
     /**
@@ -1147,7 +1146,6 @@
         }
 
         getExpandLink().render(buffer);
-        buffer.append("\n");
     }
 
     /**
@@ -1182,8 +1180,6 @@
         //renders the node value
         renderValue(buffer, treeNode);
 
-        // IE requires a newline here otherwise a large space appear between
-        buffer.append("\n");
         buffer.elementEnd("span");
     }
 
@@ -1207,10 +1203,6 @@
             }
             buffer.append(">");
 
-            // TODO IE HACK. With a empty span <span></span> IE does not render
-            // the icons. Putting a non-breaking space, '&#160;', in the
-            // span seemed to work. Perhaps there is a better workaround.
-            buffer.append("&#160;");
             buffer.append("</span>");
 
         } else {



Mime
View raw message