6.0.0-RC7
6/27/26

[#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/07 (6771 days ago)
Due
Updated 12/14/07 (6770 days ago)
Assigned
Resolved 12/14/07 (6770 days ago)
Milestone
Patch No

History
76 Chuck Hagenbuch Assigned to Chuck Hagenbuch
State ⇒ Resolved
 
295 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.
14 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?
328 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();


266 Jan Schneider Comment #2
State ⇒ Accepted
Reply to this comment
Patch?
2110 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