# HG changeset patch # User Sylvain Thénault # Date 1318574998 -7200 # Node ID ce64860b3cdc86e79e6d62725a545a8b37287121 # Parent 72d60e92134187ae73080cc7773186cbef10ad67 [facets] on the way to vidargs removal our roving on the table view, which leads to introduction of this feature, proved it was not the way to go. diff -r 72d60e921341 -r ce64860b3cdc web/data/cubicweb.facets.js --- a/web/data/cubicweb.facets.js Tue Oct 11 18:16:52 2011 +0200 +++ b/web/data/cubicweb.facets.js Fri Oct 14 08:49:58 2011 +0200 @@ -49,6 +49,7 @@ } +// XXX deprecate vidargs once TableView is gone function buildRQL(divid, vid, paginate, vidargs) { jQuery(CubicWeb).trigger('facets-content-loading', [divid, vid, paginate, vidargs]); var $form = $('#' + divid + 'Form'); @@ -77,7 +78,7 @@ copyParam(zipped, extraparams, 'vid'); extraparams['divid'] = divid; copyParam(zipped, extraparams, 'divid'); - copyParam(zipped, extraparams, 'subvid'); + copyParam(zipped, extraparams, 'subvid'); // XXX deprecate once TableView is gone copyParam(zipped, extraparams, 'fromformfilter'); // paginate used to know if the filter box is acting, in which case we // want to reload action box to match current selection (we don't want diff -r 72d60e921341 -r ce64860b3cdc web/views/facets.py --- a/web/views/facets.py Tue Oct 11 18:16:52 2011 +0200 +++ b/web/views/facets.py Fri Oct 14 08:49:58 2011 +0200 @@ -128,7 +128,7 @@ needs_css = ['cubicweb.facets.css'] roundcorners = True - def generate_form(self, w, rset, divid, vid, vidargs, + def generate_form(self, w, rset, divid, vid, vidargs=None, paginate=False, cssclass='', **hiddens): """display a form to filter some view's content @@ -161,7 +161,11 @@ if self.roundcorners: self._cw.html_headers.add_onload( 'jQuery(".facet").corner("tl br 10px");') - # drop False / None values from vidargs + if vidargs is not None: + warn("[3.14] vidargs is deprecated. Maybe you're using some TableView?", + DeprecationWarning, stacklevel=2) + else: + vidargs = {} vidargs = dict((k, v) for k, v in vidargs.iteritems() if v) facetargs = xml_escape(json_dumps([divid, vid, paginate, vidargs])) w(u'
\n')