File:  [LON-CAPA] / loncom / publisher / publisher.html
Revision 1.17: download - view: text, annotated - select for diffs
Thu Jul 26 12:53:48 2001 UTC (22 years, 10 months ago) by ng
Branches: MAIN
CVS tags: stable_2002_spring, stable_2001_fall, HEAD
change background color

    1: <html>
    2: <head>
    3: <title>LON-CAPA Publishing Frame</title>
    4: <script>
    5: 
    6: function getfilename() {
    7:    document.publisher.filename.value=parent.LONCAPAToBePublished.location.href;
    8:    if ((document.publisher.filename.value.charAt(
    9:         document.publisher.filename.value.length-1)!='/') &&
   10:        (document.publisher.filename.value.indexOf('/adm/pubdir')==-1)) {
   11:         document.publisher.submit();
   12:    } else {
   13:       alert('Cannot publish directory');
   14:    }
   15: }
   16: 
   17: function getdfilename() {
   18:   document.dpublisher.filename.value=parent.LONCAPAToBePublished.location.href;
   19:   if (document.dpublisher.filename.value.indexOf('/adm/pubdir')==-1) {
   20:       document.dpublisher.submit();
   21:   }
   22: }
   23: 
   24: function getufilename() {
   25:   document.upublisher.filename.value=parent.LONCAPAToBePublished.location.href;
   26:   if (document.upublisher.filename.value.indexOf('/adm/pubdir')!=-1) {
   27:       document.upublisher.filename.value=document.dpublisher.filename.value;
   28:   }
   29:   document.upublisher.submit();
   30: }
   31: 
   32: function getrfilename() {
   33:   document.rpublisher.filename.value=parent.LONCAPAToBePublished.location.href;
   34:    if ((document.rpublisher.filename.value.charAt(
   35:         document.rpublisher.filename.value.length-1)!='/') &&
   36:        (document.rpublisher.filename.value.indexOf('/adm/pubdir')==-1)) {
   37:         document.rpublisher.submit();
   38:    } else {
   39:       alert('Cannot retrieve directory');
   40:    }
   41: }
   42: 
   43: function getdelfilename() {
   44:   document.del.filename.value=parent.LONCAPAToBePublished.location.href;
   45:   document.del.submit();
   46: }
   47: 
   48: function getrenamefilename() {
   49:   document.rename.filename.value=parent.LONCAPAToBePublished.location.href;
   50:   document.rename.submit();
   51: }
   52: 
   53: function getcpfilename() {
   54:   document.cp.filename.value=parent.LONCAPAToBePublished.location.href;
   55:   document.cp.submit();
   56: }
   57: 
   58: function getnewdirfilename() {
   59:    document.newdir.filename.value=parent.LONCAPAToBePublished.location.href;
   60:    if (document.newdir.filename.value.indexOf('/adm/pubdir')!=-1) {
   61:        document.newdir.filename.value=document.dpublisher.filename.value;
   62:    }
   63:    if ((document.newdir.filename.value.charAt(
   64:         document.newdir.filename.value.length-1)!='/') &&
   65:        (document.newdir.filename.value.indexOf('/adm/pubdir')==-1)) {
   66:       alert('Must create new subdirectory inside a directory');
   67:    } else {
   68:       document.newdir.submit();
   69:    }
   70: }
   71: </script>
   72: </head>
   73: <body bgcolor="#99ff99">
   74: <table border=0><tr><th bgcolor="#aaaaaa" height=20>
   75: <table border=0><tr valign="middle">
   76: <form name="publisher" action="/adm/publish" target="_parent" method="post"><td bgcolor="#ccffcc">
   77: <input type="hidden" name="filename" value="">
   78: <input type="button" value="Publish this Resource" onClick="getfilename();">
   79: </td></form>
   80: <form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished" 
   81: method="post"><td bgcolor="#ccffcc">
   82: <input type="hidden" name="filename" value="">
   83: <input type="button" value="List Directory" onClick="getdfilename();">
   84: </td></form>
   85: <form name="cp" action="/adm/cfile" target="_parent" method="post"><td bgcolor="#ccffcc">
   86: <input type="hidden" name="filename" value="">
   87: <input type="hidden" name="action" value="copy">
   88: <input type="text" size=10 name="newfilename" value="">
   89: <input type="button" value="Copy" onClick="getcpfilename();">
   90: </td></form>
   91: <form name="upublisher" action="/adm/upload" target="_parent" 
   92: method="post" enctype="multipart/form-data"><td bgcolor="#ccffcc" valign="top">
   93: <input type="hidden" name="filename" value="">
   94: <input type="file" name="upfile" size="10">
   95: <input type="button" value="Upload file" onClick="getufilename();">
   96: </td></form></tr>
   97: 
   98: <tr valign="middle">
   99: <form name="rpublisher" action="/adm/retrieve" target="_parent" method="post"><td bgcolor="#ccffcc">
  100: <input type="hidden" name="filename" value="">
  101: <input type="button" value="Retrieve Old Version" onClick="getrfilename();">
  102: </td></form>
  103: <form name="del" action="/adm/cfile" target="_parent" method="post"><td bgcolor="#ccffcc">
  104: <input type="hidden" name="filename" value="">
  105: <input type="hidden" name="action" value="delete">
  106: <input type="button" value="Delete" onClick="getdelfilename();">
  107: </td></form>
  108: <form name="rename" action="/adm/cfile" target="_parent" method="post"><td bgcolor="#ccffcc">
  109: <input type="hidden" name="filename" value="">
  110: <input type="hidden" name="action" value="rename">
  111: <input type="text" size=10 name="newfilename" value="">
  112: <input type="button" value="Rename" onClick="getrenamefilename();">
  113: </td></form>
  114: <form name="newdir" action="/adm/cfile" target="_parent" method="post"><td bgcolor="#ccffcc">
  115: <input type="hidden" name="filename" value="">
  116: <input type="hidden" name="action" value="newdir">
  117: <input type="text" size=10 name="newfilename" value="">
  118: <input type="button" value="New Subdirectory" onClick="getnewdirfilename();">
  119: </td></form>
  120: </tr>
  121: </table>
  122: </th></tr></table>
  123: 
  124: </body>
  125: </html>
  126: 
  127: 
  128: 
  129: 

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