зеркало из https://github.com/mozilla/pjs.git
add support for text browser characters.
This commit is contained in:
Родитель
5435f59bc5
Коммит
30a67530a4
|
@ -12,8 +12,8 @@
|
|||
# the completed string before it is returned.
|
||||
|
||||
|
||||
# $Revision: 1.10 $
|
||||
# $Date: 2001-11-14 21:59:55 $
|
||||
# $Revision: 1.11 $
|
||||
# $Date: 2001-12-03 19:48:47 $
|
||||
# $Author: kestes%walrus.com $
|
||||
# $Source: /home/jrmuizel/cvs-mirror/mozilla/webtools/tinderbox2/src/lib/HTMLPopUp.pm,v $
|
||||
# $Name: $
|
||||
|
@ -121,6 +121,34 @@ $DEFAULT_POPUP_WIDTH = 425;
|
|||
|
||||
|
||||
|
||||
# People who use the text browser 'links'
|
||||
# (http://artax.karlin.mff.cuni.cz/~mikulas/links/) would like to
|
||||
# see colors in the tinderbox table cells. Links will not render
|
||||
# background colors but it will render foreground colors. So we
|
||||
# add characters in the same color as the background just for
|
||||
# these browsers, others will not see these characters because
|
||||
# they will disapear into the background color.
|
||||
|
||||
sub text_browser_color_string {
|
||||
my ($cell_color, $char) = @_;
|
||||
|
||||
my $cell_options;
|
||||
if ( $cell_color ) {
|
||||
$cell_options = "color=$cell_color";
|
||||
}
|
||||
|
||||
my $out = (
|
||||
|
||||
"<font $cell_options>".
|
||||
"$char".
|
||||
"</font>".
|
||||
|
||||
"");
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
# Turn a time in 'time() format' into a string suitable for html
|
||||
# printing. eg '05/31 14:59'
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче