Index: manager.php
===================================================================
RCS file: /repository/gollem/manager.php,v
retrieving revision 1.45
diff -U2 -r1.45 manager.php
--- manager.php	11 Dec 2002 17:39:51 -0000	1.45
+++ manager.php	16 Dec 2002 15:05:20 -0000
@@ -52,4 +52,12 @@
     break;
 
+case GOLLEM_CHANGE_DIRECTORY:
+    if (array_key_exists('change_directory', $_POST) &&
+        !empty($_POST['change_directory'])) {
+        $_SESSION['gollem']['dir'] = $_POST['change_directory'];
+        Gollem::setLabel();
+    }
+    break;
+
 case GOLLEM_RENAME_ITEMS:
     $new = explode('|', $_POST['new_names']);
Index: lib/Gollem.php
===================================================================
RCS file: /repository/gollem/lib/Gollem.php,v
retrieving revision 1.67
diff -U2 -r1.67 Gollem.php
--- lib/Gollem.php	2 Oct 2002 04:04:29 -0000	1.67
+++ lib/Gollem.php	16 Dec 2002 15:05:21 -0000
@@ -274,4 +274,8 @@
     }
 
+    function changeDirectory($dir, $name)
+    {
+    }
+
     function createFolder($dir, $name)
     {
Index: lib/constants.php
===================================================================
RCS file: /repository/gollem/lib/constants.php,v
retrieving revision 1.4
diff -U2 -r1.4 constants.php
--- lib/constants.php	6 Aug 2002 17:10:35 -0000	1.4
+++ lib/constants.php	16 Dec 2002 15:05:21 -0000
@@ -12,4 +12,5 @@
 /** @const GOLLEM_CHMOD_MODIFY Modify a chmod.            */ define('GOLLEM_CHMOD_MODIFY', 108);
 /** @const GOLLEM_VIEW_FILE View a File.                  */ define('GOLLEM_VIEW_FILE', 109);
+/** @const GOLLEM_CHANGE_DIRECTORY Change active directory.                  */ define('GOLLEM_CHANGE_DIRECTORY', 110);
 
 // Sort types
Index: templates/manager/actions.inc
===================================================================
RCS file: /repository/gollem/templates/manager/actions.inc,v
retrieving revision 1.12
diff -U2 -r1.12 actions.inc
--- templates/manager/actions.inc	15 Jun 2002 05:03:53 -0000	1.12
+++ templates/manager/actions.inc	16 Dec 2002 15:05:21 -0000
@@ -7,4 +7,5 @@
         <select name="action<?php echo ++$i ?>" onchange="chooseAction(<?php echo $i ?>); document.manager.action<?php echo $i ?>.selectedIndex = 0;">
             <option selected="selected"><?php echo _("Choose Action:") ?></option>
+            <option value="<?php echo GOLLEM_CHANGE_DIRECTORY ?>"><?php echo _("Change Directory") ?></option>
             <option value="<?php echo GOLLEM_CREATE_FOLDER ?>"><?php echo _("Create Folder") ?></option>
             <?php if (@count($list)): ?>
Index: templates/manager/header.inc
===================================================================
RCS file: /repository/gollem/templates/manager/header.inc,v
retrieving revision 1.10
diff -U2 -r1.10 header.inc
--- templates/manager/header.inc	3 Jul 2002 20:20:42 -0000	1.10
+++ templates/manager/header.inc	16 Dec 2002 15:05:21 -0000
@@ -5,4 +5,5 @@
 <input type="hidden" name="old_names" value="" />
 <input type="hidden" name="chmod" value="" />
+<input type="hidden" name="change_directory" value="" />
 <table border="0" align="center" width="100%" cellpadding="0" cellspacing="0">
 <tr>
Index: templates/manager/javascript.inc
===================================================================
RCS file: /repository/gollem/templates/manager/javascript.inc,v
retrieving revision 1.9
diff -U2 -r1.9 javascript.inc
--- templates/manager/javascript.inc	6 Aug 2002 17:35:39 -0000	1.9
+++ templates/manager/javascript.inc	16 Dec 2002 15:05:21 -0000
@@ -41,4 +41,6 @@
     if (action == <?php echo GOLLEM_CREATE_FOLDER ?>) {
         createFolder();
+    } else if (action == <?php echo GOLLEM_CHANGE_DIRECTORY ?>) {
+        changeDirectory();
     } else if (checkedCount() == 0) {
         alert('<?php echo addslashes(_("Please select an item before this action.")) ?>');
@@ -63,4 +65,17 @@
     popup.style.visibility = 'visible';
     document.createfrm.foldername.focus();
+}
+
+function changeDirectory()
+{
+    for (var i = 0; i < document.manager.elements.length; i++) {
+        if (document.manager.elements[i].checked) {
+            document.manager.elements[i].checked = false;
+        }
+    } 
+
+    var popup = document.getElementById('changedirectory');
+    popup.style.visibility = 'visible';
+    document.cdfrm.foldername.focus();
 }
 
Index: templates/manager/prompts.inc
===================================================================
RCS file: /repository/gollem/templates/manager/prompts.inc,v
retrieving revision 1.1
diff -U2 -r1.1 prompts.inc
--- templates/manager/prompts.inc	6 Aug 2002 17:35:39 -0000	1.1
+++ templates/manager/prompts.inc	16 Dec 2002 15:05:21 -0000
@@ -136,4 +136,35 @@
 }
 
