--- loncom/interface/londocs.pm 2013/11/12 14:36:07 1.567 +++ 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.567 2013/11/12 14:36:07 raeburn Exp $ +# $Id: londocs.pm,v 1.570 2013/11/17 14:40:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -163,8 +163,8 @@ ENDJS add_entries => {'onload' => "hide_searching();"}, }; } - $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' Content to Authoring Space',$js,$starthash)."\n". - &Apache::lonhtmlcommon::breadcrumbs('Dump '.$crstype.' Content to Authoring Space')."\n"); + $r->print(&Apache::loncommon::start_page('Copy '.$crstype.' Content to Authoring Space',$js,$starthash)."\n". + &Apache::lonhtmlcommon::breadcrumbs('Copy '.$crstype.' Content to Authoring Space')."\n"); $r->print(&startContentScreen('tools')); my ($home,$other,%outhash)=&authorhosts(); unless ($home) { @@ -492,6 +492,9 @@ $contents{webreferences}.' } } } + if ($home>1) { + $preamble .= ''; + } foreach my $user (@orderspaces) { if ($home==1) { $preamble .= ''; @@ -4467,7 +4470,7 @@ sub handler { &init_breadcrumbs('versions','Check/Set Resource Versions'); &checkversions($r); } elsif ($allowed && $env{'form.dumpcourse'}) { - &init_breadcrumbs('dumpcourse','Dump '.&Apache::loncommon::course_type().' Content to Authoring Space'); + &init_breadcrumbs('dumpcourse','Copy '.&Apache::loncommon::course_type().' Content to Authoring Space'); &dumpcourse($r); } elsif ($allowed && $env{'form.exportcourse'}) { &init_breadcrumbs('exportcourse','IMS Export'); @@ -4635,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$/) { @@ -4649,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');", @@ -4944,7 +4949,7 @@ HIDDENFORM my $newnavform=(< - + $pathitem @@ -4954,7 +4959,7 @@ HIDDENFORM NNFORM my $newsmppageform=(< - + $pathitem $lt{'sipa'} @@ -4995,7 +5000,7 @@ NEXUFORM my $newbulform=(< - + $pathitem $lt{'bull'} @@ -5005,7 +5010,7 @@ NBFORM my $newaboutmeform=(< - + $pathitem @@ -5016,7 +5021,7 @@ NAMFORM my $newaboutsomeoneform=(< - + $pathitem $lt{'abou'} @@ -5025,7 +5030,7 @@ NASOFORM my $newrosterform=(< - + $pathitem @@ -5046,7 +5051,7 @@ NROSTFORM } my $newwebpageform =(< - + $pathitem $lt{'webp'} @@ -5070,7 +5075,7 @@ my $newfolderb;
- + $lt{'newp'} $help{'Adding_Pages'}
@@ -5081,14 +5086,14 @@ NPFORM
$pathitem - + $lt{'newf'}$help{'Adding_Folders'}
NFFORM my $newsylform=(< - + $pathitem @@ -5100,7 +5105,7 @@ NSYLFORM my $newgroupfileform=(< - + $pathitem @@ -5217,7 +5222,7 @@ SUPDOCFORM my $supnewfolderform=(< - + $pathitem $lt{'newf'} @@ -5499,7 +5504,7 @@ sub generate_admin_menu { 'cv' => 'Check/Set Resource Versions', 'ls' => 'List Resource Identifiers', 'imse' => 'Export contents to IMS Archive', - 'dcd' => "Dump $crstype Content to Authoring Space", + 'dcd' => "Copy $crstype Content to Authoring Space", ); my ($candump,$dumpurl); if ($home + $other > 0) { @@ -5582,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'; @@ -5617,7 +5622,7 @@ sub generate_edit_table { $form .= '
  • '.&mt(${$orderhash{$name}}[0]).'
  • '."\n"; } else { - $form .= '
  • '.${$orderhash{$name}}[1].'
  • '."\n"; + $form .= '
  • '.${$orderhash{$name}}[1].'
  • '."\n"; } } @@ -6180,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'); @@ -6214,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; @@ -6605,9 +6626,9 @@ ENDINJECT sub dump_switchserver_js { my @hosts = @_; my %lt = &Apache::lonlocal::texthash( - dump => 'Dumping to Authoring Space requires switching server.', + dump => 'Copying Content to Authoring Space requires switching server.', swit => 'Switch server?', - duco => 'Dump content to Authoring Space', + duco => 'Copying Content to Authoring Space', yone => 'You need to switch to a server housing an Authoring Space for which you are author or co-author.', chos => 'Choose server', );