Annotation of loncom/publisher/publisher.html, revision 1.12
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:
1.12 ! www 52: function getcpfilename() {
! 53: document.cp.filename.value=parent.LONCAPAToBePublished.location.href;
! 54: document.cp.submit();
! 55: }
! 56:
1.11 www 57: function getnewdirfilename() {
58: document.newdir.filename.value=parent.LONCAPAToBePublished.location.href;
59: if ((document.newdir.filename.value.charAt(
60: document.newdir.filename.value.length-1)!='/') &&
61: (document.newdir.filename.value.indexOf('/adm/pubdir')==-1)) {
62: alert('Must create new subdirectory inside a directory');
63: } else {
64: document.newdir.submit();
65: }
66: }
67:
1.1 www 68: </script>
69: </head>
70: <body bgcolor="#FFFFFF">
1.9 www 71: <table border=2><tr><td>
1.7 www 72: <form name="publisher" action="/adm/publish" target="_parent" method="post">
1.1 www 73: <input type="hidden" name="filename" value="">
1.7 www 74: <input type="button" value="Publish this Resource" onClick="getfilename();">
1.11 www 75: </form>
76: </td><td>
1.5 www 77: <form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished"
1.6 www 78: method="post">
1.4 www 79: <input type="hidden" name="filename" value="">
1.6 www 80: <input type="button" value="List Directory" onClick="getdfilename();">
1.4 www 81: </form></td><td>
1.8 www 82: <form name="rpublisher" action="/adm/retrieve" target="_parent" method="post">
1.4 www 83: <input type="hidden" name="filename" value="">
1.8 www 84: <input type="button" value="Retrieve Old Version" onClick="getrfilename();">
1.4 www 85: </form></td><td>
1.9 www 86: <form name="upublisher" action="/adm/upload" target="_parent"
87: method="post" enctype="multipart/form-data">
88: <input type="hidden" name="filename" value="">
1.11 www 89: <input type="file" name="upfile" size="10">
1.9 www 90: <input type="button" value="Upload file" onClick="getufilename();">
91: </form>
1.11 www 92: </td></tr>
93: <tr>
94: <td>
95: <form name="del" action="/adm/cfile" target="_parent" method="post">
96: <input type="hidden" name="filename" value="">
97: <input type="hidden" name="action" value="delete">
98: <input type="button" value="Delete" onClick="getdelfilename();">
1.12 ! www 99: </form></td><td>
! 100: <form name="cp" action="/adm/cfile" target="_parent" method="post">
! 101: <input type="hidden" name="filename" value="">
! 102: <input type="hidden" name="action" value="copy">
! 103: <input type="text" size=15 name="newfilename" value="">
! 104: <input type="button" value="Copy" onClick="getcpfilename();">
! 105: </form></td><td>
! 106: <form name="rename" action="/adm/cfile" target="_parent" method="post">
1.11 www 107: <input type="hidden" name="filename" value="">
108: <input type="hidden" name="action" value="rename">
109: <input type="text" size=15 name="newfilename" value="">
110: <input type="button" value="Rename" onClick="getrenamefilename();">
111: </form></td><td>
112: <form name="newdir" action="/adm/cfile" target="_parent" method="post">
113: <input type="hidden" name="filename" value="">
114: <input type="hidden" name="action" value="newdir">
115: <input type="text" size=15 name="newfilename" value="">
116: <input type="button" value="New Subdirectory" onClick="getnewdirfilename();">
117: </form></td>
118: </tr>
119: </table>
1.1 www 120: </body>
1.11 www 121: </html>
122:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>