[LON-CAPA-cvs] cvs: loncom /publisher lonpubdir.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 14 Jul 2005 21:31:35 -0000


raeburn		Thu Jul 14 17:31:35 2005 EDT

  Modified files:              
    /loncom/publisher	lonpubdir.pm 
  Log:
  Include ability to delete directories in remoteless CSTR. part of bug 1860.
  
  
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.87 loncom/publisher/lonpubdir.pm:1.88
--- loncom/publisher/lonpubdir.pm:1.87	Thu Jul 14 14:27:35 2005
+++ loncom/publisher/lonpubdir.pm	Thu Jul 14 17:31:34 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.87 2005/07/14 18:27:35 raeburn Exp $
+# $Id: lonpubdir.pm,v 1.88 2005/07/14 21:31:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -233,6 +233,11 @@
             document.printdir.postdata.value=theform.filename.value
             document.printdir.submit();
         }
+        if (theform.dirtask.options[theform.dirtask.selectedIndex].value == "delete") {
+              var delform = document.delresource
+              delform.filename.value = theform.filename.value
+              delform.submit()
+        }
     }
   
     function checkUpload(theform) {
@@ -259,6 +264,11 @@
             theform.postdata.value = theform.filename.value
             theform.submit()
         }
+        if (theform.diraction.options[theform.diraction.selectedIndex].value == "delete") {
+              var delform = document.delresource
+              delform.filename.value = theform.filename.value
+              delform.submit()
+        }
         return
     }
     function SetResChoice(theform) {
@@ -325,8 +335,8 @@
                                        mcdi => 'Must create new subdirectory inside a directory',
                                        pubr => 'Publish this Resource',
                                        pubd => 'Publish this Directory',
+                                       dedr => 'Delete Directory',
                                        rtrv => 'Retrieve Old Version',
-                                       pubs => 'Publish with Subdirectories',
                                        list => 'List Directory',
                                        uplo => 'Upload file',  
                                        dele => 'Delete',
@@ -366,6 +376,7 @@
             <option value="publish">$lt{'pubd'}</option>
             <option value="editcat">$lt{'edit'}</option>
             <option value="printdir">$lt{'prnt'}</option>
+            <option value="delete">$lt{'dedr'}</option>
            </select>
            <input type="hidden" name="filename" value="/~$uname$thisdisfn/" />
           </form>
@@ -519,6 +530,7 @@
                       '<option value="publish">'.&mt('Publish').'</option>'.
                       '<option value="editcat">'.&mt('Edit catalog information').'</option>'.
                       '<option value="printdir">'.&mt('Print directory').'</option>'.
+                      '<option value="delete">'.&mt('Delete directory').'</option>'.
                     '</select>'.
                      '<input type="hidden" name="filename" value="'.&HTML::Entities::encode($dirpath.'/'.$dirname,'<>&"').'/" />'.
                      '<input type="hidden" name="openname" value="'.$here.'/'.$dirname.'/" />'.