Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1465

Provide support for icon shadow animation in JSCookMenu

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.1.9
    • None
    • JS Cook Menu
    • None
    • Websphere 6.1.0.25

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            jarodcanal Brice FINES
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: