Diff for /loncom/interface/Attic/lonremote.pm between versions 1.20 and 1.32

version 1.20, 2006/03/16 22:17:30 version 1.32, 2009/06/05 12:49:50
Line 39  use Apache::lonlocal; Line 39  use Apache::lonlocal;
 sub launchremote {  sub launchremote {
     my ($r,$lowerurl)=@_;      my ($r,$lowerurl)=@_;
     &Apache::lonnet::put('environment',{'remote' => 'on'});      &Apache::lonnet::put('environment',{'remote' => 'on'});
     &Apache::lonnet::appenv('environment.remote' => 'on');      &Apache::lonnet::appenv({'environment.remote' => 'on'});
 # -------------------------------------------------------- Menu script and info  # -------------------------------------------------------- Menu script and info
       my $brcrum = [{href=>"/adm/preferences",text=>"Set User Preferences"},
                     {href=>"/adm/remote?url=/adm/preferences&action=launch",text=>"Launch Remote Control"}];
     my $windowinfo=&Apache::lonmenu::open($env{'browser.os'});      my $windowinfo=&Apache::lonmenu::open($env{'browser.os'});
     my $startupremote=&Apache::lonmenu::startupremote($lowerurl);      my $startupremote=&Apache::lonmenu::startupremote($lowerurl);
     my $start_page = &Apache::loncommon::start_page('Remote Control',      my $start_page = &Apache::loncommon::start_page('Launch Remote Control',
     $startupremote);                                                      $startupremote,
                                                       {'bread_crumbs' => $brcrum,});
     my $end_page   = &Apache::loncommon::end_page();      my $end_page   = &Apache::loncommon::end_page();
     my $remoteinfo=&Apache::lonmenu::load_remote_msg($lowerurl);      my $remoteinfo=&Apache::lonmenu::load_remote_msg($lowerurl);
     my $setflags=&Apache::lonmenu::setflags();      my $setflags=&Apache::lonmenu::setflags();
     my $maincall=&Apache::lonmenu::maincall();      my $maincall=&Apache::lonmenu::maincall();
     my $message=&mt("Launching of the Remote Control menu will fail if pop-up window filters are active. To use the Remote Control, disable the filter for this site.");      my $message='<p class="LC_info">'
                  .&mt('Launching of the Remote Control menu will fail if pop-up window filters are active.'
                      .' To use the Remote Control, disable the filter for this site.')
                  .'</p>';
     $r->print(<<ENDLAUNCH);      $r->print(<<ENDLAUNCH);
 $start_page  $start_page
 $setflags  $setflags
Line 64  ENDLAUNCH Line 70  ENDLAUNCH
 sub collapseremote {  sub collapseremote {
     my ($r,$lowerurl)=@_;      my ($r,$lowerurl)=@_;
 # -------------------------------------------------------- Menu script and info  # -------------------------------------------------------- Menu script and info
     my $start_page = &Apache::loncommon::start_page('Collapse Remote Control');      my $brcrum = [{href=>"/adm/preferences",text=>"Set User Preferences"},
                     {href=>"/adm/remote?url=/adm/preferences&action=collapse",text=>"Collapse Remote Control"}];
       my $start_page = 
           &Apache::loncommon::start_page('Collapse Remote Control',
                                          undef,
                                          {'bread_crumbs' => $brcrum,
                                           'no_inline_link' => 1,});
     my $end_page  =  &Apache::loncommon::end_page();      my $end_page  =  &Apache::loncommon::end_page();
     my $windowinfo=&Apache::lonmenu::close();      my $windowinfo=&Apache::lonmenu::close();
 #    my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='.$lowerurl.'">';  #    my $switch='<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='.$lowerurl.'" />';
     my $message='<p>'.&mt("The external menu (Remote Control) has been disabled, and you will be working with the smaller inline menu.\nYou may have either closed the Remote Control window, or it was blocked by a pop-up window filter in your browser.\nTo use the Remote Control, disable the filter for this site, and re-launch the Remote Control from the inline menu.").'</p>';       my $message='<div class="LC_warning"><b>'.&mt('The external menu (Remote Control) has been disabled, and you will be working with the smaller inline menu.').'</b></div>'."\n".
                   '<p>'.&mt('You may have either closed the Remote Control window, or it was blocked by a pop-up window filter in your browser.').'<br />'."\n".
                   &mt('To use the Remote Control, disable the filter for this site, and re-launch the Remote Control.').'</p>'."\n".
                   '<table><tr><td><fieldset><legend>'.&mt('Actions').'</legend><table><tr>'."\n".
                   '<td class="LC_menubuttons_text" align="left">'.
                   '<a class="LC_menubuttons_link" href="/adm/remote?action=launch"><img alt="Launch Remote Control" src="/res/adm/pages/network-wireless.png" class="LC_noBorder" />'.
                   &mt('Re-launch Remote Control').'</a></td><td>'.('&nbsp;'x3).'</td>'.
                   '<td class="LC_menubuttons_link" align="right">'.
                   '<a class="LC_menubuttons_link" href="'.$lowerurl.'"><img alt="Launch Remote Control" src="/res/adm/pages/forw.png" class="LC_noBorder" />'.
                   &mt('Continue without Remote Control').'</a></td></tr></table>'.
                   '</fieldset></td></tr></table>'."\n".
                   '<p>'.&mt('Assuming no pop-up blocking, the Remote Control can be launched at any time from the [_1]Set User Preferences[_2] page, linked to in the [_3]Main Menu[_2].','<a href="/adm/preferences">','</a>','<a href="/adm/menu">').'</span></p>';
     $r->print(<<ENDCOLLAPSE);      $r->print(<<ENDCOLLAPSE);
 $start_page  $start_page
 $windowinfo  $windowinfo
 <p>  
 $message  $message
 </p>  
 <a href="$lowerurl">Continue</a>  
 $end_page  $end_page
 ENDCOLLAPSE  ENDCOLLAPSE
    &Apache::lonnet::put('environment',{'remote' => 'off'});      &Apache::lonnet::put('environment',{'remote' => 'off'});
    &Apache::lonnet::appenv('environment.remote' => 'off');      &Apache::lonnet::appenv({'environment.remote' => 'off'});
 }  }
   
 sub handler {  sub handler {

Removed from v.1.20  
changed lines
  Added in v.1.32


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>