update, MSIE bug compatibility
authorshort <>
Wed, 15 Oct 2003 13:37:13 +0000 (13:37 +0000)
committershort <>
Wed, 15 Oct 2003 13:37:13 +0000 (13:37 +0000)
Web.pm

diff --git a/Web.pm b/Web.pm
index 6a2189e..2b89eef 100644 (file)
--- a/Web.pm
+++ b/Web.pm
@@ -27,7 +27,7 @@ use Exporter;
 sub Wrequire ($);
 sub Wuse ($@);
 our $W;
-our @EXPORT=qw(&Wrequire &Wuse &a_href &a_href_cz &vskip &img &centerimg $W &top_dir &top_dir_disk);
+our @EXPORT=qw(&Wrequire &Wuse &a_href &a_href_cz &vskip &img &centerimg &rightimg $W &top_dir &top_dir_disk);
 our @ISA=qw(Exporter);
 
 BEGIN
@@ -515,6 +515,27 @@ sub centerimg
        return $r;
 }
 
+sub rightimg
+{
+my($text,@args_img)=@_;
+
+       # Workaround bug of 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)':
+       return <<"HERE";
+<table border="0" width="100%">
+       <col width="@{[ (!$W->{"browser"}->ie() ? "1*" : "90%" ) ]}" />
+       <col width="@{[ (!$W->{"browser"}->ie() ? "0*" : "10%" ) ]}" />
+       <tr>
+               <td align="left">
+                       @{[ $text ]}
+               </td>
+               <td align="right">
+                       @{[ &{\&img}(@args_img) ]}
+               </td>
+       </tr>
+</table>
+HERE
+}
+
 sub readfile ($$)
 {
 my($class,$filename)=@_;