sridhars711 / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

Persistence using cookies #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Refreshing a page should retain the current selection.

For lazy trees this may require re-loading the parent folders.
For better user experience, we should be able to display the selected node
and parent nodes immediately. And the we can use Ajax to load the missing
siblings.
So the cookie must not only contain the selected key, but also title, icon
and keys of the parens.

Original issue reported on code.google.com by moo...@wwwendt.de on 30 Aug 2008 at 11:55

GoogleCodeExporter commented 9 years ago
As a first thing, I started implementing persistence of the expansion state.
Setting 
 options.persist: true,

will do the following:

 - Maintain a list of expanded nodes
 - If no cookie exists, create one, using the expand flags from the node data.
 - If a cookie exists, read the expand list from the cookie and use it instead of
node data.

Restrictions so far:
 - nodes must have a key
 - session cookies are used (discarded when the browser is closed)
 - $.cookie plugin is required
 - selection status is not persisted
 - lazy nodes are not supported

Original comment by moo...@wwwendt.de on 2 Nov 2008 at 5:42

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 30 Nov 2008 at 5:47

GoogleCodeExporter commented 9 years ago
considered verified

Original comment by moo...@wwwendt.de on 17 Jul 2012 at 4:12