diff -r 8a7f619fce96 -r 915b4c6ffe5e web/data/cubicweb.formfilter.js --- a/web/data/cubicweb.formfilter.js Thu Jan 15 14:39:19 2009 +0100 +++ b/web/data/cubicweb.formfilter.js Thu Jan 15 15:58:13 2009 +0100 @@ -109,10 +109,9 @@ root = root || document; jQuery(root).find('form').each(function () { var form = jQuery(this); - var facetargs = form.attr('cubicweb:facetargs'); - if (facetargs) { + var facetargs = evalJSON(form.attr('cubicweb:facetargs')); + if (facetargs !== undefined && facetargs.length) { form.submit(function() { - var facetargs = evalJSON(form.attr('cubicweb:facetargs')); buildRQL.apply(null, facetargs); //(divid, vid, paginate, extraargs); return false; }); @@ -122,7 +121,6 @@ this.setAttribute('cubicweb:idx', i); }); facet.find('div.facetCheckBox').click(function () { - var facetargs = evalJSON(form.attr('cubicweb:facetargs')); var $this = jQuery(this); if ($this.hasClass('facetValueSelected')) { $this.removeClass('facetValueSelected');