--- loncom/interface/lonnavmaps.pm 2004/08/13 20:12:11 1.275 +++ loncom/interface/lonnavmaps.pm 2005/02/17 08:29:43 1.316 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.275 2004/08/13 20:12:11 albertel Exp $ +# $Id: lonnavmaps.pm,v 1.316 2005/02/17 08:29:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,9 +33,12 @@ use strict; use Apache::Constants qw(:common :http); use Apache::loncommon(); use Apache::lonmenu(); +use Apache::lonenc(); use Apache::lonlocal; +use Apache::lonnet; use POSIX qw (floor strftime); -use Data::Dumper; # for debugging, not always used +use Data::Dumper; # for debugging, not always +use Time::HiRes qw( gettimeofday tv_interval ); # symbolic constants sub SYMB { return 1; } @@ -84,7 +87,7 @@ my %colormap = my $hurryUpColor = "#FF0000"; sub launch_win { - my ($mode,$script)=@_; + my ($mode,$script,$toplinkitems)=@_; my $result; if ($script ne 'no') { $result.=''; } if ($mode eq 'link') { - $result.='' - .&mt("Launch navigation in separate window")." "; + &add_linkitem($toplinkitems,'launchnav','launch_navmapwin()', + "Launch navigation window"); } return $result; } @@ -140,7 +143,7 @@ sub handler { sub real_handler { my $r = shift; - + #my $t0=[&gettimeofday()]; # Handle header-only request if ($r->header_only) { if ($ENV{'browser.mathml'}) { @@ -161,6 +164,8 @@ sub real_handler { &Apache::loncommon::no_cache($r); $r->send_http_header; + my %toplinkitems=(); + &add_linkitem(\%toplinkitems,'blank','',"Select Action"); if ($ENV{QUERY_STRING} eq 'collapseExternal') { &Apache::lonnet::put('environment',{'remotenavmap' => 'off'}); &Apache::lonnet::appenv('environment.remotenavmap' => 'off'); @@ -172,9 +177,17 @@ sub real_handler { swmenu.clearTimeout(swmenu.menucltim); $navstatus MENU + } else { + my $nothing = &Apache::lonhtmlcommon::javascript_nothing(); + my $mainwindow='window.open('.$nothing.',"loncapaclient","",false);'; + $menu=(<