diff -r cb7dde69c301 -r d7fc25acd3f3 themes/admin/js/menu.js --- a/themes/admin/js/menu.js Wed Aug 01 13:39:27 2007 -0400 +++ b/themes/admin/js/menu.js Sun Aug 05 15:58:50 2007 -0400 @@ -42,6 +42,7 @@ var exheight = height - magic; expander.style.height = exheight + 'px'; expander.style.top = magic + 'px'; + expander_set_pos(); } function expander_onload() @@ -59,7 +60,26 @@ } } +function expander_set_pos() +{ + var winheight = getHeight(); + var magic = $('header').Height() + $('pagebar_main').Height(); + var top = getScrollOffset(); + if ( typeof(top) != 'number' ) + { + return null; + } + magic = magic - top; + if ( magic < 0 ) + magic = 0; + var bartop = magic + top; + var barheight = winheight - magic; + var expander = document.getElementById('sidebar-hide'); + expander.style.top = bartop + 'px'; + expander.style.height = barheight + 'px'; +} + addOnloadHook(expander_set_height); addOnloadHook(expander_onload); window.onresize = expander_set_height; - +window.onscroll = expander_set_pos;