6.0.0-beta1
7/28/25

[#5987] Remember the last folder tree view
Summary Remember the last folder tree view
Queue Trean
Type Enhancement
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester tinu (at) humbapa (dot) ch
Created 12/13/2007 (6437 days ago)
Due
Updated 12/14/2007 (6436 days ago)
Assigned
Resolved 12/14/2007 (6436 days ago)
Milestone
Patch No

History
12/14/2007 06:09:07 PM Chuck Hagenbuch Assigned to Chuck Hagenbuch
State ⇒ Resolved
 
12/14/2007 05:27:29 PM tinu (at) humbapa (dot) ch Comment #5 Reply to this comment
Committed with a little bit of code tweaking, thanks. Does that close
this ticket, though?
would still be nice to have the option to "Remember the last view" and 
maybe also to redirect to the last folder I was in. but I'm not so 
familiar with the AJAX stuff and the current solution solved my 
problem with a very long folder tree... :-)

so I suggest to close the ticket for now.
12/14/2007 04:59:01 PM Chuck Hagenbuch Comment #4
State ⇒ Feedback
Reply to this comment
Committed with a little bit of code tweaking, thanks. Does that close 
this ticket, though?
12/14/2007 08:37:32 AM tinu (at) humbapa (dot) ch Comment #3 Reply to this comment
Patch?
I saw that there already exists a not activated preference named 
expand_tree. my patch to templates/browse.php now implements this.



when I try to attach a file whups says: Unable to create VFS directory.

so I paste it directly here:



Index: templates/browse.php

===================================================================

RCS file: /repository/trean/templates/browse.php,v

retrieving revision 1.8

diff -u -r1.8 browse.php

--- templates/browse.php        5 Jun 2007 06:35:34 -0000        1.8

+++ templates/browse.php        14 Dec 2007 08:09:58 -0000

@@ -119,7 +119,9 @@

      foreach ($folders as $tfn => $tf) {

          $params['class'] = ($tf->getId() == 
$GLOBALS['folder']->getId()) ? 'selected' : null;

          $params['url'] = Horde::applicationUrl('browse.php?f=' . 
$tf->getId());

-        $tree->addNode($tf->getId(), $tf->getParent(), 
$tf->get('name'), substr_count($tfn, ':'), true, $params);

+        $level = substr_count($tfn, ':');

+        $expand = ($prefs->getValue('expand_tree') == 'none') ? false 
: (($prefs->getValue('expand_tree') == 'all') ? true : 
(($prefs->getValue('expand_tree') == 'first' && $level == 0) ? true : 
false));

+        $tree->addNode($tf->getId(), $tf->getParent(), 
$tf->get('name'), $level, $expand, $params);

      }



      echo $tree->renderTree();


12/13/2007 06:20:26 PM Jan Schneider Comment #2
State ⇒ Accepted
Reply to this comment
Patch?
12/13/2007 10:22:21 AM tinu (at) humbapa (dot) ch Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Remember the last folder tree view
Queue ⇒ Trean
State ⇒ New
Reply to this comment
add a new preference to set the behavior of the folder tree. e.g.:



Expand the entire folder tree by default?

-> No / Yes / Remember the last view

Saved Queries