--- loncom/interface/lonindexer.pm 2007/06/27 23:27:23 1.163
+++ loncom/interface/lonindexer.pm 2007/07/11 20:40:28 1.171
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Directory Indexer
#
-# $Id: lonindexer.pm,v 1.163 2007/06/27 23:27:23 banghart Exp $
+# $Id: lonindexer.pm,v 1.171 2007/07/11 20:40:28 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -128,7 +128,6 @@ sub handler {
if ($env{'form.launch'} eq '1') {
&start_fresh_session(\%dbfile);
}
-
while(my($key,$value)=each(%dbfile)) {
$hash{$key}=$value;
}
@@ -242,7 +241,7 @@ END
#
#
if (!defined($mode) || ($mode ne 'edit' && $mode ne 'parmset')) {
- my $location = "/adm/groupsort?catalogmode=import&";
+ my $location = "/adm/groupsort?&inhibitmenu=yes&catalogmode=import&";
$location .= "mode=".$mode."&";
$location .= "acts=";
$catalogmodefunctions=<<"END";
@@ -346,7 +345,9 @@ function queue(val) {
END
}
+ my $inhibit_menu = "+'&".&Apache::loncommon::inhibit_menu_check()."'";
# ---------------------------------------------------------------- Print Header
+
my $js = <<"ENDHEADER";
ENDHEADER
@@ -409,11 +412,10 @@ ENDHEADER
$ac++;
}
# sorting through the actions and changing the global database hash
- foreach (sort {$achash{$a}<=>$achash{$b}} (keys %ahash)) {
- my $key=$_;
+ foreach my $key (sort {$achash{$a}<=>$achash{$b}} (keys %ahash)) {
if ($ahash{$key} eq '1') {
$hash{'store_'.$hash{'pre_'.$key.'_link'}}=
- $hash{'pre_'.$key.'_title'};
+ $hash{'pre_'.$key.'_title'};
$hash{'storectr_'.$hash{'pre_'.$key.'_link'}}=
$hash{'storectr'}+0;
$hash{'storectr'}++;
@@ -498,6 +500,7 @@ ENDHEADER
$closebutton $groupimportbutton
END
+ $r->print(&Apache::loncommon::inhibit_menu_check('input'));
# -------------- Filter out sequence containment in crumbs and "recent folders"
my $storeuri=$uri;
$storeuri='/'.(split(/\.(page|sequence)\/\//,$uri))[-1];
@@ -513,7 +516,7 @@ END
if ($reshome) {
$r->print("print('javascript:document.forms.fileattr.action="'.$reshome.'";document.forms.fileattr.submit();');
+ $r->print('javascript:document.forms.fileattr.action="'.&Apache::loncommon::inhibit_menu_check($reshome).'";document.forms.fileattr.submit();');
} else {
$r->print($reshome);
}
@@ -524,8 +527,10 @@ END
&Apache::loncommon::storeresurl($storeuri);
&Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri);
# -------------------------------------------------- Check All and Uncheck all
- $r->print('
');
- $r->print('');
+ if ($env{'form.catalogmode'} eq 'import') {
+ $r->print('
');
+ $r->print('');
+ }
# ----------------- output starting row to the indexed file/directory hierarchy
my $titleclr="#ddffff";
#$r->print(&initdebug());
@@ -847,6 +852,7 @@ sub display_line {
'document.forms.fileattr.acts.value)" '.
'enctype="application/x-www-form-urlencoded"'.
'>'."\n");
+ $r->print(&Apache::loncommon::inhibit_menu_check('input'));
$r->print (''."\n");
$r->print (''."\n");
@@ -920,7 +926,11 @@ sub display_line {
# display file
if (($fnptr == 0 and $filecom[3] ne '') or $absolute) {
+ my $title;
my $filelink = $pathprefix.$filecom[0];
+ if ($hash{'display_attrs_0'} == 1) {
+ $title = &Apache::lonnet::gettitle($filelink);
+ }
my @file_ext = split (/\./,$listname);
my $curfext = $file_ext[-1];
if (@Omit) {
@@ -953,6 +963,10 @@ sub display_line {
$r->print(" />\n");
$r->print("