make round corners optional on facet boxes
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 10 Dec 2008 18:39:41 +0100
changeset 205 8ea3294e7427
parent 204 4b01608c5397
child 206 9b7085d8fb2e
make round corners optional on facet boxes
web/views/facets.py
--- a/web/views/facets.py	Wed Dec 10 10:38:23 2008 +0100
+++ b/web/views/facets.py	Wed Dec 10 18:39:41 2008 +0100
@@ -34,6 +34,7 @@
     title = _('boxes_filter_box')
     visible = True # functionality provided by the search box by default
     order = 1
+    roundcorners = True
 
     def facetargs(self):
         """this method returns the list of extra arguments that should
@@ -55,7 +56,8 @@
         req = self.req
         req.add_js( ('cubicweb.ajax.js', 'cubicweb.formfilter.js') )
         req.add_css('cubicweb.facets.css')
-        req.html_headers.add_onload('jQuery(".facet").corner("tl br 10px");')
+        if self.roundcorners:
+            req.html_headers.add_onload('jQuery(".facet").corner("tl br 10px");')
         rset, vid, divid, paginate=self._get_context(view)
         if rset.rowcount < 2: # XXX done by selectors, though maybe necessary when rset has been hijacked
             return