[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonfeedback.pm lonmsgdisplay.pm /localize/localize de.pm zh.pm

bisitz bisitz@source.lon-capa.org
Wed, 04 Mar 2009 17:07:37 -0000


bisitz		Wed Mar  4 17:07:37 2009 EDT

  Modified files:              
    /loncom/interface	loncommon.pm lonmsgdisplay.pm lonfeedback.pm 
    /loncom/localize/localize	de.pm zh.pm 
  Log:
  help_open_topic:
  - Repaired unbalanced tags
    (only close help span, if opened before due to existing help link text)
  - Localized alt content for help icon
  - Added title to help icon
  - Optimized CSS usage
  - Optimized screen layout:
      - text and help icon now with same background again
      - less agressive background color
      - Added padding
  
  Cheatsheet:
  - Replaced <table> structure by <span>s
  - Added missing &mt() call to additional help icons text
  
  Adjusted screen layout creation in related scripts to keep old functionality:
  lonfeedback.pm, lonmsgdisplay.pm
  
  Table styles in construction space need to be revisited.
  
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.762 loncom/interface/loncommon.pm:1.763
--- loncom/interface/loncommon.pm:1.762	Wed Mar  4 12:43:31 2009
+++ loncom/interface/loncommon.pm	Wed Mar  4 17:07:31 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.762 2009/03/04 12:43:31 bisitz Exp $
+# $Id: loncommon.pm,v 1.763 2009/03/04 17:07:31 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -924,16 +924,22 @@
 
     # Add the text
     if ($text ne "") {	
-	$template.="<span class=\"LC_nobreak\"><a class=\"LC_helptextbgcolor\" target=\"_top\" href=\"$link\"><span class=\"LC_helptextfontcolor\">$text</span></a>";
+	$template.='<span class="LC_help_open_topic">'
+                  .'<a target="_top" href="'.$link.'">'
+                  .$text.'</a>';
     }
 
-    # Add the graphic
+    # (Always) Add the graphic
     my $title = &mt('Online Help');
     my $helpicon=&lonhttpdurl("/adm/help/help.png");
-    $template .= <<"ENDTEMPLATE";
- <a target="_top" href="$link" title="$title"><img src="$helpicon" border="0" alt="(Help: $topic)" /></a></span>
-ENDTEMPLATE
-    
+    $template.=' <a target="_top" href="'.$link.'" title="'.$title.'">'
+              .'<img src="'.$helpicon.'" border="0"'
+              .' alt="'.&mt('Help: [_1]',$topic).'"'
+              .' title="'.$title.'"'
+              .' /></a>';
+    if ($text ne "") {	
+        $template.='</span>';
+    }
     return $template;
 
 }
@@ -945,25 +951,26 @@
     my $out;
     my $addOther = '';
     if ($topic) {
-	$addOther = &Apache::loncommon::help_open_topic($topic,$text,
-						       undef, undef, 600).
-							   '</td><td>';
-    }
-    $out = '<table><tr><td>'.
-	   $addOther .
-	   &Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'),
-					       undef,undef,600).
-	   '</td><td>'.
-	   &Apache::loncommon::help_open_topic("Other_Symbols",&mt('Other Symbols'),
-					       undef,undef,600).
-	   '</td>';
+	$addOther = '<span>'.&Apache::loncommon::help_open_topic($topic,&mt($text),
+							       undef, undef, 600).
+								   '</span> ';
+    }
+    $out = '<span>' # Start cheatsheet
+	  .$addOther
+          .'<span>'
+	  .&Apache::loncommon::help_open_topic('Greek_Symbols',&mt('Greek Symbols'),
+					       undef,undef,600)
+	  .'</span> <span>'
+	  .&Apache::loncommon::help_open_topic('Other_Symbols',&mt('Other Symbols'),
+					       undef,undef,600)
+	  .'</span>';
     unless ($not_author) {
-        $out .= '<td>'.
-	        &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'),
-	                                            undef,undef,600).
-	        '</td>';
+        $out .= ' <span>'
+	       .&Apache::loncommon::help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),
+	                                            undef,undef,600)
+	       .'</span>';
     }
-    $out .= '</tr></table>';
+    $out .= '</span>'; # End cheatsheet
     return $out;
 }
 
@@ -5594,13 +5601,14 @@
         cursor:pointer;
         text-decoration:underline;
 }
-.LC_helptextbgcolor
-{
-	background-color:#5555FF;
-}
-.LC_helptextfontcolor
-{
-	color:#FFFFFF;
+
+.LC_help_open_topic {
+        color: #FFFFFF;
+        background-color: #EEEEFF;
+        margin: 1px;
+        padding: 4px;
+        border: 1px solid #000033;
+        white-space: nowrap;
 }
 
 dl,ul,div,fieldset {
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.116 loncom/interface/lonmsgdisplay.pm:1.117
--- loncom/interface/lonmsgdisplay.pm:1.116	Thu Feb 26 16:17:29 2009
+++ loncom/interface/lonmsgdisplay.pm	Wed Mar  4 17:07:31 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines for messaging display
 #
-# $Id: lonmsgdisplay.pm,v 1.116 2009/02/26 16:17:29 schafran Exp $
+# $Id: lonmsgdisplay.pm,v 1.117 2009/03/04 17:07:31 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1578,7 +1578,7 @@
         $r->print(<<"ENDCOMP");
 $attachrow
 </table><br />
-$latexHelp
+$latexHelp<br />
 <textarea name="message" id="message" cols="80" rows="15" wrap="hard">$dismsg
 </textarea>$wysiwyglink
 $sendmode
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.266 loncom/interface/lonfeedback.pm:1.267
--- loncom/interface/lonfeedback.pm:1.266	Tue Feb 24 19:51:32 2009
+++ loncom/interface/lonfeedback.pm	Wed Mar  4 17:07:31 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Feedback
 #
-# $Id: lonfeedback.pm,v 1.266 2009/02/24 19:51:32 weissno Exp $
+# $Id: lonfeedback.pm,v 1.267 2009/03/04 17:07:31 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1695,6 +1695,8 @@
 <p>$lt{'myqu'}</p>
 <p>
 $latexHelp
+</p>
+<p>
 $lt{'title'}: <input type="text" name="subject" size="30" value="$subject" /></p>
 <p>
 <textarea name="comment" id="comment" cols="60" rows="10" wrap="hard">$comment
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.243 loncom/localize/localize/de.pm:1.244
--- loncom/localize/localize/de.pm:1.243	Sun Mar  1 19:38:18 2009
+++ loncom/localize/localize/de.pm	Wed Mar  4 17:07:36 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.243 2009/03/01 19:38:18 biermanm Exp $
+# $Id: de.pm,v 1.244 2009/03/04 17:07:36 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4160,6 +4160,9 @@
    'Online Help'
 => 'Online-Hilfe',
 
+   'Help: [_1]'
+=> 'Hilfe zu [_1]',
+
    'Only domain coordinators can change a users password.'
 => 'Nur Domänen-Koordinatoren können das Passwort eines Benutzers ändern.',
 
@@ -8903,7 +8906,7 @@
 => 'wieder aktivieren',
 
    'Script Functions'
-=> 'Funktionen in Skripten', # n.t.
+=> 'Funktionen in Skripten',
 
    'Image Options'
 => 'Bildoptionen', # n.t.
Index: loncom/localize/localize/zh.pm
diff -u loncom/localize/localize/zh.pm:1.22 loncom/localize/localize/zh.pm:1.23
--- loncom/localize/localize/zh.pm:1.22	Sun Mar  1 22:31:07 2009
+++ loncom/localize/localize/zh.pm	Wed Mar  4 17:07:36 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Chinese Simplified Localization Lexicon
 #
-# $Id: zh.pm,v 1.22 2009/03/01 22:31:07 zhu Exp $
+# $Id: zh.pm,v 1.23 2009/03/04 17:07:36 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4162,6 +4162,9 @@
    'Online Help'
 => 'Online-Hilfe',
 
+   'Help: [_1]'
+=> 'Hilfe zu [_1]',
+
    'Only domain coordinators can change a users password.'
 => 'Nur Domänen-Koordinatoren können das Passwort eines Benutzers ändern.',
 
@@ -8990,7 +8993,7 @@
 => 'wieder aktivieren',
 
    'Script Functions'
-=> 'Funktionen in Skripten', # n.t.
+=> 'Funktionen in Skripten',
 
    'Image Options'
 => 'Bildoptionen', # n.t.