--- loncom/interface/lonmenu.pm 2004/09/18 16:28:35 1.116
+++ loncom/interface/lonmenu.pm 2004/11/01 04:31:03 1.121
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.116 2004/09/18 16:28:35 albertel Exp $
+# $Id: lonmenu.pm,v 1.121 2004/11/01 04:31:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -167,7 +167,7 @@ $utility
$reloadlink
$navmaps
-
+
$lt{'launch'} |
@@ -226,6 +226,14 @@ sub innerregister {
my $forcereg=shift;
my $target = shift;
my $result = '';
+ my ($uname,$thisdisfn);
+ my $const_space = 0;
+ if ($ENV{'request.filename'} =~ /^\/home\/([^\/]+)\/public_html\/(.*)/) {
+ $const_space = 1;
+ $uname = $1;
+ $thisdisfn = $2;
+ }
+
if ($ENV{'request.noversionuri'} eq '/res/adm/pages/menu.html') { return ''; }
$Apache::lonxml::registered=1;
@@ -244,6 +252,38 @@ sub innerregister {
if ($noremote) {
$newmail='';
}
+ if ($textual && $const_space) {
+ my $formaction='/priv/'.$uname.'/'.$thisdisfn;
+ $formaction=~s/\/+/\//g;
+ my $titleinfo = '';
+ &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);
+ $newmail .= &constspaceform();
+# role and realm
+ my ($role,$realm) = &Apache::lonnet::plaintext((split(/\./,$ENV{'request.role'}))[0]);
+ unless ($realm) { $realm=' '; }
+ $newmail .= <
+
+
+$titleinfo
+ |
+
+
+ $ENV{'environment.firstname'}
+ $ENV{'environment.middlename'}
+ $ENV{'environment.lastname'}
+ $ENV{'environment.generation'}
+
+ $role
+ |
+ |
+END
+ }
if (($textual) && ($ENV{'request.symb'}) && ($ENV{'request.course.id'})) {
my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($ENV{'request.symb'});
$newmail.=$ENV{'course.'.$ENV{'request.course.id'}.'.description'};
@@ -348,7 +388,7 @@ sub innerregister {
}
}
# Finally, turn the button on or off
- if ($cfile) {
+ if ($cfile && !$const_space) {
$editbutton=&switch
('','',6,1,'cstr.gif','edit[_1]','resource[_2]',
"go('".$cfile."');","Edit this resource");
@@ -359,7 +399,19 @@ sub innerregister {
###
###
# Prepare the rest of the buttons
- my $menuitems=(<
-
+var timestart;
function wheelswitch() {
+ if (typeof(document.wheel) != 'undefined') {
+ if (typeof(document.wheel.spin) != 'undefined') {
+ var date=new Date();
+ var waited=Math.round(30-((date.getTime()-timestart)/1000));
+ document.wheel.spin.value=$message;
+ }
+ }
if (window.status=='|') {
window.status='/';
} else {
@@ -573,6 +633,8 @@ function wait() {
function main() {
canceltim=setTimeout('tim=1;',30000);
window.status='-';
+ var date=new Date();
+ timestart=date.getTime();
wait();
}
@@ -598,6 +660,25 @@ sub maincall() {
ENDMAINCALL
}
+
+sub load_remote_msg {
+ my ($lowerurl)=@_;
+
+ if (($ENV{'browser.interface'} eq 'textual') ||
+ ($ENV{'environment.remote'} eq 'off')) { return ''; }
+
+ my $esclowerurl=&Apache::lonnet::escape($lowerurl);
+ my $link=&mt('Continue on in Inline Menu mode',
+ "/adm/remote?action=collapse?url=$esclowerurl");
+ return(<
+
+
+$link
+ENDREMOTEFORM
+}
# ================================================================= Reopen menu
sub reopenmenu {
@@ -915,6 +996,20 @@ function gocmd(url,cmd) {
}
}
+function gocstr(url,filename) {
+ if (url == '/adm/cfile?action=delete') {
+ this.document.cstrdelete.filename.value = filename
+ this.document.cstrdelete.submit();
+ return;
+ }
+ if (url !='') {
+ this.document.constspace.filename.value = filename;
+ this.document.constspace.action = url;
+ this.document.constspace.submit();
+ }
+}
+
+
function catalog_info() {
loncatinfo=window.open(window.location.pathname+'.meta',"LONcatInfo",'height=320,width=280,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no');
}
@@ -937,6 +1032,19 @@ sub serverform {
ENDSERVERFORM
}
+sub constspaceform {
+ return(<
+
+
+
+ENDCONSTSPACEFORM
+}
+
+
sub get_nav_status {
my $navstatus="swmenu.w_loncapanav_flag=";
if ($ENV{'environment.remotenavmap'} eq 'on') {
|