equal
deleted
inserted
replaced
716 cssclass = '' |
716 cssclass = '' |
717 imgsrc = self.req.datadir_url + self.unselected_img |
717 imgsrc = self.req.datadir_url + self.unselected_img |
718 imgalt = self.req._('not selected') |
718 imgalt = self.req._('not selected') |
719 self.w(u'<div class="facetValue facetCheckBox%s" cubicweb:value="%s">\n' |
719 self.w(u'<div class="facetValue facetCheckBox%s" cubicweb:value="%s">\n' |
720 % (cssclass, xml_escape(unicode(self.value)))) |
720 % (cssclass, xml_escape(unicode(self.value)))) |
721 self.w(u'<img src="%s" alt="%s"/> ' % (imgsrc, imgalt)) |
721 self.w(u'<img src="%s" alt="%s"/> ' % (imgsrc, imgalt)) |
722 self.w(u'<a href="javascript: {}">%s</a>' % xml_escape(self.label)) |
722 self.w(u'<a href="javascript: {}">%s</a>' % xml_escape(self.label)) |
723 self.w(u'</div>') |
723 self.w(u'</div>') |
724 |
724 |
725 class CheckBoxFacetWidget(HTMLWidget): |
725 class CheckBoxFacetWidget(HTMLWidget): |
726 selected_img = "black-check.png" |
726 selected_img = "black-check.png" |
745 imgsrc = self.req.datadir_url + self.unselected_img |
745 imgsrc = self.req.datadir_url + self.unselected_img |
746 imgalt = self.req._('not selected') |
746 imgalt = self.req._('not selected') |
747 self.w(u'<div class="facetValue facetCheckBox%s" cubicweb:value="%s">\n' |
747 self.w(u'<div class="facetValue facetCheckBox%s" cubicweb:value="%s">\n' |
748 % (cssclass, xml_escape(unicode(self.value)))) |
748 % (cssclass, xml_escape(unicode(self.value)))) |
749 self.w(u'<div class="facetCheckBoxWidget">') |
749 self.w(u'<div class="facetCheckBoxWidget">') |
750 self.w(u'<img src="%s" alt="%s" cubicweb:unselimg="true" /> ' % (imgsrc, imgalt)) |
750 self.w(u'<img src="%s" alt="%s" cubicweb:unselimg="true" /> ' % (imgsrc, imgalt)) |
751 self.w(u'<label class="facetTitle" cubicweb:facetName="%s"><a href="javascript: {}">%s</a></label>' % (facetid, title)) |
751 self.w(u'<label class="facetTitle" cubicweb:facetName="%s"><a href="javascript: {}">%s</a></label>' % (facetid, title)) |
752 self.w(u'</div>\n') |
752 self.w(u'</div>\n') |
753 self.w(u'</div>\n') |
753 self.w(u'</div>\n') |
754 self.w(u'</div>\n') |
754 self.w(u'</div>\n') |
755 |
755 |
756 class FacetSeparator(HTMLWidget): |
756 class FacetSeparator(HTMLWidget): |
757 def __init__(self, label=None): |
757 def __init__(self, label=None): |
758 self.label = label or u' ' |
758 self.label = label or u' ' |
759 |
759 |
760 def _render(self): |
760 def _render(self): |
761 pass |
761 pass |