Code expand/collapse behavior

Let us know how we are doing -
Post Reply
LeshkaSaD
Posts: 4
Joined: Thu Apr 23, 2009 12:27 pm

Code expand/collapse behavior

Post by LeshkaSaD »

Hi there
When you click on expand/collapse links on code snippet window page scrolls up. And you have to scroll it back to place where you was. it takes time and sometimes you can forget where you were before :)
To prevent it you can add "return false" to:

Code: Select all

<a onclick="selectCode(this); return false;" href="#">Select all</a>
<a class="codebox" onclick="expandCode(this, true);" href="#">Expand view</a>
<a class="codeboxexp" onclick="expandCode(this, false);" href="#">Collapse view</a>
like that:

Code: Select all

<a onclick="selectCode(this); return false;" href="#">Select all</a>
<a class="codebox" onclick="expandCode(this, true); return false;" href="#">Expand view</a>
<a class="codeboxexp" onclick="expandCode(this, false); return false;" href="#">Collapse view</a>
or you can add "return false" to "expandCode" function.
OOo 2.4.X on Ms Windows XP + Ubuntu
TerryE
Volunteer
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: Code expand/collapse behavior

Post by TerryE »

Sorry for the late response on this one I'll check this out and make this change. Thanks :-)
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
TerryE
Volunteer
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: Code expand/collapse behavior

Post by TerryE »

@LeshkaSaD, Thanks for this. If you notice I have implemented your suggestion with the phpBB version 3.0.5 upgrade. :bravo:
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
Post Reply