[LON-CAPA-cvs] cvs: loncom /auth lonauth.pm /interface lonmenu.pm
www
lon-capa-cvs@mail.lon-capa.org
Wed, 29 May 2002 14:51:43 -0000
www Wed May 29 10:51:43 2002 EDT
Modified files:
/loncom/auth lonauth.pm
/loncom/interface lonmenu.pm
Log:
For bug #54.
Needed to exclude linux/unix from automatic resizing and repositioning of
browser windows because of virtual desktop sizes (desktopsize!=screensize).
Looks like this also fixed bug 468 - "misbehavior" was apparently
(not confirmed) due to overlap of windows.
Index: loncom/auth/lonauth.pm
diff -u loncom/auth/lonauth.pm:1.30 loncom/auth/lonauth.pm:1.31
--- loncom/auth/lonauth.pm:1.30 Mon May 6 17:55:25 2002
+++ loncom/auth/lonauth.pm Wed May 29 10:51:42 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network
# User Authentication Module
#
-# $Id: lonauth.pm,v 1.30 2002/05/06 21:55:25 matthew Exp $
+# $Id: lonauth.pm,v 1.31 2002/05/29 14:51:42 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -103,6 +103,7 @@
if (($httpbrowser=~/mac/i) ||
($httpbrowser=~/powerpc/i)) { $clientos='mac'; }
if ($httpbrowser=~/win/i) { $clientos='win'; }
+ if ($httpbrowser=~/embed/i) { $clientos='pda'; }
# ------------------------------------------------------------- Get environment
@@ -162,7 +163,7 @@
$cookie="lonID=$cookie; path=/";
# -------------------------------------------------------- Menu script and info
- my $windowinfo=&Apache::lonmenu::open();
+ my $windowinfo=&Apache::lonmenu::open($clientos);
# ------------------------------------------------------------- Info for Remote
my $configmenu=&Apache::lonmenu::rawconfig($r);
# ------------------------------------------------- Output for successful login
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.21 loncom/interface/lonmenu.pm:1.22
--- loncom/interface/lonmenu.pm:1.21 Fri May 24 16:32:48 2002
+++ loncom/interface/lonmenu.pm Wed May 29 10:51:43 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.21 2002/05/24 20:32:48 www Exp $
+# $Id: lonmenu.pm,v 1.22 2002/05/29 14:51:43 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -42,17 +42,21 @@
# =============================================================== Open the menu
sub open {
-# return(<<ENDOPEN);
-#if (window.screen) {
-# self.resizeTo(screen.availWidth-215,screen.availHeight-30);
-# self.moveTo(190,15);
-#}
- return(<<ENDOPEN);
-<script>
+ my $returnval='';
+ unless (shift eq 'unix') {
+# resizing does not work on linux because of virtual desktop sizes
+ $returnval.=(<<ENDRESIZE);
+if (window.screen) {
+ self.resizeTo(screen.availWidth-215,screen.availHeight-30);
+ self.moveTo(190,15);
+}
+ENDRESIZE
+ }
+ $returnval.=(<<ENDOPEN);
var menu=window.open("/res/adm/pages/menu.html","LONCAPAmenu",
"height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5");
-</script>
ENDOPEN
+ return '<script>'.$returnval.'</script>';
}
# ============================================================ Switch Menu Item