click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r777908 - in /incubator/click/trunk/click: documentation/docs/roadmap-changes.html extras/src/org/apache/click/extras/control/Menu.java extras/src/org/apache/click/extras/control/menu.css
Date Sat, 23 May 2009 13:08:46 GMT
Author: medgar
Date: Sat May 23 13:08:46 2009
New Revision: 777908

URL: http://svn.apache.org/viewvc?rev=777908&view=rev
Log:
CLK-551

Modified:
    incubator/click/trunk/click/documentation/docs/roadmap-changes.html
    incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java
    incubator/click/trunk/click/extras/src/org/apache/click/extras/control/menu.css

Modified: incubator/click/trunk/click/documentation/docs/roadmap-changes.html
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/documentation/docs/roadmap-changes.html?rev=777908&r1=777907&r2=777908&view=diff
==============================================================================
--- incubator/click/trunk/click/documentation/docs/roadmap-changes.html (original)
+++ incubator/click/trunk/click/documentation/docs/roadmap-changes.html Sat May 23 13:08:46
2009
@@ -230,6 +230,11 @@
           [<a target='_blank' href="https://issues.apache.org/click/browse/CLK-547">547</a>].
       </li>      
       <li class="change">
+          Improved Menu control to render attribute class="selected" when the menu item
+          is selected. This issue was raised and fixed by Frederic Daoud
+          [<a target='_blank' href="https://issues.apache.org/click/browse/CLK-551">551</a>].
+      </li>      
+      <li class="change">
           Deprecated methods: <a href="click-api/org/apache/click/Control.html#getHtmlImports()">Control.getHtmlImports()</a>
and
           <a href="click-api/org/apache/click/Page.html#getHtmlImports()">Page.getHtmlImports()</a>.
           These methods have been deprecated in favor of

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java?rev=777908&r1=777907&r2=777908&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java (original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/control/Menu.java Sat May
23 13:08:46 2009
@@ -755,7 +755,9 @@
     }
 
     /**
-     * Render an anchor tag HTML representation of the Menu.
+     * Render an anchor tag HTML representation of the Menu. If the menu item
+     * is selected the anchor tag will be rendered with class="selected" 
+     * attribute.
      *
      * @see #toString()
      *
@@ -785,6 +787,10 @@
             if (getTitle() != null && getTitle().length() > 0) {
                 buffer.appendAttributeEscaped("title", getTitle());
             }
+            
+            if (isSelected()) {
+            	buffer.appendAttribute("class", "selected");
+            }
 
             buffer.closeTag();
 
@@ -823,7 +829,9 @@
 
     /**
      * Return an HTML anchor tag representation of the menu item. If the menu is
-     * a separator this method will return a HR tag &lt;hr/&gt;.
+     * a separator this method will return a HR tag &lt;hr/&gt;.  If the menu 
+     * item is selected the anchor tag will be rendered with class="selected" 
+     * attribute.
      * <p/>
      * Note for more fine grained rendering control you should use a Velocity
      * #macro to render the menu item.

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/control/menu.css
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/control/menu.css?rev=777908&r1=777907&r2=777908&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/control/menu.css (original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/control/menu.css Sat May
23 13:08:46 2009
@@ -62,10 +62,12 @@
     border-bottom: 1px solid #707070; 
     border-right: 1px solid #707070; 
 }
+/* Uncomment to highlight the selecte menu item
 .menustyle .selected {
     font-weight: normal; 
     background: #afaea9 repeat-x left; 
 }
+*/
 .menustyle img.link {
     vertical-align: middle;
 }



Mime
View raw message