You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Brice FINES (JIRA)" <de...@myfaces.apache.org> on 2009/11/03 15:37:59 UTC

[jira] Created: (TOMAHAWK-1465) Provide support for icon shadow animation in JSCookMenu

Provide support for icon shadow animation in JSCookMenu
-------------------------------------------------------

                 Key: TOMAHAWK-1465
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1465
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: JS Cook Menu
    Affects Versions: 1.1.9
         Environment: Websphere 6.1.0.25
            Reporter: Brice FINES
            Priority: Minor


JSCookMenu included in Tomahawk provides support for icon shadow animation (i.e. swap image while mouse is over), but Tomahawk component lacks support for this feature.

According to JSCookmenu documentation (available for example in incubator-myfaces/src/components/org/apache/myfaces/custom/navmenu/resource/jscookmenu/ThemeOffice/theme.css ), image animation is supported:
/* image shadow animation */
  
/*
  	seq1:	image for normal
  	seq2:	image for hover and active
  
  	To use, in the icon field, input the following:
  	<img class="seq1" src="normal.gif" /><img class="seq2" src="hover.gif" />
*/

But it is not compatible with current Tomahawk component implementation, since there is only one field for "icon", and HtmlJSCookMenuRenderer is doing the following:

            if (item.getIcon() != null) {
                String iconSrc = context.getApplication().getViewHandler().getResourceURL(context, item.getIcon());
                writer.append("'<img src=\"");
                writer.append(context.getExternalContext().encodeResourceURL(iconSrc));
                writer.append("\"/>'");
            }

So it is not possible to use direct HTML JSCookMenu syntax in icon field (we would get something like <img src=<img class="seq1" src="normal.gif" /><img class="seq2" ...).
Maybe a possible way to solve this and offer support for this JSCookMenu feature would be an optional iconHover field.

For an example of icon animation in JSCookMenu, please have a look at the following URL ("Animation" section):
http://jscook.yuanheng.org/JSCookMenu/ThemeOffice.html

Thanks
Regards

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.