make js, css class variables stable
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Mon, 29 Jun 2009 19:07:08 +0200
branchstable
changeset 2210 b40131032ff1
parent 2155 1dd3dfc6fd76
child 2211 7ff8f5133422
make js, css class variables
web/views/facets.py
--- a/web/views/facets.py	Tue Jun 23 20:04:15 2009 +0200
+++ b/web/views/facets.py	Mon Jun 29 19:07:08 2009 +0200
@@ -37,7 +37,9 @@
     visible = True # functionality provided by the search box by default
     order = 1
     roundcorners = True
-
+    css_facets = 'cubicweb.facets.css'
+    js = ('cubicweb.ajax.js', 'cubicweb.formfilter.js')
+    
     def facetargs(self):
         """this method returns the list of extra arguments that should
         be used by the facet
@@ -56,8 +58,8 @@
 
     def call(self, view=None):
         req = self.req
-        req.add_js( ('cubicweb.ajax.js', 'cubicweb.formfilter.js') )
-        req.add_css('cubicweb.facets.css')
+        req.add_js( self.js )
+        req.add_css( self.css_facets)
         if self.roundcorners:
             req.html_headers.add_onload('jQuery(".facet").corner("tl br 10px");')
         rset, vid, divid, paginate = self._get_context(view)