--- loncom/interface/loncommon.pm 2010/03/16 19:55:49 1.953
+++ loncom/interface/loncommon.pm 2010/03/29 13:40:03 1.963
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.953 2010/03/16 19:55:49 droeschl Exp $
+# $Id: loncommon.pm,v 1.963 2010/03/29 13:40:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3687,10 +3687,13 @@ sub submlink {
}
if (!$symb) { $symb=&Apache::lonnet::symbread(); }
$symb=&escape($symb);
- if ($target) { $target="target=\"$target\""; }
- return ''.$text.'';
+ if ($target) { $target=" target=\"$target\""; }
+ return
+ ''.$text.'';
}
##############################################
@@ -4536,10 +4539,6 @@ Inputs:
=item * $bgcolor, used to override the bgcolor on a webpage to a specific value
-#SD
-#RC =item * $no_inline_link, if true and in remote mode, don't show the
-#RC 'Switch To Inline Menu' link
-#RC
=item * $args, optional argument valid values are
no_auto_mt_title -> prevents &mt()ing the title arg
inherit_jsmath -> when creating popup window in a page,
@@ -4557,8 +4556,13 @@ other decorations will be returned.
sub bodytag {
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,
- $no_nav_bar,$bgcolor,$no_inline_link,$args)=@_;
+ $no_nav_bar,$bgcolor,$args)=@_;
+ my $public;
+ if ((($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public'))
+ || ($env{'user.name'} eq '') && ($env{'user.domain'} eq '')) {
+ $public = 1;
+ }
if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); }
$function = &get_users_function() if (!$function);
@@ -4608,7 +4612,7 @@ sub bodytag {
}
my $name = &plainname($env{'user.name'},$env{'user.domain'});
- if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') {
+ if ($public) {
undef($role);
} else {
$name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'});
@@ -4629,7 +4633,6 @@ sub bodytag {
$role = '('.$role.')' if $role;
&get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']);
- # No Remote
if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') {
return $bodytag;
}
@@ -4666,12 +4669,12 @@ sub bodytag {
$bodytag .= qq|
$realm $dc_info
|;
#don't show menus for public users
- if($env{'user.name'} ne 'public' && $env{'user.domain'} ne 'public'){
+ if (!$public){
$bodytag .= Apache::lonmenu::secondary_menu();
$bodytag .= Apache::lonmenu::serverform();
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
if ($env{'request.state'} eq 'construct') {
- $bodytag .= &Apache::lonmenu::innerregister($forcereg,'',
+ $bodytag .= &Apache::lonmenu::innerregister($forcereg,
$args->{'bread_crumbs'});
} elsif ($forcereg) {
$bodytag .= &Apache::lonmenu::innerregister($forcereg);
@@ -4835,7 +4838,8 @@ body {
color:$font;
}
-a:focus {
+a:focus,
+a:focus img {
color: red;
background: yellow;
}
@@ -6113,7 +6117,7 @@ ul.LC_TabContent {
ul.LC_TabContent li {
vertical-align:middle;
- padding: 0 10px 0 10px;
+ padding: 0 16px 0 10px;
background-color:$tabbg;
border-bottom:solid 1px $lg_border_color;
border-right: solid 1px $font;
@@ -6129,12 +6133,14 @@ ul.LC_TabContent li {
text-decoration:none;
font-size:95%;
font-weight:bold;
- padding-right: 16px;
min-height:20px;
}
-ul.LC_TabContent li a:hover {
+ul.LC_TabContent li a:hover,
+ul.LC_TabContent li a:focus {
color: $button_hover;
+ background:none;
+ outline:none;
}
ul.LC_TabContent li:hover {
@@ -6149,6 +6155,11 @@ ul.LC_TabContent li.active {
cursor: default;
}
+ul.LC_TabContent li.active a {
+ color:$font;
+ background:#FFFFFF;
+ outline: none;
+}
#maincoursedoc {
clear:both;
}
@@ -6167,6 +6178,10 @@ ul.LC_TabContentBigger li {
color: #737373;
}
+ul.LC_TabContentBigger li.active {
+ position: relative;
+ top: 1px;
+}
ul.LC_TabContentBigger li a {
background:url('/adm/lonIcons/tabbgleft.gif') left bottom no-repeat;
@@ -6175,28 +6190,31 @@ ul.LC_TabContentBigger li a {
text-align: center;
display: block;
text-decoration: none;
+ outline: none;
}
-ul.LC_TabContentBigger li:hover a,
ul.LC_TabContentBigger li.active a {
background:url('/adm/lonIcons/tabbgleft.gif') left top no-repeat;
color:$font;
- text-decoration: underline;
}
-
ul.LC_TabContentBigger li b {
background: url('/adm/lonIcons/tabbgright.gif') no-repeat right bottom;
display: block;
float: left;
padding: 0 30px;
+ border-bottom: 1px solid $lg_border_color;
+}
+
+ul.LC_TabContentBigger li:hover b {
+ color:$button_hover;
}
-ul.LC_TabContentBigger li:hover b,
ul.LC_TabContentBigger li.active b {
background:url('/adm/lonIcons/tabbgright.gif') right top no-repeat;
color:$font;
- border-bottom: 1px solid #FFFFFF;
+ border: 0;
+ cursor:default;
}
@@ -6547,8 +6565,8 @@ sub headtag {
if (!$args->{'frameset'}) {
$result .= &Apache::lonhtmlcommon::htmlareaheaders();
}
- if ($args->{'force_register'}) {
- $result .= &Apache::lonmenu::registerurl();
+ if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) {
+ $result .= Apache::lonxml::display_title();
}
if (!$args->{'no_nav_bar'}
&& !$args->{'only_body'}
@@ -6574,7 +6592,7 @@ ADDMETA
$result .= ' LON-CAPA '.$title.''
.''
.$head_extra;
- return $result;
+ return $result.'';
}
=pod
@@ -6631,43 +6649,6 @@ sub xml_begin {
=pod
-=item * &endheadtag()
-
-Returns a uniform for LON-CAPA web pages.
-
-Inputs: none
-
-=cut
-
-sub endheadtag {
- return '';
-}
-
-=pod
-
-=item * &head()
-
-Returns a uniform complete .. section for LON-CAPA web pages.
-
-Inputs:
-
-=over 4
-
-$title - optional title for the page
-
-$head_extra - optional extra HTML to put inside the
-
-=back
-
-=cut
-
-sub head {
- my ($title,$head_extra,$args) = @_;
- return &headtag($title,$head_extra,$args).&endheadtag();
-}
-
-=pod
-
=item * &start_page()
Returns a complete .. section for LON-CAPA web pages.
@@ -6705,8 +6686,6 @@ $args - additional optional args support
skip_phases -> hash ref of
head -> skip the generation
body -> skip all generation
-#RC no_inline_link -> if true and in remote mode, don't show the
-#RC 'Switch To Inline Menu' link
no_auto_mt_title -> prevent &mt()ing the title arg
inherit_jsmath -> when creating popup window in a page,
should it have jsmath forced on by the
@@ -6737,7 +6716,7 @@ sub start_page {
if (! exists($args->{'skip_phases'}{'head'}) ) {
$result.=
&xml_begin().
- &headtag($title,$head_extra,\%head_args).&endheadtag();
+ &headtag($title,$head_extra,\%head_args);
}
if (! exists($args->{'skip_phases'}{'body'}) ) {
@@ -6751,8 +6730,7 @@ sub start_page {
$args->{'function'}, $args->{'add_entries'},
$args->{'only_body'}, $args->{'domain'},
$args->{'force_register'}, $args->{'no_nav_bar'},
- $args->{'bgcolor'}, $args->{'no_inline_link'},
- $args);
+ $args->{'bgcolor'}, $args);
}
}
@@ -6797,28 +6775,6 @@ sub start_page {
return $result;
}
-
-=pod
-
-=item * &head()
-
-Returns a complete section for LON-CAPA web pages.
-
-Inputs: $args - additional optional args supported are:
- js_ready -> return a string ready for being used in
- a javascript writeln
- html_encode -> return a string ready for being used in
- a html attribute
- frameset -> if true will start with a