--- loncom/interface/londocs.pm 2009/06/17 17:36:25 1.373 +++ loncom/interface/londocs.pm 2009/07/10 15:05:28 1.376 @@ -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.376 2009/07/10 15:05:28 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -278,7 +278,7 @@ sub exportcourse { my $navmap = Apache::lonnavmaps::navmap->new(); if (!defined($navmap)) { $r->print(&Apache::loncommon::start_page('Export '.lc($type).' to IMS content package'). - '

IMS Export Failed

'. + '

'.&mt('IMS Export Failed').'

'. '
'. &mt('Unable to retrieve information about course contents'). '
'.&mt('Return to Course Editor').''); @@ -2507,7 +2507,7 @@ sub changewarning { 'function reinit(tf) { tf.submit();'.$postexec.' }'."\n". '// ]]>'."\n". ''."\n". -'
'. +''. '

'. &mt($message,' '.&mt('Supplemental Course Documents').''); - $r->print('

'); + $r->print('' + .'
' + .'
'); # --------------------------------------------------------- Standard documents my $savefolderpath; my $active = 'style="display: none;"'; @@ -3303,7 +3305,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 +3379,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 +3402,7 @@ sub generate_edit_table { }elsif($activetab eq $field){ $active = 'style="display:block;"'; } - $form .= '
    '.${$orderhash{$field}}[1] .'
    '; } @@ -3615,13 +3617,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,8 +3641,25 @@ 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') { + funcString = currentLis[i].onclick.toString(); + tab = funcString.split('"'); + currentData = document.getElementById(tab[1]); + currentData.style.display = 'block'; + } + } + } +} + function showPage(current, pageId, nav, data) { hideAll(current, nav, data); + openTabs(pageId); unselectInactive(nav); current.className = 'active'; currentData = document.getElementById(pageId);