Search and Top Navigation
#2393 closed enhancement (fixed)
Opened February 22, 2008 08:16PM UTC
Closed January 23, 2009 08:29PM UTC
Last modified October 11, 2012 09:15PM UTC
Add ability to define cookie name for UI Tabs
Reported by: | scottweaver | Owned by: | klaus.hartl |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.tabs | Version: | |
Keywords: | ui tabs | Cc: | |
Blocked by: | Blocking: |
Description
UI/Tabs currently has support for remembering active tabs via a cookie. However, there is no way to define the cookie name so all tabs look at the same cookie (within the same domain). There is a partial solution by using the path property. Unfortunately, this doesn't work in many cases. For example if the path changes or a page contains multiple tab groups .
I have attached a patch that contains the code to look for an optional "cookieName" setting within the cookie:{} option set.
-scott
Attachments (0)
Change History (14)
Changed February 26, 2008 01:02PM UTC by comment:1
owner: | paul → klaus |
---|
Changed March 01, 2008 04:15PM UTC by comment:2
resolution: | → worksforme |
---|---|
status: | new → closed |
That is not true. Each tab set uses its own unique cookie name (created via $.data).
Changed March 03, 2008 03:56PM UTC by comment:3
resolution: | worksforme |
---|---|
status: | closed → reopened |
I probably wasn't completely clear with my usecase. The problem is that if it is the same tab set on different pages. The tab stays selected.
Example:
I have an account page with a tabset. If I select a tab on one account then jump to a different account, that tab that was selected on the previous account is now selected on the current one. For my application, this is behavior is undesired, i.e. the state of the tabset for each account page needs to be independent.
-scott
Changed March 10, 2008 03:46PM UTC by comment:4
resolution: | → worksforme |
---|---|
status: | reopened → closed |
If I understand correctly you just must not set a global path for the cookie. That way there would be a unique cookie for each single page.
Could you provide a demo to showcase that bug? Apparently I cannot reproduce it.
Changed March 11, 2008 04:08PM UTC by comment:5
resolution: | worksforme |
---|---|
status: | closed → reopened |
The problem it is always the same page, just displaying a different account in the same tabset. So altering the scope of the cookie won't be effective.
Example:
1. User visits www.somewebpage.com/accounts.html?id=12345, tab 1 is active by default.
2. User selects tab 2, and the state is written to a cookie.
3. User visits www.somewebpage.com/accounts.html?id=56789, tab 1 should be the default however this is not the case since the tabset uses the same cookie as it is the same page and tabset.
I guess what I am trying to get across is the fact that the state of the tabset, for me, needs to be at a higher level than just the page/tabset/cookie scope level. For me it needs to be at the account level (in this example) and I can only do that by controlling the cookie name. So, in this case with my code changes to UI tabs, I can define two cookies: tabs-12345 and tabs-56789 and everything would work correctly. I can then, within the code, look at account number passed in the url and decide which tab is active for that specific account.
Am I making sense?
Thanks,
-scott
Changed May 24, 2008 03:39AM UTC by comment:6
milestone: | 1.2.4 |
---|
Milestone 1.2.4 deleted
Changed May 24, 2008 07:25PM UTC by comment:7
component: | ui.core → ui.tabs |
---|---|
version: | 1.2.3 → 1.5b4 |
Changed June 11, 2008 02:17AM UTC by comment:8
owner: | klaus → klaus.hartl |
---|---|
status: | reopened → assigned |
version: | 1.5b4 → 1.5 |
Changed August 17, 2008 09:22AM UTC by comment:9
milestone: | → TDB |
---|
Changed October 30, 2008 09:01PM UTC by comment:10
priority: | minor → major |
---|---|
version: | 1.5 |
Changed October 30, 2008 09:02PM UTC by comment:11
summary: | [ENH] Add ability to define cookie name for UI/Tabs → Add ability to define cookie name for UI/Tabs |
---|
Changed October 30, 2008 09:05PM UTC by comment:12
summary: | Add ability to define cookie name for UI/Tabs → Add ability to define cookie name for UI Tabs |
---|
In case of two pages that just differ in their url parameters:
/foo?bar=1
/foo?bar=2
the cookie name for a tab pane will be the same, thus it is going to be reused. This is undesireable in certain situations, thus a cookie name must be specifyable.
Changed January 23, 2009 08:29PM UTC by comment:13
resolution: | → fixed |
---|---|
status: | assigned → closed |
[1770]
Changed October 11, 2012 09:15PM UTC by comment:14
milestone: | TBD |
---|
Milestone TBD deleted