1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 15:17:16 +01:00

Bye bye toggle_inverse.gif... made a "super" toggle.gif which contains both states and "switched" using CSS sprites method to stop the ugly loading "flash" when images aren't cached for the first time. prosilver ACP+style classnames use hyphens... so stuck with them, plus underscores might trip up some bizarre edge case thing with IE6, so play safe. Would like the toggle to set a cookie at some point, so the setting would be "sticky".

git-svn-id: file:///svn/phpbb/trunk@7222 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Jonathan Stanley 2007-03-23 18:41:45 +00:00
parent 2e244a1eeb
commit 369dc7502c
4 changed files with 11 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 621 B

View File

@ -353,7 +353,7 @@ span.corners-bottom span {
margin-left: 2px;
}
#toggle_handle {
#toggle-handle {
display: block;
width: 18px;
height: 19px;

View File

@ -120,27 +120,31 @@ function switch_menu()
var menu = document.getElementById('menu');
var main = document.getElementById('main');
var toggle = document.getElementById('toggle');
var handle = document.getElementById('toggle_handle');
var handle = document.getElementById('toggle-handle');
switch(menu_state)
{
//hide
//hidden
case 'shown':
main.style.width = 'auto';
menu.style.display = 'none';
menu_state = 'hidden';
toggle.style.left = '0';
toggle.style.width = '20px';
handle.style.backgroundImage = 'url(images/toggle_inverse.gif)';
handle.style.backgroundImage = 'url(images/toggle.gif)';
handle.style.backgroundPosition = '100% 50%';
handle.style.backgroundRepeat = 'no-repeat';
break;
//show
//shown
case 'hidden':
main.style.width = '76%';
menu.style.display = 'block';
menu_state = 'shown';
toggle.style.left = '15%';
toggle.style.width = '5%';
handle.style.backgroundImage = 'url(images/toggle.gif)';
handle.style.backgroundImage = 'url(images/toggle.gif)';
handle.style.backgroundPosition = '0% 50%';
handle.style.backgroundRepeat = 'no-repeat';
break;
}
}
@ -172,7 +176,7 @@ function switch_menu()
<span class="corners-top"><span></span></span>
<div id="content">
<div id="toggle">
<a id="toggle_handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
<a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
<div id="menu">
<p>{L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;]</p>
<ul>