[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 08 Apr 2004 21:10:25 -0000
albertel Thu Apr 8 17:10:25 2004 EDT
Modified files:
/loncom/interface londocs.pm
Log:
- okay now works in all cases that I can think of and poke at,
- mad the size of the bread crumb trail a bit larger
- when 'Reinit' it takes you back to the same place you started from
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.116 loncom/interface/londocs.pm:1.117
--- loncom/interface/londocs.pm:1.116 Wed Apr 7 18:32:18 2004
+++ loncom/interface/londocs.pm Thu Apr 8 17:10:25 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.116 2004/04/07 22:32:18 albertel Exp $
+# $Id: londocs.pm,v 1.117 2004/04/08 21:10:25 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -273,7 +273,9 @@
&Apache::lonhtmlcommon::add_breadcrumb(
{'href'=>$url,
'title'=>&Apache::lonnet::unescape($foldername),
- 'text'=>&Apache::lonnet::unescape($foldername)});
+ 'text'=>'<font size="+1">'.
+ &Apache::lonnet::unescape($foldername).'</font>'
+ });
}
@@ -874,7 +876,9 @@
$r->print(
'<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'.
'<form method="post" action="/adm/roles" target="loncapaclient">'.
-'<input type="hidden" name="orgurl" value="/adm/coursedocs" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'.
+'<input type="hidden" name="orgurl" value="/adm/coursedocs?folderpath='.
+&Apache::lonnet::escape($ENV{'form.folderpath'}).
+'" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'.
&mt('Changes will become active for your current session after').
' <input type="hidden" name="'.
$ENV{'request.role'}.'" value="1" /><input type="button" value="'.
@@ -1148,14 +1152,13 @@
&mt('Editing the Table of Contents for your Course')));
}
# --------------------------------------------------------- Standard documents
- #my $htmlfoldername=&HTML::Entities::encode($ENV{'form.foldername'},'<>&"');
$r->print('<table border=2 cellspacing=4 cellpadding=4>');
if (($standard) && ($allowed) && (!$forcesupplement)) {
$r->print('<tr><td bgcolor="#BBBBBB">');
# '<h2>'.&mt('Main Course Documents').
# ($allowed?' '.$help{'Main_Course_Documents'}:'').'</h2>');
my $folder=$ENV{'form.folder'};
- if ($folder eq '') {
+ if ($folder eq '' || $folder eq 'supplemental') {
$folder='default';
$ENV{'form.folderpath'}='default&'.&Apache::lonnet::escape(&mt('Main Course Documents'));
}
@@ -1163,7 +1166,7 @@
if ($folder eq 'default') {
$r->print('<script>this.window.name="loncapaclient";</script>');
} else {
- $postexec='self.close();';
+ #$postexec='self.close();';
}
$hadchanges=0;
&editor($r,$coursenum,$coursedom,$folder,$allowed);
@@ -1313,9 +1316,13 @@
# '<h2>'.&mt('Supplemental Course Documents').
# ($allowed?' '.$help{'Supplemental'}:'').'</h2>');
my $folder=$ENV{'form.folder'};
- unless ($folder=~/supplemental/) {
+ unless ($folder=~/^supplemental/) {
$folder='supplemental';
- $ENV{'form.folderpath'}='supplemental&'.&Apache::lonnet::escape(&mt('Supplemental Course Documents'));;
+ }
+ if ($folder =~ /^supplemental$/ &&
+ $ENV{'form.folderpath'} =~ /^default\&/) {
+ $ENV{'form.folderpath'}='supplemental&'.
+ &Apache::lonnet::escape(&mt('Supplemental Course Documents'));
}
&editor($r,$coursenum,$coursedom,$folder,$allowed);
if ($allowed) {