Diff for /loncom/interface/londocs.pm between versions 1.329 and 1.330

version 1.329, 2009/01/28 18:10:04 version 1.330, 2009/01/30 09:05:36
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 3038  NROSTFORM Line 3039  NROSTFORM
   
        $r->print(<<ENDFORM);         $r->print(<<ENDFORM);
   
 <ul class="LC_TabContent">  
 <li>$lt{'nd'}</li>  
 <li>$lt{'pm'}</li>  
 <li>$lt{'pubd'}</li>  
 <li>$lt{'sd'}</li>  
 <li>$lt{'mo'}</li>  
 <li>$lt{'hao'}</li>  
 </ul>  
   
 <table class="LC_docs_adddocs">  <table class="LC_docs_adddocs">
 <!-- <tr>  <!-- <tr>
Line 3125  NSYLFORM Line 3118  NSYLFORM
 NGFFORM  NGFFORM
   
   
            $r->print(<<ENDFORM);             my $specialdocumentsform=(<<ENDFORM);
 <br />  <br />
 $newfolderform  $newfolderform
 <br />  <br />
Line 3153  $newgroupfileform Line 3146  $newgroupfileform
 <br />  <br />
 $newrosterform  $newrosterform
 ENDFORM  ENDFORM
        }  
   $r->print($specialdocumentsform);
   my %orderhash = (
                   'aa_eins' => 'New Document',
                   'bb_zwei' => 'Published Documents',
                   'cc_drei' => 'Special Documents',
    'dd_vier' => 'More Options',
                   'zz_hide' => 'Hide all Option',
                   );
   my %namehash = (
                   'New Document' => $fileuploadform,
                   'Published Documents' => $simpleeditdefaultform,
                   'Special Documents' => $specialdocumentsform,
    'More Options' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform,
                   'drei' => 'dr',
                   );
   $r->print(&generate_edit_table(\%namehash,\%orderhash)); 
         }
        if ($env{'form.pagepath'}) {         if ($env{'form.pagepath'}) {
            $r->print(<<ENDBLOCK);             $r->print(<<ENDBLOCK);
 $newsmpproblemform  $newsmpproblemform
Line 3163  ENDBLOCK Line 3173  ENDBLOCK
        }         }
        $r->print('</td></tr>'."\n".         $r->print('</td></tr>'."\n".
 '</table>');  '</table>');
   #$r->print(&generate_edit_table(\%namehash,\%orderhash));
        $r->print('</td></tr>');         $r->print('</td></tr>');
     }      }
 # ----------------------------------------------------- Supplemental documents  # ----------------------------------------------------- Supplemental documents
Line 3294  ENDSUPFORM Line 3305  ENDSUPFORM
   <input type="hidden" name="residx" />    <input type="hidden" name="residx" />
 </form>');  </form>');
     }      }
   
   } else {    } else {
       unless ($upload_result eq 'phasetwo') {        unless ($upload_result eq 'phasetwo') {
 # -------------------------------------------------------- This is showdoc mode  # -------------------------------------------------------- This is showdoc mode
Line 3352  sub generate_admin_options { Line 3364  sub generate_admin_options {
  </form>   </form>
  <div style="clear: both; height: 0px;">&nbsp;</div>   <div style="clear: both; height: 0px;">&nbsp;</div>
 ENDOPTIONFORM  ENDOPTIONFORM
   
 }  }
   
   
 sub generate_edit_table {  sub generate_edit_table {
     my ($optionhash_ref,$namehash_ref,$orderhash_ref) = @_;      my ($namehash_ref,$orderhash_ref) = @_;
     my %optionhash = %{$optionhash_ref};         #id verlinkt mit inhalt      #my %optionhash = %{$optionhash_ref};         #id verlinkt mit inhalt
     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 $form;      my $form;
     $form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt('Upload Course Documents').'<h4>';      $form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt('Upload Course Documents').'</h4>';
     $form .= '<ul class="LC_TabContent">';      $form .= '<ul class="LC_TabContent">';
     foreach my $name (sort(keys(%orderhash))){      foreach my $name (sort(keys(%orderhash))){
         if($name eq 'zz_hide'){          if($name eq 'zz_hide'){
             $form .= '<li><a onclick="hideAllSection();" href="#">'.&mt($orderhash{$name}).'</a></li>';              $form .= '<li onclick="javascript:hideAll();">'.&mt($orderhash{$name}).'</li>';
         }else{          }else{
             $form .= '<li><a onclick="popUpSection(\''.$namehash{$orderhash{$name}}.'\');" href="#">'.&mt($orderhash{$name}).'</a></li>';              $form .= '<li onclick="javascript:showPage(this, \''.$orderhash{$name}.'\');">'.&mt($orderhash{$name}).'</li>';
         }          }
     }      }
     foreach my $field (keys(%optionhash)){      $form .= '<div id="content" style="padding: 0 0; margin: 0 0;">';
         $form .= '<div id="'.$field.'" class="LC_ContentBox LC_hideThis">'.$optionhash{$field}.'</div>';      foreach my $field (keys(%namehash)){
           $form .= '<div id="'.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>';
     }      }
     $form .= '</div>';      $form .= '</div></div>';
     return $form;      return $form;
 }  }
   
Line 3577  function markcopy(folderpath,index,oldti Line 3592  function markcopy(folderpath,index,oldti
     this.document.forms.renameform.submit();      this.document.forms.renameform.submit();
 }  }
   
   function hideAll() {
    currentData = document.getElementById('content');
    currentDivs = currentData.getElementsByTagName('div');
    for (i = 0; i < currentDivs.length; i++) {
    currentDivs[i].style.display = 'none';
    }
   }
   
   function showPage(current, pageId) {
    hideAll();
    current.className = 'active';
    currentData = document.getElementById(pageId);
    currentData.style.display = 'block';
    return false;
   }
   
 ENDNEWSCRIPT  ENDNEWSCRIPT
 }  }

Removed from v.1.329  
changed lines
  Added in v.1.330


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