[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

tempelho tempelho@source.lon-capa.org
Tue, 17 Mar 2009 21:41:31 -0000


tempelho		Tue Mar 17 21:41:31 2009 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  XHTML
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.358 loncom/interface/londocs.pm:1.359
--- loncom/interface/londocs.pm:1.358	Tue Mar 17 17:36:22 2009
+++ loncom/interface/londocs.pm	Tue Mar 17 21:41:30 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.358 2009/03/17 17:36:22 bisitz Exp $
+# $Id: londocs.pm,v 1.359 2009/03/17 21:41:30 tempelho Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2897,7 +2897,7 @@
 	   $activeClass = 0;
 	}
     }
-    $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Main Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Main Course Documents').'</li>');
+    $r->print('<li '.$active.'onclick="javascript:showPage(this,\'mainCourseDocuments\',\'mainnav\',\'maincoursedoc\');">'.&mt('Main Course Documents').'</li>');
     $active = '';
     if (!$forcestandard || ($env{'form.folderpath'}=~/^supplemental/)) {
         if($activeClass == 1){
@@ -2912,7 +2912,7 @@
        if($activeClass == 0){
           $active = 'style="display: block;"';
        }
-       $r->print('<div class="LC_ContentBox" id="Main Course Documents" '.$active.'>');
+       $r->print('<div class="LC_ContentBox" id="mainCourseDocuments" '.$active.'>');
         $r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc',
                      &mt('Editing the Table of Contents for your '.$type)));
        my $folder=$env{'form.folder'};
@@ -3138,10 +3138,8 @@
 		'Tools' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform.'<br />'.&generate_admin_options($containertag,$uploadtag,\%help,\%env),
                 );
 my $tid='1';
-my $content='content';
-my $navigation='navigation';
 my $varcd = 'Main Course Documents';
-$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash));
+$r->print(&generate_edit_table($tid,$varcd,\%namehash,\%orderhash));
  $hadchanges=0;
         my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
        if ($error) {
@@ -3264,11 +3262,9 @@
                 );
 
 my $tid='2';
-my $content='content';
-my $navigation='navigation';
 my $varscd = 'Supplemental Course Documents';
 
-$r->print(&generate_edit_table($tid,$content,$navigation,$varscd,\%supnamehash,\%suporderhash));
+$r->print(&generate_edit_table($tid,$varscd,\%supnamehash,\%suporderhash));
 my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
        if ($error) {
            $r->print('<p><span class="LC_error">'.$error.'</span></p>');
@@ -3327,24 +3323,24 @@
 
 
 sub generate_edit_table {
-    my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_;
+    my ($tid,$varcd,$namehash_ref,$orderhash_ref) = @_;
     my %namehash = %{$namehash_ref};
     my %orderhash = %{$orderhash_ref};
     my $form;
 
     $form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt($varcd).'</h4>';
-    $form .= '<ul id="'.$navigation.$tid.'" class="LC_TabContent">';
+    $form .= '<ul id="navigation'.$tid.'" class="LC_TabContent">';
     foreach my $name (sort(keys(%orderhash))){
         if($name eq 'zz'){
-            $form .= '<span class="LC_Right"><li onclick="javascript:hideAll(this, \''.$navigation.$tid.'\' ,\''.$content.$tid.'\');" class="active">'.&mt($orderhash{$name}).'</li></span>';
+            $form .= '<span class="LC_Right"><li onclick="javascript:hideAll(this, \'navigation'.$tid.'\' ,\'content'.$tid.'\');" class="active">'.&mt($orderhash{$name}).'</li></span>';
         }else{
-            $form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>';
+            $form .= '<li onclick="javascript:showPage(this, \''.substr($orderhash{$name},0,3).$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');">'.&mt($orderhash{$name}).'</li>';
         }
     }
     $form .= '</ul>';
-    $form .= '<div id="'.$content.$tid.'" style="padding: 0 0; margin: 0 0;">';
+    $form .= '<div id="content'.$tid.'" style="padding: 0 0; margin: 0 0;">';
     foreach my $field (keys(%namehash)){
-        $form .= '<div id="'.$tid.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>';
+        $form .= '<div id="'.substr($field,0,3).$tid.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>';
       }
     $form .= '</div></div>';