version 1.155, 2004/12/13 01:57:10
|
version 1.156, 2004/12/14 21:10:58
|
Line 1034 sub entryline {
|
Line 1034 sub entryline {
|
$folderpath=&Apache::lonnet::escape($ENV{'form.folderpath'}); |
$folderpath=&Apache::lonnet::escape($ENV{'form.folderpath'}); |
# $htmlfoldername=&HTML::Entities::encode($ENV{'form.foldername'},'<>&"'); |
# $htmlfoldername=&HTML::Entities::encode($ENV{'form.foldername'},'<>&"'); |
} |
} |
my $pagepath; |
my ($pagepath,$pagesymb); |
if ($ENV{'form.pagepath'}) { |
if ($ENV{'form.pagepath'}) { |
$container = 'page'; |
$container = 'page'; |
$pagepath=&Apache::lonnet::escape($ENV{'form.pagepath'}); |
$pagepath=&Apache::lonnet::escape($ENV{'form.pagepath'}); |
|
$pagesymb=&Apache::lonnet::escape($ENV{'form.pagesymb'}); |
} |
} |
if ($allowed) { |
if ($allowed) { |
my $incindex=$index+1; |
my $incindex=$index+1; |
Line 1064 sub entryline {
|
Line 1065 sub entryline {
|
$line.=(<<END); |
$line.=(<<END); |
<form name="entry_$index" action="/adm/coursedocs" method="post"> |
<form name="entry_$index" action="/adm/coursedocs" method="post"> |
<input type="hidden" name="pagepath" value="$ENV{'form.pagepath'}" /> |
<input type="hidden" name="pagepath" value="$ENV{'form.pagepath'}" /> |
|
<input type="hidden" name="pagesymb" value="$ENV{'form.pagesymb'}" /> |
<input type="hidden" name="setparms" value="$orderidx" /> |
<input type="hidden" name="setparms" value="$orderidx" /> |
<td><table border='0' cellspacing='2' cellpadding='0'> |
<td><table border='0' cellspacing='2' cellpadding='0'> |
<tr><td bgcolor="#DDDDDD"> |
<tr><td bgcolor="#DDDDDD"> |
<a href='/adm/coursedocs?cmd=up_$index&pagepath=$pagepath'> |
<a href='/adm/coursedocs?cmd=up_$index&pagepath=$pagepath&pagesymb=$pagesymb'> |
<img src="${iconpath}move_up.gif" alt='$lt{'up'}' border='0' /></a></td></tr> |
<img src="${iconpath}move_up.gif" alt='$lt{'up'}' border='0' /></a></td></tr> |
<tr><td bgcolor="#DDDDDD"> |
<tr><td bgcolor="#DDDDDD"> |
<a href='/adm/coursedocs?cmd=down_$index&pagepath=$pagepath'> |
<a href='/adm/coursedocs?cmd=down_$index&pagepath=$pagepath&pagesymb=$pagesymb'> |
<img src="${iconpath}move_down.gif" alt='$lt{'dw'}' border='0' /></a></td></tr> |
<img src="${iconpath}move_down.gif" alt='$lt{'dw'}' border='0' /></a></td></tr> |
</table></td> |
</table></td> |
<td>$selectbox |
<td>$selectbox |
</td><td bgcolor="#DDDDDD"> |
</td><td bgcolor="#DDDDDD"> |
<a href='javascript:removeres("$pagepath","$index","$renametitle","page");'> |
<a href='javascript:removeres("$pagepath","$index","$renametitle","page","$pagesymb");'> |
<font size="-2" color="#990000">$lt{'rm'}</font></a> |
<font size="-2" color="#990000">$lt{'rm'}</font></a> |
<a href='javascript:changename("$pagepath","$index","$renametitle","page");'> |
<a href='javascript:changename("$pagepath","$index","$renametitle","page","$pagesymb");'> |
<font size="-2" color="#009900">$lt{'rn'}</font></a></td> |
<font size="-2" color="#009900">$lt{'rn'}</font></a></td> |
END |
END |
} else { |
} else { |
Line 1626 sub changewarning {
|
Line 1628 sub changewarning {
|
if (defined($ENV{'form.pagepath'})) { |
if (defined($ENV{'form.pagepath'})) { |
$pathvar='pagepath'; |
$pathvar='pagepath'; |
$path=&Apache::lonnet::escape($ENV{'form.pagepath'}); |
$path=&Apache::lonnet::escape($ENV{'form.pagepath'}); |
|
$path.='&symb='.&Apache::lonnet::escape($ENV{'form.pagesymb'}); |
} |
} |
$r->print( |
$r->print( |
'<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'. |
'<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'. |
Line 1700 sub handler {
|
Line 1703 sub handler {
|
my (@pagepath)=split('&',$ENV{'form.pagepath'}); |
my (@pagepath)=split('&',$ENV{'form.pagepath'}); |
$ENV{'form.pagename'}=&Apache::lonnet::unescape(pop(@pagepath)); |
$ENV{'form.pagename'}=&Apache::lonnet::unescape(pop(@pagepath)); |
$ENV{'form.folder'}=pop(@pagepath); |
$ENV{'form.folder'}=pop(@pagepath); |
$containertag = '<input type="hidden" name="pagepath" value="" />'; |
$containertag = '<input type="hidden" name="pagepath" value="" />'. |
$uploadtag = '<input type="hidden" name="pagepath" value="'.$ENV{'form.pagepath'}.'" />'; |
'<input type="hidden" name="pagesymb" value="" />'; |
|
$uploadtag = '<input type="hidden" name="pagepath" value="'.$ENV{'form.pagepath'}.'" />'. |
|
'<input type="hidden" name="pagesymb" value="'.$ENV{'form.pagesymb'}.'" />'; |
} |
} |
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) { |
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) { |
$showdoc='/'.$1; |
$showdoc='/'.$1; |
} |
} |
unless ($showdoc) { # got called from remote |
unless ($showdoc) { # got called from remote |
if (($ENV{'form.folder'}=~/^default_$/) || |
if (($ENV{'form.folder'}=~/^default_/) || |
($ENV{'form.folder'} =~ m#^\d+/(pages|sequences)/#)) { |
($ENV{'form.folder'} =~ m#^\d+/(pages|sequences)/#)) { |
$forcestandard = 1; |
$forcestandard = 1; |
} |
} |
Line 1844 function finishpick() {
|
Line 1849 function finishpick() {
|
'";this.document.forms.'+form+'.submit();'); |
'";this.document.forms.'+form+'.submit();'); |
} |
} |
|
|
function changename(folderpath,index,oldtitle,container) { |
function changename(folderpath,index,oldtitle,container,pagesymb) { |
var title=prompt('New Title',oldtitle); |
var title=prompt('New Title',oldtitle); |
if (title) { |
if (title) { |
this.document.forms.renameform.title.value=title; |
this.document.forms.renameform.title.value=title; |
Line 1854 function changename(folderpath,index,old
|
Line 1859 function changename(folderpath,index,old
|
} |
} |
if (container == 'page') { |
if (container == 'page') { |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagepath.value=folderpath; |
|
this.document.forms.renameform.pagesymb.value=pagesymb; |
} |
} |
this.document.forms.renameform.submit(); |
this.document.forms.renameform.submit(); |
} |
} |
} |
} |
|
|
function removeres(folderpath,index,oldtitle,container) { |
function removeres(folderpath,index,oldtitle,container,pagesymb) { |
if (confirm('Remove "'+oldtitle+'"?')) { |
if (confirm('Remove "'+oldtitle+'"?')) { |
this.document.forms.renameform.cmd.value='del_'+index; |
this.document.forms.renameform.cmd.value='del_'+index; |
if (container == 'sequence') { |
if (container == 'sequence') { |
Line 1867 function removeres(folderpath,index,oldt
|
Line 1873 function removeres(folderpath,index,oldt
|
} |
} |
if (container == 'page') { |
if (container == 'page') { |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagepath.value=folderpath; |
|
this.document.forms.renameform.pagesymb.value=pagesymb; |
} |
} |
this.document.forms.renameform.submit(); |
this.document.forms.renameform.submit(); |
} |
} |