You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Bob Paige <bo...@gmail.com> on 2009/05/01 17:05:37 UTC

collapsebox preferences?

Where is the current state of a collapsebox stored?

I know you can specify whether it should be open or closed by default, but
if I have a page with several collapseboxes on it, the state of each one
(open or closed) is preserved if I leave the page and come back. For the way
I am considering using this, I can imagine some people missing the fact that
several of these are 'closed' and think there is no content under some
headings.

Related question: is there any way to have a control on a page that forces
all collapsed boxes on the page to open, revealing all hidden content in one
click?

-- 
Bobman

Re: collapsebox preferences?

Posted by Dirk Frederickx <di...@gmail.com>.
Bob,

Disabling the cookie handling, will just stop the browser remembering
the collapsable settings when moving between pages.
While the user is on the page, all functionality remains the same.

dirk

On Fri, May 1, 2009 at 7:11 PM, Bob Paige <bo...@gmail.com> wrote:
> If I disable the cookie handling, what is the behavior? Will it only
> remember the collapse settings while the user is on the page (i.e. reloading
> the page opens everything) or just when they restart the browser?
>
> I'm fine with writing some javascript. I assume it would be just clearing
> the cookie (which is based on the page name as you say) and reloading the
> page?
>
> Thanks for the info.
>
> --
> Bobman
>
> On Fri, May 1, 2009 at 1:08 PM, Dirk Frederickx
> <di...@gmail.com>wrote:
>
>> Bob,
>>
>> 1)
>> The state of the collapsable lists and boxes is saved in a browser
>> cookie JSPWiki<pagename>
>>
>> 2)
>> If you want a control that forces all collapsed boxes to open, you
>> need to write some javascript.
>> Or probably better is just  to turn off the cookie handling of the
>> collapsable boxes and lists.
>>
>> Here is how.
>> Deactivate following js line in jspwiki-common.js:
>>
>> //var cookie = Wiki.Context.test(/view|edit|comment/) ? "JSPWiki"+name :
>> "";
>> var cookie = "";
>>
>>
>> dirk
>>
>>
>> On Fri, May 1, 2009 at 5:05 PM, Bob Paige <bo...@gmail.com> wrote:
>> > Where is the current state of a collapsebox stored?
>> >
>> > I know you can specify whether it should be open or closed by default,
>> but
>> > if I have a page with several collapseboxes on it, the state of each one
>> > (open or closed) is preserved if I leave the page and come back. For the
>> way
>> > I am considering using this, I can imagine some people missing the fact
>> that
>> > several of these are 'closed' and think there is no content under some
>> > headings.
>> >
>> > Related question: is there any way to have a control on a page that
>> forces
>> > all collapsed boxes on the page to open, revealing all hidden content in
>> one
>> > click?
>> >
>> > --
>> > Bobman
>> >
>>
>

Re: collapsebox preferences?

Posted by Bob Paige <bo...@gmail.com>.
If I disable the cookie handling, what is the behavior? Will it only
remember the collapse settings while the user is on the page (i.e. reloading
the page opens everything) or just when they restart the browser?

I'm fine with writing some javascript. I assume it would be just clearing
the cookie (which is based on the page name as you say) and reloading the
page?

Thanks for the info.

-- 
Bobman

On Fri, May 1, 2009 at 1:08 PM, Dirk Frederickx
<di...@gmail.com>wrote:

> Bob,
>
> 1)
> The state of the collapsable lists and boxes is saved in a browser
> cookie JSPWiki<pagename>
>
> 2)
> If you want a control that forces all collapsed boxes to open, you
> need to write some javascript.
> Or probably better is just  to turn off the cookie handling of the
> collapsable boxes and lists.
>
> Here is how.
> Deactivate following js line in jspwiki-common.js:
>
> //var cookie = Wiki.Context.test(/view|edit|comment/) ? "JSPWiki"+name :
> "";
> var cookie = "";
>
>
> dirk
>
>
> On Fri, May 1, 2009 at 5:05 PM, Bob Paige <bo...@gmail.com> wrote:
> > Where is the current state of a collapsebox stored?
> >
> > I know you can specify whether it should be open or closed by default,
> but
> > if I have a page with several collapseboxes on it, the state of each one
> > (open or closed) is preserved if I leave the page and come back. For the
> way
> > I am considering using this, I can imagine some people missing the fact
> that
> > several of these are 'closed' and think there is no content under some
> > headings.
> >
> > Related question: is there any way to have a control on a page that
> forces
> > all collapsed boxes on the page to open, revealing all hidden content in
> one
> > click?
> >
> > --
> > Bobman
> >
>

Re: collapsebox preferences?

Posted by Dirk Frederickx <di...@gmail.com>.
Bobman,

Yep - v2.6.3. is of course diffent ;-)

Please try following change:

