web/facet.py
changeset 949 1fba39d6ee70
parent 536 781cd9fccbaa
child 985 6a25c58a1c23
--- a/web/facet.py	Tue Feb 24 20:59:46 2009 +0100
+++ b/web/facet.py	Wed Feb 25 09:30:30 2009 +0100
@@ -507,10 +507,7 @@
     def _render(self):
         title = html_escape(self.facet.title)
         facetid = html_escape(self.facet.id)
-        if len(self.items) > 6:
-            self.w(u'<div id="%s" class="facet overflowed">\n' % facetid)
-        else:
-            self.w(u'<div id="%s" class="facet">\n' % facetid)
+        self.w(u'<div id="%s" class="facet">\n' % facetid)
         self.w(u'<div class="facetTitle" cubicweb:facetName="%s">%s</div>\n' %
                (html_escape(facetid), title))
         if self.facet.support_and():
@@ -523,6 +520,8 @@
         cssclass = ''
         if not self.facet.start_unfolded:
             cssclass += ' hidden'
+        if len(self.items) > 6:
+            cssclass +=' overflowed'
         self.w(u'<div class="facetBody%s">\n' % cssclass)
         for item in self.items:
             item.render(self.w)