Annotation of loncom/publisher/publisher.html, revision 1.24
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;
1.14 www 26: if (document.upublisher.filename.value.indexOf('/adm/pubdir')!=-1) {
27: document.upublisher.filename.value=document.dpublisher.filename.value;
1.9 www 28: }
1.14 www 29: document.upublisher.submit();
1.9 www 30: }
31:
1.4 www 32: function getrfilename() {
33: document.rpublisher.filename.value=parent.LONCAPAToBePublished.location.href;
1.8 www 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: }
1.4 www 41: }
42:
1.24 ! albertel 43: function getactionfilename() {
! 44: document.fileaction.filename.value=parent.LONCAPAToBePublished.location.href;
! 45: var test=document.fileaction.action.selectedIndex;
! 46: if (test == 4) { // trying to create a directory
! 47: if (document.fileaction.filename.value.indexOf('/adm/pubdir')!=-1) {
! 48: document.fileaction.filename.value=document.dpublisher.filename.value;
! 49: }
! 50: if ((document.fileaction.filename.value.charAt(
! 51: document.fileaction.filename.value.length-1)!='/') &&
! 52: (document.fileaction.filename.value.indexOf('/adm/pubdir')==-1)) {
! 53: alert('Must create new subdirectory inside a directory');
! 54: return;
! 55: }
1.11 www 56: }
1.24 ! albertel 57: document.fileaction.submit();
1.11 www 58: }
1.20 www 59:
60: function getpostdata() {
61: document.printout.postdata.value=parent.LONCAPAToBePublished.location.href;
62: document.printout.submit();
63: }
1.1 www 64: </script>
1.24 ! albertel 65: </head>
! 66: <body bgcolor="#ccffdd" text='#002200' link='#003333' vlink='#006666'>
! 67: <font size="-2">
! 68: <table border="0" align="center"><tr><th bgcolor="#004400" height="20">
! 69: <table border="0" cellspacing="4"><tr valign="middle">
! 70: <form name="publisher" action="/adm/publish" target="_parent" method="post">
! 71: <td bgcolor="#ccddaa" align="center">
! 72: <input type="hidden" name="filename" value="" />
! 73: <input type="button" value="Publish this Resource" onClick="getfilename();" />
! 74: </td>
! 75: </form>
! 76: <form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished" method="post">
! 77: <td bgcolor="#ccddaa" align="center">
! 78: <input type="hidden" name="filename" value="" />
! 79: <input type="button" value="List Directory" onClick="getdfilename();" />
! 80: </td>
! 81: </form>
! 82: <form name="upublisher" action="/adm/upload" target="_parent"
! 83: method="post" enctype="multipart/form-data">
! 84: <td bgcolor="#ccddaa" valign="top" align="center">
! 85: <input type="hidden" name="filename" value="" />
! 86: <input type="file" name="upfile" size="20" />
! 87: <input type="button" value="Upload file" onClick="getufilename();" />
! 88: </td>
! 89: </form>
! 90: </tr>
! 91: <tr valign="middle">
! 92: <form name="rpublisher" action="/adm/retrieve" target="_parent" method="post">
! 93: <td bgcolor="#ccddaa" align="center">
! 94: <input type="hidden" name="filename" value="" />
! 95: <input type="button" value="Retrieve Old Version" onClick="getrfilename();" />
! 96: </td>
! 97: </form>
! 98: <form name="printout" target="_parent" action="/adm/printout" target="LONCAPAToBePublished" method="post" onSubmit="getpostdata();">
! 99: <td bgcolor="#ccddaa" align="center">
! 100: <input type="hidden" name="postdata" value="" />
! 101: <input type="button" value="Print" onClick="getpostdata();" />
! 102: </td>
! 103: </form>
! 104: <form name="fileaction" action="/adm/cfile" target="_parent" method="post">
! 105: <td bgcolor="#ccddaa" align="center">
! 106: <nobr>
! 107: <input type="hidden" name="filename" value="" />
! 108: <select name="action">
! 109: <option>Select Action</option>
! 110: <option value="newfile">New file:</option>
! 111: <option value="newhtmlfile">New HTML file:</option>
! 112: <option value="newproblemfile">New problem:</option>
! 113: <option value="newsubdir">New subdirectory:</option>
! 114: <option value="rename">Rename current file to:</option>
! 115: <option value="copy">Copy current file to:</option>
! 116: </select> <input type="text" name="filename" value="Type Name Here" onFocus="if (this.value == 'Type Name Here') this.value=''" /> <input type="button" value="Go" onClick="getactionfilename();" />
! 117: </nobr>
! 118: </td>
! 119: </form>
! 120: </td>
! 121: </form>
! 122: </tr>
! 123: </table>
! 124: </th>
! 125: </tr>
! 126: </table>
! 127: </font>
! 128: </body>
! 129: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>