--- loncom/interface/loncommon.pm 2010/03/08 14:51:14 1.948 +++ loncom/interface/loncommon.pm 2010/03/10 21:25:49 1.949 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.948 2010/03/08 14:51:14 raeburn Exp $ +# $Id: loncommon.pm,v 1.949 2010/03/10 21:25:49 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1202,12 +1202,7 @@ ENDOUTPUT sub help_open_menu { my ($topic,$component_help,$faq,$bug,$stayOnPage,$width,$height,$text) = @_; - $stayOnPage = 0 if (not defined $stayOnPage); - # only use pop-up help (stayOnPage == 0) - # if environment.remote is on (using remote control UI) - if ($env{'environment.remote'} eq 'off' ) { - $stayOnPage=1; - } + $stayOnPage = 1; my $output; if ($component_help) { if (!$text) { @@ -1228,8 +1223,8 @@ sub help_open_menu { sub top_nav_help { my ($text) = @_; $text = &mt($text); - my $stay_on_page = - ($env{'environment.remote'} eq 'off' ); + my $stay_on_page = 1; + my $link = ($stay_on_page) ? "javascript:helpMenu('display')" : "javascript:helpMenu('open')"; my $banner_link = &update_help_link(undef,undef,undef,undef,$stay_on_page); @@ -1244,10 +1239,7 @@ END sub help_menu_js { my ($text) = @_; - - my $stayOnPage = - ($env{'environment.remote'} eq 'off' ); - + my $stayOnPage = 1; my $width = 620; my $height = 600; my $helptopic=&general_help(); @@ -1304,10 +1296,7 @@ sub help_open_bug { unless ($env{'user.adv'}) { return ''; } unless ($Apache::lonnet::perlvar{'BugzillaHost'}) { return ''; } $text = "" if (not defined $text); - $stayOnPage = 0 if (not defined $stayOnPage); - if ($env{'environment.remote'} eq 'off' ) { $stayOnPage=1; - } $width = 600 if (not defined $width); $height = 600 if (not defined $height); @@ -1348,10 +1337,7 @@ sub help_open_faq { unless ($env{'user.adv'}) { return ''; } unless ($Apache::lonnet::perlvar{'FAQHost'}) { return ''; } $text = "" if (not defined $text); - $stayOnPage = 0 if (not defined $stayOnPage); - if ($env{'environment.remote'} eq 'off' ) { $stayOnPage=1; - } $width = 350 if (not defined $width); $height = 400 if (not defined $height); @@ -4550,9 +4536,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 - +#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, @@ -4642,7 +4628,6 @@ sub bodytag { $role = '('.$role.')' if $role; &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']); - if ($env{'environment.remote'} eq 'off') { # No Remote if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') { return $bodytag; @@ -4698,40 +4683,6 @@ sub bodytag { } return $bodytag; - } - -# -# Top frame rendering, Remote is up -# - - my $imgsrc = $img; - if ($img =~ /^\/adm/) { - $imgsrc = &lonhttpdurl($img); - } - my $upperleft=''.$function.''; - - # 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)|; - } - - $bodytag .= qq|
$name $role
-
    -
  1. $menu
  2. -
$realm $dc_info
| unless $env{'form.inhibitmenu'}; - return(< -$upperleft - $messages  - -$titleinfo $dc_info $menu - - -ENDBODY } sub dc_courseid_toggle { @@ -5111,11 +5062,6 @@ td.LC_table_cell_checkbox { padding: 0; } -/* Preliminary fix to hide breadcrumbs inside remote control window */ -#LC_remote #LC_breadcrumbs { - display:none; -} - #LC_head_subbox { clear:both; background: #F8F8F8; /* $sidebg; */ @@ -6106,11 +6052,6 @@ ol.LC_primary_menu { margin: 0; } -span.LC_new_message{ - font-weight:bold; - color: darkred; -} - ol#LC_PathBreadcrumbs { margin: 0; } @@ -6131,6 +6072,11 @@ ol.LC_primary_menu a { text-decoration: none; } +ol.LC_primary_menu a.LC_new_message { + font-weight:bold; + color: darkred; +} + ul#LC_secondary_menu { clear: both; color: $fontmenu; @@ -6764,8 +6710,8 @@ $args - additional optional args support skip_phases -> hash ref of head -> skip the generation body -> skip all generation - no_inline_link -> if true and in remote mode, don't show the - 'Switch To Inline Menu' link +#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 @@ -6831,7 +6777,8 @@ sub start_page { return $result if $args->{'only_body'}; #Breadcrumbs for Construction Space provided by &bodytag. - if (($env{'environment.remote'} eq 'off') && ($env{'request.state'} eq 'construct')) { + if ( + $env{'request.state'} eq 'construct') { return $result; } @@ -10690,15 +10637,12 @@ sub init_user_environment { my %userenv = &Apache::lonnet::dump('environment',$domain,$username); my ($tmp) = keys(%userenv); if ($tmp !~ /^(con_lost|error|no_such_host)/i) { - # default remote control to off - if ($userenv{'remote'} ne 'on') { $userenv{'remote'} = 'off'; } } else { undef(%userenv); } if (($userenv{'interface'}) && (!$form->{'interface'})) { $form->{'interface'}=$userenv{'interface'}; } - $env{'environment.remote'}=$userenv{'remote'}; if ($userenv{'texengine'} eq 'ttm') { $clientmathml=1; } # --------------- Do not trust query string to be put directly into environment @@ -10730,9 +10674,6 @@ sub init_user_environment { $initial_env{"browser.localres"} = $form->{'localres'}; } - if ($public) { - $initial_env{"environment.remote"} = "off"; - } if ($form->{'interface'}) { $form->{'interface'}=~s/\W//gs; $initial_env{"browser.interface"} = $form->{'interface'};