diff -r 1de67012837b -r 1fe089765187 web/facet.py --- a/web/facet.py Tue Jan 17 11:47:14 2012 +0100 +++ b/web/facet.py Tue Jan 17 11:48:25 2012 +0100 @@ -422,6 +422,7 @@ context = '' needs_update = False start_unfolded = True + allow_hide = True cw_rset = None # ensure facets have a cw_rset attribute def __init__(self, req, select=None, filtered_variable=None, @@ -1444,8 +1445,11 @@ title = xml_escape(self.facet.title) facetid = make_uid(self.facet.__regid__) w(u'
\n' % facetid) - w(u'
%s
\n' % - (xml_escape(self.facet.__regid__), title)) + cssclass = 'facetTitle' + if self.facet.allow_hide: + cssclass += ' hideFacetBody' + w(u'
%s
\n' % + (cssclass, xml_escape(self.facet.__regid__), title)) if self.facet._support_and_compat(): self._render_and_or(w) cssclass = 'facetBody vocabularyFacet' @@ -1501,8 +1505,11 @@ title = xml_escape(self.facet.title) facetid = make_uid(self.facet.__regid__) w(u'
\n' % facetid) - w(u'
%s
\n' % - (xml_escape(self.facet.__regid__), title)) + cssclass = 'facetTitle' + if self.facet.allow_hide: + cssclass += ' hideFacetBody' + w(u'
%s
\n' % + (cssclass, xml_escape(self.facet.__regid__), title)) w(u'\n' % (facetid, self.value or u'')) w(u'
\n') @@ -1560,8 +1567,11 @@ title = xml_escape(self.facet.title) facetname = xml_escape(facetname) w(u'
\n' % facetid) - w(u'
%s
\n' % - (facetname, title)) + cssclass = 'facetTitle' + if facet.allow_hide: + cssclass += ' hideFacetBody' + w(u'
%s
\n' % + (cssclass, facetname, title)) cssclass = 'facetBody' if not self.facet.start_unfolded: cssclass += ' hidden'