--- loncom/interface/londocs.pm 2012/05/07 05:14:59 1.484.2.2 +++ loncom/interface/londocs.pm 2012/05/10 17:56:58 1.484.2.3 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.484.2.2 2012/05/07 05:14:59 raeburn Exp $ +# $Id: londocs.pm,v 1.484.2.3 2012/05/10 17:56:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1664,7 +1664,7 @@ sub checkonthis { =item list_symbs() -List Content Idenifiers +List Content Identifiers =cut @@ -2440,9 +2440,9 @@ sub handler { $script .= &editing_js($udom,$uname,$supplementalflag). &history_tab_js(). &inject_data_js(). - &resize_contentdiv_js($tabidstr); + &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr); $addentries = { - onload => "javascript:resize_contentdiv('contentscroll','1','1');", + onload => "javascript:resize_scrollbox('contentscroll','1','1');", }; } } @@ -3680,7 +3680,7 @@ function showPage(current, pageId, nav, } } } - resize_contentdiv('contentscroll','1','0'); + resize_scrollbox('contentscroll','1','0'); return false; } @@ -3797,196 +3797,6 @@ function choose_switchserver_window() { ENDSWITCHJS } -sub resize_contentdiv_js { - my ($tabidstr) = @_; - my $viewport_js = &Apache::loncommon::viewport_geometry_js(); - return < maxtabw) { - maxtabw = actabw; - } - } else { - if (document.getElementById(alltabs[i]) != null) { - var thistab = document.getElementById(alltabs[i]); - thistab.style.visibility = 'hidden'; - thistab.style.display = 'block'; - var tabw = document.getElementById(alltabs[i]).offsetWidth; - thistab.style.display = 'none'; - thistab.style.visibility = ''; - if (tabw > maxtabw) { - maxtabw = tabw; - } - } - } - } - - if (maxtabw > 0) { - var newscrollboxw; - if (maxtabw+paddingw+scrollboxscrollw scrollboxheight) { - if (freevspace > offsetv) { - newscrollboxheight = scrollboxheight+freevspace-offsetv; - if (newscrollboxheight < minvscrollbox) { - newscrollboxheight = minvscrollbox; - } - scrollbox.style.height = newscrollboxheight+"px"; - } - } - } - scrollboxheight = scrollbox.offsetHeight; - var contentlistheight = document.getElementById("contentlist").offsetHeight; - - if (scrollboxscrollheight <= scrollboxheight) { - if ((contentlistheight+offsetv)