version 1.172, 2007/07/11 23:51:19
|
version 1.175, 2007/08/02 00:10:59
|
Line 106 sub handler {
|
Line 106 sub handler {
|
|
|
my $fileclr='#ffffe6'; |
my $fileclr='#ffffe6'; |
my $line; |
my $line; |
my (@attrchk,@openpath); |
my (@attrchk,@openpath,%typechk); |
my $uri=$r->uri; |
my $uri=$r->uri; |
|
|
# -------------------------------------- see if called from an interactive mode |
# -------------------------------------- see if called from an interactive mode |
Line 135 sub handler {
|
Line 135 sub handler {
|
untie(%dbfile); |
untie(%dbfile); |
} |
} |
} |
} |
|
# - Evaluate actions from previous page (both cumulatively and chronologically) |
|
if ($env{'form.catalogmode'} eq 'import' || $hash{'form.catalogmode'} eq 'import') { |
|
&Apache::groupsort::update_actions_hash(\%hash); |
|
} |
|
|
{ |
{ |
#Hijack lonindexer to verify a title and be close down. |
#Hijack lonindexer to verify a title and be close down. |
if ($env{'form.launch'} eq '2') { |
if ($env{'form.launch'} eq '2') { |
Line 269 END
|
Line 274 END
|
function select_data(url) { |
function select_data(url) { |
var location = "/res/?launch=2&form=$form&element=$element&titleelement=$titleelement&acts=" + url; |
var location = "/res/?launch=2&form=$form&element=$element&titleelement=$titleelement&acts=" + url; |
window.location=location; |
window.location=location; |
|
if (window.opener.document.forms["$form"].elements["$element"].value != url) { |
|
window.opener.unClean(); |
|
} |
} |
} |
function select_group() { |
function select_group() { |
window.location="$location"+document.forms.fileattr.acts.value; |
window.location="$location"+document.forms.fileattr.acts.value; |
Line 351 END
|
Line 359 END
|
|
|
my $js = <<"ENDHEADER"; |
my $js = <<"ENDHEADER"; |
<script type="text/javascript"> |
<script type="text/javascript"> |
$catalogmodefunctions |
$catalogmodefunctions; |
|
function update_only(field) { |
|
alert(field.name); |
|
} |
function checkAll() { |
function checkAll() { |
var numForms = document.forms.length; |
var numForms = document.forms.length; |
for (i=0;i<numForms;i++) { |
for (i=0;i<numForms;i++) { |
Line 398 ENDHEADER
|
Line 409 ENDHEADER
|
my ($headerdom)=($uri=~m{^/res/($match_domain)/}); |
my ($headerdom)=($uri=~m{^/res/($match_domain)/}); |
$r->print(&Apache::loncommon::start_page('Browse Resources',$js, |
$r->print(&Apache::loncommon::start_page('Browse Resources',$js, |
{'domain' => $headerdom,})); |
{'domain' => $headerdom,})); |
# - Evaluate actions from previous page (both cumulatively and chronologically) |
# ---------------------------------- get state of file types to be showing |
if ($env{'form.catalogmode'} eq 'import') { |
if ($env{'form.only'}) { |
&Apache::groupsort::update_actions_hash(\%hash); |
if ($env{'form.only'} eq 'problem' ) { |
|
$typechk{'problem'} = 'selected'; |
|
} elsif ($env{'form.only'} eq 'gif,jpg,jpeg' ) { |
|
$typechk{'graphic'} = 'selected'; |
|
} |
|
} else { |
|
$typechk{'all'} = 'selected'; |
} |
} |
|
|
|
|
# ---------------------------------- get state of file attributes to be showing |
# ---------------------------------- get state of file attributes to be showing |
if ($env{'form.attrs'}) { |
if ($env{'form.attrs'}) { |
for (my $i=0; $i<=11; $i++) { |
for (my $i=0; $i<=11; $i++) { |
Line 434 ENDHEADER
|
Line 452 ENDHEADER
|
'sr' => 'Show resource', |
'sr' => 'Show resource', |
'li' => 'Linked/Related Resources', |
'li' => 'Linked/Related Resources', |
'av' => 'All versions', |
'av' => 'All versions', |
'ud' => 'Update Display' |
'ud' => 'Update Display', |
|
'pr' => 'Problems', |
|
'gr' => 'Graphics', |
|
'at' => 'All types' |
); |
); |
$r->print(<<END); |
$r->print(<<END); |
<form method="post" name="fileattr" action="$uri" |
<form method="post" name="fileattr" action="$uri" |
Line 461 ENDHEADER
|
Line 482 ENDHEADER
|
</tr> |
</tr> |
</table> |
</table> |
<input type="hidden" name="attrs" value="1" /> |
<input type="hidden" name="attrs" value="1" /> |
|
<label><select name="only" onClick="this.form.submit()"> |
|
<option value='problem' $typechk{'problem'}>Problems</option> |
|
<option value='gif,jpg,jpeg' $typechk{'graphic'}>Graphics</option> |
|
<option value='' $typechk{'all'}>All</option> |
|
</select>File Types Displayed</label> |
|
<br /> |
<input type="submit" name="updatedisplay" value="$lt{'ud'}" /> |
<input type="submit" name="updatedisplay" value="$lt{'ud'}" /> |
<input type="hidden" name="acts" value="" /> |
<input type="hidden" name="acts" value="" /> |
$closebutton $groupimportbutton |
$closebutton $groupimportbutton |