[primary] RsetBox view should give dispctrl & all to its subview. Also, don't use csv when in boxes.
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 13 Oct 2010 16:18:20 +0200
changeset 6479 16a402e91a54
parent 6478 8098e1295cf0
child 6480 2e3dabe00987
[primary] RsetBox view should give dispctrl & all to its subview. Also, don't use csv when in boxes.
web/views/boxes.py
--- a/web/views/boxes.py	Wed Oct 13 16:17:37 2010 +0200
+++ b/web/views/boxes.py	Wed Oct 13 16:18:20 2010 +0200
@@ -222,7 +222,12 @@
         w(self.cw_extra_kwargs['title'])
 
     def render_body(self, w):
-        self._cw.view(self.cw_extra_kwargs['vid'], self.cw_rset, w=w)
+        if 'dispctrl' in self.cw_extra_kwargs:
+            # XXX do not modify dispctrl!
+            self.cw_extra_kwargs['dispctrl'].setdefault('subvid', 'outofcontext')
+            self.cw_extra_kwargs['dispctrl'].setdefault('use_list_limit', 1)
+        self._cw.view(self.cw_extra_kwargs['vid'], self.cw_rset, w=w,
+                      initargs=self.cw_extra_kwargs)
 
  # helper classes ##############################################################
 
@@ -238,6 +243,7 @@
         if 'dispctrl' in self.cw_extra_kwargs:
             # XXX do not modify dispctrl!
             self.cw_extra_kwargs['dispctrl'].setdefault('subvid', 'outofcontext')
+            self.cw_extra_kwargs['dispctrl'].setdefault('use_list_limit', 1)
         box = self._cw.vreg['ctxcomponents'].select(
             'rsetbox', self._cw, rset=self.cw_rset, vid='autolimited',
             title=title, **self.cw_extra_kwargs)