updated to use the "title" attribute for tooltips.
This commit is contained in:
parent
eb652b0f99
commit
ec0ba5ac9f
1 changed files with 11 additions and 40 deletions
|
|
@ -34,7 +34,6 @@ A package for generating user interface buttons. The subroutines found herein do
|
|||
=head1 SYNOPSIS
|
||||
|
||||
use WebGUI::Icon;
|
||||
$html = becomeIcon('op=something');
|
||||
$html = copyIcon('op=something');
|
||||
$html = cutIcon('op=something');
|
||||
$html = deleteIcon('op=something');
|
||||
|
|
@ -56,34 +55,6 @@ These subroutines are available from this package:
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 becomeIcon ( urlParameters [, pageURL ] )
|
||||
|
||||
Generates a button with the word "Become" printed on it.
|
||||
|
||||
=over
|
||||
|
||||
=item urlParameters
|
||||
|
||||
Any URL parameters that need to be tacked on to the current URL to accomplish whatever function this button represents.
|
||||
|
||||
=item pageURL
|
||||
|
||||
The URL to any page. Defaults to the current page.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub becomeIcon {
|
||||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/become.gif" align="middle" border="0" alt="Become"></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 copyIcon ( urlParameters [, pageURL ] )
|
||||
|
||||
Generates a button with the word "Copy" printed on it.
|
||||
|
|
@ -106,7 +77,7 @@ sub copyIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/copy.gif" align="middle" border="0" alt="Copy"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/copy.gif" align="middle" border="0" alt="Copy" title="Copy" /></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -134,7 +105,7 @@ sub cutIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/cut.gif" align="middle" border="0" alt="Cut"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/cut.gif" align="middle" border="0" alt="Cut" title="Cut" /></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -162,7 +133,7 @@ sub deleteIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/delete.gif" align="middle" border="0" alt="Delete"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/delete.gif" align="middle" border="0" alt="Delete" title="Delete" /></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -190,7 +161,7 @@ sub editIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/edit.gif" align="middle" border="0" alt="Edit"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/edit.gif" align="middle" border="0" alt="Edit" title="Edit" /></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +217,7 @@ sub moveBottomIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveBottom.gif" align="middle" border="0" alt="Move To Bottom"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveBottom.gif" align="middle" border="0" alt="Move To Bottom" title="Move To Bottom" /></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -274,7 +245,7 @@ sub moveDownIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveDown.gif" align="middle" border="0" alt="Move Down"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveDown.gif" align="middle" border="0" alt="Move Down" title="Move Down" /></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -302,7 +273,7 @@ sub moveTopIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveTop.gif" align="middle" border="0" alt="Move To Top"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveTop.gif" align="middle" border="0" alt="Move To Top" title="Move To Top" /></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -330,7 +301,7 @@ sub moveUpIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveUp.gif" align="middle" border="0" alt="Move Up"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/moveUp.gif" align="middle" border="0" alt="Move Up" title="Move Up" /></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -343,7 +314,7 @@ Generates an icon that looks like a page. It's purpose is to represent whether y
|
|||
=cut
|
||||
|
||||
sub pageIcon {
|
||||
return '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/page.gif" align="middle" border="0" alt="Page Settings">';
|
||||
return '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/page.gif" align="middle" border="0" alt="Page Settings" title="Page Settings" />';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -370,7 +341,7 @@ sub viewIcon {
|
|||
my ($output, $pageURL);
|
||||
$pageURL = $_[1] || $session{page}{urlizedTitle};
|
||||
$output = '<a href="'.WebGUI::URL::gateway($pageURL,$_[0]).'">';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/view.gif" align="middle" border="0" alt="View"></a>';
|
||||
$output .= '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/view.gif" align="middle" border="0" alt="View" title="View" /></a>';
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -383,7 +354,7 @@ Generates an icon that looks like a wobject. It's purpose is to represent whethe
|
|||
=cut
|
||||
|
||||
sub wobjectIcon {
|
||||
return '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/wobject.gif" align="middle" border="0" alt="Wobject Settings">';
|
||||
return '<img src="'.$session{config}{extrasURL}.'/toolbar/'.$session{language}{toolbar}.'/wobject.gif" align="middle" border="0" alt="Wobject Settings" title="Wobject Settings" />';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue