Annotation of loncom/publisher/publisher.html, revision 1.25
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:
1.25 ! albertel 60: function getdelfilename() {
! 61: document.del.filename.value=parent.LONCAPAToBePublished.location.href;
! 62: document.del.submit();
! 63: }
! 64:
1.20 www 65: function getpostdata() {
66: document.printout.postdata.value=parent.LONCAPAToBePublished.location.href;
67: document.printout.submit();
68: }
1.1 www 69: </script>
1.24 albertel 70: </head>
71: <body bgcolor="#ccffdd" text='#002200' link='#003333' vlink='#006666'>
72: <font size="-2">
73: <table border="0" align="center"><tr><th bgcolor="#004400" height="20">
74: <table border="0" cellspacing="4"><tr valign="middle">
75: <form name="publisher" action="/adm/publish" target="_parent" method="post">
76: <td bgcolor="#ccddaa" align="center">
77: <input type="hidden" name="filename" value="" />
78: <input type="button" value="Publish this Resource" onClick="getfilename();" />
79: </td>
80: </form>
81: <form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished" method="post">
82: <td bgcolor="#ccddaa" align="center">
83: <input type="hidden" name="filename" value="" />
84: <input type="button" value="List Directory" onClick="getdfilename();" />
85: </td>
86: </form>
87: <form name="upublisher" action="/adm/upload" target="_parent"
88: method="post" enctype="multipart/form-data">
89: <td bgcolor="#ccddaa" valign="top" align="center">
90: <input type="hidden" name="filename" value="" />
91: <input type="file" name="upfile" size="20" />
92: <input type="button" value="Upload file" onClick="getufilename();" />
93: </td>
94: </form>
1.25 ! albertel 95: <form name="printout" target="_parent" action="/adm/printout" target="LONCAPAToBePublished" method="post" onSubmit="getpostdata();">
! 96: <td rowspan="2" bgcolor="#ccddaa" align="center">
! 97: <input type="hidden" name="postdata" value="" />
! 98: <input type="button" value="Print" onClick="getpostdata();" />
! 99: </td>
! 100: </form>
! 101:
1.24 albertel 102: </tr>
103: <tr valign="middle">
104: <form name="rpublisher" action="/adm/retrieve" target="_parent" method="post">
105: <td bgcolor="#ccddaa" align="center">
106: <input type="hidden" name="filename" value="" />
107: <input type="button" value="Retrieve Old Version" onClick="getrfilename();" />
108: </td>
109: </form>
1.25 ! albertel 110: <form name="del" action="/adm/cfile" target="_parent" method="post">
! 111: <td bgcolor="#ccddaa">
! 112: <input type="hidden" name="filename" value="" />
! 113: <input type="hidden" name="action" value="delete" />
! 114: <input type="button" value="Delete" onClick="getdelfilename();" />
1.24 albertel 115: </td>
116: </form>
117: <form name="fileaction" action="/adm/cfile" target="_parent" method="post">
118: <td bgcolor="#ccddaa" align="center">
119: <nobr>
120: <input type="hidden" name="filename" value="" />
121: <select name="action">
122: <option>Select Action</option>
123: <option value="newfile">New file:</option>
124: <option value="newhtmlfile">New HTML file:</option>
125: <option value="newproblemfile">New problem:</option>
1.25 ! albertel 126: <option value="newdir">New subdirectory:</option>
1.24 albertel 127: <option value="rename">Rename current file to:</option>
128: <option value="copy">Copy current file to:</option>
1.25 ! albertel 129: </select> <input type="text" name="newfilename" value="Type Name Here" onFocus="if (this.value == 'Type Name Here') this.value=''" /> <input type="button" value="Go" onClick="getactionfilename();" />
1.24 albertel 130: </nobr>
131: </td>
132: </form>
133: </td>
134: </form>
135: </tr>
136: </table>
137: </th>
138: </tr>
139: </table>
140: </font>
141: </body>
142: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>