File:  [LON-CAPA] / loncom / publisher / publisher.html
Revision 1.10: download - view: text, annotated - select for diffs
Mon Apr 9 23:58:03 2001 UTC (23 years ago) by www
Branches: MAIN
CVS tags: HEAD
Upload file field needs name

<html>
<head>
<title>LON-CAPA Publishing Frame</title>
<script>

function getfilename() {
   document.publisher.filename.value=parent.LONCAPAToBePublished.location.href;
   if ((document.publisher.filename.value.charAt(
        document.publisher.filename.value.length-1)!='/') &&
       (document.publisher.filename.value.indexOf('/adm/pubdir')==-1)) {
        document.publisher.submit();
   } else {
      alert('Cannot publish directory');
   }
}

function getdfilename() {
  document.dpublisher.filename.value=parent.LONCAPAToBePublished.location.href;
  if (document.dpublisher.filename.value.indexOf('/adm/pubdir')==-1) {
      document.dpublisher.submit();
  }
}

function getufilename() {
  document.upublisher.filename.value=parent.LONCAPAToBePublished.location.href;
  if (document.upublisher.filename.value.indexOf('/adm/pubdir')==-1) {
      document.upublisher.submit();
  }
}

function getrfilename() {
  document.rpublisher.filename.value=parent.LONCAPAToBePublished.location.href;
   if ((document.rpublisher.filename.value.charAt(
        document.rpublisher.filename.value.length-1)!='/') &&
       (document.rpublisher.filename.value.indexOf('/adm/pubdir')==-1)) {
        document.rpublisher.submit();
   } else {
      alert('Cannot retrieve directory');
   }
}

</script>
</head>
<body bgcolor="#FFFFFF">
<table border=2><tr><td>
<form name="publisher" action="/adm/publish" target="_parent" method="post">
<input type="hidden" name="filename" value="">
<input type="button" value="Publish this Resource" onClick="getfilename();">
</form></td><td>
<form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished" 
method="post">
<input type="hidden" name="filename" value="">
<input type="button" value="List Directory" onClick="getdfilename();">
</form></td><td>
<form name="rpublisher" action="/adm/retrieve" target="_parent" method="post">
<input type="hidden" name="filename" value="">
<input type="button" value="Retrieve Old Version" onClick="getrfilename();">
</form></td><td>
<form name="upublisher" action="/adm/upload" target="_parent" 
method="post" enctype="multipart/form-data">
<input type="hidden" name="filename" value="">
<input type="file" name="upfile" size="20">
<input type="button" value="Upload file" onClick="getufilename();">
</form>
</td></tr></table>
</body>
</html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>