[facet] use facet name as input name for text widget (eg has_text)
we need to ba able to distinguish between text-inputs so we can write
a widget for a single facet that uses more than one text input.
This fix consists in the diff in cubicweb.facts.js; modifications in
facet.py result from this former.
--- a/web/data/cubicweb.facets.js Tue Jul 02 09:36:20 2013 +0200
+++ b/web/data/cubicweb.facets.js Mon Jul 08 17:38:10 2013 +0200
@@ -30,7 +30,7 @@
});
// FacetStringWidget (e.g. has-text)
$(this).find('input:text').each(function(){
- names.push(facetName);
+ names.push(this.name);
values.push(this.value);
});
});
--- a/web/facet.py Tue Jul 02 09:36:20 2013 +0200
+++ b/web/facet.py Mon Jul 08 17:38:10 2013 +0200
@@ -1517,7 +1517,8 @@
cssclass += ' hideFacetBody'
w(u'<div class="%s" cubicweb:facetName="%s">%s</div>\n' %
(cssclass, xml_escape(self.facet.__regid__), title))
- w(u'<input name="%s" type="text" value="%s" />\n' % (facetid, self.value or u''))
+ w(u'<input name="%s" type="text" value="%s" />\n' % (
+ xml_escape(self.facet.__regid__), self.value or u''))
w(u'</div>\n')