web/facet.py
changeset 7070 5f8e52d722c5
parent 6681 674461009c7c
child 7117 44775b275d45
--- a/web/facet.py	Thu Mar 10 12:03:37 2011 +0100
+++ b/web/facet.py	Thu Mar 10 12:04:46 2011 +0100
@@ -1169,11 +1169,11 @@
     def _render(self):
         if self.selected:
             cssclass = ' facetValueSelected'
-            imgsrc = self._cw.datadir_url + self.selected_img
+            imgsrc = self._cw.data_url(self.selected_img)
             imgalt = self._cw._('selected')
         else:
             cssclass = ''
-            imgsrc = self._cw.datadir_url + self.unselected_img
+            imgsrc = self._cw.data_url(self.unselected_img)
             imgalt = self._cw._('not selected')
         self.w(u'<div class="facetValue facetCheckBox%s" cubicweb:value="%s">\n'
                % (cssclass, xml_escape(unicode(self.value))))
@@ -1198,11 +1198,11 @@
         self.w(u'<div id="%s" class="facet">\n' % facetid)
         if self.selected:
             cssclass = ' facetValueSelected'
-            imgsrc = self._cw.datadir_url + self.selected_img
+            imgsrc = self._cw.data_url(self.selected_img)
             imgalt = self._cw._('selected')
         else:
             cssclass = ''
-            imgsrc = self._cw.datadir_url + self.unselected_img
+            imgsrc = self._cw.data_url(self.unselected_img)
             imgalt = self._cw._('not selected')
         self.w(u'<div class="facetValue facetCheckBox%s" cubicweb:value="%s">\n'
                % (cssclass, xml_escape(unicode(self.value))))