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

bisitz bisitz@source.lon-capa.org
Wed, 09 Dec 2009 17:09:27 -0000


bisitz		Wed Dec  9 17:09:27 2009 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  Optimized layout and floating for detailed parameter selection (table mode, overview mode)
  - Replaced fieldsets by boxes with headlines
  - Boxes with fixed width but allow boxes to float
  - List the parameters for each category vertically instead of horizontally
  - Show hide link at top and bottom of parameter box
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.488 loncom/interface/lonparmset.pm:1.489
--- loncom/interface/lonparmset.pm:1.488	Thu Dec  3 17:50:42 2009
+++ loncom/interface/lonparmset.pm	Wed Dec  9 17:09:26 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.488 2009/12/03 17:50:42 bisitz Exp $
+# $Id: lonparmset.pm,v 1.489 2009/12/09 17:09:26 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1493,13 +1493,24 @@
         'slots' => [],
         'file_submission' => [],
         'misc' => [],
-   );
+    );
+    my $hidelink =
+        '<p>'
+       .'<a href="javascript:hideParms()">'
+       .&mt('Hide detailed Parameter Selection')
+       .'</a>'
+       .'</p>'
+       ."\n";
+;
     foreach $tempparameter (keys %$allparms) {
         &whatIsMyCategory($tempparameter, \%categoryList);
     }
     #part to print the parm-list
-    $r->print('<fieldset id="LC_parm_overview_parm_menu" style="display:none">'
-             .'<legend>'.&mt('Parameter').'</legend>'."\n"
+    $r->print(
+        '<div id="LC_parm_overview_parm_menu" class="LC_Box" style="display:none">'."\n"
+       .'<h3>'.&mt('Parameter').'</h3>'."\n"
+       .$hidelink
+       .'<div class="LC_columnSection">'."\n"
     );
 
     #Print parameters
@@ -1507,10 +1518,10 @@
         if(@{$categoryList{$key}} == 0) {
             next;
         } else { 
-            $r->print('<fieldset>'
-                     .'<legend>'
+            $r->print('<div class="LC_Box LC_400Box">'
+                     .'<h4 class="LC_hcell">'
                      .&mt($categories{$key})
-                     .'</legend>'."\n");
+                     .'</h4>'."\n");
             foreach $tempkey (&keysindisplayorderCategory($categoryList{$key},$keyorder)) {
                     $r->print('<span class="LC_nobreak">'
                              .'<label><input type="checkbox" name="pscat" ');
@@ -1521,19 +1532,18 @@
                 }
                 $r->print(' />'.($$allparms{$tempkey}=~/\S/ ? $$allparms{$tempkey}
                                                       : $tempkey)
-                        .'</label></span> ');
+                        .'</label></span><br />'."\n");
             }
-            $r->print('</fieldset>');
+            $r->print("</div>\n");
         }
     }
-    $r->print('<hr />'
-             .'<a href="javascript:hideParms()">'
-             .&mt('Hide')
-             .'</a>'
-    );
 
     #&shortCuts($r,$allparms,$pscat,$keyorder);
-    $r->print('</fieldset>');
+    $r->print(
+        "</div>\n"
+       .$hidelink
+       ."</div>\n"
+    );
 }
 #
 # This function offers some links on the parameter section to get with one click a group a parameters