+function changedirectoryOK()
+{
+    var popup = document.getElementById('changedirectory');
+    popup.style.visibility = 'hidden';
+
+    if (document.cdfrm.foldername.value != '') {
+        document.manager.change_directory.value = document.cdfrm.foldername.value;
+        document.manager.actionID.value = <?php echo GOLLEM_CHANGE_DIRECTORY ?>;
+        document.manager.submit();
+    }
+}
+
+function changedirectoryKeyCheck(event)
+{
+    if (event.keyCode == 27) {
+        changedirectoryCancel();
+        return false;
+    } else if (event.keyCode == 13) {
+        changedirectoryOK();
+        return false;
+    }
+    return true;
+}
+
+function changedirectoryCancel()
+{
+    var popup = document.getElementById('changedirectory');
+    popup.style.visibility = 'hidden';
+    document.cdfrm.reset();
+}
+
 // -->
 </script>
@@ -241,4 +272,37 @@
         <td align="center" width="50%" colspan="2"><input class="button" type="button" value="<?php echo _('OK') ?>" onclick="createfolderOK();"></td>
         <td align="center" width="50%" colspan="2"><input class="button" type="button" value="<?php echo _('Cancel') ?>" onclick="createfolderCancel()"></td>
+    </tr>
+    <tr class="control">
+        <td align="center" width="100%" colspan="4" height="5"></td>
+    </tr>
+    </table>
+    </form>
+</div>
+
+<div id="changedirectory" style="background-color:black;position:absolute;left:200px;top:20px;width:200px;visibility:hidden;padding:1px">
+    <form name="cdfrm" onsubmit="return false;">
+    <table border="0" width="100%" cellpadding="2" cellspacing="0" class="text">
+    <tr>
+        <td width="100%" class="header" align="center" colspan="4">
+            <?php echo _('Change Directory') ?>
+        </td>
+    </tr>
+    <tr class="control">
+        <td align="center" width="100%" colspan="4" height="5"></td>
+    </tr>
+    <tr class="control">
+        <td align="right" width="35%">
+            <?php echo _("Go to:") ?>&nbsp;
+        </td>
+        <td align="center" colspan="3" width="65%">
+            <input class="input" type="text" name="foldername" value="" onkeypress="return changedirectoryKeyCheck(event)">
+        </td>
+    </tr>
+    <tr class="control">
+        <td align="center" width="100%" colspan="4" height="5"></td>
+    </tr>
+    <tr class="control">
+        <td align="center" width="50%" colspan="2"><input class="button" type="button" value="<?php echo _('OK') ?>" onclick="changedirectoryOK();"></td>
+        <td align="center" width="50%" colspan="2"><input class="button" type="button" value="<?php echo _('Cancel') ?>" onclick="changedirectoryCancel()"></td>
     </tr>
     <tr class="control">
