merge 3.5
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 15 Sep 2009 14:13:59 +0200
branch3.5
changeset 3223 480b003cd31b
parent 3221 3422d2188940 (current diff)
parent 3222 8013f8e239e9 (diff)
child 3231 3ee43e2f8560
child 3233 7ac07c3a9659
merge
--- a/web/views/treeview.py	Tue Sep 15 14:10:52 2009 +0200
+++ b/web/views/treeview.py	Tue Sep 15 14:13:59 2009 +0200
@@ -24,7 +24,7 @@
     css_classes = 'treeview widget'
     title = _('tree view')
 
-    def call(self, subvid=None, treeid=None, initial_load=True):
+    def call(self, subvid=None, treeid=None, initial_load=True, initial_thru_ajax=False):
         if subvid is None:
             subvid = self.req.form.pop('treesubvid', 'oneline') # consume it
         if treeid is None:
@@ -32,7 +32,7 @@
             if treeid is None:
                 self.warning('Tree state won\'t be properly restored after next reload')
                 treeid = make_uid('throw away uid')
-        toplevel_thru_ajax = self.req.form.pop('treeview_top', False)
+        toplevel_thru_ajax = self.req.form.pop('treeview_top', False) or initial_thru_ajax
         toplevel = toplevel_thru_ajax or (initial_load and not self.req.form.get('fname'))
         ulid = ' '
         if toplevel: