Diff for /loncom/interface/londocs.pm between versions 1.331 and 1.332

version 1.331, 2009/01/30 10:02:46 version 1.332, 2009/01/30 11:39:38
Line 2872  ERFORM Line 2872  ERFORM
            $containertag = '<input type="hidden" name="folderpath" value="" />';             $containertag = '<input type="hidden" name="folderpath" value="" />';
            $uploadtag = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($folderpath,'<>&"').'" />';             $uploadtag = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($folderpath,'<>&"').'" />';
        }         }
        ##############alter hashaufruf  
        $r->print(&generate_admin_options($containertag,$uploadtag,\%lt,\%help,\%env));         $r->print(&generate_admin_options($containertag,$uploadtag,\%lt,\%help,\%env));
        $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',         $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
      &mt('Editing the Table of Contents for your '.$type)));       &mt('Editing the Table of Contents for your '.$type)));
Line 3150  ENDFORM Line 3150  ENDFORM
 $r->print($specialdocumentsform);  $r->print($specialdocumentsform);
   
 my %orderhash = (  my %orderhash = (
                 'aa_eins' => 'New Document',                  'aa' => 'New Document',
                 'bb_zwei' => 'Published Documents',                  'bb' => 'Published Documents',
                 'cc_drei' => 'Special Documents',                  'cc' => 'Special Documents',
  'dd_vier' => 'More Options',   'dd' => 'More Options',
                 'zz_hide' => 'Hide all Option',                  'zz' => 'Hide all Option',
                 );                  );
 my %namehash = (  my %namehash = (
                 'New Document' => $fileuploadform,                  'New Document' => $fileuploadform,
Line 3373  ENDOPTIONFORM Line 3373  ENDOPTIONFORM
   
 sub generate_edit_table {  sub generate_edit_table {
     my ($varcd,$namehash_ref,$orderhash_ref) = @_;      my ($varcd,$namehash_ref,$orderhash_ref) = @_;
     #my %optionhash = %{$optionhash_ref};         #id verlinkt mit inhalt  
     #my %tablehash = %{$tablehash_ref};  
     my %namehash = %{$namehash_ref};             #name verlinkt mit id      my %namehash = %{$namehash_ref};             #name verlinkt mit id
     my %orderhash = %{$orderhash_ref};           #name mit kürzel verlinkt mit name      my %orderhash = %{$orderhash_ref};           #name mit kürzel verlinkt mit name
     #my %tablehash = %{$tablehash_ref};  
     my $form;      my $form;
   
     #foreach my $id (keys(%tablehash)){      #foreach my $id (keys(%tablehash)){
     $form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt('Upload '.$varcd).'</h4>';      $form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt('Upload '.$varcd).'</h4>';
           
     $form .= '<ul class="LC_TabContent">';      $form .= '<ul id="navigation" class="LC_TabContent">';
     foreach my $name (sort(keys(%orderhash))){      foreach my $name (sort(keys(%orderhash))){
         if($name eq 'zz_hide'){          if($name eq 'zz'){
             $form .= '<li onclick="javascript:hideAll();">'.&mt($orderhash{$name}).'</li>';              $form .= '<li onclick="javascript:hideAll(this);" class="active">'.&mt($orderhash{$name}).'</li>';
         }else{          }else{
             $form .= '<li onclick="javascript:showPage(this, \''.$orderhash{$name}.'\');">'.&mt($orderhash{$name}).'</li>';              $form .= '<li onclick="javascript:showPage(this, \''.$orderhash{$name}.'\');">'.&mt($orderhash{$name}).'</li>';
         }          }
Line 3394  sub generate_edit_table { Line 3391  sub generate_edit_table {
     $form .= '<div id="content" style="padding: 0 0; margin: 0 0;">';      $form .= '<div id="content" style="padding: 0 0; margin: 0 0;">';
     foreach my $field (keys(%namehash)){      foreach my $field (keys(%namehash)){
         $form .= '<div id="'.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>';          $form .= '<div id="'.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>';
     }        }
     $form .= '</div></div>';      $form .= '</div></div>';
 #}  #}
     return $form;      return $form;
Line 3601  function markcopy(folderpath,index,oldti Line 3598  function markcopy(folderpath,index,oldti
     this.document.forms.renameform.submit();      this.document.forms.renameform.submit();
 }  }
   
 function hideAll() {  function unselectInactive() {
   currentNav = document.getElementById('navigation');
   currentLis = currentNav.getElementsByTagName('LI');
   for (i = 0; i < currentLis.length; i++) {
   currentLis[i].className = 'i';
   }
   }
   
   function hideAll(current) {
    unselectInactive();
    current.className = 'active';
  currentData = document.getElementById('content');   currentData = document.getElementById('content');
  currentDivs = currentData.getElementsByTagName('div');   currentDivs = currentData.getElementsByTagName('DIV');
  for (i = 0; i < currentDivs.length; i++) {   for (i = 0; i < currentDivs.length; i++) {
  currentDivs[i].style.display = 'none';   currentDivs[i].style.display = 'none';
  }   }
 }  }
   
 function showPage(current, pageId) {  function showPage(current, pageId) {
  hideAll();   hideAll(current);
    unselectInactive();
  current.className = 'active';   current.className = 'active';
  currentData = document.getElementById(pageId);   currentData = document.getElementById(pageId);
  currentData.style.display = 'block';   currentData.style.display = 'block';

Removed from v.1.331  
changed lines
  Added in v.1.332


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