--- loncom/interface/lonnavmaps.pm 2004/08/20 20:14:27 1.277
+++ loncom/interface/lonnavmaps.pm 2004/09/09 09:49:50 1.287
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.277 2004/08/20 20:14:27 matthew Exp $
+# $Id: lonnavmaps.pm,v 1.287 2004/09/09 09:49:50 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -84,7 +84,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;
}
@@ -119,6 +119,23 @@ window.status='Done.';
ENDCLOSE
}
+sub nav_control_js {
+ my $nav=($ENV{'environment.remotenavmap'} eq 'on');
+ return (<send_http_header;
+ my %toplinkitems=();
+
if ($ENV{QUERY_STRING} eq 'collapseExternal') {
&Apache::lonnet::put('environment',{'remotenavmap' => 'off'});
&Apache::lonnet::appenv('environment.remotenavmap' => 'off');
@@ -172,6 +191,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=(<