version 1.74, 2005/06/10 21:45:46
|
version 1.77, 2006/05/23 18:31:13
|
Line 405 sub attemptread {
|
Line 405 sub attemptread {
|
# --------------------------------------------------------- Build up RAT screen |
# --------------------------------------------------------- Build up RAT screen |
sub ratedt { |
sub ratedt { |
my ($r,$url)=@_; |
my ($r,$url)=@_; |
my $frameset = '<frameset rows="1,70,*" border="0">'; |
my %layout = ('border' => "0"); |
if ($env{'environment.remote'} eq 'off') { |
if ($env{'environment.remote'} eq 'off') { |
$frameset = '<frameset rows="1,250,*" border="0">'; |
$layout{'rows'} = "1,250,*"; |
|
} else { |
|
$layout{'rows'} = "1,70,*"; |
} |
} |
$r->print(<<ENDDOCUMENT); |
my $js =' |
|
<script type="text/javascript"> |
<html> |
|
<head> |
|
<script language="JavaScript"> |
|
var flag=0; |
var flag=0; |
</script> |
</script>'; |
</head> |
|
$frameset |
my $start_page = |
<frame name=server src="$url/loadonly/ratserver" noresize noscroll> |
&Apache::loncommon::start_page('Edit Sequence',$js, |
<frame name=code src="$url/loadonly/adveditmenu"> |
{'frameset' => 1, |
<frame name=mapout src="/adm/rat/map.html"> |
'add_entries' => \%layout}); |
</frameset> |
my $end_page = |
</html> |
&Apache::loncommon::end_page({'frameset' => 1}); |
|
|
|
$r->print(<<ENDDOCUMENT); |
|
$start_page |
|
<frame name="server" src="$url/loadonly/ratserver" noresize="noresize" |
|
noscroll="noscroll" /> |
|
<frame name="code" src="$url/loadonly/adveditmenu" /> |
|
<frame name="mapout" src="/adm/rat/map.html" /> |
|
$end_page |
ENDDOCUMENT |
ENDDOCUMENT |
} |
} |
|
|
Line 1022 sub smpedt {
|
Line 1028 sub smpedt {
|
|
|
# ----------------------------------------------------- Start simple RAT screen |
# ----------------------------------------------------- Start simple RAT screen |
my $editscript=&editscript('simple'); |
my $editscript=&editscript('simple'); |
my $bodytag=&Apache::loncommon::bodytag(undef,undef,undef, |
|
($env{'environment.remote'} ne 'off')). |
|
&Apache::loncommon::help_open_menu('','Sequence_Simple_Editor_Creation','Sequence_Simple_Editor_Creation','',6,'RAT'); |
|
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'sa' => 'Save', |
'sa' => 'Save', |
'nt' => 'New Title', |
'nt' => 'New Title', |
Line 1046 sub smpedt {
|
Line 1050 sub smpedt {
|
'pas' => 'Paste after selected', |
'pas' => 'Paste after selected', |
'reco' => 'Recover Deleted' |
'reco' => 'Recover Deleted' |
); |
); |
$r->print(<<ENDSMPHEAD); |
my $js=<<ENDJS; |
<html> |
<script type="text/javascript"> |
<head> |
|
<script> |
|
|
|
$editscript |
$editscript |
|
|
Line 1092 sub smpedt {
|
Line 1094 sub smpedt {
|
} |
} |
|
|
</script> |
</script> |
</head> |
ENDJS |
$bodytag |
|
|
my $start_page = &Apache::loncommon::start_page(undef,$js). |
|
&Apache::loncommon::help_open_menu('', |
|
'Sequence_Simple_Editor_Creation', |
|
'Sequence_Simple_Editor_Creation', |
|
'',6,'RAT'); |
|
my $end_page = &Apache::loncommon::end_page(); |
|
|
|
$r->print(<<ENDSMPHEAD); |
|
$start_page |
$buttons |
$buttons |
<font color=red>$errtext</font> |
<font color=red>$errtext</font> |
<form name=simpleedit method=post> |
<form name=simpleedit method=post> |
Line 1160 $targetwindow
|
Line 1171 $targetwindow
|
<input type=hidden name=targetdetail value="$targetdetail"> |
<input type=hidden name=targetdetail value="$targetdetail"> |
<input type=hidden name=impfortarget value="0"> |
<input type=hidden name=impfortarget value="0"> |
</form> |
</form> |
</body></html> |
$end_page |
ENDSMPHEAD |
ENDSMPHEAD |
} |
} |
|
|
# ----------------------------------------------------------------- No such dir |
# ----------------------------------------------------------------- No such dir |
sub nodir { |
sub nodir { |
my ($r,$dir)=@_; |
my ($r,$dir)=@_; |
$dir=~s/^\/home\/\w+\/public\_html//; |
$dir=~s{^/home/\w+/public_html}{}; |
$r->print(<<ENDNODIR); |
$r->print(&Apache::loncommon::start_page(undef,undef, |
<html> |
{'only_body' => 1, |
<body bgcolor='#FFFFFF'> |
'bgcolor' => '#FFFFFF',}). |
<h1>No such directory: $dir</h1> |
"<h1>No such directory: $dir</h1>". |
</body> |
&Apache::loncommon::end_page()); |
</html> |
|
ENDNODIR |
|
} |
} |
|
|
# ---------------------------------------------------------------- View Handler |
# ---------------------------------------------------------------- View Handler |
|
|
sub viewmap { |
sub viewmap { |
my ($r,$url,$adv,$errtext)=@_; |
my ($r,$url,$adv,$errtext)=@_; |
$r->print('<html>'. |
$r->print( |
&Apache::loncommon::bodytag('Edit Content of a Map'). |
&Apache::loncommon::start_page('Edit Content of a Map'). |
&Apache::loncommon::help_open_menu('','','','',6,'RAT'). |
&Apache::loncommon::help_open_menu('','','','',6,'RAT'). |
&buttons($adv)); |
&buttons($adv)); |
if ($errtext) { |
if ($errtext) { |
Line 1235 sub viewmap {
|
Line 1244 sub viewmap {
|
} |
} |
} |
} |
$r->print('</table>'); |
$r->print('</table>'); |
$r->print('</body></html>'); |
$r->print(&Apache::loncommon::end_page()); |
} |
} |
|
|
# ================================================================ Main Handler |
# ================================================================ Main Handler |