Annotation of loncom/publisher/publisher.html, revision 1.11

1.1       www         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;
1.7       www         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:    }
1.1       www        15: }
                     16: 
1.4       www        17: function getdfilename() {
                     18:   document.dpublisher.filename.value=parent.LONCAPAToBePublished.location.href;
1.6       www        19:   if (document.dpublisher.filename.value.indexOf('/adm/pubdir')==-1) {
                     20:       document.dpublisher.submit();
                     21:   }
1.4       www        22: }
                     23: 
1.9       www        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.submit();
                     28:   }
                     29: }
                     30: 
1.4       www        31: function getrfilename() {
                     32:   document.rpublisher.filename.value=parent.LONCAPAToBePublished.location.href;
1.8       www        33:    if ((document.rpublisher.filename.value.charAt(
                     34:         document.rpublisher.filename.value.length-1)!='/') &&
                     35:        (document.rpublisher.filename.value.indexOf('/adm/pubdir')==-1)) {
                     36:         document.rpublisher.submit();
                     37:    } else {
                     38:       alert('Cannot retrieve directory');
                     39:    }
1.4       www        40: }
                     41: 
1.11    ! www        42: function getdelfilename() {
        !            43:   document.del.filename.value=parent.LONCAPAToBePublished.location.href;
        !            44:   document.del.submit();
        !            45: }
        !            46: 
        !            47: function getrenamefilename() {
        !            48:   document.rename.filename.value=parent.LONCAPAToBePublished.location.href;
        !            49:   document.rename.submit();
        !            50: }
        !            51: 
        !            52: function getnewdirfilename() {
        !            53:   document.newdir.filename.value=parent.LONCAPAToBePublished.location.href;
        !            54:    if ((document.newdir.filename.value.charAt(
        !            55:         document.newdir.filename.value.length-1)!='/') &&
        !            56:        (document.newdir.filename.value.indexOf('/adm/pubdir')==-1)) {
        !            57:       alert('Must create new subdirectory inside a directory');
        !            58:    } else {
        !            59:       document.newdir.submit();
        !            60:    }
        !            61: }
        !            62: 
1.1       www        63: </script>
                     64: </head>
                     65: <body bgcolor="#FFFFFF">
1.9       www        66: <table border=2><tr><td>
1.7       www        67: <form name="publisher" action="/adm/publish" target="_parent" method="post">
1.1       www        68: <input type="hidden" name="filename" value="">
1.7       www        69: <input type="button" value="Publish this Resource" onClick="getfilename();">
1.11    ! www        70: </form>
        !            71: </td><td>
1.5       www        72: <form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished" 
1.6       www        73: method="post">
1.4       www        74: <input type="hidden" name="filename" value="">
1.6       www        75: <input type="button" value="List Directory" onClick="getdfilename();">
1.4       www        76: </form></td><td>
1.8       www        77: <form name="rpublisher" action="/adm/retrieve" target="_parent" method="post">
1.4       www        78: <input type="hidden" name="filename" value="">
1.8       www        79: <input type="button" value="Retrieve Old Version" onClick="getrfilename();">
1.4       www        80: </form></td><td>
1.9       www        81: <form name="upublisher" action="/adm/upload" target="_parent" 
                     82: method="post" enctype="multipart/form-data">
                     83: <input type="hidden" name="filename" value="">
1.11    ! www        84: <input type="file" name="upfile" size="10">
1.9       www        85: <input type="button" value="Upload file" onClick="getufilename();">
                     86: </form>
1.11    ! www        87: </td></tr>
        !            88: <tr>
        !            89: <td>
        !            90: <form name="del" action="/adm/cfile" target="_parent" method="post">
        !            91: <input type="hidden" name="filename" value="">
        !            92: <input type="hidden" name="action" value="delete">
        !            93: <input type="button" value="Delete" onClick="getdelfilename();">
        !            94: </form></td><td colspan=2>
        !            95: <form name="rename" action="/adm/cfile" target="LONCAPAToBePublished" 
        !            96: method="post">
        !            97: <input type="hidden" name="filename" value="">
        !            98: <input type="hidden" name="action" value="rename">
        !            99: <input type="text" size=15 name="newfilename" value="">
        !           100: <input type="button" value="Rename" onClick="getrenamefilename();">
        !           101: </form></td><td>
        !           102: <form name="newdir" action="/adm/cfile" target="_parent" method="post">
        !           103: <input type="hidden" name="filename" value="">
        !           104: <input type="hidden" name="action" value="newdir">
        !           105: <input type="text" size=15 name="newfilename" value="">
        !           106: <input type="button" value="New Subdirectory" onClick="getnewdirfilename();">
        !           107: </form></td>
        !           108: </tr>
        !           109: </table>
1.1       www       110: </body>
1.11    ! www       111: </html>
        !           112: 

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