--- loncom/interface/londocs.pm 2009/01/30 10:02:46 1.331 +++ loncom/interface/londocs.pm 2009/01/30 11:39:38 1.332 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.331 2009/01/30 10:02:46 muellerd Exp $ +# $Id: londocs.pm,v 1.332 2009/01/30 11:39:38 tempelho Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2872,7 +2872,7 @@ ERFORM $containertag = ''; $uploadtag = ''; } - ##############alter hashaufruf + $r->print(&generate_admin_options($containertag,$uploadtag,\%lt,\%help,\%env)); $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', &mt('Editing the Table of Contents for your '.$type))); @@ -3150,11 +3150,11 @@ 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', + 'aa' => 'New Document', + 'bb' => 'Published Documents', + 'cc' => 'Special Documents', + 'dd' => 'More Options', + 'zz' => 'Hide all Option', ); my %namehash = ( 'New Document' => $fileuploadform, @@ -3373,20 +3373,17 @@ ENDOPTIONFORM sub generate_edit_table { 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 %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name - #my %tablehash = %{$tablehash_ref}; my $form; #foreach my $id (keys(%tablehash)){ $form = '

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

'; - $form .= '
'; #} return $form; @@ -3601,16 +3598,27 @@ function markcopy(folderpath,index,oldti 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'); - currentDivs = currentData.getElementsByTagName('div'); + currentDivs = currentData.getElementsByTagName('DIV'); for (i = 0; i < currentDivs.length; i++) { currentDivs[i].style.display = 'none'; } } function showPage(current, pageId) { - hideAll(); + hideAll(current); + unselectInactive(); current.className = 'active'; currentData = document.getElementById(pageId); currentData.style.display = 'block';