Opened 10 years ago

Closed 6 years ago

#9360 closed enhancement (wontfix)

[patch][cla] TitlePane: allowing to persist state across requests

Reported by: ergo Owned by: dante
Priority: high Milestone: future
Component: Dijit Version: 1.3.0
Keywords: titlePane dijit Cc:
Blocked By: Blocking:

Description

the patch allowing titlePane to persist its state across requests with cookie

Attachments (1)

mypatch.patch (873 bytes) - added by ergo 10 years ago.
patch

Download all attachments as: .zip

Change History (12)

Changed 10 years ago by ergo

Attachment: mypatch.patch added

patch

comment:1 Changed 10 years ago by dante

Cc: wildbill added
Milestone: tbd1.4
Owner: set to dante

seems a simple patch, and the added functionality is sound. +1 from me. Bill?

comment:2 Changed 10 years ago by bill

Cc: wildbill removed

I guess so, although the patch doesn't look quite right; looks like it will fail on a

<div dojoType=dijit.TitlePane open=false>

where the open state has been persisted (ie, saved to the cookie) as true.

PS: There's no need to CC me on tickets, as I see all of them. And also, there's no user named wildbill

comment:3 Changed 10 years ago by ergo

any hints on how to improve the patch to work with parsed widgets (i dont use them at all), this seems to be a very functionality for titlePane, and i can hope its not too hard to add it .

comment:4 Changed 10 years ago by dante

bill - it would seem leaving persists="false" would mean to ignore the persisting all together (regardless of previously stored open/closed state). If someone is using this functionality, they'd have to add persists="true" anyway. what am I missing?

comment:5 Changed 10 years ago by bill

Right, I meant to say that this will fail:

<div dojoType=dijit.TitlePane open=false persists=true>

Maybe I'm getting confused... anyway the idea is that if persists=true that if a persisted value exists (either open or closed) that it should override the open parameter. This is the current code in the patch, and it doesn't quite do that:

if(this.persist && dojo.cookie(this.id + "_titlePane") == 'false'){ 
     this.open = false; 
}

If there's no cookie, for example, we shouldn't alter this.open.

And if there is a cookie we should alter this.open, both in the case where the cookie == false, or when it's == true.

comment:6 Changed 10 years ago by dante

Milestone: 1.41.5

comment:7 Changed 9 years ago by Adam Peller

Milestone: 1.51.6

comment:8 Changed 9 years ago by ergo

bump?

comment:9 Changed 8 years ago by dante

Milestone: 1.6future

it doesn't seem there was a resolution in the expected behavior.

comment:10 Changed 7 years ago by bill

Summary: [patch][cla] allowing titlePane to persist its state across requests[patch][cla] TitlePane: allowing to persist state across requests

comment:11 Changed 6 years ago by bill

Resolution: wontfix
Status: newclosed

This is probably not worth adding. I don't know where it ends; lots of widgets have state that could be persisted.

Note: See TracTickets for help on using tickets.