\n' % facetid)
w(u'
%s
\n' %
- (facetid, title))
+ (xml_escape(self.facet.__regid__), title))
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'