diff -r ae4cb4153490 -r 56300bec75f8 web/facet.py --- a/web/facet.py Thu Jul 07 11:33:55 2011 +0200 +++ b/web/facet.py Thu Jul 07 11:34:05 2011 +0200 @@ -1304,10 +1304,10 @@ def _render(self): w = self.w title = xml_escape(self.facet.title) - facetid = xml_escape(self.facet.__regid__) + facetid = make_uid(self.facet.__regid__) w(u'
\n' % facetid) w(u'
%s
\n' % - (xml_escape(facetid), title)) + (xml_escape(self.facet.__regid__), title)) if self.facet._support_and_compat(): _ = self.facet._cw._ w(u'''\n' % (facetid, self.value or u'')) w(u'
\n') @@ -1362,13 +1362,13 @@ slide: function(event, ui) { jQuery('#%(sliderid)s_inf').html(_formatter(ui.values[0])); jQuery('#%(sliderid)s_sup').html(_formatter(ui.values[1])); - jQuery('input[name=%(facetid)s_inf]').val(ui.values[0]); - jQuery('input[name=%(facetid)s_sup]').val(ui.values[1]); + jQuery('input[name=%(facetname)s_inf]').val(ui.values[0]); + jQuery('input[name=%(facetname)s_sup]').val(ui.values[1]); } }); // use JS formatter to format value on page load - jQuery('#%(sliderid)s_inf').html(_formatter(jQuery('input[name=%(facetid)s_inf]').val())); - jQuery('#%(sliderid)s_sup').html(_formatter(jQuery('input[name=%(facetid)s_sup]').val())); + jQuery('#%(sliderid)s_inf').html(_formatter(jQuery('input[name=%(facetname)s_inf]').val())); + jQuery('#%(sliderid)s_sup').html(_formatter(jQuery('input[name=%(facetname)s_sup]').val())); ''' #'# make emacs happier def __init__(self, facet, minvalue, maxvalue): @@ -1385,18 +1385,21 @@ facet._cw.add_js('jquery.ui.js') facet._cw.add_css('jquery.ui.css') sliderid = make_uid('theslider') - facetid = xml_escape(self.facet.__regid__) + facetname = self.facet.__regid__ + facetid = make_uid(facetname) facet._cw.html_headers.add_onload(self.onload % { 'sliderid': sliderid, 'facetid': facetid, + 'facetname': facetname, 'minvalue': self.minvalue, 'maxvalue': self.maxvalue, 'formatter': self.formatter, }) title = xml_escape(self.facet.title) + facetname = xml_escape(facetname) w(u'
\n' % facetid) w(u'
%s
\n' % - (facetid, title)) + (facetname, title)) cssclass = 'facetBody' if not self.facet.start_unfolded: cssclass += ' hidden' @@ -1404,13 +1407,13 @@ w(u' - ' % (sliderid, sliderid)) w(u'' - % (facetid, self.minvalue)) + % (facetname, self.minvalue)) w(u'' - % (facetid, self.maxvalue)) + % (facetname, self.maxvalue)) w(u'' - % (facetid, self.minvalue)) + % (facetname, self.minvalue)) w(u'' - % (facetid, self.maxvalue)) + % (facetname, self.maxvalue)) w(u'
' % sliderid) w(u'
\n') w(u'\n') @@ -1477,7 +1480,7 @@ def _render(self): w = self.w title = xml_escape(self.facet.title) - facetid = xml_escape(self.facet.__regid__) + facetid = make_uid(self.facet.__regid__) w(u'
\n' % facetid) cssclass = 'facetValue facetCheckBox' if self.selected: @@ -1491,7 +1494,8 @@ % (cssclass, xml_escape(unicode(self.value)))) w(u'
') w(u'%s ' % (imgsrc, imgalt)) - w(u'' % (facetid, title)) + w(u'' + % (xml_escape(self.facet.__regid__), title)) w(u'
\n') w(u'
\n') w(u'\n')