Diff for /loncom/interface/londocs.pm between versions 1.567 and 1.570

version 1.567, 2013/11/12 14:36:07 version 1.570, 2013/11/17 14:40:31
Line 163  ENDJS Line 163  ENDJS
                          add_entries => {'onload' => "hide_searching();"},                           add_entries => {'onload' => "hide_searching();"},
                      };                       };
     }      }
     $r->print(&Apache::loncommon::start_page('Dump '.$crstype.' Content to Authoring Space',$js,$starthash)."\n".      $r->print(&Apache::loncommon::start_page('Copy '.$crstype.' Content to Authoring Space',$js,$starthash)."\n".
               &Apache::lonhtmlcommon::breadcrumbs('Dump '.$crstype.' Content to Authoring Space')."\n");                &Apache::lonhtmlcommon::breadcrumbs('Copy '.$crstype.' Content to Authoring Space')."\n");
     $r->print(&startContentScreen('tools'));      $r->print(&startContentScreen('tools'));
     my ($home,$other,%outhash)=&authorhosts();      my ($home,$other,%outhash)=&authorhosts();
     unless ($home) {      unless ($home) {
Line 492  $contents{webreferences}.' Line 492  $contents{webreferences}.'
                     }                      }
                 }                   } 
             }              }
               if ($home>1) {
                   $preamble .= '<option value="" selected="selected">'.&mt('Select').'</option>';
               }
             foreach my $user (@orderspaces) {              foreach my $user (@orderspaces) {
  if ($home==1) {   if ($home==1) {
     $preamble .= '<input type="hidden" name="authorspace" value="'.$user.'" />';      $preamble .= '<input type="hidden" name="authorspace" value="'.$user.'" />';
Line 4467  sub handler { Line 4470  sub handler {
       &init_breadcrumbs('versions','Check/Set Resource Versions');        &init_breadcrumbs('versions','Check/Set Resource Versions');
       &checkversions($r);        &checkversions($r);
   } elsif ($allowed && $env{'form.dumpcourse'}) {    } 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);        &dumpcourse($r);
   } elsif ($allowed && $env{'form.exportcourse'}) {    } elsif ($allowed && $env{'form.exportcourse'}) {
       &init_breadcrumbs('exportcourse','IMS Export');        &init_breadcrumbs('exportcourse','IMS Export');
Line 4635  sub handler { Line 4638  sub handler {
                 $script .= &dump_switchserver_js(@hosts);                   $script .= &dump_switchserver_js(@hosts); 
             }              }
         } else {          } else {
               my $tid = 1;
             my @tabids;              my @tabids;
             if ($supplementalflag) {              if ($supplementalflag) {
                 @tabids = ('002','ee2','ff2');                  @tabids = ('002','ee2','ff2');
                   $tid = 2;
             } else {              } else {
                 @tabids = ('aa1','bb1','cc1','ff1');                  @tabids = ('aa1','bb1','cc1','ff1');
                 unless ($env{'form.folderpath'} =~ /\:1$/) {                  unless ($env{'form.folderpath'} =~ /\:1$/) {
Line 4649  sub handler { Line 4654  sub handler {
     $script .= &editing_js($udom,$uname,$supplementalflag).      $script .= &editing_js($udom,$uname,$supplementalflag).
                        &history_tab_js().                         &history_tab_js().
                        &inject_data_js().                         &inject_data_js().
                        &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr).                         &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr,$tid).
                        &Apache::lonextresedit::extedit_javascript();                         &Apache::lonextresedit::extedit_javascript();
             $addentries = {              $addentries = {
                             onload   => "javascript:resize_scrollbox('contentscroll','1','1');",                              onload   => "javascript:resize_scrollbox('contentscroll','1','1');",
Line 4944  HIDDENFORM Line 4949  HIDDENFORM
   
  my $newnavform=(<<NNFORM);   my $newnavform=(<<NNFORM);
  <form action="/adm/coursedocs" method="post" name="newnav">   <form action="/adm/coursedocs" method="post" name="newnav">
  <input type="hidden" name="active" value="cc" />   <input type="hidden" name="active" value="ee" />
  $pathitem   $pathitem
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="$lt{'navc'}=/adm/navmaps" />   value="$lt{'navc'}=/adm/navmaps" />
Line 4954  HIDDENFORM Line 4959  HIDDENFORM
 NNFORM  NNFORM
  my $newsmppageform=(<<NSPFORM);   my $newsmppageform=(<<NSPFORM);
  <form action="/adm/coursedocs" method="post" name="newsmppg">   <form action="/adm/coursedocs" method="post" name="newsmppg">
  <input type="hidden" name="active" value="cc" />   <input type="hidden" name="active" value="ee" />
  $pathitem   $pathitem
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <a class="LC_menubuttons_link" href="javascript:makesmppage();"> $lt{'sipa'}</a>   <a class="LC_menubuttons_link" href="javascript:makesmppage();"> $lt{'sipa'}</a>
Line 4995  NEXUFORM Line 5000  NEXUFORM
   
  my $newbulform=(<<NBFORM);   my $newbulform=(<<NBFORM);
  <form action="/adm/coursedocs" method="post" name="newbul">   <form action="/adm/coursedocs" method="post" name="newbul">
  <input type="hidden" name="active" value="cc" />   <input type="hidden" name="active" value="dd" />
  $pathitem   $pathitem
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <a class="LC_menubuttons_link" href="javascript:makebulboard();" >$lt{'bull'}</a>   <a class="LC_menubuttons_link" href="javascript:makebulboard();" >$lt{'bull'}</a>
Line 5005  NBFORM Line 5010  NBFORM
   
  my $newaboutmeform=(<<NAMFORM);   my $newaboutmeform=(<<NAMFORM);
  <form action="/adm/coursedocs" method="post" name="newaboutme">   <form action="/adm/coursedocs" method="post" name="newaboutme">
  <input type="hidden" name="active" value="cc" />   <input type="hidden" name="active" value="dd" />
  $pathitem   $pathitem
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="$plainname=/adm/$udom/$uname/aboutme" />   value="$plainname=/adm/$udom/$uname/aboutme" />
Line 5016  NAMFORM Line 5021  NAMFORM
   
  my $newaboutsomeoneform=(<<NASOFORM);   my $newaboutsomeoneform=(<<NASOFORM);
  <form action="/adm/coursedocs" method="post" name="newaboutsomeone">   <form action="/adm/coursedocs" method="post" name="newaboutsomeone">
  <input type="hidden" name="active" value="cc" />   <input type="hidden" name="active" value="dd" />
  $pathitem   $pathitem
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <a class="LC_menubuttons_link" href="javascript:makeabout();">$lt{'abou'}</a>   <a class="LC_menubuttons_link" href="javascript:makeabout();">$lt{'abou'}</a>
Line 5025  NASOFORM Line 5030  NASOFORM
   
  my $newrosterform=(<<NROSTFORM);   my $newrosterform=(<<NROSTFORM);
  <form action="/adm/coursedocs" method="post" name="newroster">   <form action="/adm/coursedocs" method="post" name="newroster">
  <input type="hidden" name="active" value="cc" />   <input type="hidden" name="active" value="dd" />
  $pathitem   $pathitem
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="$lt{'rost'}=/adm/viewclasslist" />   value="$lt{'rost'}=/adm/viewclasslist" />
Line 5046  NROSTFORM Line 5051  NROSTFORM
         }          }
         my $newwebpageform =(<<NWEBFORM);          my $newwebpageform =(<<NWEBFORM);
         <form action="/adm/coursedocs" method="post" name="newwebpage">          <form action="/adm/coursedocs" method="post" name="newwebpage">
         <input type="hidden" name="active" value="cc" />          <input type="hidden" name="active" value="ee" />
         $pathitem          $pathitem
         <input type="hidden" name="importdetail" value="$newwebpage" />          <input type="hidden" name="importdetail" value="$newwebpage" />
         <a class="LC_menubuttons_link" href="javascript:makewebpage();">$lt{'webp'}</a>          <a class="LC_menubuttons_link" href="javascript:makewebpage();">$lt{'webp'}</a>
Line 5070  my $newfolderb; Line 5075  my $newfolderb;
  <form action="/adm/coursedocs" method="post" name="newpage">   <form action="/adm/coursedocs" method="post" name="newpage">
  <input type="hidden" name="folderpath" value="$path" />   <input type="hidden" name="folderpath" value="$path" />
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <input type="hidden" name="active" value="cc" />   <input type="hidden" name="active" value="ee" />
  <a class="LC_menubuttons_link" href="javascript:makenewpage(document.newpage,'$pageseq');">$lt{'newp'}</a>   <a class="LC_menubuttons_link" href="javascript:makenewpage(document.newpage,'$pageseq');">$lt{'newp'}</a>
  $help{'Adding_Pages'}   $help{'Adding_Pages'}
  </form>   </form>
Line 5081  NPFORM Line 5086  NPFORM
  <form action="/adm/coursedocs" method="post" name="newfolder">   <form action="/adm/coursedocs" method="post" name="newfolder">
  $pathitem   $pathitem
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <input type="hidden" name="active" value="aa" />   <input type="hidden" name="active" value="" />
  <a href="javascript:makenewfolder(document.newfolder,'$folderseq');">$lt{'newf'}</a>$help{'Adding_Folders'}   <a href="javascript:makenewfolder(document.newfolder,'$folderseq');">$lt{'newf'}</a>$help{'Adding_Folders'}
  </form>   </form>
 NFFORM  NFFORM
   
  my $newsylform=(<<NSYLFORM);   my $newsylform=(<<NSYLFORM);
  <form action="/adm/coursedocs" method="post" name="newsyl">   <form action="/adm/coursedocs" method="post" name="newsyl">
  <input type="hidden" name="active" value="cc" />   <input type="hidden" name="active" value="ee" />
  $pathitem   $pathitem
  <input type="hidden" name="importdetail"    <input type="hidden" name="importdetail" 
  value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" />   value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" />
Line 5100  NSYLFORM Line 5105  NSYLFORM
   
  my $newgroupfileform=(<<NGFFORM);   my $newgroupfileform=(<<NGFFORM);
  <form action="/adm/coursedocs" method="post" name="newgroupfiles">   <form action="/adm/coursedocs" method="post" name="newgroupfiles">
  <input type="hidden" name="active" value="cc" />   <input type="hidden" name="active" value="dd" />
  $pathitem   $pathitem
  <input type="hidden" name="importdetail"   <input type="hidden" name="importdetail"
  value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" />   value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" />
Line 5217  SUPDOCFORM Line 5222  SUPDOCFORM
   
  my $supnewfolderform=(<<SNFFORM);   my $supnewfolderform=(<<SNFFORM);
  <form action="/adm/coursedocs" method="post" name="supnewfolder">   <form action="/adm/coursedocs" method="post" name="supnewfolder">
  <input type="hidden" name="active" value="ee" />   <input type="hidden" name="active" value="" />
         $pathitem          $pathitem
  <input type="hidden" name="importdetail" value="" />   <input type="hidden" name="importdetail" value="" />
  <a class="LC_menubuttons_link" href="javascript:makenewfolder(document.supnewfolder,'$folderseq');">$lt{'newf'}</a>    <a class="LC_menubuttons_link" href="javascript:makenewfolder(document.supnewfolder,'$folderseq');">$lt{'newf'}</a> 
Line 5499  sub generate_admin_menu { Line 5504  sub generate_admin_menu {
                                          'cv'   => 'Check/Set Resource Versions',                                           'cv'   => 'Check/Set Resource Versions',
                                          'ls'   => 'List Resource Identifiers',                                           'ls'   => 'List Resource Identifiers',
                                          'imse' => 'Export contents to IMS Archive',                                           'imse' => 'Export contents to IMS Archive',
                                          'dcd'  => "Dump $crstype Content to Authoring Space",                                           'dcd'  => "Copy $crstype Content to Authoring Space",
             );              );
     my ($candump,$dumpurl);      my ($candump,$dumpurl);
     if ($home + $other > 0) {      if ($home + $other > 0) {
Line 5582  sub generate_edit_table { Line 5587  sub generate_edit_table {
     my $form;      my $form;
     my $activetab;      my $activetab;
     my $active;      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'};          $activetab = $env{'form.active'};
     }      }
     my $backicon = $iconpath.'clickhere.gif';      my $backicon = $iconpath.'clickhere.gif';
Line 5617  sub generate_edit_table { Line 5622  sub generate_edit_table {
             $form .= '<li style="float:right" '.$active              $form .= '<li style="float:right" '.$active
                 .' onclick="javascript:showPage(this, \''.$name.$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');"><a href="javascript:;"><b>'.&mt(${$orderhash{$name}}[0]).'</b></a></li>'."\n";                  .' onclick="javascript:showPage(this, \''.$name.$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');"><a href="javascript:;"><b>'.&mt(${$orderhash{$name}}[0]).'</b></a></li>'."\n";
         } else {          } else {
     $form .= '<li '.$active.' style="float:right">'.${$orderhash{$name}}[1].'</li>'."\n";      $form .= '<li style="float:right">'.${$orderhash{$name}}[1].'</li>'."\n";
   
  }   }
     }      }
Line 6180  for (i = 0; i < currentLis.length; i++) Line 6185  for (i = 0; i < currentLis.length; i++)
   
 function hideAll(current, nav, data) {  function hideAll(current, nav, data) {
 unselectInactive(nav);  unselectInactive(nav);
 if(current.className == 'right'){  if (current) { 
  current.className = 'right active'      if (current.className == 'right'){
  }else{          current.className = 'right active'
  current.className = 'active';      } else {
           current.className = 'active';
       }
 }  }
 currentData = document.getElementById(data);  currentData = document.getElementById(data);
 currentDivs = currentData.getElementsByTagName('DIV');  currentDivs = currentData.getElementsByTagName('DIV');
Line 6214  function openTabs(pageId) { Line 6221  function openTabs(pageId) {
 }  }
   
 function showPage(current, pageId, nav, data) {  function showPage(current, pageId, nav, data) {
           currstate = current.className;
  hideAll(current, nav, data);   hideAll(current, nav, data);
  openTabs(pageId);   openTabs(pageId);
  unselectInactive(nav);   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 = document.getElementById(pageId);
  currentData.style.display = 'block';   currentData.style.display = 'block';
         activeTab = pageId;          activeTab = pageId;
Line 6605  ENDINJECT Line 6626  ENDINJECT
 sub dump_switchserver_js {  sub dump_switchserver_js {
     my @hosts = @_;      my @hosts = @_;
     my %lt = &Apache::lonlocal::texthash(      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?',          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.',          yone => 'You need to switch to a server housing an Authoring Space for which you are author or co-author.',
         chos => 'Choose server',          chos => 'Choose server',
     );      );

Removed from v.1.567  
changed lines
  Added in v.1.570


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>