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

bisitz bisitz@source.lon-capa.org
Wed, 17 Jun 2009 17:36:25 -0000


bisitz		Wed Jun 17 17:36:25 2009 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Corrected attributes closure for ContentBox (removed second quotation mark)
  - Added missing blank between attributes to main/supplemental list items
  - XHTML: Blanks in id are not allowed
    (Renamed Supplemental Course Documents -> supplCourseDocuments)
  - XHTML: lower case attributes
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.372 loncom/interface/londocs.pm:1.373
--- loncom/interface/londocs.pm:1.372	Wed Jun 17 17:15:00 2009
+++ loncom/interface/londocs.pm	Wed Jun 17 17:36:25 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.372 2009/06/17 17:15:00 bisitz Exp $
+# $Id: londocs.pm,v 1.373 2009/06/17 17:36:25 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1790,7 +1790,7 @@
 	     ne '')) {
 	    $selectbox=
 		'<input type="hidden" name="currentpos" value="'.$incindex.'" />'.
-		'<select name="newpos" onChange="this.form.submit()">';
+		'<select name="newpos" onchange="this.form.submit()">';
 	    for (my $i=1;$i<=$#LONCAPA::map::order+1;$i++) {
 		if ($i==$incindex) {
 		    $selectbox.='<option value="" selected="selected">('.$i.')</option>';
@@ -1972,7 +1972,7 @@
                                               'parameter_randomorder'))[0]=~/^yes$/i);
 	$url.='folderpath='.&escape($folderpath).$cpinfo;
 	$parameterset='<label>'.&mt('Randomly Pick: ').
-	    '<input type="text" size="4" onChange="this.form.changeparms.value='."'randompick'".';this.form.submit()" name="randompick_'.$orderidx.'" value="'.
+	    '<input type="text" size="4" onchange="this.form.changeparms.value='."'randompick'".';this.form.submit()" name="randompick_'.$orderidx.'" value="'.
 	    (&LONCAPA::map::getparameter($orderidx,
                                               'parameter_randompick'))[0].
                                               '" />'.
@@ -2925,14 +2925,14 @@
 	   $activeClass = 0;
 	}
     }
-    $r->print('<li '.$active.'onclick="javascript:showPage(this,\'mainCourseDocuments\',\'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){
            $active = 'class="active"';
         }
     }
-    $r->print('<li '.$active.'onclick="javascript:showPage(this,\'Supplemental Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>');
+    $r->print('<li '.$active.' onclick="javascript:showPage(this,\'supplCourseDocuments\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>');
     $r->print('</ul><div class="LC_Box" style="margin:0 0;padding:0 0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;">');
 # --------------------------------------------------------- Standard documents
        my $savefolderpath;
@@ -3198,7 +3198,7 @@
        if($activeClass == 1){
           $active = 'style="display: block;"';
        }
-       $r->print('<div class="LC_ContentBox" id="Supplemental Course Documents" '.$active.'>');
+       $r->print('<div class="LC_ContentBox" id="supplCourseDocuments" '.$active.'>');
        my $folder=$env{'form.folder'};
        unless ($folder=~/^supplemental/) {
 	   $folder='supplemental';
@@ -3303,7 +3303,7 @@
                 );
 
 my $tid='2';
-my $varscd = 'Supplemental Course Documents';
+my $varscd = 'supplCourseDocuments';
 
 $r->print(&generate_edit_table($tid,$varscd,\%suporderhash));
 my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type);
@@ -3400,7 +3400,9 @@
         }elsif($activetab eq $field){
                 $active = 'style="display:block;"';
         }
-           $form .= '<div id="'.substr(${$orderhash{$field}}[0],0,3).$tid.'" class="LC_ContentBox" '.$active.'">'.${$orderhash{$field}}[1].'</div>';
+           $form .= '<div id="'.substr(${$orderhash{$field}}[0],0,3).$tid.'"'
+                   .' class="LC_ContentBox" '.$active.'>'.${$orderhash{$field}}[1]
+                   .'</div>';
         }
     }
     $form .= '</div></div>';