[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm
droeschl
droeschl@source.lon-capa.org
Tue, 02 Jun 2009 17:25:03 -0000
droeschl Tue Jun 2 17:25:03 2009 EDT
Modified files:
/loncom/interface lonmenu.pm
Log:
Removed textual interface fragments.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.268 loncom/interface/lonmenu.pm:1.269
--- loncom/interface/lonmenu.pm:1.268 Tue May 26 20:30:28 2009
+++ loncom/interface/lonmenu.pm Tue Jun 2 17:25:03 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.268 2009/05/26 20:30:28 droeschl Exp $
+# $Id: lonmenu.pm,v 1.269 2009/06/02 17:25:03 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -26,15 +26,10 @@
# http://www.lon-capa.org/
#
#
-# There are two parameters controlling the action of this module:
-#
-# browser.interface - if this is 'textual', it overrides the second parameter
-# and goes to screen reader PDA mode
+# There is one parameter controlling the action of this module:
#
# environment.remote - if this is 'on', the routines controll the remote
-# control, otherwise they render the main window controls; ignored it
-# browser.interface is 'textual'
-#
+# control, otherwise they render the main window controls;
=head1 NAME
@@ -350,8 +345,7 @@
if ($env{'request.state'} eq 'construct') {
$force_title=&Apache::lonxml::display_title();
}
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off') ||
+ if (($env{'environment.remote'} eq 'off') ||
((($env{'request.publicaccess'}) ||
(!&Apache::lonnet::is_on_map(
&unescape($env{'request.noversionuri'})))) &&
@@ -734,7 +728,7 @@
} else {
# ========================================== This can or will not be registered
if ($noremote) {
-# Not registered, textual
+# Not registered
$result= (<<ENDDONOTREGTEXT);
ENDDONOTREGTEXT
} else {
@@ -825,8 +819,7 @@
sub startupremote {
my ($lowerurl)=@_;
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ if ($env{'environment.remote'} eq 'off') {
return ('<meta HTTP-EQUIV="Refresh" CONTENT="0.5; url='.$lowerurl.'" />');
}
#
@@ -901,8 +894,7 @@
}
sub maincall() {
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
return(<<ENDMAINCALL);
<script type="text/javascript">
main();
@@ -913,8 +905,7 @@
sub load_remote_msg {
my ($lowerurl)=@_;
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $esclowerurl=&escape($lowerurl);
my $link=&mt('[_1]Continue[_2] on in Inline Menu mode'
@@ -938,8 +929,7 @@
sub reopenmenu {
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $menuname = &get_menu_name();
my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
return('window.open('.$nothing.',"'.$menuname.'","",false);');
@@ -948,8 +938,7 @@
sub open {
my $returnval='';
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ if ($env{'environment.remote'} eq 'off') {
return '<script type="text/javascript">self.name="loncapaclient";</script>';
}
my $menuname = &get_menu_name();
@@ -977,8 +966,7 @@
sub clear {
my ($row,$col)=@_;
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ unless ($env{'environment.remote'} eq 'off') {
return "\n".qq(window.status+='.';swmenu.clearbut($row,$col););
} else {
$inlineremote[10*$row+$col]='';
@@ -1003,23 +991,10 @@
my $idx=10*$row+$col;
$category_members{$cat}.=':'.$idx;
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ unless ($env{'environment.remote'} eq 'off') {
# Remote
return "\n".
qq(window.status+='.';swmenu.switchbutton($row,$col,"$img","$top","$bot","$act","$desc"););
- } elsif ($env{'browser.interface'} eq 'textual') {
-# Accessibility
- if ($nobreak==2) { return ''; }
- my $text=$top.' '.$bot;
- $text=~s/\s*\-\s*//gs;
- if ($nobreak) {
- $inlineremote[$idx]=
- '<a href="javascript:'.$act.';">'.$text.'</a>';
- } else {
- $inlineremote[$idx]="\n<br />".
- $desc.' <a href="javascript:'.$act.';">'.$text.'</a>';
- }
} else {
# Inline Remote
if ($env{'environment.icons'} ne 'classic') {
@@ -1082,8 +1057,7 @@
sub openmenu {
my $menuname = &get_menu_name();
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $nothing = &Apache::lonhtmlcommon::javascript_nothing();
return "window.open(".$nothing.",'".$menuname."');";
}
@@ -1124,8 +1098,7 @@
sub rawconfig {
my $textualoverride=shift;
my $output='';
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ unless ($env{'environment.remote'} eq 'off') {
$output.=
"window.status='Opening Remote Control';var swmenu=".&openmenu().
"\nwindow.status='Configuring Remote Control ';";
@@ -1258,8 +1231,7 @@
$uname,$udom,$rol,$crs,$pub,$con,$row,$col,$prt,$img,$top,$bot,$act,$desc,$cat);
}
}
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) {
+ unless ($env{'environment.remote'} eq 'off') {
$output.="\nwindow.status='Synchronizing Time';swmenu.syncclock(1000*".time.");\nwindow.status='Remote Control Configured.';";
if (&Apache::lonmsg::newmail()) {
$output.='swmenu.setstatus("you have","messages");';
@@ -1272,8 +1244,7 @@
# ======================================================================= Close
sub close {
- if (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off')) { return ''; }
+ if ($env{'environment.remote'} eq 'off') { return ''; }
my $menuname = &get_menu_name();
return(<<ENDCLOSE);
<script type="text/javascript">
@@ -1315,8 +1286,10 @@
sub utilityfunctions {
my $caller = shift;
- unless (($env{'browser.interface'} eq 'textual') ||
- ($env{'environment.remote'} eq 'off') || ($caller eq '/adm/menu')) { return ''; }
+ unless ($env{'environment.remote'} eq 'off' ||
+ $caller eq '/adm/menu') {
+ return ''; }
+
my $currenturl=&Apache::lonnet::clutter(&Apache::lonnet::fixversion((split(/\?/,$env{'request.noversionuri'}))[0]));
$currenturl=&Apache::lonenc::check_encrypt(&unescape($currenturl));