#3062 closed feature (wontfix)
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); },
Change History (7)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Milestone: | 1.5.2 → 1.6b |
---|
comment:3 Changed 14 years ago by
Milestone: | 1.6b → 1.7 |
---|---|
Status: | new → assigned |
comment:4 Changed 14 years ago by
Milestone: | 1.7 → TDB |
---|
comment:5 Changed 14 years ago by
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.
comment:6 Changed 14 years ago by
"properly work with dynamically added AJAXed tabs" is not a sufficient description to me.
Note: See
TracTickets for help on using
tickets.
I'm sorry, there is bug in exists method. Fix: