[Python-checkins] python/dist/src/Doc/perl l2hinit.perl,1.72,1.73

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Fri, 02 May 2003 19:07:24 -0700


Update of /cvsroot/python/python/dist/src/Doc/perl
In directory sc8-pr-cvs1:/tmp/cvs-serv26345

Modified Files:
	l2hinit.perl 
Log Message:
- add title attributes to the navigation icons on the navigation bars;
  this causes some browsers to offer descriptive tooltips when the
  mouse hovers over the linked icon
- clean up the code in this area


Index: l2hinit.perl
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/perl/l2hinit.perl,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** l2hinit.perl	2 May 2003 20:30:18 -0000	1.72
--- l2hinit.perl	3 May 2003 02:07:22 -0000	1.73
***************
*** 142,166 ****
  }
  
! sub use_my_icon($$) {
!     my($s,$rel) = @_;
!     if ($s =~ /\<tex2html_([a-z_]+)_visible_mark\>/) {
!         my $r = get_my_icon($1);
!         $s =~ s/\<tex2html_[a-z_]+_visible_mark\>/$r/;
      }
-     $s =~ s/<[aA] /<a rel="$rel" /;
-     return $s;
  }
  
  sub make_nav_panel() {
      my $s;
!     my $BLANK_ICON = get_my_icon('blank');
!     $NEXT = $NEXT_TITLE ? use_my_icon("$NEXT", 'next') : $BLANK_ICON;
!     $UP = $UP_TITLE ? use_my_icon("$UP", 'parent') : $BLANK_ICON;
!     $PREVIOUS = ($PREVIOUS_TITLE
!                  ? use_my_icon("$PREVIOUS", 'prev') : $BLANK_ICON);
!     $CONTENTS = use_my_icon("$CONTENTS", 'contents');
!     $INDEX = $INDEX ? use_my_icon("$INDEX", 'index') : $BLANK_ICON;
      if (!$CUSTOM_BUTTONS) {
!         $CUSTOM_BUTTONS = $BLANK_ICON;
      }
      $s = ('<table align="center" width="100%" cellpadding="0" cellspacing="2">'
--- 142,178 ----
  }
  
! sub unlinkify($) {
!     my $text = "$_[0]";
!     $text =~ s|</[aA]>||;
!     $text =~ s|<a\s+[^>]*>||i;
!     return $text;
! }
! 
! sub use_icon($$$) {
!     my($rel,$str,$title) = @_;
!     if ($title) {
!         my $s = "$str";
!         if ($s =~ /\<tex2html_([a-z_]+)_visible_mark\>/) {
!             my $r = get_my_icon($1);
!             $s =~ s/\<tex2html_[a-z_]+_visible_mark\>/$r/;
!         }
!         $s =~ s/<[aA] /<a rel="$rel" title="$title" \n  /;
!         return $s;
!     }
!     else {
!         return get_my_icon('blank');
      }
  }
  
  sub make_nav_panel() {
      my $s;
!     # new iconic         rel         iconic     page title
!     $NEXT     = use_icon('next',     $NEXT,     unlinkify($NEXT_TITLE));
!     $UP       = use_icon('parent',   $UP,       unlinkify($UP_TITLE));
!     $PREVIOUS = use_icon('prev',     $PREVIOUS, unlinkify($PREVIOUS_TITLE));
!     $CONTENTS = use_icon('contents', $CONTENTS, 'Table of Contents');
!     $INDEX    = use_icon('index',    $INDEX,    'Index');
      if (!$CUSTOM_BUTTONS) {
!         $CUSTOM_BUTTONS = get_my_icon('blank');
      }
      $s = ('<table align="center" width="100%" cellpadding="0" cellspacing="2">'