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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 26 Jun 2006 22:06:20 -0000


albertel		Mon Jun 26 18:06:20 2006 EDT

  Modified files:              
    /loncom/interface	lonhelpmenu.pm loncommon.pm 
  Log:
  - eliminating unneeded color passing
  - moving font/bold styling into css
  
  
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.26 loncom/interface/lonhelpmenu.pm:1.27
--- loncom/interface/lonhelpmenu.pm:1.26	Mon Jun 26 17:54:34 2006
+++ loncom/interface/lonhelpmenu.pm	Mon Jun 26 18:06:19 2006
@@ -37,14 +37,13 @@
 
 sub handler {
     my ($r) = @_;
-    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','color','function','faq','bug','topic','component_help','origurl','stayonpage']);
+    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','function','faq','bug','topic','component_help','origurl','stayonpage']);
     &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
 
     if ($r->header_only) {
         return OK;
     }
-    my $color = $env{'form.color'};
     my $faq = $env{'form.faq'};
     my $bug = $env{'form.bug'};
     my $topic = $env{'form.topic'};
@@ -64,24 +63,16 @@
     my $faqbaseurl = $Apache::lonnet::perlvar{'FAQHost'};
     my $requestmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
     if ($env{'form.page'} eq 'banner') {
-        &display_help_banner($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage);
+        &display_help_banner($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage);
     } elsif ($env{'form.page'} eq 'body') {
-        &display_help_mainpage($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
+        &display_help_mainpage($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
     }
     return OK;
 }
 
 sub display_help_banner {
-    my ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;
-    my $fontcolor = &Apache::loncommon::designparm($function.'.font');
-    my $alinkcolor = &Apache::loncommon::designparm($function.'.alink');
-    my $vlinkcolor = &Apache::loncommon::designparm($function.'.vlink');
-    my $pagecolor = &Apache::loncommon::designparm($function.'.pgbg');
-    my $tablecolor = &Apache::loncommon::designparm($function.'.tabbg');
+    my ($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;
     my $location=&Apache::loncommon::lonhttpdurl("/adm");
-    if (($tablecolor eq '') || ($tablecolor eq '#FFFFFF')) {
-        $tablecolor = '#EEEE99';
-    }
     my $scripttag = '';
     if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
         my $displayurl = &escape($origurl);
@@ -152,16 +143,15 @@
 					'only_body'   => 1,});
     $r->print($start_page);
 
-    if ($stayOnPage) {
-        $r->print('<table width="700" border="0" cellspacing="0" cellpadding="0" height="55">');
-    } else {
-        $r->print('<table width="600" border="0" cellspacing="0" cellpadding="0" height="55">');
-    }
+    my $width = ($stayOnPage) ? '700' : '600';
+
+    $r->print('<table id="LC_helpmenu" width="'.$width.'">');
+
     $r->print(<<END);
   <tr height="50">
    <td width='5'>&nbsp;</td>
    <td>
-    <fieldset><legend><img src="$location/lonIcons/minilogo.gif" height='20' width='29' valign='bottom' />&nbsp;&nbsp;<b><font size="+1">LON-CAPA help/support</font></b></legend>
+    <fieldset><legend><img src="$location/lonIcons/minilogo.gif" height='20' width='29' valign='bottom' />&nbsp;&nbsp;LON-CAPA help/support</legend>
  <table id="LC_helpmenu_links">
    <tr>
 END
@@ -210,7 +200,7 @@
 }
 
 sub display_help_mainpage {
-    my ($r,$color,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;
+    my ($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;
 
     my %lt =&Apache::lonlocal::texthash(
         'topp' => 'Topic Page',
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.397 loncom/interface/loncommon.pm:1.398
--- loncom/interface/loncommon.pm:1.397	Mon Jun 26 17:54:34 2006
+++ loncom/interface/loncommon.pm	Mon Jun 26 18:06:19 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.397 2006/06/26 21:54:34 albertel Exp $
+# $Id: loncommon.pm,v 1.398 2006/06/26 22:06:19 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -730,8 +730,8 @@
     } else {
         $link = "javascript:helpMenu('display')";
     }
-    my $banner_link = "/adm/helpmenu?page=banner&amp;color=$color&amp;function=$function&amp;topic=$topic&amp;component_help=$component_help&amp;faq=$faq&amp;bug=$bug&amp;origurl=$origurl&amp;stamp=$timestamp&amp;stayonpage=$stayOnPage";
-    my $details_link = "/adm/helpmenu?page=body&amp;color=$color&amp;function=$function&amp;topic=$topic&amp;component_help=$component_help&amp;faq=$faq&amp;bug=$bug&amp;origurl=$origurl&amp;stamp=$timestamp";
+    my $banner_link = "/adm/helpmenu?page=banner&amp;function=$function&amp;topic=$topic&amp;component_help=$component_help&amp;faq=$faq&amp;bug=$bug&amp;origurl=$origurl&amp;stamp=$timestamp&amp;stayonpage=$stayOnPage";
+    my $details_link = "/adm/helpmenu?page=body&amp;function=$function&amp;topic=$topic&amp;component_help=$component_help&amp;faq=$faq&amp;bug=$bug&amp;origurl=$origurl&amp;stamp=$timestamp";
     my $template;
     if ($text ne "") {
 	$template .= 
@@ -3422,6 +3422,16 @@
   border-style: solid;
   border-color: $pgbg;
 }
+table#LC_helpmenu {
+  border: 0px;
+  height: 55px;
+  border-spacing: 0px;
+}
+
+table#LC_helpmenu fieldset legend {
+  font-size: larger;
+  font-weight: bold;
+}
 table#LC_helpmenu_links {
   width: 100%;
   border: 1px solid black;