--- loncom/publisher/publisher.html 2000/11/28 21:37:43 1.1 +++ loncom/publisher/publisher.html 2002/12/26 15:38:54 1.23 @@ -5,16 +5,146 @@ function getfilename() { document.publisher.filename.value=parent.LONCAPAToBePublished.location.href; + if ((document.publisher.filename.value.charAt( + document.publisher.filename.value.length-1)!='/') && + (document.publisher.filename.value.indexOf('/adm/pubdir')==-1)) { + document.publisher.submit(); + } else { + alert('Cannot publish directory'); + } } +function getdfilename() { + document.dpublisher.filename.value=parent.LONCAPAToBePublished.location.href; + if (document.dpublisher.filename.value.indexOf('/adm/pubdir')==-1) { + document.dpublisher.submit(); + } +} + +function getufilename() { + document.upublisher.filename.value=parent.LONCAPAToBePublished.location.href; + if (document.upublisher.filename.value.indexOf('/adm/pubdir')!=-1) { + document.upublisher.filename.value=document.dpublisher.filename.value; + } + document.upublisher.submit(); +} + +function getrfilename() { + document.rpublisher.filename.value=parent.LONCAPAToBePublished.location.href; + if ((document.rpublisher.filename.value.charAt( + document.rpublisher.filename.value.length-1)!='/') && + (document.rpublisher.filename.value.indexOf('/adm/pubdir')==-1)) { + document.rpublisher.submit(); + } else { + alert('Cannot retrieve directory'); + } +} + +function getdelfilename() { + document.del.filename.value=parent.LONCAPAToBePublished.location.href; + document.del.submit(); +} + +function getrenamefilename() { + document.rename.filename.value=parent.LONCAPAToBePublished.location.href; + document.rename.submit(); +} + +function getcpfilename() { + document.cp.filename.value=parent.LONCAPAToBePublished.location.href; + document.cp.submit(); +} + +function getnewdirfilename() { + document.newdir.filename.value=parent.LONCAPAToBePublished.location.href; + if (document.newdir.filename.value.indexOf('/adm/pubdir')!=-1) { + document.newdir.filename.value=document.dpublisher.filename.value; + } + if ((document.newdir.filename.value.charAt( + document.newdir.filename.value.length-1)!='/') && + (document.newdir.filename.value.indexOf('/adm/pubdir')==-1)) { + alert('Must create new subdirectory inside a directory'); + } else { + document.newdir.submit(); + } +} + +function getpostdata() { + document.printout.postdata.value=parent.LONCAPAToBePublished.location.href; + document.printout.submit(); +} -
-