--- loncom/interface/londocs.pm 2013/11/13 13:32:33 1.569 +++ loncom/interface/londocs.pm 2013/11/17 14:40:31 1.570 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.569 2013/11/13 13:32:33 raeburn Exp $ +# $Id: londocs.pm,v 1.570 2013/11/17 14:40:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4638,9 +4638,11 @@ sub handler { $script .= &dump_switchserver_js(@hosts); } } else { + my $tid = 1; my @tabids; if ($supplementalflag) { @tabids = ('002','ee2','ff2'); + $tid = 2; } else { @tabids = ('aa1','bb1','cc1','ff1'); unless ($env{'form.folderpath'} =~ /\:1$/) { @@ -4652,7 +4654,7 @@ sub handler { $script .= &editing_js($udom,$uname,$supplementalflag). &history_tab_js(). &inject_data_js(). - &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr). + &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr,$tid). &Apache::lonextresedit::extedit_javascript(); $addentries = { onload => "javascript:resize_scrollbox('contentscroll','1','1');", @@ -4947,7 +4949,7 @@ HIDDENFORM my $newnavform=(< - + $pathitem @@ -4957,7 +4959,7 @@ HIDDENFORM NNFORM my $newsmppageform=(< - + $pathitem $lt{'sipa'} @@ -4998,7 +5000,7 @@ NEXUFORM my $newbulform=(< - + $pathitem $lt{'bull'} @@ -5008,7 +5010,7 @@ NBFORM my $newaboutmeform=(< - + $pathitem @@ -5019,7 +5021,7 @@ NAMFORM my $newaboutsomeoneform=(< - + $pathitem $lt{'abou'} @@ -5028,7 +5030,7 @@ NASOFORM my $newrosterform=(< - + $pathitem @@ -5049,7 +5051,7 @@ NROSTFORM } my $newwebpageform =(< - + $pathitem $lt{'webp'} @@ -5073,7 +5075,7 @@ my $newfolderb;
- + $lt{'newp'} $help{'Adding_Pages'}
@@ -5084,14 +5086,14 @@ NPFORM
$pathitem - + $lt{'newf'}$help{'Adding_Folders'}
NFFORM my $newsylform=(< - + $pathitem @@ -5103,7 +5105,7 @@ NSYLFORM my $newgroupfileform=(< - + $pathitem @@ -5220,7 +5222,7 @@ SUPDOCFORM my $supnewfolderform=(< - + $pathitem $lt{'newf'} @@ -5585,7 +5587,7 @@ sub generate_edit_table { my $form; my $activetab; my $active; - if (($env{'form.active'} ne '') && ($env{'form.active'} ne 'aa')) { + if (($env{'form.active'} ne '') && ($env{'form.active'} ne '00')) { $activetab = $env{'form.active'}; } my $backicon = $iconpath.'clickhere.gif'; @@ -5620,7 +5622,7 @@ sub generate_edit_table { $form .= '
  • '.&mt(${$orderhash{$name}}[0]).'
  • '."\n"; } else { - $form .= '
  • '.${$orderhash{$name}}[1].'
  • '."\n"; + $form .= '
  • '.${$orderhash{$name}}[1].'
  • '."\n"; } } @@ -6183,10 +6185,12 @@ for (i = 0; i < currentLis.length; i++) function hideAll(current, nav, data) { unselectInactive(nav); -if(current.className == 'right'){ - current.className = 'right active' - }else{ - current.className = 'active'; +if (current) { + if (current.className == 'right'){ + current.className = 'right active' + } else { + current.className = 'active'; + } } currentData = document.getElementById(data); currentDivs = currentData.getElementsByTagName('DIV'); @@ -6217,10 +6221,24 @@ function openTabs(pageId) { } function showPage(current, pageId, nav, data) { + currstate = current.className; hideAll(current, nav, data); openTabs(pageId); unselectInactive(nav); - current.className = 'active'; + if ((currstate == 'active') || (currstate == 'right active')) { + if (currstate == 'active') { + current.className = ''; + } else { + current.className = 'right'; + } + activeTab = ''; + toggleUpload(); + toggleMap(); + resize_scrollbox('contentscroll','1','0'); + return; + } else { + current.className = 'active'; + } currentData = document.getElementById(pageId); currentData.style.display = 'block'; activeTab = pageId;