--- loncom/interface/loncommon.pm 2012/05/23 00:29:22 1.1075.2.4 +++ loncom/interface/loncommon.pm 2012/08/07 13:15:28 1.1075.2.13 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1075.2.4 2012/05/23 00:29:22 raeburn Exp $ +# $Id: loncommon.pm,v 1.1075.2.13 2012/08/07 13:15:28 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4954,6 +4954,9 @@ Inputs: =item * $bgcolor, used to override the bgcolor on a webpage to a specific value +=item * $no_inline_link, if true and in remote mode, don't show the + 'Switch To Inline Menu' link + =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, @@ -4971,7 +4974,7 @@ other decorations will be returned. sub bodytag { my ($title,$function,$addentries,$bodyonly,$domain,$forcereg, - $no_nav_bar,$bgcolor,$args)=@_; + $no_nav_bar,$bgcolor,$no_inline_link,$args)=@_; my $public; if ((($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public')) @@ -5013,6 +5016,8 @@ sub bodytag { } if (!$realm) { $realm=' '; } +# Set messages + my $messages=&domainlogo($domain); my $extra_body_attr = &make_attr_string($forcereg,\%design); @@ -5047,11 +5052,13 @@ sub bodytag { $role = '('.$role.')' if $role; &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']); - if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') { - return $bodytag; - } + if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') { + return $bodytag; + } - if ($env{'request.state'} eq 'construct') { $forcereg=1; } + if ($env{'request.state'} eq 'construct') { $forcereg=1; } + + unless ($env{'environment.remote'} eq 'on') { # if ($env{'request.state'} eq 'construct') { # $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls @@ -5103,6 +5110,55 @@ sub bodytag { } return $bodytag; + } + +# +# Top frame rendering, Remote is up +# + + my $imgsrc = $img; + if ($img =~ /^\/adm/) { + $imgsrc = &lonhttpdurl($img); + } + my $upperleft=''; + + # Explicit link to get inline menu + my $menu= ($no_inline_link?'' + :''.&mt('Switch to Inline Menu Mode').''); + + if ($dc_info) { + $dc_info = qq|($dc_info)|; + } + + unless ($env{'form.inhibitmenu'}) { + $bodytag .= qq|
+'; + my $endbodytag; + unless ((ref($args) eq 'HASH') && ($args->{'notbody'})) { + $endbodytag=''; + } $endbodytag=&Apache::lontexconvert::jsMath_process()."\n".$endbodytag; if ( exists( $env{'internal.head.redirect'} ) ) { if (!(ref($args) eq 'HASH' && $args->{'noredirectlink'})) { @@ -6482,16 +6548,19 @@ ol.LC_primary_menu li:hover ul, ol.LC_pr position: absolute; margin: 0; padding: 0; + z-index: 2; } ol.LC_primary_menu li:hover li, ol.LC_primary_menu li.hover li { font-size: 90%; vertical-align: top; float: none; + border-left: 1px solid black; + border-right: 1px solid black; } ol.LC_primary_menu li:hover li a, ol.LC_primary_menu li.hover li a { - background-color:$data_table_light + background-color:$data_table_light; } ol.LC_primary_menu li li a:hover { @@ -6579,6 +6648,8 @@ ul#LC_secondary_menu li:hover ul, ul#LC_ list-style:none; float: none; background-color: $data_table_light; + z-index: 2; + margin-left: -1px; } ul#LC_secondary_menu li ul li { @@ -6932,6 +7003,7 @@ ul#LC_toolbar { list-style:none; position:relative; background-color:white; + overflow: auto; } ul#LC_toolbar li { @@ -6941,6 +7013,7 @@ ul#LC_toolbar li { float: left; display:inline; vertical-align:middle; + white-space: nowrap; } @@ -7090,8 +7163,8 @@ sub headtag { if (!$args->{'frameset'}) { $result .= &Apache::lonhtmlcommon::htmlareaheaders(); } - if ($args->{'force_register'} && $env{'request.noversionuri'} !~ m{^/res/adm/pages/}) { - $result .= Apache::lonxml::display_title(); + if ($args->{'force_register'}) { + $result .= &Apache::lonmenu::registerurl(1); } if (!$args->{'no_nav_bar'} && !$args->{'only_body'} @@ -7300,6 +7373,8 @@ $args - additional optional args support skip_phases -> hash ref of head -> skip the
generation body -> skip all