web/facet.py
changeset 8867 6ad000b91347
parent 8748 f5027f8d2478
parent 8866 64f24ecad177
child 9135 d42540bacff4
equal deleted inserted replaced
8852:59a29405688c 8867:6ad000b91347
    64 
    64 
    65 from rql import nodes, utils
    65 from rql import nodes, utils
    66 
    66 
    67 from cubicweb import Unauthorized
    67 from cubicweb import Unauthorized
    68 from cubicweb.schema import display_name
    68 from cubicweb.schema import display_name
    69 from cubicweb.uilib import css_em_num_value
    69 from cubicweb.uilib import css_em_num_value, domid
    70 from cubicweb.utils import make_uid
    70 from cubicweb.utils import make_uid
    71 from cubicweb.predicates import match_context_prop, partial_relation_possible
    71 from cubicweb.predicates import match_context_prop, partial_relation_possible
    72 from cubicweb.appobject import AppObject
    72 from cubicweb.appobject import AppObject
    73 from cubicweb.web import RequestError, htmlwidgets
    73 from cubicweb.web import RequestError, htmlwidgets
    74 
    74 
  1447     scrollbar_padding_factor = 4
  1447     scrollbar_padding_factor = 4
  1448 
  1448 
  1449     def _render(self):
  1449     def _render(self):
  1450         w = self.w
  1450         w = self.w
  1451         title = xml_escape(self.facet.title)
  1451         title = xml_escape(self.facet.title)
  1452         facetid = make_uid(self.facet.__regid__)
  1452         facetid = domid(make_uid(self.facet.__regid__))
  1453         w(u'<div id="%s" class="facet">\n' % facetid)
  1453         w(u'<div id="%s" class="facet">\n' % facetid)
  1454         cssclass = 'facetTitle'
  1454         cssclass = 'facetTitle'
  1455         if self.facet.allow_hide:
  1455         if self.facet.allow_hide:
  1456             cssclass += ' hideFacetBody'
  1456             cssclass += ' hideFacetBody'
  1457         w(u'<div class="%s" cubicweb:facetName="%s">%s</div>\n' %
  1457         w(u'<div class="%s" cubicweb:facetName="%s">%s</div>\n' %