version 1.66, 2003/05/16 20:47:07
|
version 1.72, 2003/05/27 15:50:29
|
Line 158 ENDINLINEMENU
|
Line 158 ENDINLINEMENU
|
} |
} |
} |
} |
|
|
|
# ===== Early call to LONCAPAreg for long-running pages, preferably used right |
|
# ===== before $r->rflush() |
|
|
|
sub regflush { |
|
return '<script type="text/javascript">'.&loadevents.'</script>'; |
|
} |
|
|
# ====================================== This gets called in the header section |
# ====================================== This gets called in the header section |
|
|
sub registerurl { |
sub registerurl { |
my $forcereg=shift; |
my $forcereg=shift; |
my $target = shift; |
my $target = shift; |
my $result = ''; |
my $result = ''; |
|
if ($ENV{'REQUEST_URI'} eq '/res/adm/pages/menu.html') { return ''; } |
my $force_title=''; |
my $force_title=''; |
if ($ENV{'request.state'} eq 'construct') { |
if ($ENV{'request.state'} eq 'construct') { |
$force_title=&Apache::lonxml::display_title(); |
$force_title=&Apache::lonxml::display_title(); |
Line 180 sub registerurl {
|
Line 187 sub registerurl {
|
((($ENV{'request.publicaccess'}) || |
((($ENV{'request.publicaccess'}) || |
(!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) && |
(!&Apache::lonnet::is_on_map($ENV{'REQUEST_URI'}))) && |
(!$forcereg))) { |
(!$forcereg))) { |
return $result. |
my $loadfunction=''; |
'<script type="text/javascript">function LONCAPAreg(){;} function LONCAPAstale(){}</script>'.$force_title; |
my $unloadfunction=''; |
|
unless (($ENV{'browser.interface'} eq 'textual') || |
|
($ENV{'environment.remote'} eq 'off') || |
|
($ENV{'request.publicaccess'})) { |
|
my $reopen=&Apache::lonmenu::reopenmenu(); |
|
$loadfunction='swmenu='.$reopen.'swmenu.windowloaded(self.name);'; |
|
$unloadfunction='swmenu='.$reopen.'swmenu.windowunloaded(self.name);'; |
|
} |
|
return $result.(<<ENDFUNCTIONS); |
|
<script type="text/javascript"> |
|
function LONCAPAreg() { |
|
$loadfunction |
|
} |
|
|
|
function LONCAPAstale() { |
|
$unloadfunction |
|
} |
|
</script> |
|
$force_title |
|
ENDFUNCTIONS |
} |
} |
# Graphical display after login only |
# Graphical display after login only |
if ($Apache::lonxml::registered && !$forcereg) { return ''; } |
if ($Apache::lonxml::registered && !$forcereg) { return ''; } |
Line 196 sub innerregister {
|
Line 222 sub innerregister {
|
my $forcereg=shift; |
my $forcereg=shift; |
my $target = shift; |
my $target = shift; |
my $result = ''; |
my $result = ''; |
|
if ($ENV{'REQUEST_URI'} eq '/res/adm/pages/menu.html') { return ''; } |
|
|
$Apache::lonxml::registered=1; |
$Apache::lonxml::registered=1; |
|
|
Line 371 var swmenu=null;
|
Line 398 var swmenu=null;
|
|
|
function LONCAPAreg() { |
function LONCAPAreg() { |
swmenu=$reopen; |
swmenu=$reopen; |
|
swmenu.windowloaded(self.name); |
swmenu.clearTimeout(swmenu.menucltim); |
swmenu.clearTimeout(swmenu.menucltim); |
$timesync |
$timesync |
$newmail |
$newmail |
Line 398 var swmenu=null;
|
Line 426 var swmenu=null;
|
'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+ |
'clearbut(2,1);clearbut(2,3);clearbut(8,1);clearbut(8,2);clearbut(8,3);'+ |
'clearbut(9,1);clearbut(9,2);clearbut(9,3);clearbut(6,3);clearbut(6,1)', |
'clearbut(9,1);clearbut(9,2);clearbut(9,3);clearbut(6,3);clearbut(6,1)', |
2000); |
2000); |
|
swmenu.windowunloaded(self.name); |
} |
} |
|
|
// END LON-CAPA Internal |
// END LON-CAPA Internal |
Line 422 var swmenu=null;
|
Line 450 var swmenu=null;
|
|
|
function LONCAPAreg() { |
function LONCAPAreg() { |
swmenu=$reopen |
swmenu=$reopen |
|
swmenu.windowloaded(self.name); |
$timesync |
$timesync |
swmenu.currentStale=1; |
swmenu.currentStale=1; |
swmenu.clearbut(2,1); |
swmenu.clearbut(2,1); |
Line 438 var swmenu=null;
|
Line 467 var swmenu=null;
|
} |
} |
|
|
function LONCAPAstale() { |
function LONCAPAstale() { |
|
swmenu=$reopen |
|
swmenu.windowunloaded(self.name); |
} |
} |
|
|
// END LON-CAPA Internal |
// END LON-CAPA Internal |
Line 450 ENDDONOTREGTHIS
|
Line 481 ENDDONOTREGTHIS
|
} |
} |
|
|
sub loadevents() { |
sub loadevents() { |
|
if ($ENV{'REQUEST_URI'} eq '/res/adm/pages/menu.html') { return ''; } |
return 'LONCAPAreg();'; |
return 'LONCAPAreg();'; |
} |
} |
|
|
sub unloadevents() { |
sub unloadevents() { |
|
if ($ENV{'REQUEST_URI'} eq '/res/adm/pages/menu.html') { return ''; } |
return 'LONCAPAstale();'; |
return 'LONCAPAstale();'; |
} |
} |
|
|
Line 566 ENDRESIZE
|
Line 599 ENDRESIZE
|
window.status='Opening LON-CAPA Remote Control'; |
window.status='Opening LON-CAPA Remote Control'; |
var menu=window.open("/res/adm/pages/menu.html","$menuname", |
var menu=window.open("/res/adm/pages/menu.html","$menuname", |
"height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5"); |
"height=350,width=150,scrollbars=no,menubar=no,top=5,left=5,screenX=5,screenY=5"); |
|
self.name='loncapaclient'; |
ENDOPEN |
ENDOPEN |
return '<script>'.$returnval.'</script>'; |
return '<script>'.$returnval.'</script>'; |
} |
} |