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

riegler lon-capa-cvs-allow@mail.lon-capa.org
Fri, 05 Sep 2008 19:20:41 -0000


riegler		Fri Sep  5 15:20:41 2008 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm loncommon.pm 
  Log:
  prettyfied main menue and defined new css-style
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.240 loncom/interface/lonmenu.pm:1.241
--- loncom/interface/lonmenu.pm:1.240	Thu Sep  4 18:47:20 2008
+++ loncom/interface/lonmenu.pm	Fri Sep  5 15:20:39 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.240 2008/09/04 22:47:20 riegler Exp $
+# $Id: lonmenu.pm,v 1.241 2008/09/05 19:20:39 riegler Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -995,40 +995,14 @@
     &rawconfig(1);
     my $output='<table id="LC_mainmenu"><tr>';
     for (my $col=1; $col<=2; $col++) {
-        $output.='<td class="LC_mainmenu_column">';
+        $output.='<td class="LC_mainmenu_col_fieldset">';
         for (my $row=1; $row<=8; $row++) {
             foreach my $cat (keys(%category_members)) {
                if ($category_positions{$cat} ne "$col,$row") { next; }
-               $output.='<table id="LC_menubuttons_mainmenu"><tr><td colspan="4" class="LC_menubuttons_category">'.&mt($category_names{$cat}).'</td></tr>';
-               my %active=();
-               foreach my $menu_item (split(/\:/,$category_members{$cat})) {
-                  if ($inlineremote[$menu_item]) {
-                     $active{$menu_item}=1;
-                  }
-               }  
-               foreach my $item (sort(keys(%active))) {
-                  $output.=$inlineremote[$item];
-               }
-               $output.='</table>';
-            }
-         }
-         $output.="</td>";
-    }
-    $output.="</tr></table>";
-    return $output;
-}
-
-sub inlinemenu_new {
-    undef(@inlineremote);
-    undef(%category_members);
-    &rawconfig(1);
-    my $output='<table id="LC_mainmenu"><tr>';
-    for (my $col=1; $col<=2; $col++) {
-        $output.='<td class="LC_mainmenu_column">';
-        for (my $row=1; $row<=8; $row++) {
-            foreach my $cat (keys(%category_members)) {
-               if ($category_positions{$cat} ne "$col,$row") { next; }
-               $output.='<table id="LC_menubuttons_mainmenu"><tr><td colspan="4" class="LC_menubuttons_category">'.&mt($category_names{$cat}).'</td></tr>';
+               #$output.='<table id="LC_menubuttons_mainmenu"><tr><td colspan="4" class="LC_menubuttons_category">'.&mt($category_names{$cat}).'</td></tr>';
+               $output.='<fieldset id="LC_mainmenu_fieldset">';
+	       $output.='<legend class="LC_mainmenu_fieldset_category">'.&mt($category_names{$cat}).'</legend>';
+               $output.='<table id="LC_menubuttons_mainmenu">';
                my %active=();
                foreach my $menu_item (split(/\:/,$category_members{$cat})) {
                   if ($inlineremote[$menu_item]) {
@@ -1037,8 +1011,10 @@
                }  
                foreach my $item (sort(keys(%active))) {
                   $output.=$inlineremote[$item];
+		&Apache::lonnet::logthis("item=$item output=$inlineremote[$item]");
                }
                $output.='</table>';
+               $output.='</fieldset>';
             }
          }
          $output.="</td>";
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.680 loncom/interface/loncommon.pm:1.681
--- loncom/interface/loncommon.pm:1.680	Fri Sep  5 11:48:08 2008
+++ loncom/interface/loncommon.pm	Fri Sep  5 15:20:39 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.680 2008/09/05 15:48:08 riegler Exp $
+# $Id: loncommon.pm,v 1.681 2008/09/05 19:20:39 riegler Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4493,7 +4493,6 @@
 td.LC_table_cell_checkbox {
   text-align: center;
 }
-#changed in a new style. see at the end of the css deklaration LC_mainmenu_col__fieldset
 table#LC_mainmenu td.LC_mainmenu_column {
     vertical-align: top;
 }
@@ -5365,7 +5364,12 @@
   vertical-align:middle;
 }
 
-#Styles for main menu
+table#LC_mainmenu{
+ margin-top:10px;
+ width:80%;
+
+}
+
 table#LC_mainmenu td.LC_mainmenu_col_fieldset{
   vertical-align: top;
   width: 45%;
@@ -5378,7 +5382,7 @@
   font-weight: bold;
 }
 fieldset#LC_mainmenu_fieldset {
-  margin:0px 0px 10px 0px;
+  margin:0px 10px 10px 0px;
 
 }
 END