Return to publisher.html CVS log | Up to [LON-CAPA] / loncom / publisher |
Bug #831 - Printout now opens "Full Screen" like all other handlers to avoid problems in trying to access frame-src of lower frame for other functions.
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; 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: } 15: } 16: 17: function getdfilename() { 18: document.dpublisher.filename.value=parent.LONCAPAToBePublished.location.href; 19: if (document.dpublisher.filename.value.indexOf('/adm/pubdir')==-1) { 20: document.dpublisher.submit(); 21: } 22: } 23: 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.filename.value=document.dpublisher.filename.value; 28: } 29: document.upublisher.submit(); 30: } 31: 32: function getrfilename() { 33: document.rpublisher.filename.value=parent.LONCAPAToBePublished.location.href; 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: } 41: } 42: 43: function getdelfilename() { 44: document.del.filename.value=parent.LONCAPAToBePublished.location.href; 45: document.del.submit(); 46: } 47: 48: function getrenamefilename() { 49: document.rename.filename.value=parent.LONCAPAToBePublished.location.href; 50: document.rename.submit(); 51: } 52: 53: function getcpfilename() { 54: document.cp.filename.value=parent.LONCAPAToBePublished.location.href; 55: document.cp.submit(); 56: } 57: 58: function getnewdirfilename() { 59: document.newdir.filename.value=parent.LONCAPAToBePublished.location.href; 60: if (document.newdir.filename.value.indexOf('/adm/pubdir')!=-1) { 61: document.newdir.filename.value=document.dpublisher.filename.value; 62: } 63: if ((document.newdir.filename.value.charAt( 64: document.newdir.filename.value.length-1)!='/') && 65: (document.newdir.filename.value.indexOf('/adm/pubdir')==-1)) { 66: alert('Must create new subdirectory inside a directory'); 67: } else { 68: document.newdir.submit(); 69: } 70: } 71: 72: function getpostdata() { 73: document.printout.postdata.value=parent.LONCAPAToBePublished.location.href; 74: document.printout.submit(); 75: } 76: </script> 77: </head> 78: <body bgcolor="#ccffff" text='#004400' link='#003333' vlink='#006666'> 79: <font size="-2"> 80: <table border=0><tr><th bgcolor="#004400" height=20> 81: <table border=0><tr valign="middle"> 82: <form name="publisher" action="/adm/publish" target="_parent" method="post"> 83: <td bgcolor="#ccffcc"> 84: <input type="hidden" name="filename" value=""> 85: <input type="button" value="Publish this Resource" onClick="getfilename();"> 86: </td></form> 87: <form name="dpublisher" action="/adm/pubdir" target="LONCAPAToBePublished" method="post"> 88: <td bgcolor="#ccffcc"> 89: <input type="hidden" name="filename" value=""> 90: <input type="button" value="List Directory" onClick="getdfilename();"> 91: </td></form> 92: <form name="cp" action="/adm/cfile" target="_parent" method="post" onSubmit="getcpfilename();"> 93: <td bgcolor="#ccffcc"> 94: <input type="hidden" name="filename" value=""> 95: <input type="hidden" name="action" value="copy"> 96: <input type="text" size=10 name="newfilename" value=""> 97: <input type="button" value="Copy" onClick="getcpfilename();"> 98: </td></form> 99: <form name="upublisher" action="/adm/upload" target="_parent" 100: method="post" enctype="multipart/form-data"> 101: <td bgcolor="#ccffcc" valign="top"> 102: <input type="hidden" name="filename" value=""> 103: <input type="file" name="upfile" size="10"> 104: <input type="button" value="Upload file" onClick="getufilename();"> 105: </td></form> 106: <form name="printout" target="_parent" action="/adm/printout" target="LONCAPAToBePublished" 107: method="post" onSubmit="getpostdata();"> 108: <td rowspan=2 bgcolor="#ccffcc"> 109: <input type="hidden" name="postdata" value=""> 110: <input type="button" value="Printout" onClick="getpostdata();"> 111: </td> 112: </form> 113: </tr> 114: 115: <tr valign="middle"> 116: <form name="rpublisher" action="/adm/retrieve" target="_parent" method="post"> 117: <td bgcolor="#ccffcc"> 118: <input type="hidden" name="filename" value=""> 119: <input type="button" value="Retrieve Old Version" onClick="getrfilename();"> 120: </td></form> 121: <form name="del" action="/adm/cfile" target="_parent" method="post"> 122: <td bgcolor="#ccffcc"> 123: <input type="hidden" name="filename" value=""> 124: <input type="hidden" name="action" value="delete"> 125: <input type="button" value="Delete" onClick="getdelfilename();"> 126: </td></form> 127: <form name="rename" action="/adm/cfile" target="_parent" method="post" onSubmit="getrenamefilename();"> 128: <td bgcolor="#ccffcc"> 129: <input type="hidden" name="filename" value=""> 130: <input type="hidden" name="action" value="rename"> 131: <input type="text" size=10 name="newfilename" value=""> 132: <input type="button" value="Rename" onClick="getrenamefilename();"> 133: </td></form> 134: <form name="newdir" action="/adm/cfile" target="_parent" method="post" onSubmit="getnewdirfilename();"> 135: <td bgcolor="#ccffcc"> 136: <input type="hidden" name="filename" value=""> 137: <input type="hidden" name="action" value="newdir"> 138: <input type="text" size=10 name="newfilename" value=""> 139: <input type="button" value="New Subdirectory" onClick="getnewdirfilename();"> 140: </td></form> 141: </tr> 142: </table> 143: </th></tr></table> 144: </font> 145: </body> 146: </html> 147: 148: 149: 150: