version 1.3, 2005/04/07 06:56:27
|
version 1.6, 2009/02/26 16:10:49
|
Line 1
|
Line 1
|
# The LearningOnline Network with CAPA |
# The LearningOnline Network with CAPA |
# Construction Space Buttons for Top Frame |
# Construction Space Buttons for Top Frame |
# |
# |
|
# $Id$ |
|
# |
# Copyright Michigan State University Board of Trustees |
# Copyright Michigan State University Board of Trustees |
# |
# |
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
# This file is part of the LearningOnline Network with CAPA (LON-CAPA). |
Line 43 sub handler {
|
Line 45 sub handler {
|
list => 'List Directory', |
list => 'List Directory', |
uplo => 'Upload file', |
uplo => 'Upload file', |
dele => 'Delete', |
dele => 'Delete', |
edit => 'Edit Catalog Information', |
edit => 'Edit Metadata', |
sela => 'Select Action', |
sela => 'Select Action', |
nfil => 'New file', |
nfil => 'New file', |
nhtm => 'New HTML file', |
nhtm => 'New HTML file', |
Line 68 sub handler {
|
Line 70 sub handler {
|
if ($env{'request.role'} =~ m#^ca\./[^/]+/([^/]+)#) { |
if ($env{'request.role'} =~ m#^ca\./[^/]+/([^/]+)#) { |
$defaultdir = '/priv/'.$1.'/'; |
$defaultdir = '/priv/'.$1.'/'; |
} |
} |
$r->print(<<"ENDONE"); |
my $js= |
<html> |
|
<head> |
|
<title>LON-CAPA Publishing Frame</title> |
|
<script type="text/javascript"> |
<script type="text/javascript"> |
//<!-- |
//<!-- |
function frameloc() { |
function frameloc() { |
Line 166 function getpostdata() {
|
Line 165 function getpostdata() {
|
ENDONE |
ENDONE |
|
|
if ($disp eq 'dir') { |
if ($disp eq 'dir') { |
$r->print(<<"ENDDIR"); |
$js .= <<"ENDDIR"; |
function getdirname() { |
function getdirname() { |
document.publishdir.filename.value=frameloc(); |
document.publishdir.filename.value=frameloc(); |
pubdir(document.publishdir) |
pubdir(document.publishdir) |
Line 201 function forcepub(theform) {
|
Line 200 function forcepub(theform) {
|
} |
} |
ENDDIR |
ENDDIR |
} else { |
} else { |
$r->print(<<"ENDRES"); |
$js.=<<"ENDRES"; |
function getfilename() { |
function getfilename() { |
document.publisher.filename.value=frameloc(); |
document.publisher.filename.value=frameloc(); |
if ((document.publisher.filename.value.charAt( |
if ((document.publisher.filename.value.charAt( |
Line 230 function getdelfilename() {
|
Line 229 function getdelfilename() {
|
} |
} |
ENDRES |
ENDRES |
} |
} |
|
my $start_page = |
|
&Apache::loncommon::start_page('Publishing Frame',$js, |
|
{'only_body' => 1,}); |
|
my $end_page = |
|
&Apache::loncommon::end_page(); |
$r->print(<<"END"); |
$r->print(<<"END"); |
//--> |
$start_page |
</script> |
|
</head> |
|
<body bgcolor="#ccffdd" text='#002200' link='#003333' vlink='#006666'> |
|
<table border="0" align="center"><tr><th bgcolor="#004400" height="20"> |
<table border="0" align="center"><tr><th bgcolor="#004400" height="20"> |
<table border="0" cellspacing="2" cellpadding="2"><tr valign="middle"> |
<table border="0" cellspacing="2" cellpadding="2"><tr valign="middle"> |
<td bgcolor="#ccddaa" align="center"> |
<td bgcolor="#ccddaa" align="center"> |
Line 351 ENDPROBOPS
|
Line 352 ENDPROBOPS
|
</th> |
</th> |
</tr> |
</tr> |
</table> |
</table> |
</body> |
$end_page |
</html> |
|
ENDPAGE |
ENDPAGE |
} |
} |
|
|