Search and Top Navigation
#3062 closed feature (wontfix)
Opened July 04, 2008 12:21AM UTC
Closed September 08, 2008 07:36PM UTC
Last modified October 11, 2012 09:15PM UTC
properly work with dynamically added AJAXed tabs
Reported by: | kpect | Owned by: | klaus.hartl |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.tabs | Version: | 1.5 |
Keywords: | tabs ajax | Cc: | |
Blocked by: | Blocking: |
Description
1) added "exists" method
exists: function(index) { if (typeof index == 'string') return this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] ); if(this.$tabs.length <= index || 0 > index) return false; return index; }
2) changed "tabId" because this.$tabs.filter() can't find hrefs with "." or ":" symbols.
tabId: function(a) { return a.title && a.title.replace(/\\s/g, '_').replace(/[^A-Za-z0-9\\-_]/g, '') || this.options.idPrefix + $.data(a); },
3) "tabTemplate" option set to: '<li class="ui-tabs-nav-item"><a href="#{href}" title="#{href}"><span>#{label}</span></a></li>'
for compatibilty with the UI Themes and constantly ids generation.
4) patch for "add" method
// try to find an existing element before creating a new one if(-1 != this.exists('#'+id)) { this.select('#'+id); return; }
5) patch fot "select" method
select: function(index) { index = this.exists(index); if(-1 != index) this.$tabs.eq(index).trigger(this.options.event); },
Attachments (0)
Change History (7)
Changed July 04, 2008 12:48AM UTC by comment:1
Changed July 10, 2008 08:51PM UTC by comment:2
milestone: | 1.5.2 → 1.6b |
---|
Changed August 16, 2008 03:20PM UTC by comment:3
milestone: | 1.6b → 1.7 |
---|---|
status: | new → assigned |
Changed August 16, 2008 06:37PM UTC by comment:4
milestone: | 1.7 → TDB |
---|
Changed September 08, 2008 07:36PM UTC by comment:5
resolution: | → wontfix |
---|---|
status: | assigned → closed |
I'm sorry, I don't even know why this is necessary. Please reopen with a test case exposing the bug or at least a description of the erroneous behavior, e.g. what this is supposed fix.
Changed September 08, 2008 07:37PM UTC by comment:6
"properly work with dynamically added AJAXed tabs" is not a sufficient description to me.
Changed October 11, 2012 09:15PM UTC by comment:7
milestone: | TBD |
---|
Milestone TBD deleted
I'm sorry, there is bug in exists method.
Fix: