Hi,

I think this issue has been raised before, but it seems nothing is
better than a ready patch ;)  The patch below should provide
ability to hide the feedback by a click in all JavaScript-enabled
browsers.  Unfortunately, it is untested, since I was unable to
install Savane locally yet.  The trivial script itself, though,
works perfectly on a test page.

For full standards conformance, the following meta tag should also
be added:

    <meta http-equiv="Content-Script-Type" content="text/javascript" />

See http://www.w3.org/TR/html4/interact/scripts.html#default-script

Paul Pogonyshev


Index: html.php
===================================================================
--- html.php    (revision 5298)
+++ html.php    (working copy)
@@ -137,17 +137,19 @@
       $GLOBALS[ffeedback] = htmlspecialchars($GLOBALS[ffeedback]);
     }
 
+  $script = "onclick=\"this.style.visibility='hidden';\""
+
   # Only success
   if ($GLOBALS[feedback] && !$GLOBALS[ffeedback])
-    {  print '<div class="feedback"><span class="feedbacktitle"><img 
src="'.$GLOBALS['sys_home'].'images/'.SV_THEME.'.theme/ok.png" 
class="feedbackimage" alt="'._("Success").'" /> '._("Success:").'</span> 
'.$GLOBALS[feedback].'</div>'; }
+    {  print '<div class="feedback" '.$scipt.'><span 
class="feedbacktitle"><img 
src="'.$GLOBALS['sys_home'].'images/'.SV_THEME.'.theme/ok.png" 
class="feedbackimage" alt="'._("Success").'" /> '._("Success:").'</span> 
'.$GLOBALS[feedback].'</div>'; }
 
   # Only errors
   if ($GLOBALS[ffeedback] && !$GLOBALS[feedback])
-    {  print '<div class="feedbackerror"><span class="feedbackerrortitle"><img 
src="'.$GLOBALS['sys_home'].'images/'.SV_THEME.'.theme/wrong.png" 
class="feedbackimage" alt="'._("Error").'" /> 
'._("Error:").'</span>'.$GLOBALS[ffeedback].'</div>'; }
+    {  print '<div class="feedbackerror" '.$scipt.'><span 
class="feedbackerrortitle"><img 
src="'.$GLOBALS['sys_home'].'images/'.SV_THEME.'.theme/wrong.png" 
class="feedbackimage" alt="'._("Error").'" /> 
'._("Error:").'</span>'.$GLOBALS[ffeedback].'</div>'; }
 
   # Errors and success
   if ($GLOBALS[ffeedback] && $GLOBALS[feedback])
-    {  print '<div class="feedbackerrorandsuccess"><span 
class="feedbackerrorandsuccesstitle"><img 
src="'.$GLOBALS['sys_home'].'images/'.SV_THEME.'.theme/wrong.png" 
class="feedbackimage" alt="'._("Some Errors").'" /> '._("Some 
Errors:").'</span>'.$GLOBALS[feedback].' '.$GLOBALS[ffeedback].'</div>'; }
+    {  print '<div class="feedbackerrorandsuccess" '.$scipt.'><span 
class="feedbackerrorandsuccesstitle"><img 
src="'.$GLOBALS['sys_home'].'images/'.SV_THEME.'.theme/wrong.png" 
class="feedbackimage" alt="'._("Some Errors").'" /> '._("Some 
Errors:").'</span>'.$GLOBALS[feedback].' '.$GLOBALS[ffeedback].'</div>'; }
 
   if ($GLOBALS[sys_debug_on] && $GLOBALS[debug])
     {  print '<div class="debug">DEBUG information: 
'.$GLOBALS[debug].'</div>'; }
@@ -155,7 +157,7 @@
   # [EMAIL PROTECTED] 2003-11-03:
   # We unset feedback so there will be a bottom feedback only if something
   # changed. It may confuse users, however I would find more confusing to
-  # have to lookalike feedback information providing most of the time the
+  # have two lookalike feedback information providing most of the time the
   # same information AND (that is the problem) sometimes more information
   # in the second one.
   unset($GLOBALS[feedback],$GLOBALS[ffeedback],$GLOBALS[debug]);

_______________________________________________
Savane-dev mailing list
[email protected]
https://mail.gna.org/listinfo/savane-dev

Reply via email to