[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm lonhtmlcommon.pm
wenzelju
wenzelju@source.lon-capa.org
Mon, 23 Nov 2009 14:04:37 -0000
wenzelju Mon Nov 23 14:04:37 2009 EDT
Modified files:
/loncom/interface loncommon.pm lonhtmlcommon.pm
Log:
Changed topic_bar(). The number is not represented by an image anymore. So you are now able to call topic_bar() with a number greater than 9 or even with a letter.
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.917 loncom/interface/loncommon.pm:1.918
--- loncom/interface/loncommon.pm:1.917 Fri Nov 20 04:12:43 2009
+++ loncom/interface/loncommon.pm Mon Nov 23 14:04:36 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.917 2009/11/20 04:12:43 raeburn Exp $
+# $Id: loncommon.pm,v 1.918 2009/11/23 14:04:36 wenzelju Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5541,15 +5541,17 @@
.LC_topic_bar {
font-weight: bold;
- width: 100%;
background: $tabbg;
- vertical-align: middle;
- margin: 2ex 0ex 2ex 0ex;
+ margin: 1em 0em 1em 2em;
padding: 3px;
+ font-size: 1.2em;
}
.LC_topic_bar span {
+ left: 0.5em;
+ position: absolute;
vertical-align: middle;
+ font-size: 1.2em;
}
.LC_topic_bar img {
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.247 loncom/interface/lonhtmlcommon.pm:1.248
--- loncom/interface/lonhtmlcommon.pm:1.247 Sat Nov 21 22:36:23 2009
+++ loncom/interface/lonhtmlcommon.pm Mon Nov 23 14:04:37 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.247 2009/11/21 22:36:23 www Exp $
+# $Id: lonhtmlcommon.pm,v 1.248 2009/11/23 14:04:37 wenzelju Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1881,22 +1881,21 @@
# topic_bar
#
-# Generates a div containing an (optional) numbered (static) image followed by a
+# Generates a div containing an (optional) number with a white background followed by a
# title with a background color defined in the corresponding CSS: LC_topic_bar
# Inputs:
-# 1. number to display (corresponding static image should exist).
-# img tag will be included if arg is an integer in the range 1 to 9.
+# 1. number to display.
+# If input for number is empty only the title will be displayed.
# 2. title text to display.
# Outputs - a scalar containing html mark-up for the div.
sub topic_bar {
- my ($imgnum,$title) = @_;
- my $imgtag;
- if ($imgnum =~ /^[1-9]$/) {
- $imgtag = '<img src="/res/adm/pages/bl_step'.$imgnum.'.gif"'.
- ' alt="'.&mt('Step [_1]',$imgnum).'" /> ';
+ my ($num,$title) = @_;
+ my $number = '';
+ if ($num ne '') {
+ $number = '<span>'.$num.'</span>';
}
- return '<div class="LC_topic_bar">'.$imgtag.$title.'</div>';
+ return '<div class="LC_topic_bar">'.$number.$title.'</div>';
}
##############################################