[facet html] Add surrounding div with "facetBody" class to "has_text" facet. stable
authorFlorent Cayré <florent.cayre@gmail.com>
Thu, 01 May 2014 23:35:56 +0200
branchstable
changeset 9924 25fc84990ddc
parent 9923 da09975300aa
child 9925 aee99876eb10
[facet html] Add surrounding div with "facetBody" class to "has_text" facet. This makes its html structure consistent with the other facets and fixes both css and a javascript behaviour (hide the facet body when clicking on its title). Closes #3797501.
web/facet.py
--- a/web/facet.py	Fri Jun 13 11:00:41 2014 +0200
+++ b/web/facet.py	Thu May 01 23:35:56 2014 +0200
@@ -1515,9 +1515,11 @@
             cssclass += ' hideFacetBody'
         w(u'<div class="%s" cubicweb:facetName="%s">%s</div>\n' %
                (cssclass, xml_escape(self.facet.__regid__), title))
+        w(u'<div class="facetBody">\n')
         w(u'<input name="%s" type="text" value="%s" />\n' % (
                 xml_escape(self.facet.__regid__), self.value or u''))
         w(u'</div>\n')
+        w(u'</div>\n')
 
 
 class FacetRangeWidget(htmlwidgets.HTMLWidget):