--- loncom/interface/londocs.pm 2009/06/17 17:36:25 1.373 +++ loncom/interface/londocs.pm 2009/07/01 13:16:42 1.374 @@ -1,7 +1,7 @@ # The LearningOnline Network # Documents # -# $Id: londocs.pm,v 1.373 2009/06/17 17:36:25 bisitz Exp $ +# $Id: londocs.pm,v 1.374 2009/07/01 13:16:42 tempelho Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2933,7 +2933,7 @@ HIDDENFORM } } $r->print('
  • '.&mt('Supplemental Course Documents').'
  • '); - $r->print('
    '); + $r->print('
    '); # --------------------------------------------------------- Standard documents my $savefolderpath; my $active = 'style="display: none;"'; @@ -3303,7 +3303,7 @@ my %suporderhash = ( ); my $tid='2'; -my $varscd = 'supplCourseDocuments'; +my $varscd = 'Supplemental Course Documents'; $r->print(&generate_edit_table($tid,$varscd,\%suporderhash)); my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); @@ -3377,18 +3377,18 @@ sub generate_edit_table { foreach my $name (sort(keys(%orderhash))){ if($name eq 'zz'){ if($activetab ne ''){ - $active = ''; + $active = 'class="right"'; }else{ - $active = 'class="active"'; + $active = 'class="right active"'; } - $form .= '
  • '.&mt(${$orderhash{$name}}[0]).'
  • '; + $form .= '
  • '.&mt(${$orderhash{$name}}[0]).'
  • '; }else{ if($activetab eq '' || $activetab ne $name){ $active = ''; }elsif($activetab eq $name){ $active = 'class="active"'; } - $form .= '
  • '.&mt(${$orderhash{$name}}[0]).'
  • '; + $form .= '
  • '.&mt(${$orderhash{$name}}[0]).'
  • '; } } $form .= ''; @@ -3400,7 +3400,7 @@ sub generate_edit_table { }elsif($activetab eq $field){ $active = 'style="display:block;"'; } - $form .= '
    '.${$orderhash{$field}}[1] .'
    '; } @@ -3615,13 +3615,21 @@ function unselectInactive(nav) { currentNav = document.getElementById(nav); currentLis = currentNav.getElementsByTagName('LI'); for (i = 0; i < currentLis.length; i++) { - currentLis[i].className = 'i'; + if(currentLis[i].className == 'right active' || currentLis[i].className == 'right'){ + currentLis[i].className = 'right'; + }else{ + currentLis[i].className = 'i'; + } } } function hideAll(current, nav, data) { unselectInactive(nav); -current.className = 'active'; +if(current.className == 'right'){ + current.className = 'right active' + }else{ + current.className = 'active'; +} currentData = document.getElementById(data); currentDivs = currentData.getElementsByTagName('DIV'); for (i = 0; i < currentDivs.length; i++) { @@ -3631,7 +3639,21 @@ for (i = 0; i < currentDivs.length; i++) } } +function openTabs(pageId) { + tabnav = document.getElementById(pageId).getElementsByTagName('UL'); + if(tabnav.length > 0 ){ + currentNav = document.getElementById(tabnav[0].id); + currentLis = currentNav.getElementsByTagName('LI'); + for(i = 0; i< currentLis.length; i++){ + if(currentLis[i].className == 'active') { + currentLis[i].onclick; + } + } + } +} + function showPage(current, pageId, nav, data) { + /*openTabs(pageId);*/ hideAll(current, nav, data); unselectInactive(nav); current.className = 'active';