--- loncom/interface/lonmenu.pm 2012/04/11 15:21:43 1.369 +++ loncom/interface/lonmenu.pm 2012/05/13 23:45:07 1.369.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369 2012/04/11 15:21:43 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.1 2012/05/13 23:45:07 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -761,6 +761,164 @@ sub edit_course_upload { return $cfile; } +sub startupremote { + my ($lowerurl)=@_; + if ($env{'environment.remote'} eq 'off') { + return (''); + } +# +# The Remote actually gets launched! +# + my $configmenu=&rawconfig(); + my $esclowerurl=&escape($lowerurl); + my $message=&mt('"Waiting for Remote Control window to load: "+[_1]','waited'); + return(< +// + +ENDREMOTESTARTUP +} + +sub setflags() { + return(< +// + +ENDSETFLAGS +} + +sub maincall() { + if ($env{'environment.remote'} eq 'off') { return ''; } + return(< +// + +ENDMAINCALL +} + +sub load_remote_msg { + my ($lowerurl)=@_; + + if ($env{'environment.remote'} eq 'off') { return ''; } + + my $esclowerurl=&escape($lowerurl); + my $link=&mt('[_1]Continue[_2] on in Inline Menu mode' + ,'' + ,''); + return(< +
+ +
+

+

$link

+ENDREMOTEFORM +} + +sub get_menu_name { + my $hostid = $Apache::lonnet::perlvar{'lonHostID'}; + $hostid =~ s/\W//g; + return 'LCmenu'.$hostid; +} + + +sub reopenmenu { + if ($env{'environment.remote'} eq 'off') { return ''; } + my $menuname = &get_menu_name(); + my $nothing = &Apache::lonhtmlcommon::javascript_nothing(); + return('window.open('.$nothing.',"'.$menuname.'","",false);'); +} + + +sub open { + my $returnval=''; + if ($env{'environment.remote'} eq 'off') { + return + ''; + } + my $menuname = &get_menu_name(); + +# unless (shift eq 'unix') { +# resizing does not work on linux because of virtual desktop sizes +# $returnval.=(< +ENDOPEN + return ''; +} + + # ================================================================== Raw Config sub clear { @@ -1076,6 +1234,28 @@ sub check_for_rcrs { return $showreqcrs; } +# ======================================================================= Close + +sub close { + if ($env{'environment.remote'} eq 'off') { return ''; } + my $menuname = &get_menu_name(); + return(< +// + +ENDCLOSE +} + sub dc_popup_js { my %lt = &Apache::lonlocal::texthash( more => '(More ...)',