[ 
http://jira.magnolia-cms.com/browse/MAGNOLIA-2072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20523#action_20523
 ] 

Gregory Joseph commented on MAGNOLIA-2072:
------------------------------------------

Hmm, this has been opened for a while without any feedback. It seems to me a 
little over-complex. Maybe redoing the patch file against the latest trunk, 
without any code-style related changes would make it clearer. Maybe it's too 
flexible - do we really need different naming schemes ? (i'd say "no" until we 
don't have a concrete use-case and implementation)

> Add ability for SimpleNavigation to set an ID on the anchortag that it creates
> ------------------------------------------------------------------------------
>
>                 Key: MAGNOLIA-2072
>                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-2072
>             Project: Magnolia
>          Issue Type: Improvement
>          Components: taglibs
>    Affects Versions: 3.5.4
>            Reporter: Ryan Gardner
>            Assignee: Fabrizio Giustina
>            Priority: Minor
>         Attachments: Adding_anchor_element_to_simpleNavigationTag.patch
>
>
> For certain javascript uses, it becomes trivial to add functionality to an 
> anchor if it has a known ID applied to it. 
> Here is a snippet of some simple prototype-based javascript code that relies 
> on the anchor having a known ID, and other elements having known ID's that 
> are set based on the pageName:
> Having an ID makes it possible to find the element almost instantly. 
> Assigning the IDs in the jsp with the el makes it very simple to maintain the 
> connection between the javascript and the page elements.
> Event.observe('${childPages.name}', 'mouseover', function(event) {            
>                     
>                                 
> $$('.${navigationStyles}').invoke('removeClassName', 
> 'active').invoke('addClassName', 'hidden');
>                                 
> $('${childPages.name}_navItems').addClassName('${visibleMenuState}');
>                                 
> $('${childPages.name}_navItems').removeClassName('hidden');
> The use case this was created for was that I built a two-level tab navigation 
> panel... and needed a way for the tabs to swap out the content of the 
> second-level that was below it. (Doing it via CSS would be possible, but 
> undesireable for the simple fact that the smaller navigation below it is 
> relatively thin, and using a CSS:hover attribute causes the rollover to cease 
> the second you leave the element... using javascript allows you to use a 
> small timeout before hiding the rollover - plus - it's easier to build it in 
> javascript if you have tag liibraries and the EL doing the heavy lifting for 
> you :) )
> Currently, the only option for setting the ID is specifying it to be 
> "pageName" - like this: 
> <cmsu:simpleNavigation startLevel="0" endLevel="1" wrapperElement="span" 
> anchorTextID="pageName"/>
> If other unique ID-naming schemes were desired, they could be added in the 
> future with relative ease.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to