--- loncom/interface/londocs.pm 2009/01/30 11:39:38 1.332 +++ loncom/interface/londocs.pm 2009/02/02 11:23:56 1.333 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.332 2009/01/30 11:39:38 tempelho Exp $ +# $Id: londocs.pm,v 1.333 2009/02/02 11:23:56 muellerd Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2878,12 +2878,7 @@ ERFORM &mt('Editing the Table of Contents for your '.$type))); } # --------------------------------------------------------- Standard documents - $r->print(''); - if (($standard) && ($allowed) && (!$forcesupplement)) { - $r->print(' - -'."\n". -'
'); -# '

'.&mt('Main Course Documents'). -# ($allowed?' '.$help{'Main_Course_Documents'}:'').'

'); my $folder=$env{'form.folder'}; if ($folder eq '' || $folder eq 'supplemental') { $folder='default'; @@ -3037,38 +3032,9 @@ NASOFORM NROSTFORM - $r->print(< - -
-$fileuploadform - -$simpleeditdefaultform -
-$recoverform -ENDFORM - unless ($env{'form.pagepath'}) { - $r->print(< -$extresourcesform -
-$imspform -ENDFORM - } - $r->print('
'); unless ($env{'form.pagepath'}) { my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); - - my $newpageform=(< @@ -3118,36 +3084,22 @@ NSYLFORM NGFFORM - my $specialdocumentsform=(< -$newfolderform -
-$newpageform -
-$newsylform -
-$newnavform -
-$newsmppageform -
-$newsmpproblemform -
-$newdropboxform -
-$newexuploadform -
-$newbulform -
-$newaboutmeform -
-$newaboutsomeoneform -
-$newgroupfileform -
-$newrosterform -ENDFORM + my $specialdocumentsform=(<$newfolderform +
$newpageform +
$newsylform +
$newnavform +
$newsmppageform +
$newsmpproblemform +
$newdropboxform +
$newexuploadform +
$newbulform +
$newaboutmeform +
$newaboutsomeoneform +
$newgroupfileform +
$newrosterform +SPDOFORM -$r->print($specialdocumentsform); my %orderhash = ( 'aa' => 'New Document', @@ -3163,27 +3115,15 @@ my %namehash = ( 'More Options' => $extresourcesform.'
'.$imspform.'
'.$recoverform, 'drei' => 'dr', ); +my $tid = '1'; my $varcd = 'Course Documents'; $r->print(&generate_edit_table($varcd,\%namehash,\%orderhash)); - } if ($env{'form.pagepath'}) { - $r->print(< -$newexuploadform -ENDBLOCK } - $r->print('
'); -#$r->print(&generate_edit_table(\%namehash,\%orderhash)); - $r->print(''); } # ----------------------------------------------------- Supplemental documents if (!$forcestandard) { - $r->print(''); -# '

'.&mt('Supplemental Course Documents'). -# ($allowed?' '.$help{'Supplemental'}:'').'

'); my $folder=$env{'form.folder'}; unless ($folder=~/^supplemental/) { $folder='supplemental'; @@ -3275,30 +3215,32 @@ SNSFORM SNAMFORM - $r->print(< 'New Document', + 'ff' => 'Special Documents', + 'zz' => 'Hide all Options', + ); + +my %supnamehash = ( + 'New Document' => $supupdocform, + 'Special Documents' => $supnewfolderform.'
'.$supnewextform.'
'.$supnewsylform.'
'.$supnewaboutmeform, + ); +my $tid='2'; +my $varscd = 'Supplemented Course Documents'; + +$r->print(< -
  • $lt{'nd'}
  • -
  • $lt{'sd'}
  • -
  • $lt{'hao'}
  • +
  • New Document
  • +
  • Special Documents
  • - - - -
    -$supupdocform - -$supnewfolderform -
    -$supnewextform -
    -$supnewsylform -
    -$supnewaboutmeform -
    -ENDSUPFORM - } - } - $r->print(''); +FORM + +#$r->print(&generate_edit_table($varscd,\%supnamehash,\%suporderhash)); + + } + } if ($allowed) { $r->print('
    @@ -3308,7 +3250,6 @@ ENDSUPFORM
    '); } - } else { unless ($upload_result eq 'phasetwo') { # -------------------------------------------------------- This is showdoc mode @@ -3377,9 +3318,9 @@ sub generate_edit_table { my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name my $form; - #foreach my $id (keys(%tablehash)){ + { + $form = '

    '.&mt('Upload '.$varcd).'

    '; - $form .= '
    '; -#} + } return $form; } @@ -3599,11 +3540,12 @@ function markcopy(folderpath,index,oldti } function unselectInactive() { -currentNav = document.getElementById('navigation'); -currentLis = currentNav.getElementsByTagName('LI'); -for (i = 0; i < currentLis.length; i++) { -currentLis[i].className = 'i'; -} + currentTable = document.getElementById('tableId'); + currentNav = document.getElementById('navigation'); + currentLis = currentNav.getElementsByTagName('LI'); + for (i = 0; i < currentLis.length; i++) { + currentLis[i].className = 'i'; + } } function hideAll(current) { @@ -3612,7 +3554,7 @@ function hideAll(current) { currentData = document.getElementById('content'); currentDivs = currentData.getElementsByTagName('DIV'); for (i = 0; i < currentDivs.length; i++) { - currentDivs[i].style.display = 'none'; + currentDivs[i].style.display = 'none'; } }