--- loncom/publisher/publisher.html 2001/04/02 21:28:58 1.6 +++ loncom/publisher/publisher.html 2003/02/04 20:33:19 1.24 @@ -5,6 +5,13 @@ 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() { @@ -14,30 +21,109 @@ function getdfilename() { } } +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 getactionfilename() { + document.fileaction.filename.value=parent.LONCAPAToBePublished.location.href; + var test=document.fileaction.action.selectedIndex; + if (test == 4) { // trying to create a directory + if (document.fileaction.filename.value.indexOf('/adm/pubdir')!=-1) { + document.fileaction.filename.value=document.dpublisher.filename.value; + } + if ((document.fileaction.filename.value.charAt( + document.fileaction.filename.value.length-1)!='/') && + (document.fileaction.filename.value.indexOf('/adm/pubdir')==-1)) { + alert('Must create new subdirectory inside a directory'); + return; + } + } + document.fileaction.submit(); +} + +function getpostdata() { + document.printout.postdata.value=parent.LONCAPAToBePublished.location.href; + document.printout.submit(); +} - - -
-
- - -
-
- - -
-
- - -
-LON-CAPA Construction Space -
- - \ No newline at end of file + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + + +
+ + +
+ + +
+ + +    + +
+
+
+ +