Foswiki on GitHub is open for business! Next release meeting: Monday September 29, 1300Z

Item1729: Have more flexibility in Twisty's remember setting

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension TwistyPlugin  
This use case came up in Item881:
  1. Multiple attachment tables can be on one page, so the attachment twisty cannot have a fixed id
  2. The state of having the attachment twisty opened or closed should be set site-wide, not per topic

The current implementation is as follows:
  1. If for TWISTY the param id is set, that id is used
  2. If no id is set, a generic id is created, based on web, topic and twisty order
  3. If for TWISTY the param remember is set to on, the twisty state is stored in a cookie, with the preference name based on the id

We need a creative solution to let this all work together.

-- ArthurClemens - 15 Jun 2009

I am pondering to append a sequential number to the id. That would make the id unique. Possibly only works for TWISTY, not for TWISTYBUTTON and TWISTYTOGGLE, because these may be located elsewhere on the page.

-- ArthurClemens - 01 Sep 2009

That did the trick. It works automatically for TWISTY; for TWISTYBUTTON and TWISTYTOGGLE you still need to create your own unique id.

-- ArthurClemens - 02 Sep 2009

ItemTemplate edit

Summary Have more flexibility in Twisty's remember setting
ReportedBy ArthurClemens
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component TwistyPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins Foswikirev:4750 Foswikirev:4751
TargetRelease patch
ReleasedIn 1.0.7
Topic revision: r8 - 20 Sep 2009, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License