Search and Top Navigation
#4096 closed bug (notabug)
Opened February 08, 2009 06:53PM UTC
Closed July 03, 2009 09:11PM UTC
Last modified October 03, 2012 05:04PM UTC
navigationFilter is broken
Reported by: | obecker | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 1.6 |
Component: | ui.accordion | Version: | 1.6rc6 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The navigationFilter of ui.accordion is broken since it always selects <a> elements by default (which matches the default for the header option).
Line 50 currently is
var current = $(container).find("a").filter(options.navigationFilter);
it should be
var current = $(container).find(options.header).filter(options.navigationFilter);
Attachments (0)
Change History (5)
Changed February 12, 2009 11:08PM UTC by comment:1
milestone: | TBD → 1.6 |
---|---|
owner: | → joern.zaefferer |
status: | new → accepted |
Changed February 12, 2009 11:24PM UTC by comment:2
milestone: | 1.6 → 1.next |
---|---|
owner: | joern.zaefferer |
status: | accepted → assigned |
The navigation-option may need some attention, but your proposed fix is invalid, too. For a click-accordion, links inside headers can't be visited.
The navigation option looks for all anchors to find the one that matches the current page, then activate the parent panel of that anchor.
Looking for just headers wouldn't provide any benefit.
Changed February 13, 2009 01:49PM UTC by comment:3
It may well be that I don't understand the entire logic behind the accordion (being a JQuery newby, though), however we changed the default <a> header to a <span> and with the provided fix this works like a charm:
$('#foobar').accordion({ active: true, alwaysOpen: false, header: "span.title", navigation : true, navigationFilter: function() { return $(this).hasClass('fooId#{param['fooId']}'); } });
(
#{param['fooId']}evaluates to the fooId URL parameter)
Changed July 03, 2009 09:11PM UTC by comment:4
resolution: | → invalid |
---|---|
status: | assigned → closed |
#4653 is related. Also, I see no reason to change the API of navigationFilter - for anything that can't be matched via navigationFilter, use the active-option instead.
Changed October 03, 2012 05:04PM UTC by comment:5
milestone: | 1.next → 1.6 |
---|