--- loncom/interface/lonnavmaps.pm 2004/08/13 22:08:16 1.276
+++ loncom/interface/lonnavmaps.pm 2005/02/01 21:03:13 1.314
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.276 2004/08/13 22:08:16 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.314 2005/02/01 21:03:13 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -33,9 +33,11 @@ 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
# symbolic constants
sub SYMB { return 1; }
@@ -84,7 +86,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 window")." ";
+ &add_linkitem($toplinkitems,'launchnav','launch_navmapwin()',
+ "Launch navigation window");
}
return $result;
}
@@ -161,6 +163,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,6 +176,13 @@ sub real_handler {
swmenu.clearTimeout(swmenu.menucltim);
$navstatus
MENU
+ } else {
+ my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
+ my $mainwindow='window.open('.$nothing.',"loncapaclient","",false);';
+ $menu=(<