var Collapsible =
{
     ...

     initialise: function( page, cookie){
          page = $(page); if(!page) return;

          this.pims.push({
            'name':cookie,
            'value':'',
            'initial': ''  //change this line to '' !!
          });


dirk


On Thu, May 7, 2009 at 5:05 PM, Bob Paige <bo...@gmail.com> wrote:
> Dirk,
>
> I am just now getting around to testing this. However, I don't see the
> referenced line of code in any of the .js or .jsp files. Could this line
be
> somewhere else?
>
> I am using JSPWiki 2.6.3.
>
> --
> Bobman
>
> On Fri, May 1, 2009 at 1:08 PM, Dirk Frederickx
> <di...@gmail.com>wrote:
>
>> Bob,
>>
>> 1)
>> The state of the collapsable lists and boxes is saved in a browser
>> cookie JSPWiki<pagename>
>>
>> 2)
>> If you want a control that forces all collapsed boxes to open, you
>> need to write some javascript.
>> Or probably better is just  to turn off the cookie handling of the
>> collapsable boxes and lists.
>>
>> Here is how.
>> Deactivate following js line in jspwiki-common.js:
>>
>> //var cookie = Wiki.Context.test(/view|edit|comment/) ? "JSPWiki"+name :
>> "";
>> var cookie = "";
>>
>>
>> dirk
>>
>>
>> On Fri, May 1, 2009 at 5:05 PM, Bob Paige <bo...@gmail.com> wrote:
>> > Where is the current state of a collapsebox stored?
>> >
>> > I know you can specify whether it should be open or closed by default,
>> but
>> > if I have a page with several collapseboxes on it, the state of each
one
>> > (open or closed) is preserved if I leave the page and come back. For
the
>> way
>> > I am considering using this, I can imagine some people missing the fact
>> that
>> > several of these are 'closed' and think there is no content under some
>> > headings.
>> >
>> > Related question: is there any way to have a control on a page that
>> forces
>> > all collapsed boxes on the page to open, revealing all hidden content
in
>> one
>> > click?
>> >
>> > --
>> > Bobman
>> >
>>
>

Re: collapsebox preferences?

Posted by Bob Paige <bo...@gmail.com>.
Dirk,

I am just now getting around to testing this. However, I don't see the
referenced line of code in any of the .js or .jsp files. Could this line be
somewhere else?

I am using JSPWiki 2.6.3.

-- 
Bobman

On Fri, May 1, 2009 at 1:08 PM, Dirk Frederickx
<di...@gmail.com>wrote:

> Bob,
>
> 1)
> The state of the collapsable lists and boxes is saved in a browser
> cookie JSPWiki<pagename>
>
> 2)
> If you want a control that forces all collapsed boxes to open, you
> need to write some javascript.
> Or probably better is just  to turn off the cookie handling of the
> collapsable boxes and lists.
>
> Here is how.
> Deactivate following js line in jspwiki-common.js:
>
> //var cookie = Wiki.Context.test(/view|edit|comment/) ? "JSPWiki"+name :
> "";
> var cookie = "";
>
>
> dirk
>
>
> On Fri, May 1, 2009 at 5:05 PM, Bob Paige <bo...@gmail.com> wrote:
> > Where is the current state of a collapsebox stored?
> >
> > I know you can specify whether it should be open or closed by default,
> but
> > if I have a page with several collapseboxes on it, the state of each one
> > (open or closed) is preserved if I leave the page and come back. For the
> way
> > I am considering using this, I can imagine some people missing the fact
> that
> > several of these are 'closed' and think there is no content under some
> > headings.
> >
> > Related question: is there any way to have a control on a page that
> forces
> > all collapsed boxes on the page to open, revealing all hidden content in
> one
> > click?
> >
> > --
> > Bobman
> >
>

Re: collapsebox preferences?

Posted by Dirk Frederickx <di...@gmail.com>.
Bob,

1)
The state of the collapsable lists and boxes is saved in a browser
cookie JSPWiki<pagename>

2)
If you want a control that forces all collapsed boxes to open, you
need to write some javascript.
Or probably better is just  to turn off the cookie handling of the
collapsable boxes and lists.

Here is how.
Deactivate following js line in jspwiki-common.js:

//var cookie = Wiki.Context.test(/view|edit|comment/) ? "JSPWiki"+name : "";
var cookie = "";


dirk


On Fri, May 1, 2009 at 5:05 PM, Bob Paige <bo...@gmail.com> wrote:
> Where is the current state of a collapsebox stored?
>
> I know you can specify whether it should be open or closed by default, but
> if I have a page with several collapseboxes on it, the state of each one
> (open or closed) is preserved if I leave the page and come back. For the way
> I am considering using this, I can imagine some people missing the fact that
> several of these are 'closed' and think there is no content under some
> headings.
>
> Related question: is there any way to have a control on a page that forces
> all collapsed boxes on the page to open, revealing all hidden content in one
> click?
>
> --
> Bobman
>