--- loncom/publisher/publisher.html 2000/11/28 22:15:11 1.2 +++ loncom/publisher/publisher.html 2001/06/23 18:26:40 1.11 @@ -5,17 +5,108 @@ 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.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 getnewdirfilename() { + document.newdir.filename.value=parent.LONCAPAToBePublished.location.href; + 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(); + } }
-