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