File:
[LON-CAPA] /
loncom /
publisher /
publisher.html
Revision
1.41:
download - view:
text,
annotated -
select for diffs
Mon Dec 14 15:37:38 2009 UTC (14 years, 8 months ago) by
bisitz
Branches:
MAIN
CVS tags:
version_2_9_99_0,
version_2_12_X,
version_2_11_X,
version_2_11_5,
version_2_11_4_uiuc,
version_2_11_4_msu,
version_2_11_4,
version_2_11_3_uiuc,
version_2_11_3_msu,
version_2_11_3,
version_2_11_2_uiuc,
version_2_11_2_msu,
version_2_11_2_educog,
version_2_11_2,
version_2_11_1,
version_2_11_0_RC3,
version_2_11_0_RC2,
version_2_11_0_RC1,
version_2_11_0,
version_2_10_X,
version_2_10_1,
version_2_10_0_RC2,
version_2_10_0_RC1,
version_2_10_0,
loncapaMITrelate_1,
language_hyphenation_merge,
language_hyphenation,
bz6209-base,
bz6209,
PRINT_INCOMPLETE_base,
PRINT_INCOMPLETE,
HEAD,
BZ4492-merge,
BZ4492-feature_horizontal_radioresponse
Quick intermediate layout fix: CSTR header for remote control on mode
- Lighter background color and border
1: <html>
2: <head>
3: <title>LON-CAPA Publishing Frame</title>
4: <script type="text/javascript">
5: //<!--
6: function frameloc() {
7: if (parent.LONCAPAToBePublished.location.pathname.indexOf("/~")!=-1) {
8: parent.lastknownpriv=parent.LONCAPAToBePublished.location.pathname;
9: }
10: // alert ('We are at '+parent.lastknownpriv);
11: return unescape(parent.lastknownpriv);
12: }
13:
14: function getfilename() {
15: document.publisher.filename.value=frameloc();
16: if ((document.publisher.filename.value.charAt(
17: document.publisher.filename.value.length-1)!='/') &&
18: (document.publisher.filename.value.indexOf('/adm/pubdir')==-1)) {
19: document.publisher.submit();
20: } else {
21: alert('MT{Cannot publish directory}');
22: }
23: }
24:
25: function getdfilename() {
26: document.dpublisher.filename.value=frameloc();
27: if (document.dpublisher.filename.value.indexOf('/adm/pubdir')==-1) {
28: document.dpublisher.submit();
29: }
30: }
31:
32: function getufilename() {
33: document.upublisher.filename.value=frameloc();
34: if (document.upublisher.filename.value.indexOf('/adm/pubdir')!=-1) {
35: document.upublisher.filename.value=document.dpublisher.filename.value;
36: }
37: document.upublisher.submit();
38: }
39:
40: function getrfilename() {
41: document.rpublisher.filename.value=frameloc();
42: if ((document.rpublisher.filename.value.charAt(
43: document.rpublisher.filename.value.length-1)!='/') &&
44: (document.rpublisher.filename.value.indexOf('/adm/pubdir')==-1)) {
45: document.rpublisher.submit();
46: } else {
47: alert('MT{Cannot retrieve directory}');
48: }
49: }
50:
51: function getactionfilename() {
52: document.fileaction.filename.value=frameloc();
53: var test=document.fileaction.action.selectedIndex;
54: if (test == 8) { // trying to create a directory
55: if (document.fileaction.filename.value.indexOf('/adm/pubdir')!=-1) {
56: document.fileaction.filename.value=document.dpublisher.filename.value;
57: }
58: if ((document.fileaction.filename.value.charAt(
59: document.fileaction.filename.value.length-1)!='/') &&
60: (document.fileaction.filename.value.indexOf('/adm/pubdir')==-1)) {
61: alert('MT{Must create new subdirectory inside a directory}');
62: return;
63: }
64: }
65: document.fileaction.submit();
66: }
67:
68: function getdelfilename() {
69: document.del.filename.value=frameloc();
70: document.del.submit();
71: }
72:
73: function getcurseed() {
74: if (parent.LONCAPAToBePublished.document.lonhomework
75: &&
76: parent.LONCAPAToBePublished.document.lonhomework.rndseed
77: &&
78: parent.LONCAPAToBePublished.document.lonhomework.rndseed.value) {
79: return parent.LONCAPAToBePublished.document.lonhomework.rndseed.value;
80: }
81: return 0;
82: }
83:
84: function getproblemtype() {
85: if (parent.LONCAPAToBePublished.document.lonhomework
86: &&
87: parent.LONCAPAToBePublished.document.lonhomework.problemtype) {
88: if (parent.LONCAPAToBePublished.document.lonhomework.problemtype.value) {
89: return parent.LONCAPAToBePublished.document.lonhomework.problemtype.value;
90: }
91: if (parent.LONCAPAToBePublished.document.lonhomework.problemtype.options) {
92: var optionelement;
93: var valueIndex=0;
94: for (var optionIndex=0;
95: optionIndex < parent.LONCAPAToBePublished.document.lonhomework.problemtype.options.length;
96: optionIndex++)
97: {
98: optionElement=parent.LONCAPAToBePublished.document.lonhomework.problemtype.options[optionIndex];
99: if (optionElement.selected) {
100: return optionElement.value;
101: }
102: }
103: }
104: }
105: return 0;
106: }
107:
108: function getpostdata() {
109: document.printout.postdata.value=frameloc();
110: document.printout.curseed.value=getcurseed();
111: document.printout.problemtype.value=getproblemtype();
112: document.printout.submit();
113: }
114: //-->
115: </script>
116: <style>
117: table.LC_publisher {
118: border-collapse:collapse;
119: }
120: .LC_publisher td {
121: border: 1px solid #C0C0C0;
122: padding: 2px;
123: }
124: </style>
125: </head>
126: <body>
127: <table class="LC_publisher">
128: <tr valign="middle">
129: <td align="center">
130: <form name="publisher" action="/adm/publish" target="_parent" method="post">
131: <input type="hidden" name="filename" value="" />
132: <input type="button" value="MT{Publish this Resource}" onclick="getfilename();" />
133: </form>
134: </td>
135: <td align="center">
136: <form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished" method="post">
137: <input type="hidden" name="filename" value="" />
138: <input type="button" value="MT{List Directory}" onclick="getdfilename();" />
139: </form>
140: </td>
141: <td valign="top" align="center">
142: <form name="upublisher" action="/adm/upload" target="_parent"
143: method="post" enctype="multipart/form-data">
144: <input type="hidden" name="filename" value="" />
145: <input type="file" name="upfile" size="20" />
146: <input type="button" value="MT{Upload file}" onclick="getufilename();" />
147: </form>
148: </td>
149: <td rowspan="2" align="center">
150: <form name="printout" target="_parent" action="/adm/printout" method="post" onsubmit="getpostdata();">
151: <input type="hidden" name="postdata" value="" />
152: <input type="hidden" name="curseed" value="" />
153: <input type="hidden" name="problemtype" value="" />
154: <input type="button" value="MT{Print}" onclick="getpostdata();" />
155: </form>
156: </td>
157:
158: </tr>
159: <tr valign="middle">
160: <td align="center">
161: <form name="rpublisher" action="/adm/retrieve" target="_parent" method="post">
162: <input type="hidden" name="filename" value="" />
163: <input type="button" value="MT{Retrieve Old Version}" onclick="getrfilename();" />
164: </form>
165: </td>
166: <td>
167: <form name="del" action="/adm/cfile" target="_parent" method="post">
168: <input type="hidden" name="filename" value="" />
169: <input type="hidden" name="action" value="delete" />
170: <input type="button" value="MT{Delete}" onclick="getdelfilename();" />
171: </form>
172: </td>
173: <td align="center">
174: <form name="fileaction" action="/adm/cfile" target="_parent" method="post" onsubmit="getactionfilename();">
175: <nobr>
176: <input type="hidden" name="filename" value="" />
177: <select name="action">
178: <option>MT{Select Action}</option>
179: <option value="newfile">MT{New file}:</option>
180: <option value="newhtmlfile">MT{New HTML file}:</option>
181: <option value="newproblemfile">MT{New problem}:</option>
182: <option value="newpagefile">MT{New assembled page}:</option>
183: <option value="newsequencefile">MT{New assembled sequence}:</option>
184: <option value="newrightsfile">MT{New custom rights file}:</option>
185: <option value="newstyfile">MT{New style file}:</option>
186: <option value="newlibraryfile">MT{New library file}:</option>
187: <option value="newdir">MT{New subdirectory}:</option>
188: <option value="rename">MT{Rename current file to}:</option>
189: <option value="move">MT{Move current file to}:</option>
190: <option value="copy">MT{Copy current file to}:</option>
191: </select> <input type="text" name="newfilename" value="MT{Type Name Here}" onfocus="if (this.value == 'MT{Type Name Here}') this.value=''" /> <input type="button" value="MT{Go}" onclick="getactionfilename();" />
192: </nobr>
193: </form>
194: </td>
195: </tr>
196: </table>
197: </body>
198: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>